Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to merge dev into master #32

Merged
merged 122 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
8eff093
Create app with `rails new RecipeApp`
flemton Nov 14, 2023
00c2996
Delete app to create with postgresql
flemton Nov 14, 2023
0ec3089
Create app again with postgresql
flemton Nov 14, 2023
527f747
Set database user and password
flemton Nov 14, 2023
c1d16d7
Merge pull request #20 from flemton/feature/setup
flemton Nov 14, 2023
50ccc25
Create users migration
flemton Nov 14, 2023
6cf302e
Create Foods migration
flemton Nov 14, 2023
440ecc0
Add users foreign key in foods
flemton Nov 14, 2023
06af5b6
Create recipe_foods migration
flemton Nov 14, 2023
aa7edc2
Create recipe migration
flemton Nov 14, 2023
f74b183
Add foods and recipes foreign keys to recipe_foods
flemton Nov 14, 2023
2937afd
Add users foreign key to recipe
flemton Nov 14, 2023
350b742
Run migration to create schema.rb
flemton Nov 14, 2023
6c4dd39
Create User model class
flemton Nov 15, 2023
1ceca26
Create Food model class
flemton Nov 15, 2023
3837866
Create Recipe model class
flemton Nov 15, 2023
ccbeb3e
Create RecipeFood model class
flemton Nov 15, 2023
c869d0e
Add devise gem to Gemfile
flemton Nov 15, 2023
e143df8
Install devise with `rails generate devise:install`
flemton Nov 15, 2023
94ce77d
Configure devise
flemton Nov 15, 2023
2122f98
Copy devise views to project
flemton Nov 15, 2023
ce44129
Modify User model with devise
flemton Nov 15, 2023
38c2a7e
Run migration
flemton Nov 15, 2023
8860b18
Add confirmable to devise user
flemton Nov 15, 2023
07267f2
Update routes.rb
flemton Nov 15, 2023
899e436
Merge pull request #21 from flemton/feature/setup-models-and-database
JuanDiegoGuerra Nov 15, 2023
4d2a32a
Merge pull request #22 from flemton/feature/add-devise
JuanDiegoGuerra Nov 15, 2023
3418579
Quick Setup Fixes
JuanDiegoGuerra Nov 15, 2023
7aa2efd
Update Models
JuanDiegoGuerra Nov 15, 2023
ddcfdb5
Update: routes, seeds, tailwind file
JuanDiegoGuerra Nov 15, 2023
fd8b36a
Update application.html.erb
JuanDiegoGuerra Nov 15, 2023
c455d08
Create Test Files
JuanDiegoGuerra Nov 15, 2023
129bd61
Quick Extra Fixes
JuanDiegoGuerra Nov 16, 2023
79c4981
Update .gitignore
JuanDiegoGuerra Nov 16, 2023
4c33bcf
Fixing Rubocop Linter Errors
JuanDiegoGuerra Nov 16, 2023
e7d1963
Merge pull request #23 from flemton/setup_quick_fixes
JuanDiegoGuerra Nov 16, 2023
f5e4646
Add Controllers
JuanDiegoGuerra Nov 16, 2023
2c9ae8d
Add Helpers
JuanDiegoGuerra Nov 16, 2023
2acdf84
Create Views
JuanDiegoGuerra Nov 16, 2023
83fcb55
Update Routes + Create Empty Test Files
JuanDiegoGuerra Nov 16, 2023
e60c7f6
Create foods_controller_test.rb
flemton Nov 16, 2023
e62ff58
Create general_shopping_list_controller_test.rb
flemton Nov 16, 2023
a391d1e
Create public_recipes_controller_test.rb
flemton Nov 16, 2023
af188a6
Create recipes_controller_test.rb
flemton Nov 16, 2023
42ed008
Merge branch 'views_controllers' of https://github.com/flemton/Recipe…
flemton Nov 16, 2023
3c61b2a
Fixing Rubocop Linter Errors
JuanDiegoGuerra Nov 16, 2023
80b01b1
Merge pull request #24 from flemton/views_controllers
flemton Nov 16, 2023
f116736
Update Controllers
JuanDiegoGuerra Nov 16, 2023
3a3e130
Update Views
JuanDiegoGuerra Nov 16, 2023
185b86a
Add Views
JuanDiegoGuerra Nov 16, 2023
64b2cc5
Update Routes + Seeds
JuanDiegoGuerra Nov 16, 2023
2be9d7c
Update _food.html.erb
flemton Nov 16, 2023
c6ea67d
Update _recipe.html.erb
flemton Nov 16, 2023
dfb5a4c
Update _table.html.erb
flemton Nov 16, 2023
d6a293c
Fixing Rubocop Linter Errors
JuanDiegoGuerra Nov 16, 2023
12d7f33
Merge pull request #25 from flemton/food_recipe_list
JuanDiegoGuerra Nov 16, 2023
c12fee4
Add controllers
JuanDiegoGuerra Nov 16, 2023
393efdc
Update Models
JuanDiegoGuerra Nov 16, 2023
e0e6515
Update + Add Views
JuanDiegoGuerra Nov 16, 2023
9d6d67b
Update Migrations
JuanDiegoGuerra Nov 16, 2023
43cd14d
Update routes.rb
JuanDiegoGuerra Nov 16, 2023
759f8c4
Create recipe_foods_controller_test.rb
JuanDiegoGuerra Nov 16, 2023
45001a1
Add recipe foods creation form view
flemton Nov 16, 2023
72e343e
Add recipe foods edition view
flemton Nov 16, 2023
19c9dd8
Add recipe foods controller test
flemton Nov 16, 2023
2df1479
Merge pull request #26 from flemton/recipe_details_page
flemton Nov 16, 2023
24b5e97
Fixing Rubocop Linter Errors
JuanDiegoGuerra Nov 16, 2023
b8b6877
Updates (see details)
JuanDiegoGuerra Nov 16, 2023
f4ef55d
Show public recipes
flemton Nov 16, 2023
eaf4664
Fixing Rubocop Linter Errors
JuanDiegoGuerra Nov 16, 2023
6fcdf32
Merge branch 'public_recipes_pages-general_shopping_list' of https://…
JuanDiegoGuerra Nov 16, 2023
dc8fed6
Merge pull request #27 from flemton/public_recipes_pages-general_shop…
flemton Nov 16, 2023
6004496
Updates (see details)
JuanDiegoGuerra Nov 16, 2023
139c83b
Update Views
JuanDiegoGuerra Nov 16, 2023
a3b558d
Update development.rb
JuanDiegoGuerra Nov 16, 2023
8ee5af5
Update ability.rb
flemton Nov 16, 2023
a227d50
Add devise modules to user
flemton Nov 16, 2023
8a0ec87
Add more validations to recipe
flemton Nov 16, 2023
61181e1
Add more validations to food
flemton Nov 16, 2023
6c3b6d6
Fixing Rubocop Linter Errors
JuanDiegoGuerra Nov 16, 2023
e0ae89f
Merge pull request #28 from flemton/add-devise_and_cancancan
JuanDiegoGuerra Nov 16, 2023
13d469d
Update Depedencies
JuanDiegoGuerra Nov 17, 2023
4698e34
Update Controllers
JuanDiegoGuerra Nov 17, 2023
2c50807
Styling Views
JuanDiegoGuerra Nov 17, 2023
3dff7c0
Update README.md
JuanDiegoGuerra Nov 17, 2023
ff44f73
Prepare Files for Testing with RSpec
JuanDiegoGuerra Nov 17, 2023
612a0ec
Delete Unnecessary files
JuanDiegoGuerra Nov 17, 2023
9a55924
Update RSpec helpers
JuanDiegoGuerra Nov 17, 2023
77fda2f
Add food tests
flemton Nov 17, 2023
bd99a75
Add recipe food tests
flemton Nov 17, 2023
1c8b40e
Add recipe tests
flemton Nov 17, 2023
280649f
Add user tests
flemton Nov 17, 2023
55e6585
Add food index tests
flemton Nov 17, 2023
f227a6e
Add new food view tests
flemton Nov 17, 2023
98c6ed3
Add shopping list index tests
flemton Nov 17, 2023
e9509df
Add new recipe foods view tests
flemton Nov 17, 2023
ee803d7
Add recipes index tests
flemton Nov 17, 2023
405b01e
Add new recipe view tests
flemton Nov 17, 2023
867f380
Add public recipes tests
flemton Nov 17, 2023
982902b
Add show recipe tests
flemton Nov 17, 2023
0559615
Update Gemfile
flemton Nov 17, 2023
cd2826b
Update README.md
flemton Nov 17, 2023
bd024b2
Update LICENSE
flemton Nov 17, 2023
d0c6e79
Delete app_screenshot.png
flemton Nov 17, 2023
5556912
Merge pull request #30 from flemton/feature/READme
flemton Nov 17, 2023
f851526
Create linters.yml
flemton Nov 17, 2023
409c638
Add Rubocop to project
flemton Nov 17, 2023
f38c592
Fix rubocop errrors
flemton Nov 17, 2023
dde2ebc
Create .stylelintrc.json
flemton Nov 17, 2023
9945f81
Fix Stylelint errors
flemton Nov 17, 2023
6d6a1fa
Merge pull request #31 from flemton/feature/setup-linters
flemton Nov 17, 2023
2b9d0a9
Merge branch 'dev' into Styling_and_Testing
flemton Nov 17, 2023
960cef1
Fix linter errors
flemton Nov 17, 2023
6fe6e10
Fix CRLF error
flemton Nov 17, 2023
d3c0d56
Merge branch 'Styling_and_Testing' of https://github.com/flemton/Reci…
flemton Nov 17, 2023
bdf1713
DB Schema Quick Fix
JuanDiegoGuerra Nov 17, 2023
0c1c5de
Fix migrations
flemton Nov 17, 2023
20319ad
Add test host
flemton Nov 17, 2023
1ad507b
Fixed tests
flemton Nov 17, 2023
fc8d3cc
Update show.html.erb
flemton Nov 17, 2023
3721f8b
Fixed failed tests
flemton Nov 17, 2023
8a240db
Merge pull request #29 from flemton/Styling_and_Testing
flemton Nov 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.

