-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Blasco9/feature
Merge feature to development
- Loading branch information
Showing
50 changed files
with
438 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
AllCops: | ||
Exclude: | ||
- "db/**/*" | ||
- "bin/*" | ||
- "config/**/*" | ||
- "Guardfile" | ||
- "Rakefile" | ||
- "README.md" | ||
- "node_modules/**/*" | ||
|
||
DisplayCopNames: true | ||
|
||
Layout/LineLength: | ||
Max: 120 | ||
Metrics/MethodLength: | ||
Include: | ||
- "app/controllers/*" | ||
- "app/models/*" | ||
Max: 20 | ||
Metrics/AbcSize: | ||
Include: | ||
- "app/controllers/*" | ||
- "app/models/*" | ||
Max: 50 | ||
Metrics/ClassLength: | ||
Max: 150 | ||
Metrics/BlockLength: | ||
ExcludedMethods: ['describe'] | ||
Max: 30 | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
Style/ClassAndModuleChildren: | ||
Enabled: false | ||
Style/EachForSimpleLoop: | ||
Enabled: false | ||
Style/AndOr: | ||
Enabled: false | ||
Style/DefWithParentheses: | ||
Enabled: false | ||
Style/FrozenStringLiteralComment: | ||
EnforcedStyle: never | ||
|
||
Layout/HashAlignment: | ||
EnforcedColonStyle: key | ||
Layout/ExtraSpacing: | ||
AllowForAlignment: false | ||
Layout/MultilineMethodCallIndentation: | ||
Enabled: true | ||
EnforcedStyle: indented | ||
|
||
Lint/RaiseException: | ||
Enabled: false | ||
Lint/StructNewOverride: | ||
Enabled: false | ||
Style/HashEachMethods: | ||
Enabled: false | ||
Style/HashTransformKeys: | ||
Enabled: false | ||
Style/HashTransformValues: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# add the linters you want stickler to use for this project | ||
linters: | ||
rubocop: | ||
display_cop_names: true | ||
# indicate where is the config file for stylelint | ||
config: './rubocop.yml' | ||
|
||
# add the files here you want to be ignored by stylelint | ||
files: | ||
ignore: | ||
- "bin/*" | ||
- "db/*" | ||
- "config/*" | ||
- "Guardfile" | ||
- "Rakefile" | ||
- "README.md" | ||
- "node_modules/**/*" | ||
|
||
# PLEASE DO NOT enable auto fixing options | ||
# if you need extra support from you linter - do it in your local env as described in README for this config | ||
|
||
# find full documentation here: https://stickler-ci.com/docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,53 @@ | ||
# README | ||
# Micro Reddit | ||
|
||
This README would normally document whatever steps are necessary to get the | ||
application up and running. | ||
> Micro clone of Reddit that only contains the models and tables required for users to post and comment | ||
Things you may want to cover: | ||
In this project I built the data structures necessary to support link submissions and commenting. The front-end is not built because the main purpose of this is to learn about models and associations. You can interact with the models in the rails console. | ||
|
||
* Ruby version | ||
## Built With | ||
|
||
* System dependencies | ||
- Ruby | ||
- Ruby on Rails | ||
|
||
* Configuration | ||
## Getting Started | ||
|
||
* Database creation | ||
You will need: | ||
- Ruby | ||
- Ruby on Rails | ||
- Bundler | ||
|
||
* Database initialization | ||
### Install | ||
|
||
* How to run the test suite | ||
`git clone git@github.com:Blasco9/micro-reddit.git` | ||
|
||
* Services (job queues, cache servers, search engines, etc.) | ||
### Usage | ||
|
||
* Deployment instructions | ||
`rails console` | ||
|
||
* ... | ||
Once in the console you can instantiate the models to check their fields, validations and relationships | ||
|
||
## Author | ||
|
||
👤 **Julian Blasco** | ||
|
||
- Github: [@Blasco9](https://github.com/Blasco9) | ||
- Linkedin: [Julian Blasco](https://www.linkedin.com/in/julian-augusto-blasco-1656a0153/) | ||
|
||
## 🤝 Contributing | ||
|
||
Contributions, issues and feature requests are welcome! | ||
|
||
Feel free to check the [issues page](issues/). | ||
|
||
## Show your support | ||
|
||
Give a ⭐️ if you like this project! | ||
|
||
## Acknowledgments | ||
|
||
- The Odin Project | ||
- Microverse | ||
|
||
## 📝 License | ||
|
||
This project is [MIT](lic.url) licensed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# Comment for rubocop | ||
module ApplicationHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Comment for rubocop | ||
class ApplicationRecord < ActiveRecord::Base | ||
self.abstract_class = true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Comment for rubocop | ||
class Comment < ApplicationRecord | ||
validates :content, presence: true | ||
|
||
belongs_to :user | ||
belongs_to :post | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Comment for rubocop | ||
class Post < ApplicationRecord | ||
validates :title, presence: true | ||
validates :body, presence: true | ||
|
||
belongs_to :user | ||
has_many :comments | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Comment for rubocop | ||
class User < ApplicationRecord | ||
validates :user_name, presence: true, length: { minimum: 4, maximum: 20 } | ||
validates :email, presence: true | ||
validates :password, presence: true | ||
|
||
has_many :posts | ||
has_many :comments | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) | ||
load Gem.bin_path('bundler', 'bundle') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.