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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b5f032d7b051953da7d9746cc9ef3fce5e272aa
4
- data.tar.gz: 74890284fd2a7f865cbbc84cbf6edd9f1a1856a8
3
+ metadata.gz: 73e0fba97cd5cd42c21ff4514c561dadb29d0471
4
+ data.tar.gz: 4c1385b493c6228d2794acaf6fd790bd8318cc8c
5
5
  SHA512:
6
- metadata.gz: 3e86722a8a87c0d4f774fe73fed0d2f395bcd5783465031128193283b9012e4eb3746c1df10fb40b6e75e630d0c9006785ca9374003a016fa5abf564249a484a
7
- data.tar.gz: a50553bdd237ad4da447bbfa7b6e5202eb371b5002c9b8d8eb0231ee29dbbc747fbce844733c4fd142bbce22e0bd94eb9907811ea9d77d69c4dfb3bbcd092683
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
- jbJ��ږT��a���$3�둓@�q�_�1,t+�LI�Կ�'R���Q�� 0jY\׆aO���͡i�V�'c�ލ'A��휿�p���qgj�h{T�������dKS�~�FI�F� �X���1�"��0�S��@H�*���C�?�) eB�/y�{���oS�����t�A-!��e�\?�|9�'$��e˒�vho����4xY����^p��'HXXbiw4z<��ɯ)5y�\[�1:n[�
1
+ 8zf�!#�I��$����I�97T����%��}=��'�N77ܐ�y��VDHR5皦�
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
@@ -1,3 +1,3 @@
1
1
  module ActiveShipping
2
- VERSION = "0.12.2"
2
+ VERSION = "0.12.3"
3
3
  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.2
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-05-27 00:00:00.000000000 Z
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
- �"ʠ�� NP �$�{�7���~-U�򐃧φ�� ‘M��#
2
- ��מZ"���k{oe�@��RQ� Е�'�-mU�R!����K�^dM��&F]���u��?n�LiK��A �7�R�U�\�ɴ%c+ ;s���|/Q#~@߯�Y�#����[����`���jwC����˙���*ID���M�Sy�ɝ�
3
- VO�r����AOb�sВ
1
+ �5P[�VPO�=�]��p���ո
2
+ ���nJjh����q%S%b�����8h��6�e#f*Jl�͸�ܐ
3
+ q3�-�6Q"aJ7����Q3.��+�[`��s@�P�t