Permalink
Browse files

support spree 1.1

  • Loading branch information...
1 parent 22e98a1 commit 9fa5cdebeff0c84a33c4af178e08675745d5dace @sbounmy sbounmy committed May 17, 2012
View
@@ -4,7 +4,5 @@ group :test do
gem 'ffaker'
end
-gem 'awesome_print'
-gem 'spree_auth', '~> 1.0.3'
gemspec
View
@@ -8,60 +8,61 @@ PATH
i18n
rack-contrib
routing-filter (~> 0.3.1)
- sass
- spree_core (~> 1.0.3)
+ spree_core (~> 1.1.0)
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.1.4)
- actionpack (= 3.1.4)
- mail (~> 2.3.0)
- actionpack (3.1.4)
- activemodel (= 3.1.4)
- activesupport (= 3.1.4)
+ actionmailer (3.2.3)
+ actionpack (= 3.2.3)
+ mail (~> 2.4.4)
+ actionpack (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
- i18n (~> 0.6)
- rack (~> 1.3.6)
- rack-cache (~> 1.1)
- rack-mount (~> 0.8.2)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
rack-test (~> 0.6.1)
- sprockets (~> 2.0.3)
+ sprockets (~> 2.1.2)
active_utils (1.0.3)
activesupport (>= 2.3.11)
i18n
- activemerchant (1.20.1)
- active_utils (>= 1.0.1)
+ activemerchant (1.20.4)
+ active_utils (>= 1.0.2)
activesupport (>= 2.3.11)
braintree (>= 2.0.0)
builder (>= 2.0.0)
i18n
json (>= 1.5.1)
money (<= 3.7.1)
- activemodel (3.1.4)
- activesupport (= 3.1.4)
+ activemodel (3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
- i18n (~> 0.6)
- activerecord (3.1.4)
- activemodel (= 3.1.4)
- activesupport (= 3.1.4)
- arel (~> 2.2.3)
+ activerecord (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.1.4)
- activemodel (= 3.1.4)
- activesupport (= 3.1.4)
- activesupport (3.1.4)
+ activeresource (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ activesupport (3.2.3)
+ i18n (~> 0.6)
multi_json (~> 1.0)
acts_as_list (0.1.4)
- addressable (2.2.7)
- arel (2.2.3)
+ addressable (2.2.8)
+ arel (3.0.2)
awesome_print (1.0.2)
- bcrypt-ruby (3.0.1)
+ aws-sdk (1.3.9)
+ httparty (~> 0.7)
+ json (~> 1.4)
+ nokogiri (>= 1.4.4)
+ uuidtools (~> 2.1)
braintree (2.16.0)
builder (>= 2.0.0)
builder (3.0.0)
- cancan (1.6.7)
capybara (1.0.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
@@ -72,41 +73,44 @@ GEM
childprocess (0.3.2)
ffi (~> 1.0.6)
cocaine (0.2.1)
- coffee-rails (3.1.1)
+ coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
- railties (~> 3.1.0)
+ railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
- coffee-script-source (1.3.1)
+ coffee-script-source (1.3.3)
deface (0.8.0)
nokogiri (~> 1.5.0)
rails (>= 3.0.9)
- devise (1.4.8)
- bcrypt-ruby (~> 3.0)
- orm_adapter (~> 0.0.3)
- warden (~> 1.0.3)
diff-lcs (1.1.3)
easy_globalize3_accessors (1.2.0)
globalize3 (~> 0.2.0.beta1)
erubis (2.7.0)
- execjs (1.3.1)
+ execjs (1.3.2)
multi_json (~> 1.0)
- factory_girl (3.1.1)
- activesupport (>= 3.0.0)
+ factory_girl (2.6.4)
+ activesupport (>= 2.3.9)
+ factory_girl_rails (1.7.0)
+ factory_girl (~> 2.6.0)
+ railties (>= 3.0.0)
ffaker (1.12.1)
ffi (1.0.11)
globalize3 (0.2.0)
activemodel (>= 3.0.0)
activerecord (>= 3.0.0)
paper_trail (~> 2)
- highline (1.6.8)
+ highline (1.6.11)
hike (1.2.1)
+ httparty (0.8.3)
+ multi_json (~> 1.0)
+ multi_xml
i18n (0.6.0)
- jquery-rails (1.0.19)
- railties (~> 3.0)
+ journey (1.0.3)
+ jquery-rails (2.0.2)
+ railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
- json (1.6.6)
+ json (1.7.3)
kaminari (0.13.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
@@ -115,63 +119,60 @@ GEM
addressable (~> 2.2.6)
libwebsocket (0.1.3)
addressable
- mail (2.3.3)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- meta_search (1.1.1)
- actionpack (~> 3.1.0)
- activerecord (~> 3.1.0)
- activesupport (~> 3.1.0)
- polyamorous (~> 0.5.0)
mime-types (1.18)
money (3.7.1)
i18n (~> 0.4)
- multi_json (1.3.2)
+ multi_json (1.3.5)
+ multi_xml (0.5.1)
mysql2 (0.3.11)
- nested_set (1.6.8)
+ nested_set (1.7.0)
activerecord (>= 3.0.0)
railties (>= 3.0.0)
nokogiri (1.5.2)
- orm_adapter (0.0.7)
paper_trail (2.6.3)
activerecord (~> 3.0)
railties (~> 3.0)
- paperclip (2.5.0)
+ paperclip (2.7.0)
activerecord (>= 2.3.0)
activesupport (>= 2.3.2)
cocaine (>= 0.0.2)
mime-types
polyamorous (0.5.0)
activerecord (~> 3.0)
polyglot (0.3.3)
- rack (1.3.6)
+ rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-contrib (1.1.0)
rack (>= 0.9.1)
- rack-mount (0.8.3)
- rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
- rails (3.1.4)
- actionmailer (= 3.1.4)
- actionpack (= 3.1.4)
- activerecord (= 3.1.4)
- activeresource (= 3.1.4)
- activesupport (= 3.1.4)
+ rails (3.2.3)
+ actionmailer (= 3.2.3)
+ actionpack (= 3.2.3)
+ activerecord (= 3.2.3)
+ activeresource (= 3.2.3)
+ activesupport (= 3.2.3)
bundler (~> 1.0)
- railties (= 3.1.4)
- railties (3.1.4)
- actionpack (= 3.1.4)
- activesupport (= 3.1.4)
+ railties (= 3.2.3)
+ railties (3.2.3)
+ actionpack (= 3.2.3)
+ activesupport (= 3.2.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
+ ransack (0.6.0)
+ actionpack (~> 3.0)
+ activerecord (~> 3.0)
+ polyamorous (~> 0.5.0)
rdoc (3.12)
json (~> 1.4)
routing-filter (0.3.1)
@@ -189,47 +190,47 @@ GEM
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.9.0)
- rubyzip (0.9.7)
- sass (3.1.16)
+ rubyzip (0.9.8)
+ sass (3.1.18)
+ sass-rails (3.2.5)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
selenium-webdriver (2.21.2)
childprocess (>= 0.2.5)
ffi (~> 1.0)
libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
- spree_auth (1.0.3)
- cancan (= 1.6.7)
- devise (= 1.4.8)
- spree_core (= 1.0.3)
- spree_core (1.0.3)
- activemerchant (= 1.20.1)
+ spree_core (1.1.1)
+ activemerchant (= 1.20.4)
acts_as_list (= 0.1.4)
- deface (>= 0.7.2)
+ aws-sdk (~> 1.3.4)
+ deface (>= 0.8.0)
ffaker (~> 1.12.0)
- highline (= 1.6.8)
- jquery-rails (>= 1.0.18, <= 1.0.19)
+ highline (= 1.6.11)
+ jquery-rails (~> 2.0.0)
kaminari (>= 0.13.0)
- meta_search (= 1.1.1)
- nested_set (= 1.6.8)
- paperclip (= 2.5.0)
- rails (>= 3.1.1, <= 3.1.4)
- state_machine (= 1.1.1)
- stringex (~> 1.3.0)
- sprockets (2.0.3)
+ nested_set (= 1.7.0)
+ paperclip (~> 2.7)
+ rails (>= 3.2.2, <= 3.2.3)
+ ransack (~> 0.6.0)
+ state_machine (= 1.1.2)
+ stringex (~> 1.3.2)
+ sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
- state_machine (1.1.1)
- stringex (1.3.2)
+ state_machine (1.1.2)
+ stringex (1.3.3)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)
- warden (1.0.6)
- rack (>= 1.0)
+ uuidtools (2.1.2)
xpath (0.1.4)
nokogiri (~> 1.3)
@@ -239,11 +240,11 @@ PLATFORMS
DEPENDENCIES
awesome_print
capybara (= 1.0.1)
- factory_girl
+ factory_girl_rails (~> 1.7.0)
ffaker
launchy (= 2.0.5)
mysql2
- rspec-rails (~> 2.7)
- spree_auth (~> 1.0.3)
+ rspec-rails (~> 2.9.0)
+ sass-rails
spree_multi_lingual!
sqlite3
@@ -1,4 +1,4 @@
-Spree::Core::ControllerHelpers::InstanceMethods.module_eval do
+Spree::Core::ControllerHelpers.module_eval do
private
# Internal : Set user I18n.locale
@@ -8,14 +8,14 @@ def finalize!
InventoryUnit.assign_opening_inventory(self)
# lock any optional adjustments (coupon promotions, etc.)
adjustments.optional.each { |adjustment| adjustment.update_attribute('locked', true) }
- OrderMailer.confirm_email(self).deliver
+ deliver_order_confirmation_email
- self.state_events.create({
+ self.state_changes.create({
:previous_state => 'cart',
:next_state => 'complete',
:name => 'order' ,
:user_id => (User.respond_to?(:current) && User.current.try(:id)) || self.user_id
- })
+ }, :without_protection => true)
end
end
end
@@ -32,6 +32,11 @@ def translates(*params)
accessors = options.delete(:globalize_accessors)
super
+ params_with_locale = SpreeMultiLingual.languages.map do |locale|
+ params.map { |param| "#{param}_#{locale}".to_sym }
+ end
+ attr_accessible *(params_with_locale + params).flatten
+
globalize_accessors locales: SpreeMultiLingual.languages, attributes: params.to_a if accessors
end
end
@@ -13,7 +13,7 @@
end
context "when child taxon" do
- before { taxon.update_attributes!(:permalink_fr => "ruby-on-rails-fr", :permalink_fr => "ruby-on-rails-fr", :permalink_es => "ruby-on-rails-es") }
+ before { taxon.update_attributes!(:permalink => "ruby-on-rails", :permalink_fr => "ruby-on-rails-fr", :permalink_es => "ruby-on-rails-es") }
it "returns translated parents permalink" do
child.permalink.should == "ruby-on-rails/sinatra"
@@ -1,9 +1,5 @@
require 'spec_helper'
describe "admin products" do
- before do
- sign_in_as!(FactoryGirl.create(:admin_user))
- end
-
let!(:product) { FactoryGirl.create(:product) }
it "displays price in correct format" do
@@ -2,7 +2,6 @@
feature "OptionType multi lingual", :js => true do
background do
- sign_in_as! FactoryGirl.create(:admin_user)
visit spree.admin_option_types_path
end
@@ -3,7 +3,6 @@
feature "Products multi lingual", :js => true do
background do
@product = FactoryGirl.create(:product, :name => "ror mug", :price => 30)
- sign_in_as! FactoryGirl.create(:admin_user)
end
scenario "admin should be able to edit product page i18n" do
Oops, something went wrong.

0 comments on commit 9fa5cde

Please sign in to comment.