From e61767fe787ecf15a180677aaea16c6af4c5fc11 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Wed, 6 Aug 2014 18:46:36 +0200 Subject: [PATCH] Broken end of day commit --- Gemfile.lock | 24 +++++++++---------- Procfile | 3 ++- .../supplier/app/models/list.js.coffee | 2 +- .../javascripts/supplier/app/router.js.coffee | 2 +- .../app/routes/sections_route.js.coffee | 6 ++--- .../supplier/app/templates/active_list.emblem | 2 +- .../app/templates/active_order.emblem | 2 +- .../suppliers/sections_controller.rb | 1 - app/helpers/application_helper.rb | 4 ++-- .../suppliers/navigation_steps.rb | 2 +- .../suppliers/section_view_steps.rb | 1 + 11 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a2355be4..93ab353a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -87,8 +87,8 @@ GEM i18n rake (>= 10.0.0) sshkit (~> 1.3) - capistrano-bundler (1.1.2) - capistrano (~> 3.0) + capistrano-bundler (1.1.3) + capistrano (~> 3.1) sshkit (~> 1.2) capistrano-rails (1.1.1) capistrano (~> 3.1) @@ -183,7 +183,7 @@ GEM websocket-driver (>= 0.3.1) font-awesome-rails (4.1.0.0) railties (>= 3.2, < 5.0) - foundation-rails (5.3.1.0) + foundation-rails (5.3.3.0) railties (>= 3.1.0) sass (>= 3.2.0) fuubar (1.3.3) @@ -203,7 +203,7 @@ GEM hike (1.2.3) http_parser.rb (0.6.0) i18n (0.6.11) - iso_country_codes (0.4.3) + iso_country_codes (0.4.4) jquery-rails (3.1.1) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) @@ -226,7 +226,7 @@ GEM treetop (~> 1.4.8) method_source (0.8.2) mime-types (1.25.1) - mini_magick (3.7.0) + mini_magick (3.8.0) subexec (~> 0.2.1) mini_portile (0.6.0) minitest (5.4.0) @@ -236,7 +236,7 @@ GEM net-scp (1.2.1) net-ssh (>= 2.6.5) net-ssh (2.9.1) - nokogiri (1.6.3) + nokogiri (1.6.3.1) mini_portile (= 0.6.0) oauth2 (1.0.0) faraday (>= 0.8, < 0.10) @@ -299,17 +299,17 @@ GEM rspec-core (~> 3.0.0) rspec-expectations (~> 3.0.0) rspec-mocks (~> 3.0.0) - rspec-core (3.0.2) + rspec-core (3.0.3) rspec-support (~> 3.0.0) - rspec-expectations (3.0.2) + rspec-expectations (3.0.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.0.0) rspec-its (1.0.1) rspec-core (>= 2.99.0.beta1) rspec-expectations (>= 2.99.0.beta1) - rspec-mocks (3.0.2) + rspec-mocks (3.0.3) rspec-support (~> 3.0.0) - rspec-rails (3.0.1) + rspec-rails (3.0.2) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) @@ -317,7 +317,7 @@ GEM rspec-expectations (~> 3.0.0) rspec-mocks (~> 3.0.0) rspec-support (~> 3.0.0) - rspec-support (3.0.2) + rspec-support (3.0.3) ruby-progressbar (1.5.1) sass (3.2.19) sass-rails (4.0.3) @@ -367,7 +367,7 @@ GEM thor (0.19.1) thread_safe (0.3.4) tilt (1.4.1) - tinymce-rails (4.1.2) + tinymce-rails (4.1.3) railties (>= 3.1.1) treetop (1.4.15) polyglot diff --git a/Procfile b/Procfile index 263ac329..17919615 100644 --- a/Procfile +++ b/Procfile @@ -1,4 +1,5 @@ #web: bundle exec thin start -p $PORT faye: thin start -R faye/config.ru -p 9296 #faye: rackup faye.ru -s thin -E production -counters: bin/drb_counter.rb start +counters: bin/drb_counter.rb run +database: echo "BuenosAires" | sudo -S couchdb start | ~/bin/couch_output diff --git a/app/assets/javascripts/supplier/app/models/list.js.coffee b/app/assets/javascripts/supplier/app/models/list.js.coffee index 60ec4802..50782143 100644 --- a/app/assets/javascripts/supplier/app/models/list.js.coffee +++ b/app/assets/javascripts/supplier/app/models/list.js.coffee @@ -4,7 +4,7 @@ Qsupplier.App.List = DS.Model.extend needs_help: attr 'boolean' needs_payment: attr 'boolean' user_requests_closing: attr('boolean') - users: DS.hasMany('user') + users: DS.hasMany('user', async: true) is_paid: attr 'boolean' #has_active_orders: attr 'boolean' diff --git a/app/assets/javascripts/supplier/app/router.js.coffee b/app/assets/javascripts/supplier/app/router.js.coffee index bbbf929f..fbf0fe9b 100644 --- a/app/assets/javascripts/supplier/app/router.js.coffee +++ b/app/assets/javascripts/supplier/app/router.js.coffee @@ -1,7 +1,7 @@ # For more information see: http://emberjs.com/guides/routing/ # and for queryParams: https://github.com/alexspeller/website/blob/a96d9afe4506454b155cc64299e86e558ce3c9f1/source/guides/routing/query-params.md Qsupplier.App.Router.reopen - location: 'history' + # location: 'history' rootURL: '/supplier' Qsupplier.App.Router.map -> diff --git a/app/assets/javascripts/supplier/app/routes/sections_route.js.coffee b/app/assets/javascripts/supplier/app/routes/sections_route.js.coffee index 56d64314..19b4c336 100644 --- a/app/assets/javascripts/supplier/app/routes/sections_route.js.coffee +++ b/app/assets/javascripts/supplier/app/routes/sections_route.js.coffee @@ -1,5 +1,5 @@ Qsupplier.App.SectionsRoute = Ember.Route.extend - model: -> @store.all 'section' + model: -> @store.all 'section' - setupController: (controller, collection) -> - controller.set 'content', collection + # setupController: (controller, collection) -> + # controller.set 'content', collection diff --git a/app/assets/javascripts/supplier/app/templates/active_list.emblem b/app/assets/javascripts/supplier/app/templates/active_list.emblem index a2de9c18..d7a2bbb4 100644 --- a/app/assets/javascripts/supplier/app/templates/active_list.emblem +++ b/app/assets/javascripts/supplier/app/templates/active_list.emblem @@ -8,7 +8,7 @@ td.status-icons | span.icon.needs-payment td.numeric.table_number: Qsupplier.App.TableNumberWithInfoView contextBinding="view.content" -td.section_title {{view.content.section.title}} +td.section_title: link-to 'section' view.content.section.id: span=view.content.section.title td.currency.total_list_amount {{currency view.content.total}} td.actions / if view.content.needs_help diff --git a/app/assets/javascripts/supplier/app/templates/active_order.emblem b/app/assets/javascripts/supplier/app/templates/active_order.emblem index 7c140d4a..5a0ca75e 100644 --- a/app/assets/javascripts/supplier/app/templates/active_order.emblem +++ b/app/assets/javascripts/supplier/app/templates/active_order.emblem @@ -5,7 +5,7 @@ td.status-icons span.active-order.fa.fa-check.fa-lg td= view.content.display td.numeric.table_number: Qsupplier.App.TableNumberWithInfoView contextBinding="view.content.list" -td.section_title= view.content.list.section.title +td.section_title: link-to 'section' view.content.list.section.id: span=view.content.list.section.title td.currency=currency view.content.total td.actions if view.content.placed diff --git a/app/controllers/suppliers/sections_controller.rb b/app/controllers/suppliers/sections_controller.rb index 7605f504..9e0f6336 100644 --- a/app/controllers/suppliers/sections_controller.rb +++ b/app/controllers/suppliers/sections_controller.rb @@ -16,7 +16,6 @@ module Suppliers end end - respond_to do |format| format.html # index.html.erb format.json { render json: @sections, each_serializer: SupplierExtendedSectionSerializer } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0bea4370..1802774a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -47,7 +47,7 @@ module ApplicationHelper end def application_title - 'Qwaiter' + 'mozo.bar' end # Helper for displaying HTML currency values @@ -62,7 +62,7 @@ module ApplicationHelper prefix = '€ ' return (prefix + ("%.2f" % amount)).html_safe - # Rails native is ambiguous since is uses translation hashes + # Rails native is ambiguous since is uses translation hashes options = {:unit => '€'}.merge(opts) number_to_currency(amount, options) end diff --git a/spec/acceptance_steps/suppliers/navigation_steps.rb b/spec/acceptance_steps/suppliers/navigation_steps.rb index fd09e337..b1ff4002 100644 --- a/spec/acceptance_steps/suppliers/navigation_steps.rb +++ b/spec/acceptance_steps/suppliers/navigation_steps.rb @@ -7,7 +7,7 @@ step "I visit the supplier root path" do end step "I visit the supplier section path" do - visit "/supplier/sections/#{@section.id}" + visit "/supplier#/sections/#{@section.id}" end step "I visit the supplier last section path" do diff --git a/spec/acceptance_steps/suppliers/section_view_steps.rb b/spec/acceptance_steps/suppliers/section_view_steps.rb index dbe88dcd..a07d9142 100644 --- a/spec/acceptance_steps/suppliers/section_view_steps.rb +++ b/spec/acceptance_steps/suppliers/section_view_steps.rb @@ -27,6 +27,7 @@ step "the section table should be marked as in need of help" do end step "the section table should not be marked as in need of help" do + binding.pry table = page.find(".section-table-#{@table.id}") table['class'].should_not include 'needs_help' end