active_shipping 0.12.2 → 0.12.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -1
- data/lib/active_shipping/shipping/shipment_packer.rb +4 -0
- data/lib/active_shipping/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73e0fba97cd5cd42c21ff4514c561dadb29d0471
|
4
|
+
data.tar.gz: 4c1385b493c6228d2794acaf6fd790bd8318cc8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba4a1826778a5b2bdea786620381ffa45cbed38fef43944c410231e815640c264f8927f7bbc2b73b3e9caba7c991e9cf2947b3cfdc5197827e3e9f7bb7580260
|
7
|
+
data.tar.gz: e721b3788fd41dec0fc49ec410e73c01b40e8aad8e2bbea92c6da6ce0335fd73d9d17d635a2d0867a1c4b73fe220db8d2b6a92e76f1a4a5feb98493ccd68e1b3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
�8zf�!#�I��$����I�97�T����%��}=��'�N�77ܐ�y��V�D�H�R5皦�
|
2
|
+
������ۺ
|
@@ -4,6 +4,9 @@ module ActiveMerchant
|
|
4
4
|
class OverweightItem < StandardError
|
5
5
|
end
|
6
6
|
|
7
|
+
EXCESS_PACKAGE_QUANTITY_THRESHOLD = 10_000
|
8
|
+
class ExcessPackageQuantity < StandardError; end
|
9
|
+
|
7
10
|
# items - array of hashes containing quantity, grams and price.
|
8
11
|
# ex. [{:quantity => 2, :price => 1.0, :grams => 50}]
|
9
12
|
# dimensions - [5.0, 15.0, 30.0]
|
@@ -39,6 +42,7 @@ module ActiveMerchant
|
|
39
42
|
state = :package_full
|
40
43
|
end
|
41
44
|
when :package_full
|
45
|
+
raise ExcessPackageQuantity, "Unable to pack more than #{EXCESS_PACKAGE_QUANTITY_THRESHOLD} packages" if packages.length >= EXCESS_PACKAGE_QUANTITY_THRESHOLD
|
42
46
|
packages << ActiveMerchant::Shipping::Package.new(package_weight, dimensions, :value => package_value, :currency => currency)
|
43
47
|
state = items.any? ? :package_empty : :packing_finished
|
44
48
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_shipping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James MacAulay
|
@@ -33,7 +33,7 @@ cert_chain:
|
|
33
33
|
fl3hbtVFTqbOlwL9vy1fudXcolIE/ZTcxQ+er07ZFZdKCXayR9PPs64heamfn0fp
|
34
34
|
TConQSX2BnZdhIEYW+cKzEC/bLc=
|
35
35
|
-----END CERTIFICATE-----
|
36
|
-
date: 2014-
|
36
|
+
date: 2014-06-03 00:00:00.000000000 Z
|
37
37
|
dependencies:
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: activesupport
|
metadata.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
�5�P[�V�PO�=�]��p���ո
|
2
|
+
���nJj�h����q%S%b�����8h��6�e#f*Jl��ܐ
|
3
|
+
q3�-�6Q"aJ�7����Q�3.��+�[`��s@�P�t
|