active_shipping 1.1.0 → 1.1.1
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 +0 -0
- data/CHANGELOG.md +4 -0
- data/lib/active_shipping/carriers/usps.rb +5 -4
- data/lib/active_shipping/version.rb +1 -1
- data/test/fixtures/xml/usps/tracking_response_alt.xml +0 -3
- data/test/unit/carriers/usps_test.rb +2 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 592608c29fbeaad3bfc7f21fa36ed5099d903a9a
|
4
|
+
data.tar.gz: 4bf3a6fb28099af32c2f18d734ae79a4e6ba4463
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56aa07c21b4a2fc856e0c4fe98fa4a10a196fd7bb4b708551434f45e61e5707d62bcc11425791ec07d3d5c86e4db7c40a7b67dfeeec01f870c2e7266e986d6a8
|
7
|
+
data.tar.gz: bf184014cff572470b44061be4d873a614f9ba4ef3b1e908afe8885066f15cc360b78f24ba6bf00e44da1ffa8600bd938051f5a548b13833f240938606213e95
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -238,9 +238,9 @@ module ActiveShipping
|
|
238
238
|
|
239
239
|
timestamp = "#{node.at('EventDate').text}, #{node.at('EventTime').text}"
|
240
240
|
event_code = node.at('EventCode').text
|
241
|
-
city = node.at('EventCity').text
|
242
|
-
state = node.at('EventState').text
|
243
|
-
zip_code = node.at('EventZIPCode').text
|
241
|
+
city = node.at('EventCity').try(:text)
|
242
|
+
state = node.at('EventState').try(:text)
|
243
|
+
zip_code = node.at('EventZIPCode').try(:text)
|
244
244
|
|
245
245
|
country_node = node.at('EventCountry')
|
246
246
|
country = country_node ? country_node.text : ''
|
@@ -555,7 +555,8 @@ module ActiveShipping
|
|
555
555
|
tracking_details << xml.root.at('TrackInfo/TrackSummary')
|
556
556
|
|
557
557
|
tracking_number = xml.root.at('TrackInfo').attributes['ID'].value
|
558
|
-
|
558
|
+
prediction_node = xml.root.at('PredictedDeliveryDate') || xml.root.at('ExpectedDeliveryDate')
|
559
|
+
scheduled_delivery = prediction_node ? Time.parse(prediction_node.text) : nil
|
559
560
|
|
560
561
|
tracking_details.each do |event|
|
561
562
|
details = extract_event_details(event)
|
@@ -8,7 +8,6 @@
|
|
8
8
|
<DestinationState>IL</DestinationState>
|
9
9
|
<DestinationZip>61536</DestinationZip>
|
10
10
|
<EmailEnabled>true</EmailEnabled>
|
11
|
-
<ExpectedDeliveryDate>April 28, 2015</ExpectedDeliveryDate>
|
12
11
|
<KahalaIndicator>false</KahalaIndicator>
|
13
12
|
<MailTypeCode>DM</MailTypeCode>
|
14
13
|
<MPDATE>2015-04-24 02:08:04.000000</MPDATE>
|
@@ -17,7 +16,6 @@
|
|
17
16
|
<OriginState>TX</OriginState>
|
18
17
|
<OriginZip>76226</OriginZip>
|
19
18
|
<PodEnabled>false</PodEnabled>
|
20
|
-
<PredictedDeliveryDate>April 28, 2015</PredictedDeliveryDate>
|
21
19
|
<RestoreEnabled>false</RestoreEnabled>
|
22
20
|
<RramEnabled>false</RramEnabled>
|
23
21
|
<RreEnabled>false</RreEnabled>
|
@@ -31,7 +29,6 @@
|
|
31
29
|
<EventTime>8:29 am</EventTime>
|
32
30
|
<EventDate>April 28, 2015</EventDate>
|
33
31
|
<Event>Out for Delivery, in truck</Event>
|
34
|
-
<EventCity>OTTAWA</EventCity>
|
35
32
|
<EventState>ON</EventState>
|
36
33
|
<EventZIPCode>61536</EventZIPCode>
|
37
34
|
<EventCountry>Canada</EventCountry>
|
@@ -123,6 +123,8 @@ class USPSTest < Minitest::Test
|
|
123
123
|
response = @carrier.find_tracking_info('9102901000462189604217', :test => true)
|
124
124
|
assert_equal 'Canada', response.shipment_events.last.location.country.name
|
125
125
|
assert_equal :out_for_delivery, response.status
|
126
|
+
assert_nil response.scheduled_delivery_date
|
127
|
+
assert_nil response.shipment_events.last.location.city
|
126
128
|
end
|
127
129
|
|
128
130
|
def test_find_tracking_info_destination
|
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: 1.1.
|
4
|
+
version: 1.1.1
|
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: 2015-05-
|
36
|
+
date: 2015-05-15 00:00:00.000000000 Z
|
37
37
|
dependencies:
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: quantified
|
metadata.gz.sig
CHANGED
Binary file
|