active_shipping 2.0.0 → 2.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '049d76632467f43502625eb1059dcc9db84009ff'
|
4
|
+
data.tar.gz: 2067401f05fcdad7fd6fd1b6bb14eb06dd08d90b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7240de267d12ccfeef56c846b4869f244ef2d9fc4094fb28ed560431f1815c9e0ad4840a03ea56fd25df8d1af28a82425dbfed332ebe4f2d1544572b00e1e209
|
7
|
+
data.tar.gz: 5520de3c6a87772b29241fe241a7a142d188f36e27de5ae6228ea83d83a61b6278cb468a371513ce7d05087795f59b1bdfe385a32478c2c4f904b3ef947105a5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# ActiveShipping CHANGELOG
|
2
2
|
|
3
|
+
### v2.0.1
|
4
|
+
- Raise ActiveShipping::ResponseError error in favour of ActiveUtils::ResponseError for CanadaPostPWS#find_shipment_receipt
|
5
|
+
|
3
6
|
### v2.0.0
|
4
7
|
- Drop support for < ruby 2.2, support ruby 2.4
|
5
8
|
- Drop support for < Rails 4.2.
|
@@ -115,6 +115,8 @@ module ActiveShipping
|
|
115
115
|
def find_shipment_receipt(shipping_id, options = {})
|
116
116
|
response = ssl_get(shipment_receipt_url(shipping_id, options), headers(options, SHIPMENT_MIMETYPE, SHIPMENT_MIMETYPE))
|
117
117
|
parse_shipment_receipt_response(response)
|
118
|
+
rescue ActiveUtils::ResponseError => e
|
119
|
+
raise ActiveShipping::ResponseError.new(e.message)
|
118
120
|
end
|
119
121
|
|
120
122
|
def retrieve_shipping_label(shipping_response, options = {})
|
@@ -229,6 +229,16 @@ class CanadaPostPwsShippingTest < ActiveSupport::TestCase
|
|
229
229
|
assert_equal @cp.parse_shipment_receipt_response(xml_response), response
|
230
230
|
end
|
231
231
|
|
232
|
+
def test_find_shipment_receipt_returns_active_shipping_response_error_if_active_utils_response_error
|
233
|
+
options = @default_options.dup
|
234
|
+
bad_response = Net::HTTPResponse.new({}, 404, "404 Not Found")
|
235
|
+
response_error = ActiveUtils::ResponseError.new(bad_response)
|
236
|
+
@cp.expects(:ssl_get).once.raises(response_error)
|
237
|
+
assert_raises ActiveShipping::ResponseError do
|
238
|
+
response = @cp.find_shipment_receipt('1234567', options)
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
232
242
|
def test_character_limit_on_customs_description
|
233
243
|
@line_item1.first.stubs(:name).returns("Some super long description that exceeds the 44 character limit")
|
234
244
|
options = @default_options.dup
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_shipping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: measured
|