Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
aa951c2
run rails new api
rencarot Dec 2, 2020
6b02989
add comment to .gitignore
rencarot Dec 2, 2020
6b59adb
Merge pull request #1 from RenCarothers/practice-branch
RenCarothers Dec 2, 2020
4dfff98
Added customer and video models
OlgaSe Dec 2, 2020
a7e60a1
create basic customer index with json response
rencarot Dec 2, 2020
b13c878
added index action for videos
OlgaSe Dec 3, 2020
6fad5f3
added show action for video
OlgaSe Dec 3, 2020
7b3c73b
adjust response to pass controller tests
rencarot Dec 3, 2020
ac69e79
Merge branch 'master' into wave1-customer-setup
RenCarothers Dec 3, 2020
1818c71
Merge pull request #2 from RenCarothers/wave1-customer-setup
RenCarothers Dec 3, 2020
e5c9f51
added create action, fixed tests and smoke tests
OlgaSe Dec 3, 2020
7e8771d
Merge pull request #3 from RenCarothers/create_for_video
OlgaSe Dec 3, 2020
e4d0f5e
added rental model and controller
OlgaSe Dec 3, 2020
0aad3ca
added checkout to rental controller and model, solved issue with disp…
OlgaSe Dec 4, 2020
784e2f6
tweak check_out to pass smoke tests
rencarot Dec 4, 2020
f0ec73e
Merge pull request #4 from RenCarothers/check-out-2
RenCarothers Dec 4, 2020
c65a7b5
Added check-in controller and model methods.
OlgaSe Dec 4, 2020
5e06bb5
all smoke tests are passing
OlgaSe Dec 4, 2020
3e0e715
Merge pull request #5 from RenCarothers/Check_in
OlgaSe Dec 4, 2020
5308cfc
video validation tests
OlgaSe Dec 4, 2020
f8ab5ca
Merge pull request #6 from RenCarothers/video_validation_tests
OlgaSe Dec 4, 2020
06284e9
adds basic controller tests for checkin and out methods
rencarot Dec 4, 2020
131e32a
Merge pull request #7 from RenCarothers/rental-controller-tests
RenCarothers Dec 4, 2020
ace57f3
Added custom methods tests for rental model
OlgaSe Dec 4, 2020
edd4ee2
Merge pull request #8 from RenCarothers/rental_custom_methods_tests
OlgaSe Dec 4, 2020
4e57286
adds missing status code check on one test
rencarot Dec 5, 2020
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
8 changes: 8 additions & 0 deletions .generators
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<Settings><!--This file was automatically generated by Ruby plugin.
You are allowed to:
1. Reorder generators
2. Remove generators
3. Add installed generators
To add new installed generators automatically delete this file and reload the project.
--><GeneratorsGroup><Generator name="active_record:application_record" /><Generator name="active_record:migration" /><Generator name="active_record:model" /><Generator name="application_record" /><Generator name="channel" /><Generator name="controller" /><Generator name="generator" /><Generator name="integration_test" /><Generator name="job" /><Generator name="mailbox" /><Generator name="mailer" /><Generator name="migration" /><Generator name="minitest:controller" /><Generator name="minitest:generator" /><Generator name="minitest:helper" /><Generator name="minitest:install" /><Generator name="minitest:integration" /><Generator name="minitest:job" /><Generator name="minitest:mailer" /><Generator name="minitest:model" /><Generator name="minitest:plugin" /><Generator name="minitest:scaffold" /><Generator name="minitest:system" /><Generator name="model" /><Generator name="resource" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="system_test" /><Generator name="task" /><Generator name="test_unit:channel" /><Generator name="test_unit:controller" /><Generator name="test_unit:generator" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:job" /><Generator name="test_unit:mailbox" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /><Generator name="test_unit:system" /></GeneratorsGroup></Settings>
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

# 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
.byebug_history

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

