caboose-cms 0.5.131 → 0.5.132

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjNiOTM0OWM1OWM3N2NjYTFhMTE2Zjc3NTM2ZGIwYzJlYmNlMDhmNg==
4
+ NmIwMjBmY2NmYzVkZGUzYzgwZmZkMzY5NTYzM2FkOTc0ZTYwZWYwZA==
5
5
  data.tar.gz: !binary |-
6
- OTU1YjI5YTBkZGQ2NGNhZjhiOWQ2ZGM2MThmNjMzNjZmZTBlNjRiOQ==
6
+ MmU2ZjNjYjg0MTQ4NjIyMjRmNDlmZWE5ZWNjODYxNDAyNmJlNjJlZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjM2N2YzZGU1Nzk5N2RkMGI4Mzc3MzNhNDY4NWYzN2I5NzlkMDViNWFjZGQ3
10
- N2RhYTAzNTM5ZjM3NjZlNDg0MDVjODdkZTgzYWFjMzE5MjgyYThjMTFiNDRi
11
- MjIzODBkZjM1YzVmZTY0YjNmMjBiNTJmYzBlNmJmZDQ5MjQwMjY=
9
+ ZGI5OGU2ZjZlNTJjMmM0YjQwODkzNjI4NDc5OTMzMjgxY2Q4NmQ1MTJkNzcx
10
+ OGJlZWI0ZDM1MWExMDc3ZGE3NGNmMDVlYWNkMDliOTg5ZTU2Mzg4MTQyYWQy
11
+ ODkyNjZjNDhjMGU0Mjg0ZDI2MGExMWUxNDQzNDgxMmFiYjM0Yjk=
12
12
  data.tar.gz: !binary |-
13
- Yzg2NmMwOTI2MTFiYmZjMjdhNWRhZDcwMzNmYjk3YmMxYzhkYjJjYjI3MzY3
14
- NTFkNmZhMmY5Mzk4MGY3NTIzMDcyOGJlZWQ1YzJmOGMyZTlkNTYyZjk3Yzlk
15
- OTUwYjcxYmZhMmVkMjE1MjE3NDAwODdhNjU2YmY4NjBhZjljYzM=
13
+ ZjdhOTYyZjI0MDQ0OWNmNDAzMmQzNGFkY2ExYzViYzlmZmNhYTZjNzM2ZmEy
14
+ YWRhOWQ4ZWZkOTI4OTk1OGJjNTZiYzkyZjYwNTRmZjg0NjM5MzYwNGU5MTQ0
15
+ ZWUxYmNkNmYwZDc2ODViMjg3NmY2ZDMwMGMxODI5MzQwNWY0NWE=
@@ -89,8 +89,8 @@ module Caboose
89
89
 
90
90
  if gc.nil? then resp.error = "Invalid gift card code."
91
91
  elsif gc.status != GiftCard::STATUS_ACTIVE then resp.error = "That gift card is not active."
92
- elsif gc.date_available && DateTime.now.utc < self.date_available then resp.error = "That gift card is not active yet."
93
- elsif gc.date_expires && DateTime.now.utc > self.date_expires then resp.error = "That gift card is expired."
92
+ elsif gc.date_available && DateTime.now.utc < gc.date_available then resp.error = "That gift card is not active yet."
93
+ elsif gc.date_expires && DateTime.now.utc > gc.date_expires then resp.error = "That gift card is expired."
94
94
  elsif gc.card_type == GiftCard::CARD_TYPE_AMOUNT && gc.balance <= 0 then resp.error = "That gift card has a zero balance."
95
95
  elsif gc.min_order_total && @order.total < gc.min_order_total then resp.error = "Your order must be at least $#{sprintf('%.2f',gc.min_order_total)} to use this gift card."
96
96
  elsif Discount.where(:order_id => @order.id, :gift_card_id => gc.id).exists? then resp.error = "That gift card has already been applied to this order."
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.131'
2
+ VERSION = '0.5.132'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.131
4
+ version: 0.5.132
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry