Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
cb578ae
Create rails app for code buddy backend
Donard97 Jan 20, 2022
217b7b7
Add Rails linters
Donard97 Jan 20, 2022
979d6e4
Fix rubocop errors
Donard97 Jan 20, 2022
3674344
Add missing files and fix stylelint
Donard97 Jan 20, 2022
b3db947
Revert "Add missing files and fix stylelint"
Donard97 Jan 22, 2022
e72cc84
Delete stylelint
Donard97 Jan 22, 2022
68992b2
Delete node modules
Donard97 Jan 22, 2022
ed52e54
Merge pull request #10 from Donard97/setup
Donard97 Jan 22, 2022
3778788
create resourse for User
ahzia Jan 24, 2022
6d483d5
create resourse for MeetingType
ahzia Jan 24, 2022
4f9b5a3
create resourses for UserDetail Meeting and Reservation
ahzia Jan 24, 2022
67483f7
add has_one and has_many associations
ahzia Jan 24, 2022
1305af9
fix linters issue
ahzia Jan 24, 2022
6005630
Merge pull request #13 from Donard97/model
ahzia Jan 24, 2022
4d1ae24
Fix database and migrate
Donard97 Jan 24, 2022
1c0abf8
Configure CORS
Donard97 Jan 24, 2022
11caaa7
Add methods to User controller
Donard97 Jan 24, 2022
84a8104
Install CORS gem
Donard97 Jan 25, 2022
810e754
Add methods to user details controller
Donard97 Jan 25, 2022
e7b141d
Fix routes
Donard97 Jan 25, 2022
5f6e004
Add cascade to foreign keys
Donard97 Jan 26, 2022
f1de39a
Fix bugs on users controllers
Donard97 Jan 26, 2022
c4c6fdf
Add methods to user details controller
Donard97 Jan 26, 2022
fdcbf9e
Add methods to meeting types controller
Donard97 Jan 26, 2022
a68c692
Add methods to meetings controller
Donard97 Jan 26, 2022
c7e6778
Add methods for reservations controller
Donard97 Jan 26, 2022
901aef4
Fix routes
Donard97 Jan 26, 2022
aaba4a0
Add missing methods and fix bugs
Donard97 Jan 26, 2022
11b88fa
Fix rubocop linters
Donard97 Jan 26, 2022
d793289
Fix errors
Donard97 Jan 26, 2022
9708f03
Install Rspec
Donard97 Jan 26, 2022
2dda5bd
Generate rspec files
Donard97 Jan 26, 2022
d4449a8
Fix rubocop errors
Donard97 Jan 27, 2022
65ef1b6
add validation to user
ahzia Jan 27, 2022
544f7a6
Make required changes
Donard97 Jan 27, 2022
1f77561
Fix rubocop errors
Donard97 Jan 27, 2022
6df3782
update User validations
ahzia Jan 27, 2022
71fbadb
add validation in MeetingType
ahzia Jan 27, 2022
5d35648
add validation for Meeting
ahzia Jan 27, 2022
1ede814
Write tests for users api requests
Donard97 Jan 27, 2022
785c75c
add rspec for testing
ahzia Jan 27, 2022
e72d4e4
Write tests for meeting types api requests
Donard97 Jan 27, 2022
bdca2ab
add tests for User model
ahzia Jan 27, 2022
7e60490
username should not contain white spaces
ahzia Jan 27, 2022
f0ae83b
add tests for MeetingType model
ahzia Jan 27, 2022
1bffc48
Add tests for Meeting model
ahzia Jan 27, 2022
e5b5c8a
fix linters issue
ahzia Jan 27, 2022
b05641f
Write tests api requests for meetings
Donard97 Jan 27, 2022
cbc2268
Write tests for api requests for reservations
Donard97 Jan 27, 2022
dd08144
Fix bugs on tests and controllers
Donard97 Jan 27, 2022
57c1850
Fix rubocop errors
Donard97 Jan 27, 2022
f4b75f1
Merge pull request #15 from Donard97/model
ahzia Jan 27, 2022
54228ae
Merge branch 'develop' into controllers
Donard97 Jan 27, 2022
025d28b
Merge pull request #14 from Donard97/controllers
Donard97 Jan 27, 2022
8a5eca3
add login-register functionality
ahzia Jan 30, 2022
34dcae3
Setup CORS
ahzia Jan 31, 2022
c36fc74
implement custom json error message
ahzia Jan 31, 2022
699e845
better response status in user request
ahzia Jan 31, 2022
13b0b26
fix errors in validation exception handling
ahzia Jan 31, 2022
7a4ce5e
Fix error handlers for user details
Donard97 Feb 1, 2022
357c3d2
Fix error handlers for meeting type
Donard97 Feb 1, 2022
6f16e70
Fix error handlers for meetings
Donard97 Feb 1, 2022
625122d
Fix error handlers for reservations
Donard97 Feb 1, 2022
51b590b
fix issue in user controller
ahzia Feb 1, 2022
9dda69b
Install apipie for api documentation
Donard97 Feb 4, 2022
0cf39ab
Generate apipie configuration and route
Donard97 Feb 4, 2022
d122b47
Update user api documentation
Donard97 Feb 4, 2022
8ada32a
Create api documentation for user details
Donard97 Feb 4, 2022
eac4cd9
Create api documentation for meeting types
Donard97 Feb 4, 2022
06f4f5f
Create api documentation for meetings
Donard97 Feb 4, 2022
53ada98
Create api documentation for reservations
Donard97 Feb 4, 2022
25f712f
Add details of the project on readme file
Donard97 Feb 4, 2022
640e634
Add links to readme file
Donard97 Feb 4, 2022
6cf6075
Fix routes for documentation
Donard97 Feb 4, 2022
99557dd
Fix errors
Donard97 Feb 4, 2022
062434f
Add data to seeds file
Donard97 Feb 4, 2022
8982d91
Add live link for backend
Donard97 Feb 4, 2022
6272c0a
fix linters issue
ahzia Feb 5, 2022
843fc73
Make required changes
Donard97 Feb 5, 2022
3753670
Add other details to readme file
Donard97 Feb 5, 2022
9275dcc
Merge pull request #18 from Donard97/extra-functionalities
ahzia Feb 5, 2022
1716824
Merge branch 'develop' into api-documentation
ahzia Feb 5, 2022
b2f394a
Fix tests
Donard97 Feb 5, 2022
16e145f
Update api documentation
Donard97 Feb 5, 2022
873e172
Add screenshot of tests to readme file
Donard97 Feb 5, 2022
f0b92d8
Merge pull request #17 from Donard97/api-documentation
Donard97 Feb 5, 2022
e55341a
return meetings in reservation index
ahzia Feb 5, 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
39 changes: 39 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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

# Stylelint is commented because we don't need stylelind because we are working on a API Rails app

# stylelint:
# name: Stylelint
# runs-on: ubuntu-18.04
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: "12.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}"
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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

# Ignore node modules

/node_modules


# Ignore database configuration

/config/database.yml
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: 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
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.1
55 changes: 55 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.0.1'

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

# Use postgresql as the database for Active Record

gem 'pg', '~> 1.1'

# Use apipie for api documentation

gem 'apipie-rails'

# 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', platforms: %i[mingw mswin x64_mingw jruby]

# 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 'rubocop', '>= 1.0', '< 2.0'

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
Loading