caboose-cms 0.5.121 → 0.5.122

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2Y1OWJiMzc0ZWRjNWExMGRkMWE3ZDEyYmJiYzhkZmZjZDU4MTE1Nw==
4
+ N2FiYWQyMDg1ZTg0OGIyMTdhNzFiMGJiNTIwOGUwMjI4Y2MyMjM5Yg==
5
5
  data.tar.gz: !binary |-
6
- OWI4YjQxNDMyNDMzNzJlMTZjMzJlYjQ4ZDVkZmUwY2MyNjRhODZhZg==
6
+ MDY4Y2Y5MTI3ZWZkMGRkOTEwYzlhZTMwOWJlMmYzZTJjMTY1MGUyNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTliMTNhNTRlYmNiNzk5NWIxZjU5ZWM5NmFmZmExODExNDgyYWI1MTFlODVm
10
- NmY4ZWZiMjdkODEwODUwZGFiM2VjNWY4MmIzMTdhZTU2ZDQyMWM5YmFkOGJi
11
- NjI1MTU0NDdiNDE3NDhiMDM3MWI4MTM2ZjZkMWQ0MGQwNWVhZWY=
9
+ MDg5NmM2ZWU4NWU4YjFkZWJmYmZmZmQwMWMzOWJiNzQ3NDBkM2EwODIwMmZj
10
+ YmVjY2M5NDlhYzgzMzgyYWFjN2NlOWIzODgwOWU1MDgyYTY4MzdkZDJmNGI0
11
+ N2Y4YWM0MDcyZTY1ZjhiYjUzNmZjZTJhMTg2ZDEwNzA3NTg1NjI=
12
12
  data.tar.gz: !binary |-
13
- NGRjMGEyNWI5YzkwMGQ1MjI5YTc0ZWI0ODA5MDQ2OTAyYzNkMTMzOTY4ZTQ5
14
- ODEyNzNlZDQ4MjQxYmI4ZGZkZWMxZjBiMDhmYzIyMjBlYTIwNmI2ZGI5OGVi
15
- NDAwYTNlMjE5ZmNlMzlmODZiNmUwNzc0YWE2OWJhYzdiZjZjOTc=
13
+ ZWZmYWI3YTAzNzc1OTIyYTIxZjdkYjMxMzU2NGYzOWI0ZDAzYjU5ODI0NjI2
14
+ Y2E5NzkyMTUxZjQzYTAwZDk0MWIyMjI3MDA2MjlmZWU4YzE3ZTE4ODE4MWE5
15
+ YzNkZmViYzdjYjQxMWE3NTJlYmM3YWRmZGQ4NDY1MmI5OWFmYzI=
@@ -34,7 +34,7 @@ module Caboose
34
34
  # GET /checkout/shipping
35
35
  def shipping
36
36
  redirect_to '/checkout' and return if !logged_in?
37
- redirect_to '/checkout/addresses' and return if @order.shipping_address.nil? || @order.billing_address.nil?
37
+ redirect_to '/checkout/addresses' and return if @order.billing_address.nil? || (@order.has_shippable_items? && @order.shipping_address.nil?)
38
38
 
39
39
  if !@order.has_shippable_items?
40
40
  redirect_to '/checkout/gift-cards'
@@ -59,7 +59,7 @@ module Caboose
59
59
  # GET /checkout/gift-cards
60
60
  def gift_cards
61
61
  redirect_to '/checkout' and return if !logged_in?
62
- redirect_to '/checkout/addresses' and return if @order.shipping_address.nil? || @order.billing_address.nil?
62
+ redirect_to '/checkout/addresses' and return if @order.billing_address.nil? || (@order.has_shippable_items? && @order.shipping_address.nil?)
63
63
  redirect_to '/checkout/shipping' and return if @order.has_shippable_items? && @order.has_empty_shipping_methods?
64
64
  @logged_in_user = logged_in_user
65
65
  end
@@ -68,7 +68,7 @@ module Caboose
68
68
  # GET /checkout/payment
69
69
  def payment
70
70
  redirect_to '/checkout' and return if !logged_in?
71
- redirect_to '/checkout/addresses' and return if @order.shipping_address.nil? || @order.billing_address.nil?
71
+ redirect_to '/checkout/addresses' and return if @order.billing_address.nil? || (@order.has_shippable_items? && @order.shipping_address.nil?)
72
72
  redirect_to '/checkout/shipping' and return if @order.has_shippable_items? && @order.has_empty_shipping_methods?
73
73
 
74
74
  # Make sure all the variants still exist
@@ -159,7 +159,7 @@ module Caboose
159
159
  billing_address.zip = params[:billing][:zip]
160
160
  end
161
161
 
162
- # Save address info; generate ids
162
+ # Save address info; generate ids
163
163
  render :json => { :success => false, :errors => shipping_address.errors.full_messages, :address => 'shipping' } and return if has_shippable_items && !shipping_address.save
164
164
  render :json => { :success => false, :errors => billing_address.errors.full_messages, :address => 'billing' } and return if !billing_address.save
165
165
 
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.121'
2
+ VERSION = '0.5.122'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.121
4
+ version: 0.5.122
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-25 00:00:00.000000000 Z
11
+ date: 2015-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg