Permalink
Browse files

Merge branch '1-3-stable' of git://github.com/spree/spree into add_fi…

…lter_by_taxons_to_admin

* '1-3-stable' of git://github.com/spree/spree: (142 commits)
  Revert use of display_price in data-price attribute for _cart_form
  set position for a Variant object on creation
  Fix page action button style when method is put.
  Don't show coupon code field if there are no promos with coupon codes
  [sample] Remove duplicate master variants for ror_baseball_jersey and spree_baseball_jersey products
  Make OrderPopulator error messages translatable
  Allow the description to go straight to the page raw.
  [cmd] Ensure there is a linebreak before gem lines inserted before installer
  Rescue from DestroyWithOrdersError only if it's defined
  Backend shouldn't exist in 1-3-stable
  Remove backend+frontend from .travis.yml, add promo
  When using Russian Rubles, display the full currency symbol rather than just '.'
  add failling test for spree#2823
  Explicitly setting taxon edit path in the form
  Return html_safe strings from variant_price_diff
  Recalculate product count_on_hand when ANY of its variants are saved
  [api] Don't set taxon.parent_id in Api::TaxonsController if parameters contain parent_id
  Bump to selenium-webdriver 2.32.0
  Pass args to provider method with send in Spree::Gateway#method_missing
  Fix tax calculator with non-VAT taxes.
  ...
  • Loading branch information...
