+
+<%= link_to "View All Media", "/" %>
+<%= link_to "Add a #{media_type.capitalize}", new_polymorphic_path(media_type) %>
From 49ff71dc57e1799c1ef1e0b3557728031ed777bf Mon Sep 17 00:00:00 2001
From: emgord
Date: Mon, 30 Nov 2015 16:31:03 -0800
Subject: [PATCH 12/38] added index for books
---
app/controllers/books_controller.rb | 4 ++++
app/views/books/index.html.erb | 2 ++
2 files changed, 6 insertions(+)
create mode 100644 app/views/books/index.html.erb
diff --git a/app/controllers/books_controller.rb b/app/controllers/books_controller.rb
index cdb437b99f..1d4b459297 100644
--- a/app/controllers/books_controller.rb
+++ b/app/controllers/books_controller.rb
@@ -1,2 +1,6 @@
class BooksController < ApplicationController
+
+ def index
+ @books = Book.all.sort_by { |book| -book.rank }
+ end
end
diff --git a/app/views/books/index.html.erb b/app/views/books/index.html.erb
new file mode 100644
index 0000000000..4ecd01613f
--- /dev/null
+++ b/app/views/books/index.html.erb
@@ -0,0 +1,2 @@
+<%= render partial:'shared/index',
+ locals:{media:@books, media_type: :book } %>
From 172608c93c62e645d0381463556690c3fac2d8c7 Mon Sep 17 00:00:00 2001
From: emgord
Date: Mon, 30 Nov 2015 16:45:32 -0800
Subject: [PATCH 13/38] added index for albums, seed data, and upvote for
albums and books
---
app/controllers/album_controller.rb | 2 --
app/controllers/albums_controller.rb | 14 ++++++++++++++
app/controllers/books_controller.rb | 8 ++++++++
app/views/albums/index.html.erb | 2 ++
config/routes.rb | 2 ++
db/seeds.rb | 22 ++++++++++++++++++++++
6 files changed, 48 insertions(+), 2 deletions(-)
delete mode 100644 app/controllers/album_controller.rb
create mode 100644 app/controllers/albums_controller.rb
create mode 100644 app/views/albums/index.html.erb
diff --git a/app/controllers/album_controller.rb b/app/controllers/album_controller.rb
deleted file mode 100644
index 954eeb990d..0000000000
--- a/app/controllers/album_controller.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-class AlbumController < ApplicationController
-end
diff --git a/app/controllers/albums_controller.rb b/app/controllers/albums_controller.rb
new file mode 100644
index 0000000000..84a894d8cf
--- /dev/null
+++ b/app/controllers/albums_controller.rb
@@ -0,0 +1,14 @@
+class AlbumsController < ApplicationController
+
+ def index
+ @albums = Album.all.sort_by { |album| -album.rank }
+ end
+
+ def upvote
+ a = Album.find(params[:id])
+ a.rank += 1
+ a.save
+ redirect_to album_path(a)
+ end
+
+end
diff --git a/app/controllers/books_controller.rb b/app/controllers/books_controller.rb
index 1d4b459297..b8ca0e05b5 100644
--- a/app/controllers/books_controller.rb
+++ b/app/controllers/books_controller.rb
@@ -3,4 +3,12 @@ class BooksController < ApplicationController
def index
@books = Book.all.sort_by { |book| -book.rank }
end
+
+ def upvote
+ b = Book.find(params[:id])
+ b.rank += 1
+ b.save
+ redirect_to book_path(b)
+ end
+
end
diff --git a/app/views/albums/index.html.erb b/app/views/albums/index.html.erb
new file mode 100644
index 0000000000..d65c78cecd
--- /dev/null
+++ b/app/views/albums/index.html.erb
@@ -0,0 +1,2 @@
+<%= render partial:'shared/index',
+ locals:{media:@albums, media_type: :album } %>
diff --git a/config/routes.rb b/config/routes.rb
index 4f251378b8..ea0652d9bd 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,6 +1,8 @@
Rails.application.routes.draw do
patch 'movies/:id/upvote' => 'movies#upvote', as: :upvote_movie
+ patch 'albums/:id/upvote' => 'albums#upvote', as: :upvote_album
+ patch 'book/:id/upvote' => 'books#upvote', as: :upvote_book
resources :movies
diff --git a/db/seeds.rb b/db/seeds.rb
index cb9c2f972a..0755115177 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -17,3 +17,25 @@
seed_movies.each do |seed|
Movie.create(seed)
end
+
+seed_books = [
+ {name:"Friends", author:"Emily", description:"A book about friends", rank:12},
+ {name:"Another Book", author:"Emily", description:"Hi", rank:2},
+ {name:"Cats and Dogs", author:"You", description:"Great Book", rank:1}
+
+]
+
+seed_books.each do |seed|
+ Book.create(seed)
+end
+
+seed_albums = [
+ {name:"Songs to Sing", artist:"Emily", description:"Good Songs", rank:2},
+ {name:"Christmas Songs", artist:"Santa", description:"Songs for the Holiday", rank:23},
+ {name:"Songs about Cats", artist:"You", description:"Happy Songs", rank:23}
+
+]
+
+seed_albums.each do |seed|
+ Album.create(seed)
+end
From 98db05dffeb411546bcfc8baf8650eaa8b5f3297 Mon Sep 17 00:00:00 2001
From: emgord
Date: Tue, 1 Dec 2015 11:12:40 -0800
Subject: [PATCH 14/38] added rspec
---
.rspec | 2 +
Gemfile | 1 +
Gemfile.lock | 19 +++++
app/controllers/books_controller.rb | 4 +
app/models/movie.rb | 1 +
app/views/books/new.html.erb | 2 +
spec/controllers/movies_controller_spec.rb | 11 +++
spec/helpers/movies_helper_spec.rb | 15 ++++
spec/models/movie_spec.rb | 13 +++
spec/rails_helper.rb | 57 ++++++++++++++
spec/spec_helper.rb | 92 ++++++++++++++++++++++
11 files changed, 217 insertions(+)
create mode 100644 .rspec
create mode 100644 app/views/books/new.html.erb
create mode 100644 spec/controllers/movies_controller_spec.rb
create mode 100644 spec/helpers/movies_helper_spec.rb
create mode 100644 spec/models/movie_spec.rb
create mode 100644 spec/rails_helper.rb
create mode 100644 spec/spec_helper.rb
diff --git a/.rspec b/.rspec
new file mode 100644
index 0000000000..83e16f8044
--- /dev/null
+++ b/.rspec
@@ -0,0 +1,2 @@
+--color
+--require spec_helper
diff --git a/Gemfile b/Gemfile
index 69890fc981..57145188db 100644
--- a/Gemfile
+++ b/Gemfile
@@ -33,6 +33,7 @@ gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
+ gem 'rspec-rails'
end
group :development do
diff --git a/Gemfile.lock b/Gemfile.lock
index dee2f0686a..dd55459cce 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -55,6 +55,7 @@ GEM
execjs
coffee-script-source (1.10.0)
debug_inspector (0.0.2)
+ diff-lcs (1.2.5)
erubis (2.7.0)
execjs (2.6.0)
globalid (0.3.6)
@@ -120,6 +121,23 @@ GEM
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
rdoc (4.2.0)
+ rspec-core (3.4.1)
+ rspec-support (~> 3.4.0)
+ rspec-expectations (3.4.0)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.4.0)
+ rspec-mocks (3.4.0)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.4.0)
+ rspec-rails (3.4.0)
+ actionpack (>= 3.0, < 4.3)
+ activesupport (>= 3.0, < 4.3)
+ railties (>= 3.0, < 4.3)
+ rspec-core (~> 3.4.0)
+ rspec-expectations (~> 3.4.0)
+ rspec-mocks (~> 3.4.0)
+ rspec-support (~> 3.4.0)
+ rspec-support (3.4.1)
ruby-graphviz (1.2.2)
sass (3.4.19)
sass-rails (5.0.4)
@@ -170,6 +188,7 @@ DEPENDENCIES
pry-rails
rails (= 4.2.5)
rails-erd
+ rspec-rails
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
spring
diff --git a/app/controllers/books_controller.rb b/app/controllers/books_controller.rb
index b8ca0e05b5..94329b8788 100644
--- a/app/controllers/books_controller.rb
+++ b/app/controllers/books_controller.rb
@@ -11,4 +11,8 @@ def upvote
redirect_to book_path(b)
end
+ def new
+ @book = Book.new
+ end
+
end
diff --git a/app/models/movie.rb b/app/models/movie.rb
index 13d73ce457..1ea78bec6a 100644
--- a/app/models/movie.rb
+++ b/app/models/movie.rb
@@ -1,3 +1,4 @@
class Movie < ActiveRecord::Base
+ validates :name, presence: true
end
diff --git a/app/views/books/new.html.erb b/app/views/books/new.html.erb
new file mode 100644
index 0000000000..ddfcb91e29
--- /dev/null
+++ b/app/views/books/new.html.erb
@@ -0,0 +1,2 @@
+<%= render partial:'form',
+ locals:{media: @books, action: :create, title: "New Book", rank_value: 0, creator: :author} %>
diff --git a/spec/controllers/movies_controller_spec.rb b/spec/controllers/movies_controller_spec.rb
new file mode 100644
index 0000000000..e3af8fc3f5
--- /dev/null
+++ b/spec/controllers/movies_controller_spec.rb
@@ -0,0 +1,11 @@
+require 'rails_helper'
+
+RSpec.describe MoviesController, type: :controller do
+ describe "GET 'index'" do
+ it "is successful" do
+ get :index
+ expect(response.status).to eq 200
+ end
+ end
+
+end
diff --git a/spec/helpers/movies_helper_spec.rb b/spec/helpers/movies_helper_spec.rb
new file mode 100644
index 0000000000..355b810c3c
--- /dev/null
+++ b/spec/helpers/movies_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'rails_helper'
+
+# Specs in this file have access to a helper object that includes
+# the PostsHelper. For example:
+#
+# describe PostsHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# expect(helper.concat_strings("this","that")).to eq("this that")
+# end
+# end
+# end
+RSpec.describe MoviesHelper, type: :helper do
+ # pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/movie_spec.rb b/spec/models/movie_spec.rb
new file mode 100644
index 0000000000..dbc52d0d60
--- /dev/null
+++ b/spec/models/movie_spec.rb
@@ -0,0 +1,13 @@
+require 'rails_helper'
+
+RSpec.describe Movie, type: :model do
+ describe ".validates" do
+ it "must have a name" do
+ expect(Movie.new(name: nil)).to_not be_valid
+ end
+ end
+
+
+
+
+end
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
new file mode 100644
index 0000000000..6f1ab14638
--- /dev/null
+++ b/spec/rails_helper.rb
@@ -0,0 +1,57 @@
+# This file is copied to spec/ when you run 'rails generate rspec:install'
+ENV['RAILS_ENV'] ||= 'test'
+require File.expand_path('../../config/environment', __FILE__)
+# Prevent database truncation if the environment is production
+abort("The Rails environment is running in production mode!") if Rails.env.production?
+require 'spec_helper'
+require 'rspec/rails'
+# Add additional requires below this line. Rails is not loaded until this point!
+
+# Requires supporting ruby files with custom matchers and macros, etc, in
+# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
+# run as spec files by default. This means that files in spec/support that end
+# in _spec.rb will both be required and run as specs, causing the specs to be
+# run twice. It is recommended that you do not name files matching this glob to
+# end with _spec.rb. You can configure this pattern with the --pattern
+# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
+#
+# The following line is provided for convenience purposes. It has the downside
+# of increasing the boot-up time by auto-requiring all files in the support
+# directory. Alternatively, in the individual `*_spec.rb` files, manually
+# require only the support files necessary.
+#
+# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
+
+# Checks for pending migration and applies them before tests are run.
+# If you are not using ActiveRecord, you can remove this line.
+ActiveRecord::Migration.maintain_test_schema!
+
+RSpec.configure do |config|
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
+
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
+ # examples within a transaction, remove the following line or assign false
+ # instead of true.
+ config.use_transactional_fixtures = true
+
+ # RSpec Rails can automatically mix in different behaviours to your tests
+ # based on their file location, for example enabling you to call `get` and
+ # `post` in specs under `spec/controllers`.
+ #
+ # You can disable this behaviour by removing the line below, and instead
+ # explicitly tag your specs with their type, e.g.:
+ #
+ # RSpec.describe UsersController, :type => :controller do
+ # # ...
+ # end
+ #
+ # The different available types are documented in the features, such as in
+ # https://relishapp.com/rspec/rspec-rails/docs
+ config.infer_spec_type_from_file_location!
+
+ # Filter lines from Rails gems in backtraces.
+ config.filter_rails_from_backtrace!
+ # arbitrary gems may also be filtered via:
+ # config.filter_gems_from_backtrace("gem name")
+end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 0000000000..61e27385c3
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,92 @@
+# This file was generated by the `rails generate rspec:install` command. Conventionally, all
+# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
+# The generated `.rspec` file contains `--require spec_helper` which will cause
+# this file to always be loaded, without a need to explicitly require it in any
+# files.
+#
+# Given that it is always loaded, you are encouraged to keep this file as
+# light-weight as possible. Requiring heavyweight dependencies from this file
+# will add to the boot time of your test suite on EVERY test run, even for an
+# individual file that may not need all of that loaded. Instead, consider making
+# a separate helper file that requires the additional dependencies and performs
+# the additional setup, and require it from the spec files that actually need
+# it.
+#
+# The `.rspec` file also contains a few flags that are not defaults but that
+# users commonly want.
+#
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+RSpec.configure do |config|
+ # rspec-expectations config goes here. You can use an alternate
+ # assertion/expectation library such as wrong or the stdlib/minitest
+ # assertions if you prefer.
+ config.expect_with :rspec do |expectations|
+ # This option will default to `true` in RSpec 4. It makes the `description`
+ # and `failure_message` of custom matchers include text for helper methods
+ # defined using `chain`, e.g.:
+ # be_bigger_than(2).and_smaller_than(4).description
+ # # => "be bigger than 2 and smaller than 4"
+ # ...rather than:
+ # # => "be bigger than 2"
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
+ end
+
+ # rspec-mocks config goes here. You can use an alternate test double
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
+ config.mock_with :rspec do |mocks|
+ # Prevents you from mocking or stubbing a method that does not exist on
+ # a real object. This is generally recommended, and will default to
+ # `true` in RSpec 4.
+ mocks.verify_partial_doubles = true
+ end
+
+# The settings below are suggested to provide a good initial experience
+# with RSpec, but feel free to customize to your heart's content.
+=begin
+ # These two settings work together to allow you to limit a spec run
+ # to individual examples or groups you care about by tagging them with
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
+ # get run.
+ config.filter_run :focus
+ config.run_all_when_everything_filtered = true
+
+ # Allows RSpec to persist some state between runs in order to support
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
+ # you configure your source control system to ignore this file.
+ config.example_status_persistence_file_path = "spec/examples.txt"
+
+ # Limits the available syntax to the non-monkey patched syntax that is
+ # recommended. For more details, see:
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
+ config.disable_monkey_patching!
+
+ # Many RSpec users commonly either run the entire suite or an individual
+ # file, and it's useful to allow more verbose output when running an
+ # individual spec file.
+ if config.files_to_run.one?
+ # Use the documentation formatter for detailed output,
+ # unless a formatter has already been configured
+ # (e.g. via a command-line flag).
+ config.default_formatter = 'doc'
+ end
+
+ # Print the 10 slowest examples and example groups at the
+ # end of the spec run, to help surface which specs are running
+ # particularly slow.
+ config.profile_examples = 10
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = :random
+
+ # Seed global randomization in this process using the `--seed` CLI option.
+ # Setting this allows you to use `--seed` to deterministically reproduce
+ # test failures related to randomization by passing the same `--seed` value
+ # as the one that triggered the failure.
+ Kernel.srand config.seed
+=end
+end
From e9c0d4e8b2a065a1cc4e70f357c80fa92661556c Mon Sep 17 00:00:00 2001
From: emgord
Date: Tue, 1 Dec 2015 11:40:38 -0800
Subject: [PATCH 15/38] added validation for name on movies
---
app/controllers/movies_controller.rb | 17 +++++++++++++----
app/views/movies/edit.html.erb | 2 +-
app/views/movies/new.html.erb | 2 +-
app/views/{movies => shared}/_form.html.erb | 0
4 files changed, 15 insertions(+), 6 deletions(-)
rename app/views/{movies => shared}/_form.html.erb (100%)
diff --git a/app/controllers/movies_controller.rb b/app/controllers/movies_controller.rb
index e4e985770e..e58cfd5c16 100644
--- a/app/controllers/movies_controller.rb
+++ b/app/controllers/movies_controller.rb
@@ -9,8 +9,12 @@ def new
end
def create
- new_movie = Movie.create(movie_params[:movie])
- redirect_to movie_path(new_movie)
+ @movie = Movie.new(movie_params[:movie])
+ if @movie.save
+ redirect_to movie_path(@movie)
+ else
+ render "new"
+ end
end
def show
@@ -22,8 +26,13 @@ def edit
end
def update
- Movie.update(params[:id], movie_params[:movie])
- redirect_to movie_path(params[:id])
+ @movie = Movie.find(params[:id])
+ @movie.update( movie_params[:movie])
+ if @movie.save
+ redirect_to movie_path(@movie)
+ else
+ render "edit"
+ end
end
def destroy
diff --git a/app/views/movies/edit.html.erb b/app/views/movies/edit.html.erb
index efde984c76..4eaa000c0d 100644
--- a/app/views/movies/edit.html.erb
+++ b/app/views/movies/edit.html.erb
@@ -1,2 +1,2 @@
-<%= render partial:'form',
+<%= render partial:'shared/form',
locals:{movie:@movie, action: :update, title: "Edit Movie", rank_value: @movie.rank} %>
diff --git a/app/views/movies/new.html.erb b/app/views/movies/new.html.erb
index 5b3eeb7197..3fadba9ed2 100644
--- a/app/views/movies/new.html.erb
+++ b/app/views/movies/new.html.erb
@@ -1,2 +1,2 @@
-<%= render partial:'form',
+<%= render partial:'shared/form',
locals:{movie:@movie, action: :create, title: "New Movie", rank_value: 0} %>
diff --git a/app/views/movies/_form.html.erb b/app/views/shared/_form.html.erb
similarity index 100%
rename from app/views/movies/_form.html.erb
rename to app/views/shared/_form.html.erb
From 2271b5f22b663a082e9a688a90d41c1793c5c9c3 Mon Sep 17 00:00:00 2001
From: emgord
Date: Tue, 1 Dec 2015 14:02:53 -0800
Subject: [PATCH 16/38] added simplecov
---
.gitignore | 2 ++
Gemfile | 4 ++++
Gemfile.lock | 7 +++++++
app/views/shared/_form.html.erb | 20 ++++++++++++++++++++
spec/controllers/movies_controller_spec.rb | 16 +++++++++++-----
spec/spec_helper.rb | 3 +++
6 files changed, 47 insertions(+), 5 deletions(-)
diff --git a/.gitignore b/.gitignore
index 050c9d95c7..2eb6f54617 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,5 @@
/log/*
!/log/.keep
/tmp
+
+coverage
diff --git a/Gemfile b/Gemfile
index 57145188db..578de8c946 100644
--- a/Gemfile
+++ b/Gemfile
@@ -36,6 +36,10 @@ group :development, :test do
gem 'rspec-rails'
end
+group :test do
+ gem 'simplecov', require: false
+end
+
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index dd55459cce..ffb9abfa35 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -56,6 +56,7 @@ GEM
coffee-script-source (1.10.0)
debug_inspector (0.0.2)
diff-lcs (1.2.5)
+ docile (1.1.5)
erubis (2.7.0)
execjs (2.6.0)
globalid (0.3.6)
@@ -149,6 +150,11 @@ GEM
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
+ simplecov (0.11.0)
+ docile (~> 1.1.0)
+ json (~> 1.8)
+ simplecov-html (~> 0.10.0)
+ simplecov-html (0.10.0)
slop (3.6.0)
spring (1.5.0)
sprockets (3.4.1)
@@ -191,6 +197,7 @@ DEPENDENCIES
rspec-rails
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
+ simplecov
spring
sqlite3
turbolinks
diff --git a/app/views/shared/_form.html.erb b/app/views/shared/_form.html.erb
index cddeb61d58..f2a85b22c9 100644
--- a/app/views/shared/_form.html.erb
+++ b/app/views/shared/_form.html.erb
@@ -14,3 +14,23 @@
<% end %>
+
+
+
+
+
diff --git a/spec/controllers/movies_controller_spec.rb b/spec/controllers/movies_controller_spec.rb
index e3af8fc3f5..44a914d796 100644
--- a/spec/controllers/movies_controller_spec.rb
+++ b/spec/controllers/movies_controller_spec.rb
@@ -1,11 +1,17 @@
require 'rails_helper'
RSpec.describe MoviesController, type: :controller do
- describe "GET 'index'" do
- it "is successful" do
- get :index
- expect(response.status).to eq 200
+ describe "GET 'index'" do
+ it "is successful" do
+ get :index
+ expect(response.status).to eq 200
+ end
end
- end
+ describe "GET 'new'" do
+ it "renders new view" do
+ get :new
+ expect(subject).to render_template :new
+ end
+ end
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 61e27385c3..c1697e0176 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,3 +1,6 @@
+require 'simplecov'
+SimpleCov.start 'rails'
+
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause
From 05ecd42b19f10a1ab890ff0fb179901a8ccfdfaf Mon Sep 17 00:00:00 2001
From: emgord
Date: Tue, 1 Dec 2015 16:36:01 -0800
Subject: [PATCH 17/38] adding specs for movie controller
---
spec/controllers/movies_controller_spec.rb | 82 ++++++++++++++++++++++
1 file changed, 82 insertions(+)
diff --git a/spec/controllers/movies_controller_spec.rb b/spec/controllers/movies_controller_spec.rb
index 44a914d796..122dad4cf4 100644
--- a/spec/controllers/movies_controller_spec.rb
+++ b/spec/controllers/movies_controller_spec.rb
@@ -14,4 +14,86 @@
expect(subject).to render_template :new
end
end
+
+ describe "POST 'create'" do
+ let(:good_params) do
+ {
+ movie:{
+ name: "Hello", director: "You", description: "A Good Movie", rank: 0
+ }
+ }
+ end
+ let(:bad_params) do
+ {
+ movie:{
+ director: "You", description: "A Good Movie", rank: 0
+ }
+ }
+ end
+ it "redirects to show page" do
+ post :create, good_params
+ expect(subject).to redirect_to movie_path(assigns(:movie))
+ end
+ it "renders new template on error" do
+ post :create, bad_params
+ expect(subject).to render_template :new
+ end
+ end
+
+ describe "GET 'show'" do
+ test_movie = Movie.create( name: "Hello", director: "You", description: "A Good Movie", rank: 0 )
+
+ it "renders the show view" do
+ get :show, id: test_movie.id
+ expect(subject).to render_template :show
+ end
+ end
+
+ describe "GET 'edit'" do
+ let(:test_movie){
+ Movie.create( name: "Hello", director: "You", description: "A Good Movie", rank: 0 )
+ }
+ it "renders edit view" do
+ get :edit, id: test_movie.id
+ expect(subject).to render_template :edit
+ end
+end
+
+describe "PATCH 'update'" do
+ let(:good_params) do
+ {
+ id: 1,
+ movie:{
+ name: "Hello", director: "You", description: "A Good Movie", rank: 0
+ }
+ }
+ end
+
+ let(:bad_params) do
+ {
+ id: 1,
+ movie: { name: nil, director: "You", description: "A Good Movie", rank: 0 }
+ }
+ end
+ it "redirects to show page" do
+ patch :update, good_params
+ expect(subject).to redirect_to movie_path(assigns(:movie))
+ end
+ it "renders edit template on error" do
+ patch :update, bad_params
+ expect(subject).to render_template :edit
+ end
+end
+
+describe "DELETE 'destroy'" do
+ let(:test_movie){
+ Movie.create( name: "Hello", director: "You", description: "A Good Movie", rank: 0 )
+ }
+
+ it "redirects to the index view" do
+ delete :destroy, id: test_movie.id
+ expect(subject).to redirect_to movies_path
+ end
+end
+
end
From 6ee89b11cb7c88de0499627e8e19d463d3faac57 Mon Sep 17 00:00:00 2001
From: emgord
Date: Tue, 1 Dec 2015 16:55:42 -0800
Subject: [PATCH 18/38] added spec for upvote
---
spec/controllers/movies_controller_spec.rb | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/spec/controllers/movies_controller_spec.rb b/spec/controllers/movies_controller_spec.rb
index 122dad4cf4..f9a3e4b402 100644
--- a/spec/controllers/movies_controller_spec.rb
+++ b/spec/controllers/movies_controller_spec.rb
@@ -96,4 +96,22 @@
end
end
+describe "PATCH 'upvote'" do
+ start_rank = Movie.find(1).rank
+
+ let(:upvote_params) do {
+ id: 1
+ }
+ end
+
+ it "redirects to show page" do
+ patch :upvote, upvote_params
+ expect(subject).to redirect_to movie_path(1)
+ end
+ it "increases the rank value by 1" do
+ patch :upvote, upvote_params
+ expect(Movie.find(1).rank).to eq (start_rank + 1)
+ end
+ end
+
end
From 6c4a42585231c66c4a1e49efe07751fdbf3a230e Mon Sep 17 00:00:00 2001
From: emgord
Date: Wed, 2 Dec 2015 15:14:56 -0800
Subject: [PATCH 19/38] added bootstrap styling
---
Gemfile | 2 +-
Gemfile.lock | 7 ++
app/assets/images/owl.jpg | Bin 0 -> 13218 bytes
app/assets/javascripts/application.js | 1 +
.../{application.css => application.scss} | 18 +++++-
app/views/layouts/application.html.erb | 17 +++--
app/views/movies/show.html.erb | 30 +++++----
app/views/shared/_form.html.erb | 60 ++++++++----------
app/views/shared/_index.html.erb | 38 +++++------
9 files changed, 100 insertions(+), 73 deletions(-)
create mode 100644 app/assets/images/owl.jpg
rename app/assets/stylesheets/{application.css => application.scss} (73%)
diff --git a/Gemfile b/Gemfile
index 578de8c946..922f613846 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'
# Use sqlite3 as the database for Active Record
-
+gem 'bootstrap-sass', '~> 3.3.6'
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index ffb9abfa35..801083d137 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -37,12 +37,18 @@ GEM
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.3)
+ autoprefixer-rails (6.1.2)
+ execjs
+ json
better_errors (2.1.1)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
rack (>= 0.9.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
+ bootstrap-sass (3.3.6)
+ autoprefixer-rails (>= 5.2.1)
+ sass (>= 3.3.4)
builder (3.2.2)
byebug (8.2.1)
choice (0.2.0)
@@ -186,6 +192,7 @@ PLATFORMS
DEPENDENCIES
better_errors
binding_of_caller
+ bootstrap-sass (~> 3.3.6)
byebug
coffee-rails (~> 4.1.0)
jbuilder (~> 2.0)
diff --git a/app/assets/images/owl.jpg b/app/assets/images/owl.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..b3ded309503e7f923da57cb00fa145fbf656ae56
GIT binary patch
literal 13218
zcmbVy2UrtJ_xD0*f`TX=1q4I{DJn&31O-H;OD_>26zNR@gyafR1OWj-MF9Z;ktQAK
zy(mSxbP}o*NvHu5@-5!`dhh)|@AI|Ev%9}NbLPxBXJ*cs-3|FWc?LLnTU}EfprD`t
zZh=35jHRvAym14jtFNQ3c~=dr007z#*6!}klzaf-;_B_Guc69kVrs@mI|@(&oB#vB
z1u$6Kc)6?S>fQywa>RRd{dd_J20%#wFd+8d>;KLDKkgW8;a)ZXKtTu6-E6&VTtJKf
z0BUC&cTaBspqT^d*L=O*K}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