From a6508b5c9fe804e80127ab024ea9f11c109fcab8 Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Mon, 20 Oct 2014 22:47:13 +1100 Subject: [PATCH 01/12] replace debugger with byebug --- Gemfile | 4 +--- Gemfile.lock | 11 +++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 2360041eb..310292a25 100644 --- a/Gemfile +++ b/Gemfile @@ -80,9 +80,6 @@ gem 'flickraw' # To use debugger group :development do - # Installation of the debugger gem fails on Travis CI, - # so we don't use it in the test environment - gem 'debugger' # A debugger and irb alternative. Pry doesn't play nice # with unicorn, so start a Webrick server when debugging # with Pry @@ -123,6 +120,7 @@ gem 'omniauth-flickr', '>= 0.0.15' gem 'rake', '>= 10.0.0' group :development, :test do + gem 'byebug' # debugging gem 'haml-rails' # HTML templating language gem 'rspec-rails', '~> 2.12.1' # unit testing framework gem 'database_cleaner', '~> 1.3.0' diff --git a/Gemfile.lock b/Gemfile.lock index fae16d6ad..cb7cb2688 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,6 +60,10 @@ GEM bootstrap-datepicker-rails (1.3.0.2) railties (>= 3.0) builder (3.0.4) + byebug (3.5.1) + columnize (~> 0.8) + debugger-linecache (~> 1.2) + slop (~> 3.6) cancan (1.6.10) capybara (2.4.1) mime-types (>= 1.16) @@ -96,12 +100,7 @@ GEM dalli (2.7.2) database_cleaner (1.3.0) debug_inspector (0.0.2) - debugger (1.6.8) - columnize (>= 0.3.1) - debugger-linecache (~> 1.2.0) - debugger-ruby_core_source (~> 1.3.5) debugger-linecache (1.2.0) - debugger-ruby_core_source (1.3.5) devise (3.2.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -328,6 +327,7 @@ DEPENDENCIES bluecloth bootstrap-datepicker-rails bundler (>= 1.1.5) + byebug cancan capybara coffee-rails (~> 3.2.1) @@ -336,7 +336,6 @@ DEPENDENCIES csv_shaper dalli database_cleaner (~> 1.3.0) - debugger devise (~> 3.2.0) factory_girl_rails (~> 4.0) figaro From 48875dacb3bcb8440b93b9f9c42f1c80c5921f02 Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Tue, 21 Oct 2014 06:53:21 +1100 Subject: [PATCH 02/12] remove pry because it's redundant with byebug --- Gemfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Gemfile b/Gemfile index 310292a25..1739744bf 100644 --- a/Gemfile +++ b/Gemfile @@ -80,10 +80,6 @@ gem 'flickraw' # To use debugger group :development do - # A debugger and irb alternative. Pry doesn't play nice - # with unicorn, so start a Webrick server when debugging - # with Pry - gem 'pry' gem 'better_errors' gem 'binding_of_caller' gem 'letter_opener' From e9d1d11535b08d4baca9c4266d4ee3345fb668d3 Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Tue, 21 Oct 2014 19:43:51 +1100 Subject: [PATCH 03/12] add append date functionality for planting finished on garden show page and planting list page --- Gemfile | 4 ---- Gemfile.lock | 8 -------- app/views/plantings/_thumbnail.html.haml | 2 +- app/views/plantings/index.html.haml | 2 +- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index 2360041eb..65000a6d0 100644 --- a/Gemfile +++ b/Gemfile @@ -78,11 +78,7 @@ gem 'flickraw' # Use unicorn as the app server # gem 'unicorn' -# To use debugger group :development do - # Installation of the debugger gem fails on Travis CI, - # so we don't use it in the test environment - gem 'debugger' # A debugger and irb alternative. Pry doesn't play nice # with unicorn, so start a Webrick server when debugging # with Pry diff --git a/Gemfile.lock b/Gemfile.lock index fae16d6ad..6f6b7d1a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -77,7 +77,6 @@ GEM coffee-script-source execjs coffee-script-source (1.8.0) - columnize (0.8.9) commonjs (0.2.7) compass (0.12.7) chunky_png (~> 1.2) @@ -96,12 +95,6 @@ GEM dalli (2.7.2) database_cleaner (1.3.0) debug_inspector (0.0.2) - debugger (1.6.8) - columnize (>= 0.3.1) - debugger-linecache (~> 1.2.0) - debugger-ruby_core_source (~> 1.3.5) - debugger-linecache (1.2.0) - debugger-ruby_core_source (1.3.5) devise (3.2.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -336,7 +329,6 @@ DEPENDENCIES csv_shaper dalli database_cleaner (~> 1.3.0) - debugger devise (~> 3.2.0) factory_girl_rails (~> 4.0) figaro diff --git a/app/views/plantings/_thumbnail.html.haml b/app/views/plantings/_thumbnail.html.haml index c8588abf5..4d2b6cdee 100644 --- a/app/views/plantings/_thumbnail.html.haml +++ b/app/views/plantings/_thumbnail.html.haml @@ -42,6 +42,6 @@ - if can? :edit, planting =link_to 'Edit', edit_planting_path(planting), :class => 'btn btn-default btn-xs' - if ! planting.finished - = link_to "Mark as finished", planting_path(planting, :planting => {:finished => 1}), :method => :put, :class => 'btn btn-default btn-xs' + = link_to "Mark as finished", planting_path(planting, :planting => {:finished => 1}), :method => :put, :class => 'btn btn-default btn-xs append-date' - if can? :destroy, planting =link_to 'Delete', planting, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-default btn-xs' diff --git a/app/views/plantings/index.html.haml b/app/views/plantings/index.html.haml index eb1e017dc..e3edabae5 100644 --- a/app/views/plantings/index.html.haml +++ b/app/views/plantings/index.html.haml @@ -53,7 +53,7 @@ - if can? :edit, planting =link_to 'Edit', edit_planting_path(planting), :class => 'btn btn-default btn-xs' - if ! planting.finished - = link_to "Mark as finished", planting_path(planting, :planting => {:finished => 1}), :method => :put, :class => 'btn btn-default btn-xs' + = link_to "Mark as finished", planting_path(planting, :planting => {:finished => 1}), :method => :put, :class => 'btn btn-default btn-xs append-date' - if can? :destroy, planting =link_to 'Delete', planting, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-default btn-xs' From 9b10a7c3ceb0d9cb1f8b368342ceb14ac6e36cbb Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Thu, 23 Oct 2014 22:18:52 +1100 Subject: [PATCH 04/12] write shared example group for append date --- Gemfile | 1 + Gemfile.lock | 7 ++++++ spec/features/gardens_spec.rb | 9 +++++++ .../plantings/planting_a_crop_spec.rb | 24 +++++++++---------- .../shared_examples/append_date_spec.rb | 15 ++++++++++++ .../shared_examples/crop_suggest_spec.rb | 2 -- 6 files changed, 44 insertions(+), 14 deletions(-) create mode 100644 spec/features/shared_examples/append_date_spec.rb diff --git a/Gemfile b/Gemfile index 65000a6d0..939a146b2 100644 --- a/Gemfile +++ b/Gemfile @@ -119,6 +119,7 @@ gem 'omniauth-flickr', '>= 0.0.15' gem 'rake', '>= 10.0.0' group :development, :test do + gem 'byebug' gem 'haml-rails' # HTML templating language gem 'rspec-rails', '~> 2.12.1' # unit testing framework gem 'database_cleaner', '~> 1.3.0' diff --git a/Gemfile.lock b/Gemfile.lock index 6f6b7d1a5..cb7cb2688 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,6 +60,10 @@ GEM bootstrap-datepicker-rails (1.3.0.2) railties (>= 3.0) builder (3.0.4) + byebug (3.5.1) + columnize (~> 0.8) + debugger-linecache (~> 1.2) + slop (~> 3.6) cancan (1.6.10) capybara (2.4.1) mime-types (>= 1.16) @@ -77,6 +81,7 @@ GEM coffee-script-source execjs coffee-script-source (1.8.0) + columnize (0.8.9) commonjs (0.2.7) compass (0.12.7) chunky_png (~> 1.2) @@ -95,6 +100,7 @@ GEM dalli (2.7.2) database_cleaner (1.3.0) debug_inspector (0.0.2) + debugger-linecache (1.2.0) devise (3.2.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -321,6 +327,7 @@ DEPENDENCIES bluecloth bootstrap-datepicker-rails bundler (>= 1.1.5) + byebug cancan capybara coffee-rails (~> 3.2.1) diff --git a/spec/features/gardens_spec.rb b/spec/features/gardens_spec.rb index 1b803a41e..2b4c22d8b 100644 --- a/spec/features/gardens_spec.rb +++ b/spec/features/gardens_spec.rb @@ -2,6 +2,8 @@ require 'spec_helper' feature "Planting a crop", :js => true do let!(:garden) { FactoryGirl.create(:garden) } + let!(:planting) { FactoryGirl.create(:planting, garden: garden, planted_at: Date.parse("2013-3-10")) } + background do login_as(garden.owner) @@ -54,4 +56,11 @@ feature "Planting a crop", :js => true do expect(page).to have_content "#{garden.owner}'s gardens" end + describe "Making a planting inactive from garden show" do + let(:path) { garden_path(garden) } + let(:link_text) { "Mark as finished" } + + it_behaves_like "append date" + end + end diff --git a/spec/features/plantings/planting_a_crop_spec.rb b/spec/features/plantings/planting_a_crop_spec.rb index d8fae5c64..3f903887a 100644 --- a/spec/features/plantings/planting_a_crop_spec.rb +++ b/spec/features/plantings/planting_a_crop_spec.rb @@ -4,14 +4,14 @@ feature "Planting a crop", :js => true do let(:member) { FactoryGirl.create(:member) } let!(:maize) { FactoryGirl.create(:maize) } let(:garden) { FactoryGirl.create(:garden, owner: member) } - let(:planting) { FactoryGirl.create(:planting, garden: garden, planted_at: Date.parse("2013-3-10")) } + let!(:planting) { FactoryGirl.create(:planting, garden: garden, planted_at: Date.parse("2013-3-10")) } background do login_as(member) visit "/plantings/new" end - it_behaves_like "crop suggest", "planting", "crop" + it_behaves_like "crop suggest", "planting" scenario "Creating a new planting" do fill_autocomplete "crop", :with => "m" @@ -84,16 +84,16 @@ feature "Planting a crop", :js => true do expect(page).to have_content "Finished: Yes (no date specified)" end - scenario "Marking a planting as finished from the show page" do - this_month = Date.today.strftime("%B") - this_year = Date.today.strftime("%Y") - visit planting_path(planting) - click_link "Mark as finished" - within "div.datepicker" do - expect(page).to have_content "#{this_month}" - page.find(".datepicker-days td.day", text: "21").click - end - expect(page).to have_content "Finished: #{this_month} 21, #{this_year}" + describe "Marking a planting as finished from the show page" do + let(:path) { planting_path(planting) } + let(:link_text) { "Mark as finished" } + it_behaves_like "append date" + end + + describe "Marking a planting as finished from the list page" do + let(:path) { plantings_path } + let(:link_text) { "Mark as finished" } + it_behaves_like "append date" end end diff --git a/spec/features/shared_examples/append_date_spec.rb b/spec/features/shared_examples/append_date_spec.rb new file mode 100644 index 000000000..bf4a297b1 --- /dev/null +++ b/spec/features/shared_examples/append_date_spec.rb @@ -0,0 +1,15 @@ +shared_examples "append date" do + + scenario "Displaying a datepicker" do + this_month = Date.today.strftime("%B") + this_year = Date.today.strftime("%Y") + visit path + click_link link_text + within "div.datepicker" do + expect(page).to have_content "#{this_month}" + page.find(".datepicker-days td.day", text: "21").click + end + expect(page).to have_content "Finished: #{this_month} 21, #{this_year}" + end + +end \ No newline at end of file diff --git a/spec/features/shared_examples/crop_suggest_spec.rb b/spec/features/shared_examples/crop_suggest_spec.rb index 499bab891..da10072a3 100644 --- a/spec/features/shared_examples/crop_suggest_spec.rb +++ b/spec/features/shared_examples/crop_suggest_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - shared_examples "crop suggest" do |resource| let!(:popcorn) { FactoryGirl.create(:popcorn) } let!(:pear) { FactoryGirl.create(:pear) } From 0ccd6e843a1b1e79de69e89ee00aab965b51423a Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Thu, 23 Oct 2014 22:43:38 +1100 Subject: [PATCH 05/12] implement confirm without date functionality on appty on append date js --- app/assets/javascripts/append_date.js.coffee | 18 +++++++++++++++++- .../shared_examples/append_date_spec.rb | 9 ++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/append_date.js.coffee b/app/assets/javascripts/append_date.js.coffee index cf54f4654..8fc31de9d 100644 --- a/app/assets/javascripts/append_date.js.coffee +++ b/app/assets/javascripts/append_date.js.coffee @@ -8,12 +8,28 @@ jQuery -> el.datepicker({'format': 'yyyy-mm-dd'}) + href = el.attr('href') + + originalText = el.text() + el.click (e) -> e.stopPropagation() e.preventDefault() + $(this).text('Confirm without date') + + $(this).bind('click.confirm', (e) -> + link = $("") + $('body').append(link) + $(link).click() + ) + + $(this).blur (e) -> + $(this).text(originalText) + $(this).unbind('click.confirm') + + el.one 'changeDate', -> - href = $(this).attr('href') date = $(this).datepicker('getDate') url = "#{href}&planting[finished_at]=#{date}" diff --git a/spec/features/shared_examples/append_date_spec.rb b/spec/features/shared_examples/append_date_spec.rb index bf4a297b1..089680ff9 100644 --- a/spec/features/shared_examples/append_date_spec.rb +++ b/spec/features/shared_examples/append_date_spec.rb @@ -1,6 +1,6 @@ shared_examples "append date" do - scenario "Displaying a datepicker" do + scenario "Selecting a date with datepicker" do this_month = Date.today.strftime("%B") this_year = Date.today.strftime("%Y") visit path @@ -12,4 +12,11 @@ shared_examples "append date" do expect(page).to have_content "Finished: #{this_month} 21, #{this_year}" end + scenario "Confirming without selecting date" do + visit path + click_link link_text + click_link "Confirm without date" + expect(page).to have_content("Finished: Yes (no date specified) ") + end + end \ No newline at end of file From 2426c51951f0148a287fa41019623ef78b85cfb6 Mon Sep 17 00:00:00 2001 From: Skud Date: Tue, 11 Nov 2014 19:29:32 +1100 Subject: [PATCH 06/12] Fixed bug in deleting unused photos ... and wow, my tests were really not testing what I thought they were testing :-/ --- app/models/photo.rb | 2 +- spec/models/photo_spec.rb | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/app/models/photo.rb b/app/models/photo.rb index 32679eeed..862b9d28b 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -14,7 +14,7 @@ class Photo < ActiveRecord::Base # remove photos that aren't used by anything def destroy_if_unused - unless plantings.size > 0 and harvests.size > 0 + unless plantings.size > 0 or harvests.size > 0 self.destroy end end diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb index 2a0b1d5ff..f17127301 100644 --- a/spec/models/photo_spec.rb +++ b/spec/models/photo_spec.rb @@ -39,16 +39,20 @@ describe Photo do expect(lambda { photo.reload }).to raise_error ActiveRecord::RecordNotFound end - it 'they are no longer used by plantings' do + it 'they are used by plantings but not harvests' do + harvest.photos << photo planting.photos << photo - planting.destroy # photo is now no longer used by anything - expect(lambda { photo.reload }).to raise_error ActiveRecord::RecordNotFound + harvest.destroy # photo is now used by harvest but not planting + photo.destroy_if_unused + expect(lambda { photo.reload }).not_to raise_error ActiveRecord::RecordNotFound end - it 'they are no longer used by harvests' do + it 'they are used by harvests but not plantings' do harvest.photos << photo - harvest.destroy # photo is now no longer used by anything - expect(lambda { photo.reload }).to raise_error ActiveRecord::RecordNotFound + planting.photos << photo + planting.destroy # photo is now used by harvest but not planting + photo.destroy_if_unused + expect(lambda { photo.reload }).not_to raise_error ActiveRecord::RecordNotFound end it 'they are no longer used by anything' do @@ -59,11 +63,14 @@ describe Photo do planting.destroy # photo is still used by harvest photo.reload - expect(photo).to be_an_instance_of Photo expect(photo.plantings.size).to eq 0 expect(photo.harvests.size).to eq 1 harvest.destroy # photo is now no longer used by anything + photo.reload + expect(photo.plantings.size).to eq 0 + expect(photo.harvests.size).to eq 0 + photo.destroy_if_unused expect(lambda { photo.reload }).to raise_error ActiveRecord::RecordNotFound end From eb98910bea16d747b3fb5414dedf671b7d4c93eb Mon Sep 17 00:00:00 2001 From: Skud Date: Tue, 11 Nov 2014 19:45:07 +1100 Subject: [PATCH 07/12] Only send planting reminders to confirmed accounts --- lib/tasks/growstuff.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/growstuff.rake b/lib/tasks/growstuff.rake index c1043963d..4dd11bbcf 100644 --- a/lib/tasks/growstuff.rake +++ b/lib/tasks/growstuff.rake @@ -48,7 +48,7 @@ namespace :growstuff do every_n_weeks = 2 # send fortnightly if Date.today.cwday == send_on_day and Date.today.cw_week % every_n_weeks == 0 - Member.find_each do |m| + Member.confirmed.find_each do |m| Notifier.planting_reminder(m).deliver! end end From 50b8acc67cd51ca9ba131d56a473ef1ced163401 Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Tue, 11 Nov 2014 19:52:31 +1100 Subject: [PATCH 08/12] put finished at bottom of list to make it more obvious when marking a planting finished --- app/views/plantings/_thumbnail.html.haml | 16 ++++++++-------- app/views/plantings/show.html.haml | 17 +++++++++-------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/views/plantings/_thumbnail.html.haml b/app/views/plantings/_thumbnail.html.haml index 4d2b6cdee..fd34b0703 100644 --- a/app/views/plantings/_thumbnail.html.haml +++ b/app/views/plantings/_thumbnail.html.haml @@ -17,14 +17,6 @@ in = link_to planting.location, planting.garden - - if planting.finished - %p - Finished: - - if planting.finished_at - = planting.finished_at - - else - Yes (no date specified) - %p - if planting.quantity Quantity: @@ -37,6 +29,14 @@ :growstuff_markdown #{ planting.description } + - if planting.finished + %p + Finished: + - if planting.finished_at + = planting.finished_at + - else + Yes (no date specified) + - if can? :edit, planting or can? :destroy, planting %p - if can? :edit, planting diff --git a/app/views/plantings/show.html.haml b/app/views/plantings/show.html.haml index cc3d58bae..72819f7ac 100644 --- a/app/views/plantings/show.html.haml +++ b/app/views/plantings/show.html.haml @@ -11,14 +11,6 @@ %b Planted: = @planting.planted_at ? @planting.planted_at : "not specified" - - if @planting.finished - %p - %b Finished: - - if @planting.finished_at - = @planting.finished_at - - else - Yes (no date specified) - %p %b Where: =link_to "#{@planting.owner}'s", @planting.owner @@ -39,6 +31,15 @@ %b Sun or shade? = @planting.sunniness + - if @planting.finished + %p + %b Finished: + - if @planting.finished_at + = @planting.finished_at + - else + Yes (no date specified) + + - if can? :edit, @planting or can? :destroy, @planting %p From 267c67125922dd7fbc5f3a5681c914d2871a4391 Mon Sep 17 00:00:00 2001 From: Skud Date: Tue, 11 Nov 2014 20:55:04 +1100 Subject: [PATCH 09/12] cweek not cw_week --- lib/tasks/growstuff.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/growstuff.rake b/lib/tasks/growstuff.rake index 4dd11bbcf..0cf0a50f7 100644 --- a/lib/tasks/growstuff.rake +++ b/lib/tasks/growstuff.rake @@ -47,7 +47,7 @@ namespace :growstuff do send_on_day = 3 # wednesday every_n_weeks = 2 # send fortnightly - if Date.today.cwday == send_on_day and Date.today.cw_week % every_n_weeks == 0 + if Date.today.cwday == send_on_day and Date.today.cweek % every_n_weeks == 0 Member.confirmed.find_each do |m| Notifier.planting_reminder(m).deliver! end From caad748d081107203822ab2e041ea19cd57cf752 Mon Sep 17 00:00:00 2001 From: Yoong Kang Lim Date: Tue, 11 Nov 2014 20:54:16 +1100 Subject: [PATCH 10/12] Plantings index should display finished at date instead of planted at under the finished column. Added feature test for plantings index page. --- app/views/plantings/index.html.haml | 2 +- spec/features/plantings/planting_a_crop_spec.rb | 3 +++ spec/views/plantings/index.html.haml_spec.rb | 15 +++++++++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/views/plantings/index.html.haml b/app/views/plantings/index.html.haml index eb1e017dc..fe69ed344 100644 --- a/app/views/plantings/index.html.haml +++ b/app/views/plantings/index.html.haml @@ -43,7 +43,7 @@ %td= planting.planted_at %td - if planting.finished and planting.finished_at - = planting.planted_at + = planting.finished_at - elsif planting.finished Yes (no date specified) %td= planting.sunniness diff --git a/spec/features/plantings/planting_a_crop_spec.rb b/spec/features/plantings/planting_a_crop_spec.rb index ab120fa48..99114ab43 100644 --- a/spec/features/plantings/planting_a_crop_spec.rb +++ b/spec/features/plantings/planting_a_crop_spec.rb @@ -71,6 +71,9 @@ feature "Planting a crop", :js => true do end expect(page).to have_content "Planting was successfully created" expect(page).to have_content "Finished: August 30, 2014" + + visit plantings_path + expect(page).to have_content "August 30, 2014" end scenario "Marking a planting as finished without a date" do diff --git a/spec/views/plantings/index.html.haml_spec.rb b/spec/views/plantings/index.html.haml_spec.rb index d46b4e003..f80331117 100644 --- a/spec/views/plantings/index.html.haml_spec.rb +++ b/spec/views/plantings/index.html.haml_spec.rb @@ -8,8 +8,8 @@ describe "plantings/index" do @tomato = FactoryGirl.create(:tomato) @maize = FactoryGirl.create(:maize) page = 1 - per_page = 2 - total_entries = 2 + per_page = 3 + total_entries = 3 plantings = WillPaginate::Collection.create(page, per_page, total_entries) do |pager| pager.replace([ FactoryGirl.create(:planting, @@ -22,6 +22,13 @@ describe "plantings/index" do :crop => @maize, :description => '', :planted_at => Time.local(2013, 1, 13) + ), + FactoryGirl.create(:planting, + :garden => @garden, + :crop => @tomato, + :planted_at => Time.local(2013, 1, 13), + :finished_at => Time.local(2013, 1, 20), + :finished => true ) ]) end @@ -40,6 +47,10 @@ describe "plantings/index" do rendered.should contain 'January 13, 2013' end + it "displays finished time" do + rendered.should contain 'January 20, 2013' + end + it "provides data links" do render rendered.should contain "The data on this page is available in the following formats:" From 7023b4969bc3fa8a3e6a7ad9f31fbc74a99f8cf7 Mon Sep 17 00:00:00 2001 From: Kevin Rio Date: Tue, 11 Nov 2014 22:42:01 -0500 Subject: [PATCH 11/12] Update position of activity on member details page Switched activity and contact. --- app/views/members/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/members/show.html.haml b/app/views/members/show.html.haml index edf4d0b68..afb10d932 100644 --- a/app/views/members/show.html.haml +++ b/app/views/members/show.html.haml @@ -22,5 +22,5 @@ .col-md-3 = render :partial => "avatar", :locals => { :member => @member } = render :partial => "account", :locals => { :member => @member } - = render :partial => "contact", :locals => { :member => @member, :twitter_auth => @twitter_auth, :flickr_auth => @flickr_auth } = render :partial => "stats", :locals => { :member => @member } + = render :partial => "contact", :locals => { :member => @member, :twitter_auth => @twitter_auth, :flickr_auth => @flickr_auth } From b6d2a078b17a61d4e476141a4996e6faee5bda4c Mon Sep 17 00:00:00 2001 From: Kevin Rio Date: Tue, 11 Nov 2014 23:28:22 -0500 Subject: [PATCH 12/12] Adding to contributors list --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 650f8c321..d4e5085ee 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -48,3 +48,4 @@ submit the change with your pull request. - Maki Sugita / [macckii](https:://github.com/macckii) - Shiho Takagi / [oshiho3](https://github.com/oshiho3) - Emma Winston / [emmawinston](https://github.com/emmawinston) +- Kevin Rio / [krio](https://github.com/krio)