2 parents f8943a1 + b551dfa commit f90795aef152385040649999e27c82789a43a34e @sbounmy committed Apr 13, 2013
Showing with 1,857 additions and 943 deletions.
  1. +2 −6 .travis.yml
  2. +1 −3 CONTRIBUTING.md
  3. +35 −20 README.md
  4. +2 −0 api/app/controllers/spree/api/base_controller.rb
  5. +4 −5 api/app/controllers/spree/api/taxons_controller.rb
  6. +1 −1 api/app/controllers/spree/api/variants_controller.rb
  7. +1 −1 api/app/views/spree/api/line_items/show.v1.rabl
  8. +0 −4 api/app/views/spree/api/orders/payment.v1.rabl
  9. +1 −0 api/lib/spree/api/controller_setup.rb
  10. +8 −4 api/spec/controllers/spree/api/orders_controller_spec.rb
  11. +1 −1 api/spec/controllers/spree/api/payments_controller_spec.rb
  12. +1 −1 api/spec/controllers/spree/api/product_properties_controller_spec.rb
  13. +1 −1 api/spec/controllers/spree/api/products_controller_spec.rb
  14. +6 −0 api/spec/controllers/spree/api/shipments_controller_spec.rb
  15. +1 −0 api/spec/controllers/spree/api/variants_controller_spec.rb
  16. +1 −0 api/spec/spec_helper.rb
  17. +0 −3 api/spree_api.gemspec
  18. +1 −0 build.sh
  19. +8 −6 cmd/README.md
  20. +1 −1 cmd/lib/spree_cmd/installer.rb
  21. +3 −3 cmd/lib/spree_cmd/templates/extension/extension.gemspec
  22. +0 −1 cmd/lib/spree_cmd/templates/extension/rspec
  23. +1 −0 cmd/lib/spree_cmd/templates/extension/spec/spec_helper.rb.tt
  24. +1 −0 cmd/spec/spec_helper.rb
  25. +2 −2 common_spree_dependencies.rb
  26. BIN core/app/assets/images/credit_cards/icons/diners_club.png
  27. +2 −2 core/app/assets/javascripts/admin/calculator.js
  28. +3 −1 core/app/assets/javascripts/admin/checkouts/edit.js
  29. +5 −5 core/app/assets/javascripts/admin/image_settings.js.erb
  30. +1 −1 core/app/assets/javascripts/admin/orders/edit.js
  31. +13 −1 core/app/assets/javascripts/admin/spree_core.js
  32. +2 −1 core/app/assets/javascripts/admin/taxon_autocomplete.js.erb
  33. +4 −2 core/app/assets/javascripts/admin/variant_autocomplete.js.erb
  34. +1 −1 core/app/assets/javascripts/store/checkout.js.coffee
  35. +7 −6 core/app/assets/stylesheets/admin/components/_sidebar.scss
  36. +102 −96 core/app/assets/stylesheets/admin/globals/_variables.scss
  37. +1 −0 core/app/assets/stylesheets/admin/shared/_forms.scss
  38. +2 −1 core/app/assets/stylesheets/admin/shared/_icons.scss
  39. +4 −1 core/app/assets/stylesheets/admin/shared/_layout.scss
  40. +12 −0 core/app/assets/stylesheets/store/screen.css.scss
  41. +1 −1 core/app/controllers/spree/admin/orders_controller.rb
  42. +1 −1 core/app/controllers/spree/admin/resource_controller.rb
  43. +3 −1 core/app/controllers/spree/admin/users_controller.rb
  44. +10 −6 core/app/controllers/spree/checkout_controller.rb
  45. +1 −1 core/app/controllers/spree/orders_controller.rb
  46. +8 −2 core/app/controllers/spree/taxons_controller.rb
  47. +22 −2 core/app/helpers/spree/admin/navigation_helper.rb
  48. +7 −3 core/app/helpers/spree/base_helper.rb
  49. +9 −4 core/app/helpers/spree/products_helper.rb
  50. +16 −6 core/app/mailers/spree/order_mailer.rb
  51. +8 −3 core/app/mailers/spree/shipment_mailer.rb
  52. +5 −0 core/app/mailers/spree/test_mailer.rb
  53. +1 −1 core/app/models/spree/adjustment.rb
  54. +8 −1 core/app/models/spree/app_configuration.rb
  55. +5 −1 core/app/models/spree/calculator/default_tax.rb
  56. +7 −1 core/app/models/spree/gateway.rb
  57. +4 −4 core/app/models/spree/inventory_unit.rb
  58. +1 −1 core/app/models/spree/line_item.rb
  59. +13 −33 core/app/models/spree/order.rb
  60. +13 −0 core/app/models/spree/order/checkout.rb
  61. +11 −3 core/app/models/spree/order_populator.rb
  62. +0 −5 core/app/models/spree/order_updater.rb
  63. +21 −0 core/app/models/spree/payment.rb
  64. +17 −4 core/app/models/spree/payment/processing.rb
  65. +4 −0 core/app/models/spree/payment_method.rb
  66. +2 −3 core/app/models/spree/price.rb
  67. +10 −6 core/app/models/spree/product/scopes.rb
  68. +1 −1 core/app/models/spree/shipment.rb
  69. +19 −5 core/app/models/spree/taxon.rb
  70. +7 −2 core/app/models/spree/variant.rb
  71. +1 −1 core/app/views/spree/admin/adjustments/_adjustments_table.html.erb
  72. +10 −2 core/app/views/spree/admin/general_settings/edit.html.erb
  73. +2 −2 core/app/views/spree/admin/mail_methods/index.html.erb
  74. +3 −3 core/app/views/spree/admin/orders/_form.html.erb
  75. +1 −1 core/app/views/spree/admin/orders/_line_item.html.erb
  76. +4 −4 core/app/views/spree/admin/orders/customer_details/_form.html.erb
  77. +58 −52 core/app/views/spree/admin/orders/index.html.erb
  78. +2 −2 core/app/views/spree/admin/payment_methods/_form.html.erb
  79. +39 −35 core/app/views/spree/admin/payment_methods/index.html.erb
  80. +1 −1 core/app/views/spree/admin/payments/_list.html.erb
  81. +7 −12 core/app/views/spree/admin/products/_form.html.erb
  82. +4 −8 core/app/views/spree/admin/products/index.html.erb
  83. +3 −1 core/app/views/spree/admin/products/new.html.erb
  84. +7 −7 core/app/views/spree/admin/return_authorizations/_form.html.erb
  85. +17 −11 core/app/views/spree/admin/return_authorizations/edit.html.erb
  86. +3 −3 core/app/views/spree/admin/return_authorizations/index.html.erb
  87. +13 −6 core/app/views/spree/admin/return_authorizations/new.html.erb
  88. +3 −1 core/app/views/spree/admin/shared/_configuration_menu.html.erb
  89. +6 −6 core/app/views/spree/admin/shared/_order_details.html.erb
  90. +20 −37 core/app/views/spree/admin/shared/_order_tabs.html.erb
  91. +1 −1 core/app/views/spree/admin/shared/_routes.html.erb
  92. +1 −1 core/app/views/spree/admin/shared/_tabs.html.erb
  93. +1 −1 core/app/views/spree/admin/shared/_update_order_state.js
  94. +23 −23 core/app/views/spree/admin/shipments/_form.html.erb
  95. +12 −12 core/app/views/spree/admin/shipments/edit.html.erb
  96. +35 −31 core/app/views/spree/admin/shipments/index.html.erb
  97. +35 −32 core/app/views/spree/admin/shipping_methods/index.html.erb
  98. +17 −0 core/app/views/spree/admin/taxons/_form.html.erb
  99. +3 −1 core/app/views/spree/admin/taxons/edit.html.erb
  100. +2 −2 core/app/views/spree/admin/trackers/_form.html.erb
  101. +2 −2 core/app/views/spree/admin/trackers/index.html.erb
  102. +6 −4 core/app/views/spree/admin/variants/edit.html.erb
  103. +1 −1 core/app/views/spree/admin/variants/index.html.erb
  104. +1 −1 core/app/views/spree/checkout/_delivery.html.erb
  105. +1 −1 core/app/views/spree/checkout/_payment.html.erb
  106. +2 −2 core/app/views/spree/checkout/_summary.html.erb
  107. +1 −1 core/app/views/spree/order_mailer/cancel_email.text.erb
  108. +1 −1 core/app/views/spree/order_mailer/confirm_email.text.erb
  109. +1 −1 core/app/views/spree/orders/_adjustments.html.erb
  110. +2 −2 core/app/views/spree/orders/_line_item.html.erb
  111. +1 −1 core/app/views/spree/orders/edit.html.erb
  112. +16 −0 core/app/views/spree/payments/_payment.html.erb
  113. +2 −2 core/app/views/spree/products/_cart_form.html.erb
  114. +1 −1 core/app/views/spree/products/index.html.erb
  115. +9 −23 core/app/views/spree/shared/_order_details.html.erb
  116. +1 −1 core/app/views/spree/shared/_products.html.erb
  117. +1 −1 core/app/views/spree/taxons/show.html.erb
  118. +5 −2 core/config/initializers/check_for_orphaned_preferences.rb
  119. +18 −3 core/config/locales/en.yml
  120. +2 −0 core/db/default/spree/countries.rb
  121. +4 −0 core/db/default/spree/states.rb
  122. +5 −0 core/db/migrate/20130226032817_change_meta_description_on_spree_products_to_text.rb
  123. +5 −0 core/db/migrate/20130226054936_add_variant_id_index_to_spree_prices.rb
  124. +8 −0 core/db/migrate/20130319062004_change_orders_total_precision.rb
  125. +7 −0 core/db/migrate/20130319063911_change_spree_payments_amount_precision.rb
  126. +7 −0 core/db/migrate/20130319064308_change_spree_return_authorization_amount_precision.rb
  127. +7 −0 core/db/migrate/20130319082943_change_adjustments_amount_precision.rb
  128. +9 −0 core/db/migrate/20130328195253_add_seo_metas_to_taxons.rb
  129. +9 −6 core/lib/generators/spree/dummy/templates/rails/database.yml
  130. +0 −10 core/lib/spree/core/controller_helpers/common.rb
  131. +9 −0 core/lib/spree/core/controller_helpers/order.rb
  132. +3 −1 core/lib/spree/core/mail_settings.rb
  133. +1 −3 core/lib/spree/core/permalinks.rb
  134. +30 −0 core/lib/spree/core/testing_support/capybara_ext.rb
  135. +8 −0 core/lib/spree/core/testing_support/common_rake.rb
  136. +1 −1 core/lib/spree/core/testing_support/factories/payment_factory.rb
  137. +1 −1 core/lib/spree/core/validators/email.rb
  138. +14 −3 core/lib/spree/money.rb
  139. +95 −83 core/spec/controllers/spree/checkout_controller_spec.rb
  140. +20 −0 core/spec/helpers/base_helper_spec.rb
  141. +49 −15 core/spec/helpers/navigation_helper_spec.rb
  142. +21 −3 core/spec/helpers/products_helper_spec.rb
  143. +1 −1 core/spec/lib/mail_interceptor_spec.rb
  144. +4 −1 core/spec/lib/mail_settings_spec.rb
  145. +45 −8 core/spec/lib/money_spec.rb
  146. +54 −2 core/spec/mailers/order_mailer_spec.rb
  147. +15 −0 core/spec/mailers/shipment_mailer_spec.rb
  148. +4 −4 core/spec/models/adjustment_spec.rb
  149. +15 −2 core/spec/models/calculator/default_tax_spec.rb
  150. +1 −1 core/spec/models/order/checkout_spec.rb
  151. +1 −1 core/spec/models/order/payment_spec.rb
  152. +45 −26 core/spec/models/order/state_machine_spec.rb
  153. +11 −0 core/spec/models/order_populator_spec.rb
  154. +23 −16 core/spec/models/order_spec.rb
  155. +14 −0 core/spec/models/payment_spec.rb
  156. +2 −2 core/spec/models/product_spec.rb
  157. +1 −1 core/spec/models/shipment_spec.rb
  158. +24 −0 core/spec/models/spree/gateway_spec.rb
  159. +11 −3 core/spec/models/taxon_spec.rb
  160. +23 −7 core/spec/models/variant_spec.rb
  161. +1 −0 core/spec/requests/admin/orders/listing_spec.rb
  162. +36 −0 core/spec/requests/admin/orders/order_details_spec.rb
  163. +1 −1 core/spec/requests/admin/orders/payments_spec.rb
  164. +21 −0 core/spec/requests/admin/products/products_spec.rb
  165. +25 −2 core/spec/requests/admin/products/variant_spec.rb
  166. +63 −2 core/spec/requests/checkout_spec.rb
  167. +14 −0 core/spec/requests/order_spec.rb
  168. +41 −1 core/spec/requests/products_spec.rb
  169. +33 −0 core/spec/requests/taxons_spec.rb
  170. +1 −0 core/spec/spec_helper.rb
  171. +2 −9 core/spree_core.gemspec
  172. +3 −2 core/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js
  173. +2 −0 core/vendor/assets/javascripts/jsuri.js
  174. +37 −21 dash/app/views/spree/admin/analytics/edit.html.erb
  175. +1 −0 dash/spec/spec_helper.rb
  176. +2 −2 promo/app/assets/javascripts/admin/promotions.js
  177. +1 −1 promo/app/models/spree/calculator/percent_per_item.rb
  178. +4 −0 promo/app/models/spree/promotion.rb
  179. +1 −1 promo/app/models/spree/promotion/rules/user.rb
  180. +1 −1 promo/app/overrides/promo_cart_coupon_code_field.rb
  181. +1 −1 promo/app/views/spree/checkout/_coupon_code_field.html.erb
  182. +2 −5 promo/app/views/spree/orders/_coupon_code_field.html.erb
  183. +6 −0 promo/spec/models/calculator/percent_per_item_spec.rb
  184. +2 −7 promo/spec/models/promotion/rules/user_spec.rb
  185. +8 −7 promo/spec/requests/checkout_spec.rb
  186. +1 −1 promo/spec/requests/promotion_adjustments_spec.rb
  187. +9 −1 sample/Rakefile
  188. +5 −1 sample/db/samples/products.rb
  189. +7 −0 sample/db/samples/shipping_methods.rb
  190. +0 −28 sample/db/samples/variants.rb
  191. +23 −0 sample/lib/spree_sample.rb
  192. +11 −17 sample/lib/tasks/sample.rake
