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

Ruby on Rails capstone project - Budget app #5

Open
wants to merge 154 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 106 commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
a768933
Setup rails
apt2tell Feb 13, 2023
564c7b6
Add node_modules in .gitignore
apt2tell Feb 13, 2023
707ac36
Install linters for the app
apt2tell Feb 13, 2023
b78dcfa
Add libvips gem for active_storage image processing
apt2tell Feb 13, 2023
0312c96
Generate controllers and models for the app
apt2tell Feb 13, 2023
f057a50
Implement associations for the models
apt2tell Feb 13, 2023
9213be4
Migrate db
apt2tell Feb 13, 2023
c8cf658
Update controllers users, categories expenditures
apt2tell Feb 13, 2023
e58181d
Implement validations in the models
apt2tell Feb 13, 2023
7e137b5
Setup devise for app authentication
apt2tell Feb 13, 2023
4309c2d
Setup user_mailer for email confirmation
apt2tell Feb 13, 2023
d45a683
Implement email confirmation with letter_opener
apt2tell Feb 13, 2023
cd42fa9
Add routes for the app resources
apt2tell Feb 13, 2023
1c4c966
Fix linter errors
apt2tell Feb 13, 2023
622b7c4
Merge pull request #1 from Okechukwu-muokwugwo/app-setup
apt2tell Feb 13, 2023
14029dd
Setup cancancan gem
apt2tell Feb 13, 2023
4c8a4a2
Generate splashes controller
apt2tell Feb 13, 2023
0fef55c
Define abilities
apt2tell Feb 13, 2023
226b5c0
Configure expenditures controller
apt2tell Feb 13, 2023
5e2226d
Fix a typo
apt2tell Feb 13, 2023
f39cd85
Update splashes controller
apt2tell Feb 13, 2023
dcee3be
Update application_controller
apt2tell Feb 13, 2023
0fd97f5
Fix linter errors
apt2tell Feb 13, 2023
c993f9a
Merge pull request #2 from Okechukwu-muokwugwo/authorization
apt2tell Feb 13, 2023
6056f61
Add stylesheet link for bootstrap
apt2tell Feb 13, 2023
9154fe2
Update new form view
apt2tell Feb 13, 2023
c116ab1
Add categories index view
apt2tell Feb 13, 2023
527a9bf
Add form for add new categories
apt2tell Feb 13, 2023
448b4cf
Implement new category view
apt2tell Feb 13, 2023
10dcf9e
Modify category model
apt2tell Feb 13, 2023
991414d
Update categories controller
apt2tell Feb 13, 2023
6ca561a
Add styles for form
apt2tell Feb 13, 2023
5f6ffce
Generate devise controllers for users
apt2tell Feb 15, 2023
9d5ac8c
Add grand_total method
apt2tell Feb 15, 2023
c153954
Add image for user model
apt2tell Feb 15, 2023
b319b4f
Update category partial
apt2tell Feb 15, 2023
e21306e
Add file field on the category form
apt2tell Feb 15, 2023
3a57738
Modify categories view for index
apt2tell Feb 15, 2023
f366935
Add file field for attach user icon
apt2tell Feb 15, 2023
69116f3
Implement menubar partial for the app
apt2tell Feb 15, 2023
2d18891
Add sidebar partial for the app
apt2tell Feb 15, 2023
52ae2bb
Add script for toggling menu and sidebar
apt2tell Feb 15, 2023
d0a0bed
Add link stylesheet for fontawesome
apt2tell Feb 15, 2023
169ba70
Configure routes for devise users
apt2tell Feb 15, 2023
6c1c4d3
Add styles for the views
apt2tell Feb 15, 2023
d474c74
Rename user_id to author_id
apt2tell Feb 15, 2023
9fd347f
Add foreign key to author_id
apt2tell Feb 15, 2023
229d41a
Generate schema after migrations
apt2tell Feb 15, 2023
7ef9dbc
Update routes for devise users
apt2tell Feb 15, 2023
c56cc8b
Add menu_bar_two for new transaction view
apt2tell Feb 15, 2023
f75e475
Add expenditures new view
apt2tell Feb 15, 2023
ebbd49b
Implement index partial
apt2tell Feb 15, 2023
e60dcad
Implement form partial
apt2tell Feb 15, 2023
25dc924
Update sign up form
apt2tell Feb 15, 2023
98ec601
Implement categories show view
apt2tell Feb 15, 2023
13c1a08
Implement controllers actiions for sessions
apt2tell Feb 15, 2023
7064d05
Update expenditures controllers
apt2tell Feb 15, 2023
e86405e
Add styling for menus and side bar
apt2tell Feb 15, 2023
5c05d51
Fix linter errors
apt2tell Feb 15, 2023
b257620
Update the sidebar to include sign out button
apt2tell Feb 16, 2023
3006d33
Update menu_bar for categories view
apt2tell Feb 16, 2023
ae1968a
Update menu_bar_two for transactions view
apt2tell Feb 16, 2023
dee3971
Modify expenditures view form
apt2tell Feb 16, 2023
5242576
Remove grand_total method
apt2tell Feb 16, 2023
3c4a3ac
Add styles for display total amount
apt2tell Feb 16, 2023
25b681a
Add image in the params
apt2tell Feb 16, 2023
131fa24
Add splashes index view
apt2tell Feb 16, 2023
885dfe3
Add styles for splashes view
apt2tell Feb 16, 2023
089e103
Add links to splashes view
apt2tell Feb 16, 2023
ced2ce1
Add styles for the links
apt2tell Feb 16, 2023
b9a8df4
Add README.md file
apt2tell Feb 16, 2023
f887d59
Add styes for splashes view
apt2tell Feb 16, 2023
e175809
Add styles for splashes view
apt2tell Feb 16, 2023
2e60706
Clean up views
apt2tell Feb 16, 2023
afd82a5
Merge pull request #3 from Okechukwu-muokwugwo/views
apt2tell Feb 17, 2023
90b4453
Install gems for testing
apt2tell Feb 17, 2023
bd85899
Generate rspec rails
apt2tell Feb 18, 2023
fa99498
Add & install necessary gems for testing
apt2tell Feb 18, 2023
2fa8845
Add support file for database_cleaner
apt2tell Feb 18, 2023
b976163
Add test case for user model
apt2tell Feb 18, 2023
c37376a
Implement test case for expenditure model
apt2tell Feb 18, 2023
48057a4
Add test case for category model
apt2tell Feb 18, 2023
f193252
Add fake data for user model
apt2tell Feb 18, 2023
780f6ea
Add fake files for expenditure data
apt2tell Feb 18, 2023
66582d4
Update the schema
apt2tell Feb 18, 2023
dd8e75d
Merge pull request #4 from Okechukwu-muokwugwo/testing
apt2tell Feb 18, 2023
1c490c9
Add rake gem to Gemfile
apt2tell Feb 18, 2023
b555fdd
Update Gemfile
apt2tell Feb 18, 2023
b0309ce
Setup app for render
apt2tell Feb 18, 2023
b9255a5
Update render.yaml
apt2tell Feb 18, 2023
24f5266
Add script render-build.sh
apt2tell Feb 18, 2023
f8dd71c
Fix linter error
apt2tell Feb 18, 2023
9691d45
Update config/production.rb
apt2tell Feb 18, 2023
dbd7290
Update gems for the app
apt2tell Feb 18, 2023
334cfcb
Update application.rb
apt2tell Feb 18, 2023
a2f764a
Modify production.rb
apt2tell Feb 18, 2023
6671b07
Fiix typo
apt2tell Feb 18, 2023
2768c36
Add procfile
apt2tell Feb 18, 2023
e4a3de6
Configure secret_key for the app
apt2tell Feb 18, 2023
0b1d876
Update credentials.yml.enc
apt2tell Feb 18, 2023
191af7f
Set secret_key_base
apt2tell Feb 18, 2023
30f7f57
Modify Procfile for heroku
apt2tell Feb 18, 2023
de48b81
Update Procfile
apt2tell Feb 18, 2023
06ca553
Update gems for the app
apt2tell Feb 18, 2023
7e2e945
Add back arrow to categories
apt2tell Feb 18, 2023
48588c2
Add link the app
apt2tell Feb 18, 2023
b888e57
Modify Gemfile.lock
apt2tell Feb 19, 2023
3bd9402
Modify Gemfile.lock
apt2tell Feb 19, 2023
bfebe86
Update Gemfile.lock
apt2tell Feb 19, 2023
a4a16bf
Modify config/appliation.rb
apt2tell Feb 19, 2023
9520b4d
Modify Gemfile
apt2tell Feb 19, 2023
d327eef
Update credentials
apt2tell Feb 19, 2023
c09b19e
Update Gemfile
apt2tell Feb 19, 2023
805abbd
Update Rakefile
apt2tell Feb 19, 2023
1e79275
Modify Gemfile
apt2tell Feb 19, 2023
e2c15c0
Deploy expenditor
apt2tell Feb 19, 2023
9026768
Gemfile update
apt2tell Feb 19, 2023
4d099f9
Update Gemfile
apt2tell Feb 19, 2023
b2ea4ee
Update ruby version
apt2tell Feb 19, 2023
52a8af6
Add roadie to Gemfile
apt2tell Feb 19, 2023
60103d7
Update Devise gem
apt2tell Feb 19, 2023
b2fbd59
Require roadie in devise_mailer
apt2tell Feb 19, 2023
1429035
Add roadie gem
apt2tell Feb 19, 2023
8cb9b68
Add roadie-rails gem
apt2tell Feb 19, 2023
6227b40
Add Procfile
apt2tell Feb 19, 2023
8c1c61c
Position form to centre
apt2tell Feb 19, 2023
0f9a865
Fix linter error
apt2tell Feb 19, 2023
669a6b3
Fix linter errors
apt2tell Feb 20, 2023
4137154
Merge branch 'dev' of https://github.com/Okechukwu-muokwugwo/budget-a…
apt2tell Feb 20, 2023
8c18be6
Fix linter error
apt2tell Feb 20, 2023
a97f478
Fix errors
apt2tell Feb 20, 2023
df8ebad
Modify the Gemfile to inlcude font-awesome-rails and add font awesome…
apt2tell Mar 23, 2023
005da02
Add database password to evironment variable
apt2tell Mar 23, 2023
05b82c6
Add render.yaml
apt2tell Mar 23, 2023
4ae9447
Modify render.yaml
apt2tell Mar 23, 2023
0fc2b5e
Add credentails
apt2tell Mar 23, 2023
84db685
Fix linter errors
apt2tell Mar 23, 2023
b91c1f7
Update README.md file
apt2tell Mar 23, 2023
f03dd97
Modify form UI
apt2tell Mar 23, 2023
ea55105
Modify user model
apt2tell Mar 24, 2023
4fe8cce
Modify form layout to align text properly
apt2tell Mar 24, 2023
f0f6d27
Update application.css
apt2tell Mar 24, 2023
2992511
Modify sidebar
apt2tell Mar 24, 2023
09dbd32
Remove unused code
apt2tell Mar 24, 2023
335dacc
Modify the sign out button
apt2tell Mar 24, 2023
1d4705d
Update the sign out arrow
apt2tell Mar 24, 2023
9f04797
Modify application.js
apt2tell Mar 24, 2023
b34edbe
Modify sign out link
apt2tell Mar 26, 2023
35d4880
Add styles to the modified signout link
apt2tell Mar 26, 2023
277e3d0
Modify form width
apt2tell Mar 28, 2023
9b0b112
Modify form width
apt2tell Mar 28, 2023
2858050
Modify form width
apt2tell Mar 28, 2023
87b084e
Update sidebar.css
apt2tell Aug 3, 2023
357f2a2
Configure database.yml
apt2tell Aug 4, 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@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: "12.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
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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
/node_modules

# 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
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
60 changes: 60 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
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:
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
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-3.1.3
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"]
}
82 changes: 82 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.1.3'

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

# 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 Devise for authentication for the application
gem 'cancancan'
gem 'devise'

# 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 'dragonfly_libvips', '~> 2.5', '>= 2.5.1'
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', '>= 1.7.0'
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 'database_cleaner-active_record', '~> 2.1'
gem 'factory_bot_rails'
gem 'faker'
gem 'rails-controller-testing'
gem 'selenium-webdriver'
gem 'webdrivers'
end
Loading