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

Final Group Capstone #48

Open
wants to merge 120 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
f16bb46
Initial setup commits
Epaltechs Sep 29, 2022
4f174db
Fix linters errors
Epaltechs Sep 29, 2022
e1b80d1
Merge pull request #11 from RWUBAKWANAYO/setup
ppmarq1 Sep 30, 2022
7de1381
Add categories model
ppmarq1 Sep 30, 2022
755bc1e
Fix linters
ppmarq1 Sep 30, 2022
d8e17e2
Fix linters
ppmarq1 Sep 30, 2022
121cf20
Add spec to categories
ppmarq1 Sep 30, 2022
d54aa08
Migrate categories
ppmarq1 Sep 30, 2022
192a236
Update model
ppmarq1 Sep 30, 2022
b9bbbf1
Merge pull request #23 from RWUBAKWANAYO/Add-categories
ppmarq1 Oct 3, 2022
8274375
create a user model
Epaltechs Oct 3, 2022
49be96e
generate devise gem for authentication
Epaltechs Oct 3, 2022
8960913
create database, migration and associate model relation
Epaltechs Oct 3, 2022
b7e4887
Authenticate user with devise and push migration file
Epaltechs Oct 3, 2022
3c7a022
Create validation specs using Rspec
Epaltechs Oct 3, 2022
a8107b3
Modify user devise migration
Epaltechs Oct 4, 2022
5432443
Merge pull request #25 from RWUBAKWANAYO/models
ppmarq1 Oct 4, 2022
b66ef1d
Add api to categories
ppmarq1 Oct 4, 2022
c416dba
Update category model
ppmarq1 Oct 4, 2022
55d4ed1
Add routes to categories api
ppmarq1 Oct 4, 2022
0642b2d
generate user controller
Epaltechs Oct 4, 2022
3d36561
Add users controller
Epaltechs Oct 4, 2022
9d75116
Add users API
Epaltechs Oct 4, 2022
b173cbd
Add jwt and bcrypt gems
Epaltechs Oct 4, 2022
089d04b
Modify database.yml file
Epaltechs Oct 4, 2022
9a8fb2c
Modify test file
Epaltechs Oct 4, 2022
0a6e988
Fix linter errors
Epaltechs Oct 4, 2022
22c028f
Update controller and model
ppmarq1 Oct 5, 2022
1cc5414
Authentication with jwt and jti gems
Epaltechs Oct 5, 2022
75fb902
Fix linter errors
Epaltechs Oct 5, 2022
b5ad4b2
Update routes, config and api
ppmarq1 Oct 5, 2022
3d20f2e
Merge pull request #26 from RWUBAKWANAYO/categories-controllers
ppmarq1 Oct 5, 2022
fc005f6
Fix linter errors
Epaltechs Oct 5, 2022
1e59316
Resolve merge conflicts
Epaltechs Oct 5, 2022
aa25e49
Merge pull request #27 from RWUBAKWANAYO/user-controller
Epaltechs Oct 5, 2022
b01e4ef
Create reservation model and associate model relation
Epaltechs Oct 5, 2022
7ed2f1e
Create validation specs for reservtions
Epaltechs Oct 5, 2022
20df3f2
Delete redundant test file
Epaltechs Oct 5, 2022
e49c216
Create motorbike model
ppmarq1 Oct 6, 2022
6cc3b14
Create relationship diagram
ppmarq1 Oct 6, 2022
513b51e
Merge pull request #31 from RWUBAKWANAYO/reservations
RWUBAKWANAYO Oct 6, 2022
cd4f216
changes
RWUBAKWANAYO Oct 6, 2022
24657f8
Merge branch 'dev' of https://github.com/RWUBAKWANAYO/motorbike_booki…
RWUBAKWANAYO Oct 6, 2022
12cd4c6
generate advert templates with scafford
RWUBAKWANAYO Oct 6, 2022
84255e7
add validation to advert model
RWUBAKWANAYO Oct 6, 2022
3b5a213
Add specs
ppmarq1 Oct 6, 2022
04e944e
fix linter error
RWUBAKWANAYO Oct 6, 2022
b55dd0a
remove examples.txt
ppmarq1 Oct 6, 2022
47621b5
Resolve conflicts
ppmarq1 Oct 6, 2022
b5b3107
Merge pull request #32 from RWUBAKWANAYO/motorbike-model
RWUBAKWANAYO Oct 6, 2022
cd52dd7
resolve conflict
RWUBAKWANAYO Oct 6, 2022
6acabc1
Merge pull request #33 from RWUBAKWANAYO/olivier-features
RWUBAKWANAYO Oct 6, 2022
59084ca
Add adverts controller, API end point
RWUBAKWANAYO Oct 6, 2022
265cf06
Merge pull request #34 from RWUBAKWANAYO/olivier-features
ppmarq1 Oct 6, 2022
575c005
Create controller spec
ppmarq1 Oct 6, 2022
4526043
Resolve conflicts
ppmarq1 Oct 6, 2022
d2d3381
Update controler spec
ppmarq1 Oct 6, 2022
e6c6812
Update controller spec
ppmarq1 Oct 6, 2022
2b51e6d
Update controller spec
ppmarq1 Oct 6, 2022
5b0e814
Merge pull request #35 from RWUBAKWANAYO/motorbike-model
ppmarq1 Oct 7, 2022
66863d9
Add references to reservations
ppmarq1 Oct 7, 2022
20d6860
Update credentials
ppmarq1 Oct 7, 2022
b74019c
Update motorbike controller
ppmarq1 Oct 7, 2022
dcc4c08
Merge pull request #36 from RWUBAKWANAYO/add-api-to-motorbike
ppmarq1 Oct 7, 2022
2ba8c37
Create controller
ppmarq1 Oct 7, 2022
1c10a24
Fix linters
ppmarq1 Oct 7, 2022
6b4245a
Configure controler API
ppmarq1 Oct 7, 2022
4bcf3ea
Update create-reservation-controller
ppmarq1 Oct 7, 2022
878ca8f
Fix linters
ppmarq1 Oct 7, 2022
373a5ae
Create routes to reservation
ppmarq1 Oct 7, 2022
558e380
Add spec to reservation
ppmarq1 Oct 7, 2022
dca2a36
Fix motorbike database
ppmarq1 Oct 10, 2022
2eb5e25
Rename database column on motorbike
ppmarq1 Oct 10, 2022
c56502e
Merge pull request #37 from RWUBAKWANAYO/create-reservation-controller
Epaltechs Oct 11, 2022
5a46b0e
Update controller
ppmarq1 Oct 11, 2022
93842e6
Revert "Create Reservation controller"
ppmarq1 Oct 11, 2022
4c5fe09
Merge pull request #38 from RWUBAKWANAYO/revert-37-create-reservation…
ppmarq1 Oct 11, 2022
2846877
Update database and specs
ppmarq1 Oct 11, 2022
88bdd38
Final API review
ppmarq1 Oct 11, 2022
2f92f53
Final review
ppmarq1 Oct 11, 2022
1b13d3c
Merge pull request #41 from RWUBAKWANAYO/final-review-api
Epaltechs Oct 11, 2022
d1ed8d9
Fix datase error
ppmarq1 Oct 11, 2022
07f6cc3
Merge pull request #42 from RWUBAKWANAYO/final-review-api
Epaltechs Oct 11, 2022
57a0270
Reset credentials
Epaltechs Oct 11, 2022
d22944e
Install rswag generator
Epaltechs Oct 11, 2022
84f697e
Generate Swagger JSON file
Epaltechs Oct 11, 2022
a1d4718
Generate more Swagger JSON file
Epaltechs Oct 11, 2022
f8b3e09
Modify repository README file
Epaltechs Oct 11, 2022
186c4d1
Edit repository README file
Epaltechs Oct 11, 2022
7620082
Modify routes file
Epaltechs Oct 11, 2022
bb77a4a
Merge pull request #43 from RWUBAKWANAYO/API-documentation
ppmarq1 Oct 11, 2022
aacebe1
Modify README file
Epaltechs Oct 12, 2022
103b658
Modify application controller file
Epaltechs Oct 12, 2022
3c19733
Modify user.rb file
Epaltechs Oct 12, 2022
8934cd7
Edit application controller file
Epaltechs Oct 12, 2022
0e845ea
Modify README file
Epaltechs Oct 12, 2022
2ca7c1a
Add schema diagram to README file
Epaltechs Oct 12, 2022
80edaa8
Modify database
Epaltechs Oct 12, 2022
ac57ba5
Merge pull request #44 from RWUBAKWANAYO/API-documentation
ppmarq1 Oct 12, 2022
ea4ee62
Edit README file
Epaltechs Oct 13, 2022
8eff83f
Merge pull request #45 from RWUBAKWANAYO/API-documentation
Epaltechs Oct 13, 2022
4ffcf60
resolve controllers isssues
RWUBAKWANAYO Oct 13, 2022
f2556a6
Merge pull request #46 from RWUBAKWANAYO/resolve-issues
RWUBAKWANAYO Oct 13, 2022
4fe3c49
fix rake issues
RWUBAKWANAYO Oct 14, 2022
410adf9
fix secret key issue
RWUBAKWANAYO Oct 14, 2022
15dd8a8
fix linter issue
RWUBAKWANAYO Oct 14, 2022
0c3b19d
seed admin in heroku
RWUBAKWANAYO Oct 14, 2022
57a8cd4
Merge pull request #47 from RWUBAKWANAYO/deployment
ppmarq1 Oct 14, 2022
a11974d
Edit README file and delete redundant test filesw
Epaltechs Oct 14, 2022
0ad395a
Update README.md
Epaltechs Oct 14, 2022
b31247c
Merge pull request #49 from RWUBAKWANAYO/API-documentation
ppmarq1 Oct 14, 2022
f3d90f0
Merge branch 'dev' of https://github.com/RWUBAKWANAYO/motorbike_booki…
RWUBAKWANAYO Nov 28, 2022
e8f2cfd
Deployment to Render
ppmarq1 Dec 7, 2022
1b3c2ca
Merge branch 'dev' of https://github.com/RWUBAKWANAYO/motorbike_booki…
ppmarq1 Dec 7, 2022
d0c4c9d
deploy project to railway
RWUBAKWANAYO Dec 9, 2022
e6eb37e
change credentials
RWUBAKWANAYO Dec 9, 2022
6a8cb1e
change credentials
RWUBAKWANAYO Dec 9, 2022
85b4066
change credentials
RWUBAKWANAYO Dec 9, 2022
bb069a0
change credentials
RWUBAKWANAYO Dec 9, 2022
3a77d9f
Merge pull request #50 from RWUBAKWANAYO/railway-deployment
RWUBAKWANAYO Dec 9, 2022
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
60 changes: 60 additions & 0 deletions .github/.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
31 changes: 31 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Linters

on: pull_request

env:
FORCE_COLOR: 1

jobs:
rubocop:
name: Rubocop
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
ruby-version: 3.0.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
nodechecker:
name: node_modules checker
runs-on: ubuntu-18.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

29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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

# Ignore master key for decrypting credentials and more.
/config/master.key
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.2
6 changes: 6 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file not shown.
Empty file.
Binary file added .vs/motorbike_booking_backend/v17/.suo
Binary file not shown.
Binary file added .vs/slnx.sqlite
Binary file not shown.
59 changes: 59 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.1.2'

gem 'devise'

gem 'devise-jwt'

gem 'rswag'

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

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

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

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

# 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'

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

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

# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'

gem 'rspec-core', '~> 3.4'
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
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
end
gem 'rails-controller-testing'
gem 'rspec-activemodel-mocks'
Loading