View
@@ -19,7 +19,7 @@ before_install:
- cd $GEM; export BUNDLE_GEMFILE="`pwd`/Gemfile"
script:
- bundle exec rake test_app
- - bundle exec rspec spec
+ - bundle exec rake spec
notifications:
email:
- ryan@spreecommerce.com
@@ -29,9 +29,5 @@ notifications:
channels:
- "irc.freenode.org#spree"
rvm:
- - 2.0.0
- 1.9.3
- - 1.8.7
-matrix:
- allow_failures:
- - rvm: 2.0.0
+ - 2.0.0
View
@@ -24,9 +24,7 @@ Here's a quick guide:
2. Run the tests. We only take pull requests with passing tests, and it's great
to know that you have a clean slate:
- $ bundle install
- $ bundle exec rake test_app
- $ bundle exec rake
+ $ bash build.sh
3. Add a test for your change. Only refactoring and documentation changes
require no new tests. If you are adding functionality or fixing a bug, we need
View
@@ -21,7 +21,6 @@ All of the gems are designed to work together to provide a fully functional e-co
however, to use only the pieces you are interested in. So for example, you could use just the barebones spree\_core gem
and perhaps combine it with your own custom promotion scheme instead of using spree_promo.
-[![Build Status](https://secure.travis-ci.org/spree/spree.png?branch=1-3-stable)](https://travis-ci.org/spree/spree)
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/spree/spree)
Installation
@@ -30,9 +29,9 @@ Installation
The fastest way to get started is by using the spree command line tool
available in the spree gem which will add Spree to an existing Rails application.
- $ gem install rails -v 3.2.12
+ $ gem install rails -v 3.2.13
$ gem install spree
- $ rails _3.2.12_ new my_store
+ $ rails _3.2.13_ new my_store
$ spree install my_store
This will add the Spree gem to your Gemfile, create initializers, copy migrations and
@@ -159,34 +158,50 @@ In order to set up the admin user for the application you should then run:
Running Tests
-------------
-Each gem contains its own series of tests, and for each directory, you need to do a quick one-time
-creation of a test application and then you can use it to run the tests. For example, to run the
-tests for the core project.
+[![Team City](http://www.jetbrains.com/img/logos/logo_teamcity_small.gif)](http://www.jetbrains.com/teamcity)
- $ cd core
- $ bundle exec rake test_app
+We use [TeamCity](http://www.jetbrains.com/teamcity/) to run the tests for Spree.
-If you're working on multiple facets of Spree, you may want
-to run this command at the root of the Spree project to
-generate test applications for all the facets:
+You can see the build statuses at [http://ci.spreecommerce.com](http://ci.spreecommerce.com/guestLogin.html?guest=1).
- $ bundle exec rake test_app
+---
-You can run all of the tests inside a facet by also running
-this command:
+Each gem contains its own series of tests, and for each directory, you need to do a quick one-time
+creation of a test application and then you can use it to run the tests. For example, to run the
+tests for the core project.
- $ cd core
- $ bundle exec rake
+```shell
+cd core
+bundle exec rake test_app
+bundle exec rspec spec
+```
If you want to run specs for only a single spec file
-
- $ bundle exec rspec spec/models/state_spec.rb
+```shell
+bundle exec rspec spec/models/state_spec.rb
+```
If you want to run a particular line of spec
+```shell
+bundle exec rspec spec/models/state_spec.rb:7
+```
- $ bundle exec rspec spec/models/state_spec.rb:7
+You can also enable fail fast in order to stop tests at the first failure
+```shell
+FAIL_FAST=true bundle exec rspec spec/models/state_spec.rb
+```
-Travis, the continuous integration service, runs the test suite for each gem one at a time, using the same commands as contained within [`build.sh`](https://github.com/spree/spree/tree/master/build.sh).
+If you want to run the simplecov code coverage report
+```shell
+COVERAGE=true bundle exec rspec spec
+```
+
+If you're working on multiple facets of Spree, you may want
+to run this command at the root of the Spree project to
+generate test applications and run specs for all the facets:
+```shell
+bash build.sh
+```
Contributing
------------
@@ -19,6 +19,8 @@ class BaseController < ActionController::Metal
helper Spree::Api::ApiHelpers
+ ssl_allowed
+
def set_jsonp_format
if params[:callback] && request.get?
self.response_body = "#{params[:callback]}(#{self.response_body})"
@@ -15,18 +15,17 @@ def show
def create
authorize! :create, Taxon
-
@taxon = Taxon.new(params[:taxon])
@taxon.taxonomy_id = params[:taxonomy_id]
taxonomy = Taxonomy.find_by_id(params[:taxonomy_id])
-
+
if taxonomy.nil?
@taxon.errors[:taxonomy_id] = "Invalid taxonomy_id."
invalid_resource!(@taxon) and return
end
-
- @taxon.parent_id = taxonomy.root.id
-
+
+ @taxon.parent_id = taxonomy.root.id unless params[:taxon][:parent_id]
+
if @taxon.save
respond_with(@taxon, :status => 201, :default_template => :show)
else
@@ -21,7 +21,7 @@ def new
def create
authorize! :create, Variant
- @variant = scope.new(params[:product])
+ @variant = scope.new(params[:variant])
if @variant.save
respond_with(@variant, :status => 201, :default_template => :show)
else
@@ -2,6 +2,6 @@ object @line_item
attributes *line_item_attributes
child :variant do
extends "spree/api/variants/variant"
- child(:product) { attributes :id, :description }
+ attributes :product_id
child(:images => :images) { extends "spree/api/images/show" }
end
@@ -1,4 +0,0 @@
-attributes :id, :amount, :payment_method_id
-child :payment_method => :payment_method do
- attributes :id, :name, :environment
-end
@@ -16,6 +16,7 @@ def self.included(klass)
include ActionController::MimeResponds
include CanCan::ControllerAdditions
+ include SslRequirement
prepend_view_path Rails.root + "app/views"
append_view_path File.expand_path("../../../app/views", File.dirname(__FILE__))
@@ -160,11 +160,10 @@ def clean_address(address)
json_response['line_items'].first['variant'].should have_attributes([:images])
end
- it "lists variants product id and description" do
+ it "lists variants product id" do
api_get :show, :id => order.to_param
-
- json_response['line_items'].first['variant']['product'].should_not be_nil
- json_response['line_items'].first['variant']['product'].should have_attributes([:id, :description])
+
+ json_response['line_items'].first['variant'].should have_attributes([:product_id])
end
end
end
@@ -223,6 +222,11 @@ def clean_address(address)
context "can cancel an order" do
before do
+ Spree::MailMethod.create!(
+ :environment => Rails.env,
+ :preferred_mails_from => "spree@example.com"
+ )
+
order.completed_at = Time.now
order.state = 'complete'
order.shipment_state = 'ready'
@@ -162,7 +162,7 @@ module Spree
json_response["error"].should == "There was a problem with the payment gateway: NO REFUNDS"
payment.reload
- payment.state.should == "pending"
+ payment.state.should == "checkout"
end
context "crediting" do
@@ -18,7 +18,7 @@ module Spree
context "if product is deleted" do
before do
- product.update_column(:deleted_at, Time.now)
+ product.update_column(:deleted_at, 1.day.ago)
end
it "can not see a list of product properties" do
@@ -143,7 +143,7 @@ module Spree
# Regression test for #1626
context "deleted products" do
before do
- create(:product, :deleted_at => Time.now)
+ create(:product, :deleted_at => 1.day.ago)
end
it "does not include deleted products" do
@@ -44,6 +44,12 @@
context "can transition a shipment from ready to ship" do
before do
Spree::Order.any_instance.stub(:paid? => true, :complete? => true)
+ # For the shipment notification email
+ Spree::MailMethod.create!(
+ :environment => Rails.env,
+ :preferred_mails_from => "spree@example.com"
+ )
+
shipment.update!(shipment.order)
shipment.state.should == "ready"
end
@@ -155,6 +155,7 @@ module Spree
api_post :create, :variant => { :sku => "12345" }
json_response.should have_attributes(attributes)
response.status.should == 201
+ json_response["sku"].should == "12345"
variant.product.variants.count.should == 1
end
View
@@ -15,6 +15,7 @@
RSpec.configure do |config|
config.backtrace_clean_patterns = [/gems\/activesupport/, /gems\/actionpack/, /gems\/rspec/]
+ config.color = true
config.include FactoryGirl::Syntax::Methods
config.include Spree::Api::TestingSupport::Helpers, :type => :controller
View
@@ -17,7 +17,4 @@ Gem::Specification.new do |gem|
gem.add_dependency 'spree_core', version
gem.add_dependency 'versioncake', '0.4.0'
-
- gem.add_development_dependency 'rspec-rails', '2.9.0'
- gem.add_development_dependency 'database_cleaner'
end
View
@@ -1,4 +1,5 @@
alias set_gemfile='export BUNDLE_GEMFILE="`pwd`/Gemfile"'
+ bundle check || bundle install
bundle exec rake test_app
cd api; set_gemfile; bundle install; bundle exec rspec spec
cd ../core; set_gemfile; bundle install; bundle exec rspec spec
View
@@ -42,14 +42,16 @@ to use a local clone of Spree, pass the --path option
spree install my_store --path=../spree
-options
+Options
-------
-* --auto_accept - answer yes to all questions
-* --edge - to use the edge version of Spree
-* --path=../spree - to use a local version of spree
-* --git=git@github.com:cmar/spree.git
-* --branch=my_changes or --ref=23423423423423 or --tag=my_tag
+* `--auto_accept` to answer yes to all questions
+* `--edge` to use the edge version of Spree
+* `--path=../spree` to use a local version of spree
+* `--git=git@github.com:cmar/spree.git` to use git version of spree
+ * `--branch=my_changes` to use git branch
+ * `--ref=23423423423423` to use git reference
+ * `--tag=my_tag` to use git tag
Older Versions of Spree
-----------------------
@@ -125,7 +125,7 @@ def gem(name, gem_options={})
parts = ["'#{name}'"]
parts << ["'#{gem_options.delete(:version)}'"] if gem_options[:version]
gem_options.each { |key, value| parts << ":#{key} => '#{value}'" }
- append_file 'Gemfile', "gem #{parts.join(', ')}\n", :verbose => false
+ append_file 'Gemfile', "\ngem #{parts.join(', ')}", :verbose => false
end
def ask_with_default(message, default = 'yes')
@@ -18,11 +18,11 @@ Gem::Specification.new do |s|
s.add_dependency 'spree_core', '~> <%= spree_version %>'
- s.add_development_dependency 'capybara', '~> 1.1.2'
+ s.add_development_dependency 'capybara', '~> 2.0'
s.add_development_dependency 'coffee-rails'
- s.add_development_dependency 'factory_girl', '~> 2.6.4'
+ s.add_development_dependency 'factory_girl', '~> 4.2'
s.add_development_dependency 'ffaker'
- s.add_development_dependency 'rspec-rails', '~> 2.9'
+ s.add_development_dependency 'rspec-rails', '~> 2.13'
s.add_development_dependency 'sass-rails'
s.add_development_dependency 'sqlite3'
end
@@ -1 +0,0 @@
---colour
@@ -35,6 +35,7 @@ RSpec.configure do |config|
# config.mock_with :flexmock
# config.mock_with :rr
config.mock_with :rspec
+ config.color = true
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures"
View
@@ -3,6 +3,7 @@
ENV["RAILS_ENV"] ||= 'test'
RSpec.configure do |config|
+ config.color = true
config.mock_with :rspec
config.fixture_path = "#{::Rails.root}/spec/fixtures"
@@ -22,8 +22,8 @@
gem 'ffaker'
gem 'shoulda-matchers', '~> 1.0.0'
- gem 'capybara', '1.1.3'
- gem 'selenium-webdriver', '2.30.0'
+ gem 'capybara', '~> 1.1'
+ gem 'selenium-webdriver', '2.32.0'
gem 'database_cleaner', '0.7.1'
gem 'launchy'
gem 'debugger'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -6,11 +6,11 @@ $(function() {
if (calculator_select.attr('value') == original_calc_type) {
$('div.calculator-settings').show();
$('div#calculator-settings-warning').hide();
- $('.calculator-settings input').prop("disabled", false);
+ $('.calculator-settings').find('input,textarea').prop("disabled", false);
} else {
$('div.calculator-settings').hide();
$('div#calculator-settings-warning').show();
- $('.calculator-settings input').prop("disabled", true);
+ $('.calculator-settings').find('input,textarea').prop("disabled", true);
}
});
})
@@ -1,5 +1,7 @@
$(document).ready(function() {
- window.customerTemplate = Handlebars.compile($('#customer_autocomplete_template').text());
+ if ($('#customer_autocomplete_template').length > 0) {
+ window.customerTemplate = Handlebars.compile($('#customer_autocomplete_template').text());
+ }
formatCustomerResult = function(customer) {
return customerTemplate({
Oops, something went wrong.

0 comments on commit f90795a

Please sign in to comment.