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

Recipe-App #18

Open
wants to merge 70 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
659fa7d
Add linters
Daphineatim Feb 20, 2023
e830b08
Add foods controller
johnkioko Feb 21, 2023
41d4226
Add Users controller
johnkioko Feb 21, 2023
ad20389
Add food model
johnkioko Feb 21, 2023
3f680ed
Add view files for food
johnkioko Feb 21, 2023
de3be48
Create food Migrations
johnkioko Feb 21, 2023
6887d69
Create User migrations
johnkioko Feb 21, 2023
a02d0d9
Add tests for food
johnkioko Feb 21, 2023
212a048
Add tests for user model
johnkioko Feb 21, 2023
df3ea40
Create User and foods
johnkioko Feb 21, 2023
43c63d1
Update MIT license
johnkioko Feb 21, 2023
625f90b
Update Readme file
johnkioko Feb 21, 2023
841a1cd
Update Readme file
johnkioko Feb 21, 2023
1af1310
Update Readme file
johnkioko Feb 21, 2023
577871c
Update the key-features section of the Readme file
johnkioko Feb 21, 2023
f01dfd9
Update Readme file
johnkioko Feb 21, 2023
953d2b6
Update Readme file
johnkioko Feb 21, 2023
130dbe6
Create Login page and registration page
Daphineatim Feb 22, 2023
2a185b8
Configure routes for foods
johnkioko Feb 22, 2023
71ba4cf
Update user view
johnkioko Feb 22, 2023
4ec5352
Merge pull request #10 from Daphineatim/user-login
Daphineatim Feb 22, 2023
f43dd1f
Fix linter errors
johnkioko Feb 22, 2023
215d192
Merge branch 'dev' into foodlist-feature
johnkioko Feb 22, 2023
36c3ba2
Fix linter errors
johnkioko Feb 22, 2023
b1625f4
Modify files in the app folder to create a recipes list
Daphineatim Feb 22, 2023
ed123e6
Fix linters
Daphineatim Feb 22, 2023
dfbf56f
Merge pull request #11 from Daphineatim/foodlist-feature
Daphineatim Feb 22, 2023
6cf1645
Merge branch 'dev' into Recipes-list
Daphineatim Feb 22, 2023
afa7c63
Merge pull request #12 from Daphineatim/Recipes-list
Daphineatim Feb 22, 2023
1805421
Authenticate Navbar
Daphineatim Feb 22, 2023
d2431da
Modify recipe section
Daphineatim Feb 22, 2023
5cd3073
Add remove button
Daphineatim Feb 22, 2023
f7b0be7
Modify recipe show section
Daphineatim Feb 22, 2023
d989420
Add styling to recipe files
Daphineatim Feb 22, 2023
7698e3e
Add food and recipe ID
Daphineatim Feb 22, 2023
6b50c4b
Create a show_recipe partial
Daphineatim Feb 22, 2023
891e2de
Redirect add ingredient button
Daphineatim Feb 22, 2023
007fc97
Modify path to back button in new recipe form
Daphineatim Feb 22, 2023
f0169c0
Add delete recipe functionality
Daphineatim Feb 22, 2023
f584fe6
Style the recipe add new recipe button
Daphineatim Feb 22, 2023
d8e2674
Modify files in the app folder
Daphineatim Feb 22, 2023
123d347
Create migration files
Daphineatim Feb 22, 2023
5aac6ac
Fix linters
Daphineatim Feb 22, 2023
e3ad145
Merge pull request #13 from Daphineatim/Recipe-details
Daphineatim Feb 22, 2023
e42da7a
Modify files in models folder
Daphineatim Feb 22, 2023
c9bc0c8
Add public_recipes controller
johnkioko Feb 23, 2023
7abf326
Add the public_recipes view file
johnkioko Feb 23, 2023
5294be1
Update the routes file with public_recipes route
johnkioko Feb 23, 2023
6a1e1bc
Merge pull request #14 from Daphineatim/public_recipes_feature
johnkioko Feb 23, 2023
ae22414
Add general shopping controller
johnkioko Feb 23, 2023
8ba62f6
Add general shopping view file
johnkioko Feb 23, 2023
167e781
Add general shopping list route to the routes
johnkioko Feb 23, 2023
075c34c
Merge pull request #15 from Daphineatim/general_shopping_list_feature
johnkioko Feb 23, 2023
2a37517
Edit README.md file, Add files
Daphineatim Feb 23, 2023
20e19a4
Fix linters
Daphineatim Feb 23, 2023
01eae9e
Merge branch 'dev' into Navigation
Daphineatim Feb 24, 2023
b6b5fef
Merge pull request #16 from Daphineatim/Navigation
Daphineatim Feb 24, 2023
82a67ca
Modify routes
Daphineatim Feb 24, 2023
2e5be0c
generate db migrations
johnkioko Feb 24, 2023
6ea0bc0
generate db migrations
johnkioko Feb 24, 2023
24f4a75
Create migration files
Daphineatim Feb 24, 2023
38e6fe8
Create migration files
Daphineatim Feb 24, 2023
c996b35
Create migration to add user to foods,
Daphineatim Feb 25, 2023
f875594
Add styling
Daphineatim Feb 25, 2023
90db852
Fix linters
Daphineatim Feb 25, 2023
c70ce1c
Fix linter errors
johnkioko Feb 25, 2023
026da46
Merge pull request #17 from Daphineatim/final-project
johnkioko Feb 25, 2023
30d7f5e
Fix linter errors
johnkioko Feb 25, 2023
cb65401
Fix error basing on change required
Daphineatim Feb 25, 2023
5ed8bc6
Fix the show recipe error
johnkioko Feb 25, 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
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
root: true,
extends: ["plugin:tailwindcss/recommended"],
overrides: [
{
files: ['*.html', '*.blade.php'],
parser: '@angular-eslint/template-parser',
},
],
};


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@v2
- 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@v2
- uses: actions/setup-node@v1
with:
node-version: "18.x"
- name: Setup Stylelint
run: |
npm install --save-dev [email protected] [email protected] [email protected] [email protected]
[ -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@v2
- 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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@

# Ignore master key for decrypting credentials and more.
/config/master.key


/app/assets/builds/*
!/app/assets/builds/.keep

# .gitignore
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: 200
Metrics/MethodLength:
Include:
- "app/controllers/*"
- "app/models/*"
Max: 20
Metrics/AbcSize:
Include:
- "app/controllers/*"
- "app/models/*"
Max: 50
Metrics/ClassLength:
Max: 150
Metrics/BlockLength:
IgnoredMethods: ["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:
Enabled: False
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"]
}
43 changes: 26 additions & 17 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
source "https://rubygems.org"
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.1.3"
ruby '3.1.3'

gem 'rubocop', '>= 1.0', '< 2.0'

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

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

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

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

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

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

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

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

# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"
Expand All @@ -37,10 +39,10 @@ gem "jbuilder"
# 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 ]
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]

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

# Use Sass to process CSS
# gem "sassc-rails"
Expand All @@ -50,12 +52,13 @@ gem "bootsnap", require: false

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 '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 "web-console"
gem 'web-console'

# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"
Expand All @@ -64,9 +67,15 @@ group :development do
# gem "spring"
end

gem 'tailwindcss-rails', '~> 2.0'

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

gem 'bootstrap', '~> 5.1'
gem 'cancancan'
gem 'devise'
Loading