# ignore idea files
.idea
.idea/*
.idea/
7 changes: 7 additions & 0 deletions .rakeTasks
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Settings><!--This file was automatically generated by Ruby plugin.
You are allowed to:
1. Remove rake task
2. Add existing rake tasks
To add existing rake tasks automatically delete this file and reload the project.
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="List versions of all Rails frameworks and the environment" fullCmd="about" taksId="about" /><RakeGroup description="" fullCmd="" taksId="action_mailbox"><RakeGroup description="" fullCmd="" taksId="ingress"><RakeTask description="Relay an inbound email from Exim to Action Mailbox (URL and INGRESS_PASSWORD required)" fullCmd="action_mailbox:ingress:exim" taksId="exim" /><RakeTask description="Relay an inbound email from Postfix to Action Mailbox (URL and INGRESS_PASSWORD required)" fullCmd="action_mailbox:ingress:postfix" taksId="postfix" /><RakeTask description="Relay an inbound email from Qmail to Action Mailbox (URL and INGRESS_PASSWORD required)" fullCmd="action_mailbox:ingress:qmail" taksId="qmail" /><RakeTask description="" fullCmd="action_mailbox:ingress:environment" taksId="environment" /></RakeGroup><RakeTask description="Copy over the migration" fullCmd="action_mailbox:install" taksId="install" /><RakeTask description="" fullCmd="action_mailbox:copy_migrations" taksId="copy_migrations" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="" fullCmd="action_mailbox:install:migrations" taksId="migrations" /></RakeGroup><RakeTask description="" fullCmd="action_mailbox:run_installer" taksId="run_installer" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="action_text"><RakeTask description="Copy over the migration, stylesheet, and JavaScript files" fullCmd="action_text:install" taksId="install" /><RakeTask description="" fullCmd="action_text:copy_migrations" taksId="copy_migrations" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="" fullCmd="action_text:install:migrations" taksId="migrations" /></RakeGroup><RakeTask description="" fullCmd="action_text:run_installer" taksId="run_installer" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="active_storage"><RakeTask description="Copy over the migration needed to the application" fullCmd="active_storage:install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="" fullCmd="active_storage:install:migrations" taksId="migrations" /></RakeGroup><RakeTask description="" fullCmd="active_storage:update" taksId="update" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="app"><RakeTask description="Applies the template supplied by LOCATION=(/path/to/template) or URL" fullCmd="app:template" taksId="template" /><RakeTask description="Update configs and some other initially generated files (or use just update:configs or update:bin)" fullCmd="app:update" taksId="update" /><RakeGroup description="" fullCmd="" taksId="templates"><RakeTask description="" fullCmd="app:templates:copy" taksId="copy" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="update"><RakeTask description="" fullCmd="app:update:active_storage" taksId="active_storage" /><RakeTask description="" fullCmd="app:update:bin" taksId="bin" /><RakeTask description="" fullCmd="app:update:configs" taksId="configs" /><RakeTask description="" fullCmd="app:update:upgrade_guide_info" taksId="upgrade_guide_info" /></RakeGroup></RakeGroup><RakeGroup description="" fullCmd="" taksId="db"><RakeTask description="Creates the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:create:all to create all databases in the config). Without RAILS_ENV or when RAILS_ENV is development, it defaults to creating the development and test databases" fullCmd="db:create" taksId="create" /><RakeTask description="Drops the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:drop:all to drop all databases in the config). Without RAILS_ENV or when RAILS_ENV is development, it defaults to dropping the development and test databases" fullCmd="db:drop" taksId="drop" /><RakeGroup description="" fullCmd="" taksId="environment"><RakeTask description="Set the environment value for the database" fullCmd="db:environment:set" taksId="set" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="fixtures"><RakeTask description="Loads fixtures into the current environment's database" fullCmd="db:fixtures:load" taksId="load" /><RakeTask description="" fullCmd="db:fixtures:identify" taksId="identify" /></RakeGroup><RakeTask description="Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)" fullCmd="db:migrate" taksId="migrate" /><RakeGroup description="" fullCmd="" taksId="migrate"><RakeTask description="Display status of migrations" fullCmd="db:migrate:status" taksId="status" /><RakeTask description="" fullCmd="db:migrate:down" taksId="down" /><RakeTask description="" fullCmd="db:migrate:redo" taksId="redo" /><RakeTask description="" fullCmd="db:migrate:reset" taksId="reset" /><RakeTask description="" fullCmd="db:migrate:up" taksId="up" /></RakeGroup><RakeTask description="Runs setup if database does not exist, or runs migrations if it does" fullCmd="db:prepare" taksId="prepare" /><RakeTask description="Rolls the schema back to the previous version (specify steps w/ STEP=n)" fullCmd="db:rollback" taksId="rollback" /><RakeGroup description="" fullCmd="" taksId="schema"><RakeGroup description="" fullCmd="" taksId="cache"><RakeTask description="Clears a db/schema_cache.yml file" fullCmd="db:schema:cache:clear" taksId="clear" /><RakeTask description="Creates a db/schema_cache.yml file" fullCmd="db:schema:cache:dump" taksId="dump" /></RakeGroup><RakeTask description="Creates a db/schema.rb file that is portable against any DB supported by Active Record" fullCmd="db:schema:dump" taksId="dump" /><RakeTask description="Loads a schema.rb file into the database" fullCmd="db:schema:load" taksId="load" /><RakeTask description="" fullCmd="db:schema:load_if_ruby" taksId="load_if_ruby" /></RakeGroup><RakeTask description="Loads the seed data from db/seeds.rb" fullCmd="db:seed" taksId="seed" /><RakeGroup description="" fullCmd="" taksId="seed"><RakeTask description="Truncates tables of each database for current environment and loads the seeds" fullCmd="db:seed:replant" taksId="replant" /></RakeGroup><RakeTask description="Creates the database, loads the schema, and initializes with the seed data (use db:reset to also drop the database first)" fullCmd="db:setup" taksId="setup" /><RakeGroup description="" fullCmd="" taksId="structure"><RakeTask description="Dumps the database structure to db/structure.sql" fullCmd="db:structure:dump" taksId="dump" /><RakeTask description="Recreates the databases from the structure.sql file" fullCmd="db:structure:load" taksId="load" /><RakeTask description="" fullCmd="db:structure:load_if_sql" taksId="load_if_sql" /></RakeGroup><RakeTask description="Retrieves the current schema version number" fullCmd="db:version" taksId="version" /><RakeTask description="" fullCmd="db:_dump" taksId="_dump" /><RakeTask description="" fullCmd="db:abort_if_pending_migrations" taksId="abort_if_pending_migrations" /><RakeTask description="" fullCmd="db:charset" taksId="charset" /><RakeTask description="" fullCmd="db:check_protected_environments" taksId="check_protected_environments" /><RakeTask description="" fullCmd="db:collation" taksId="collation" /><RakeGroup description="" fullCmd="" taksId="create"><RakeTask description="" fullCmd="db:create:all" taksId="all" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="drop"><RakeTask description="" fullCmd="db:drop:_unsafe" taksId="_unsafe" /><RakeTask description="" fullCmd="db:drop:all" taksId="all" /></RakeGroup><RakeTask description="" fullCmd="db:forward" taksId="forward" /><RakeTask description="" fullCmd="db:load_config" taksId="load_config" /><RakeTask description="" fullCmd="db:purge" taksId="purge" /><RakeGroup description="" fullCmd="" taksId="purge"><RakeTask description="" fullCmd="db:purge:all" taksId="all" /></RakeGroup><RakeTask description="" fullCmd="db:reset" taksId="reset" /><RakeGroup description="" fullCmd="" taksId="test"><RakeTask description="" fullCmd="db:test:load" taksId="load" /><RakeTask description="" fullCmd="db:test:load_schema" taksId="load_schema" /><RakeTask description="" fullCmd="db:test:load_structure" taksId="load_structure" /><RakeTask description="" fullCmd="db:test:prepare" taksId="prepare" /><RakeTask description="" fullCmd="db:test:purge" taksId="purge" /></RakeGroup><RakeTask description="" fullCmd="db:truncate_all" taksId="truncate_all" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="log"><RakeTask description="Truncates all/specified *.log files in log/ to zero bytes (specify which logs with LOGS=test,development)" fullCmd="log:clear" taksId="clear" /></RakeGroup><RakeTask description="Prints out your Rack middleware stack" fullCmd="middleware" taksId="middleware" /><RakeTask description="Restart app by touching tmp/restart.txt" fullCmd="restart" taksId="restart" /><RakeTask description="Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)" fullCmd="secret" taksId="secret" /><RakeTask description="Report code statistics (KLOCs, etc) from the application or engine" fullCmd="stats" taksId="stats" /><RakeTask description="Runs all tests in test folder except system ones" fullCmd="test" taksId="test" /><RakeGroup description="" fullCmd="" taksId="test"><RakeTask description="Run tests quickly, but also reset db" fullCmd="test:db" taksId="db" /><RakeTask description="Run system tests only" fullCmd="test:system" taksId="system" /><RakeTask description="" fullCmd="test:channels" taksId="channels" /><RakeTask description="" fullCmd="test:controllers" taksId="controllers" /><RakeTask description="" fullCmd="test:functionals" taksId="functionals" /><RakeTask description="" fullCmd="test:generators" taksId="generators" /><RakeTask description="" fullCmd="test:helpers" taksId="helpers" /><RakeTask description="" fullCmd="test:integration" taksId="integration" /><RakeTask description="" fullCmd="test:jobs" taksId="jobs" /><RakeTask description="" fullCmd="test:mailboxes" taksId="mailboxes" /><RakeTask description="" fullCmd="test:mailers" taksId="mailers" /><RakeTask description="" fullCmd="test:models" taksId="models" /><RakeTask description="" fullCmd="test:prepare" taksId="prepare" /><RakeTask description="" fullCmd="test:run" taksId="run" /><RakeTask description="" fullCmd="test:units" taksId="units" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="time"><RakeTask description="List all time zones, list by two-letter country code (`rails time:zones[US]`), or list by UTC offset (`rails time:zones[-8]`)" fullCmd="time:zones[country_or_offset]" taksId="zones[country_or_offset]" /><RakeTask description="" fullCmd="time:zones" taksId="zones" /><RakeGroup description="" fullCmd="" taksId="zones"><RakeTask description="" fullCmd="time:zones:all" taksId="all" /><RakeTask description="" fullCmd="time:zones:local" taksId="local" /><RakeTask description="" fullCmd="time:zones:us" taksId="us" /></RakeGroup></RakeGroup><RakeGroup description="" fullCmd="" taksId="tmp"><RakeTask description="Clear cache, socket and screenshot files from tmp/ (narrow w/ tmp:cache:clear, tmp:sockets:clear, tmp:screenshots:clear)" fullCmd="tmp:clear" taksId="clear" /><RakeTask description="Creates tmp directories for cache, sockets, and pids" fullCmd="tmp:create" taksId="create" /><RakeGroup description="" fullCmd="" taksId="cache"><RakeTask description="" fullCmd="tmp:cache:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="pids"><RakeTask description="" fullCmd="tmp:pids:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="screenshots"><RakeTask description="" fullCmd="tmp:screenshots:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="sockets"><RakeTask description="" fullCmd="tmp:sockets:clear" taksId="clear" /></RakeGroup></RakeGroup><RakeGroup description="" fullCmd="" taksId="yarn"><RakeTask description="Install all JavaScript dependencies as specified via Yarn" fullCmd="yarn:install" taksId="install" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="zeitwerk"><RakeTask description="Checks project structure for Zeitwerk compatibility" fullCmd="zeitwerk:check" taksId="check" /></RakeGroup><RakeTask description="" fullCmd="default" taksId="default" /><RakeGroup description="" fullCmd="" taksId="dev"><RakeTask description="" fullCmd="dev:cache" taksId="cache" /></RakeGroup><RakeTask description="" fullCmd="environment" taksId="environment" /><RakeTask description="" fullCmd="initializers" taksId="initializers" /><RakeTask description="" fullCmd="notes" taksId="notes" /><RakeGroup description="" fullCmd="" taksId="notes"><RakeTask description="" fullCmd="notes:custom" taksId="custom" /><RakeTask description="" fullCmd="notes:fixme" taksId="fixme" /><RakeTask description="" fullCmd="notes:optimize" taksId="optimize" /><RakeTask description="" fullCmd="notes:todo" taksId="todo" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="railties"><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="" fullCmd="railties:install:migrations" taksId="migrations" /></RakeGroup></RakeGroup><RakeTask description="" fullCmd="routes" taksId="routes" /><RakeTask description="" fullCmd="tmp" taksId="tmp" /><RakeTask description="" fullCmd="tmp/cache" taksId="tmp/cache" /><RakeTask description="" fullCmd="tmp/cache/assets" taksId="tmp/cache/assets" /><RakeTask description="" fullCmd="tmp/pids" taksId="tmp/pids" /><RakeTask description="" fullCmd="tmp/sockets" taksId="tmp/sockets" /></RakeGroup></Settings>
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.6.5
57 changes: 57 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.6.5'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.3', '>= 6.0.3.4'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Active Storage variant
# gem 'image_processing', '~> 1.2'

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

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

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end

group :development do
gem 'listen', '~> 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end

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

group :development, :test do
gem 'pry-rails'
end

group :development do
gem 'guard'
gem 'guard-minitest'
gem 'debase', '>= 0.2.4.1'
gem 'ruby-debug-ide', '>= 0.7.0'
end

group :test do
gem 'minitest-rails'
gem 'minitest-reporters'
end
Loading