piggybak 0.6.11 → 0.6.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- piggybak (0.6.11)
4
+ piggybak (0.6.12)
5
5
  activemerchant
6
6
  countries
7
7
  devise
@@ -57,7 +57,7 @@ module Piggybak
57
57
  elsif self.changes.keys.include?("quantity") && self.quantity > self.quantity_was
58
58
  quantity_change = self.quantity - self.quantity_was
59
59
  end
60
- if sellable.quantity < quantity_change
60
+ if sellable.quantity < quantity_change && !sellable.unlimited_inventory
61
61
  self.errors.add(:sellable_id, "Insufficient inventory by #{quantity_change - sellable.quantity} unit(s).")
62
62
  return
63
63
  end
@@ -1,3 +1,3 @@
1
1
  module Piggybak
2
- VERSION = "0.6.11"
2
+ VERSION = "0.6.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piggybak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.11
4
+ version: 0.6.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-10-30 00:00:00.000000000 Z
14
+ date: 2012-11-01 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -212,7 +212,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
212
212
  version: '0'
213
213
  segments:
214
214
  - 0
215
- hash: 151945934985011992
215
+ hash: -1733522364764140920
216
216
  required_rubygems_version: !ruby/object:Gem::Requirement
217
217
  none: false
218
218
  requirements:
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  version: '0'
222
222
  segments:
223
223
  - 0
224
- hash: 151945934985011992
224
+ hash: -1733522364764140920
225
225
  requirements: []
226
226
  rubyforge_project:
227
227
  rubygems_version: 1.8.23