wbzyl / my_movies

rspec 3.0.0 + using api (TMDB)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MyMovies – sample app which uses TMDB API

RSpec documentation:

fc -l -10

cat ~/.railsrc
  --skip-bundle
  --no-test-framework
  --skip-test-unit
rails new my_movies
cd my_movies/
# add rspec-rails, capybara, database_cleaner, and themoviedb gems to Gemfile
gem list rspec
bundle install
mv README.rdoc README.md
rails g rspec:install

The Movie Database API

Example:

bin/tmdb

fc -l -4

rails g controller Home index
rails g controller Search index
rails g controller Movies show
rails g controller People show

Initializers

Tmdb::Api.key(ENV['TMDB_API_KEY'])
Tmdb::Api.language("en")           # setup your default language

Routing

Rails.application.routes.draw do
  resources :movies, only: :show
  resources :people, only: :show

  match "search", to: "search#index", via: :get

  # You can have the root of your site routed with "root"
  root 'home#index'
end

Things you may want to cover

This README would normally document whatever steps are necessary to get the application up and running:

  • Ruby version
  • System dependencies
  • Configuration
  • Database creation
  • Database initialization
  • How to run the test suite
  • Services (job queues, cache servers, search engines, etc.)
  • Deployment instructions

About

rspec 3.0.0 + using api (TMDB)


Languages

Language:Ruby 92.4%Language:CSS 3.8%Language:JavaScript 3.7%