Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

Commit

Permalink
Fixed dependency for Spree 3.7/4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jkojro committed Mar 27, 2019
1 parent 9d1e440 commit 00b92df
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ env:
gemfile:
- gemfiles/spree_3_2.gemfile
- gemfiles/spree_3_5.gemfile
- gemfiles/spree_3_6.gemfile
- gemfiles/spree_3_7.gemfile
- gemfiles/spree_master.gemfile

rvm:
- 2.5.1
- 2.4.4
- 2.3.7
- 2.3.3

matrix:
allow_failures:
Expand Down
6 changes: 3 additions & 3 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
appraise 'spree-3-2' do
gem 'spree', '~> 3.2.0'
gem 'spree_auth_devise', '~> 3.2.0'
gem 'spree_auth_devise', '~> 3.3.0'
gem 'rails-controller-testing'
end

Expand All @@ -10,8 +10,8 @@ appraise 'spree-3-5' do
gem 'rails-controller-testing'
end

appraise 'spree-3-6' do
gem 'spree', '~> 3.6.0'
appraise 'spree-3-7' do
gem 'spree', '~> 3.7.0'
gem 'spree_auth_devise', '~> 3.3.0'
gem 'rails-controller-testing'
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/spree/checkout_controller_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def normalize_addresses

bill_address = @order.bill_address
ship_address = @order.ship_address
if @order.bill_address_id != @order.ship_address_id && bill_address.same_as?(ship_address)
if @order.bill_address_id != @order.ship_address_id && bill_address == ship_address
@order.update_column(:bill_address_id, ship_address.id)
bill_address.destroy
else
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/spree_3_6.gemfile → gemfiles/spree_3_7.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "spree", "~> 3.6.0"
gem "spree", "~> 3.7.0"
gem "spree_auth_devise", "~> 3.3.0"
gem "rails-controller-testing"

Expand Down
3 changes: 2 additions & 1 deletion spec/features/checkout_address_selection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
end
end

it 'should only see shipping address form' do
it 'should only see shipping address form', js: true do
within('#shipping') do
uncheck 'order_use_billing'
should_have_address_fields
expect(page).to_not have_selector(".select_address")
end
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# not sure exactly what is happening here, but i think it takes
# an iteration for the country data to load
if Spree::Country.count > 0
Spree::Config[:default_country_id] = Spree::Country.find_by_iso3('USA').id
Spree::Config[:default_country_id] = Spree::Country.find_by_iso3('USA')&.id
end
Spree::Config[:address_requires_state]
end
Expand Down
4 changes: 2 additions & 2 deletions spree_address_book.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.requirements << 'none'

spree_version = '>= 3.2.0', '< 4.0'
spree_version = '>= 3.2.0', '< 5.0'
s.add_runtime_dependency 'spree_core', spree_version
s.add_runtime_dependency 'spree_auth_devise', spree_version

Expand All @@ -32,5 +32,5 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rspec-rails'
s.add_development_dependency 'sass-rails'
s.add_development_dependency 'selenium-webdriver'
s.add_development_dependency 'sqlite3'
s.add_development_dependency 'sqlite3', '~> 1.3.6'
end

0 comments on commit 00b92df

Please sign in to comment.