Viewing Party
is an application in which users can explore movie options and create a viewing party event for the user and their invited friends, during Mod 3 of 4 for Turing School's Back End Engineering Program.
- Building a Rails application that requires basic authentication
- Consuming JSON APIs that require authentication
- Implementing a self-referential relationship in ActiveRecord
- Organizing and refactoring code to be more maintainable
- Applying
RuboCop
’s style guide for code quality - Creating instance and class methods on Rails models that use ActiveRecord methods and helpers
- Writing model and feature tests that fully cover data logic and potential user behavior
- Utilizing CI/CD via
TravisCI
👤 Erin Quinn
- Github: Erin Quinn
👤 Jacq Whitmer
- Github: Jacq Whitmer
- Fork and Clone the repo
- Install gem packages:
bundle install
- Set up the database:
rails db:{drop,create,migrate,seed}
- Set up API Access
Example wireframes to follow are found here
Find the project spec here
-
Ruby Version
$ ruby -v ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin20]
-
$ rails -v Rails 5.2.6
-
Database Creation
$ rails db:{drop,create,migrate,seed} Created database 'viewing_party_development' Created database 'viewing_party_test'
-
API Access
- Request an API key from The MovieDB
- v4 (Bearer Token) authentication:
- Run
bundle exec figaro install
to create aconfig/application.yml
file- NOTE: make sure your VCS of choice has appended this file to your
.gitignore
- NOTE: make sure your VCS of choice has appended this file to your
- Add your v4
'Bearer ...'
token asbearer:
to theconfig/application.yml
file - If redeploying this application, don't forget to add this environment variable to the
config vars
of your hosting service of choice
- Run
- v3 (Query Param) authentication:
- Remove the current
config/credentials.yml.enc
file and runEDITOR="<editor> --wait" rails credentials:edit
from the command line to generate a newmaster.key
to decrypt your stored v3 API key:$ rails credentials:show movie_db: access_key_id: 123 secret_access_key: <your_api_key>
- If redeploying this application, the master key can be echoed directly from the command line, as follows:
$ heroku config:set RAILS_MASTER_KEY=`cat config/master.key`
- Remove the current
-
How to run the test suite:
$ bundle exec rspec -fd
-
Local Deployment, for testing:
$ rails s => Booting Puma => Rails 5.2.6 application starting in development => Run `rails server -h` for more startup options Puma starting in single mode... * Version 3.12.6 (ruby 2.7.2-p137), codename: Llamas in Pajamas * Min threads: 5, max threads: 5 * Environment: development * Listening on tcp://localhost:3000 Use Ctrl-C to stop
-
Heroku Deployment, for production