# Mark the database schema as having been generated.
db/schema.rb linguist-generated

# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
44 changes: 44 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Linters

on: pull_request

env:
FORCE_COLOR: 1

jobs:
rubocop:
name: Rubocop
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-ruby@v1
with:
ruby-version: 3.1.x
- name: Setup Rubocop
run: |
gem install --no-document rubocop -v '>= 1.0, < 2.0' # https://docs.rubocop.org/en/stable/installation/
[ -f .rubocop.yml ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/ror/.rubocop.yml
- name: Rubocop Report
run: rubocop --color
stylelint:
name: Stylelint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Setup Stylelint
run: |
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/ror/.stylelintrc.json
- name: Stylelint Report
run: npx stylelint "**/*.{css,scss}"
nodechecker:
name: node_modules checker
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Check node_modules existence
run: |
if [ -d "node_modules/" ]; then echo -e "\e[1;31mThe node_modules/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."; echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future." && exit 1; fi
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep

/public/assets

# Ignore master key for decrypting credentials and more.
/config/master.key
/app/assets/builds/*
!/app/assets/builds/.keep

# Ignore node modules.
node_modules/
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
62 changes: 62 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
AllCops:
NewCops: enable
Exclude:
- "db/**/*"
- "bin/*"
- "config/**/*"
- "Guardfile"
- "Rakefile"
- "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:
AllowedMethods: ['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
Layout/EndOfLine:
EnforcedStyle: lf
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-3.2.2
32 changes: 32 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
]
}
],
"scss/at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
]
}
],
"csstree/validator": true
},
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css"]
}
80 changes: 80 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.2.2'

gem 'cancancan'

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem 'rails', '~> 7.0.8'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem 'sprockets-rails'

# Use postgresql as the database for Active Record
gem 'pg', '~> 1.1'

# Use the Puma web server [https://github.com/puma/puma]
gem 'puma', '~> 5.0'

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem 'importmap-rails'

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem 'turbo-rails'

# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem 'stimulus-rails'

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem 'jbuilder'

# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', require: false

# Use Sass to process CSS
# gem "sassc-rails"

# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem 'debug', platforms: %i[mri mingw x64_mingw]
gem 'rspec-rails'
end

group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem 'letter_opener'
gem 'web-console'

# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"

# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
end

group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem 'capybara'
gem 'selenium-webdriver'
end

gem 'devise'
gem 'rails-controller-testing'
gem 'rubocop', '>= 1.0', '< 2.0'
gem 'tailwindcss-rails', '~> 2.0'
Loading
Loading