active_shipping 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5430071c1f3d177a5712c40b87041ab1e4898911
4
- data.tar.gz: e128b635eef78c7b3dc892d45c7b0213121df807
3
+ metadata.gz: 19c7f898c4fae3541f44b1652a80084385b3b6ca
4
+ data.tar.gz: a7349bb2781c99c97196978e7dd378a3c2273519
5
5
  SHA512:
6
- metadata.gz: 30d4a4c76ddb507c9e76ef464103dbbfae3664dcd17e9ff2a2be1f337dd8f1cd814d66526d1763a0575011616ba278e081ad88db86eb69763bae3824a89b1b29
7
- data.tar.gz: 75ae396dcfce44ce7dd1a49083e40f031f03b9c75a6d342e9fa24d25b8d6b72bd64b6d9e4d4fdc0cfbfd324d7a29ac8edab35a505307199077c939ea5c93f82d
6
+ metadata.gz: 0714de5ac8bd86737faee62a0a31190ced5961f6124a9c429c94a1faa7560770fc96159debc8ee059a2ecdd3a875c03f6e29e674e36e5952ace60d70cc236ebd
7
+ data.tar.gz: d92d587f63be9ec16d81a3e43ef4e9ebf26fb599c4e99f58140e94419d64ba341270ed5441661aef525a536ae4d02f3f889f969d0e6d3694db8e1fa3310cd2a2
@@ -1,5 +1,9 @@
1
1
  # ActiveShipping CHANGELOG
2
2
 
3
+ ### v1.6.1
4
+ - Fix FedEx ShipmentEvents to include event type
5
+ - Skip broken Canada Post remote tests
6
+
3
7
  ### v1.6.0
4
8
  - Update active_utils dependency to v3.2.0
5
9
 
@@ -621,11 +621,12 @@ module ActiveShipping
621
621
 
622
622
  location = Location.new(:city => city, :state => state, :postal_code => zip_code, :country => country)
623
623
  description = event.at('EventDescription').text
624
+ type_code = event.at('EventType').text
624
625
 
625
626
  time = Time.parse(event.at('Timestamp').text)
626
627
  zoneless_time = time.utc
627
628
 
628
- shipment_events << ShipmentEvent.new(description, zoneless_time, location)
629
+ shipment_events << ShipmentEvent.new(description, zoneless_time, location, description, type_code)
629
630
  end
630
631
  shipment_events = shipment_events.sort_by(&:time)
631
632
 
@@ -1,3 +1,3 @@
1
1
  module ActiveShipping
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
  end
@@ -121,7 +121,7 @@ class RemoteCanadaPostPWSTest < Minitest::Test
121
121
  end
122
122
 
123
123
  def test_create_shipment
124
- #skip "Failing with 'Contract Number is a required field' after API change, skipping because no clue how to fix, might need different creds"
124
+ skip "Failing with 'Contract Number is a required field' after API change, skipping because no clue how to fix, might need different creds"
125
125
  opts = {:customer_number => @customer_number, :service => "DOM.XP"}
126
126
  response = @cp.create_shipment(@home_params, @dom_params, @pkg1, @line_item1, opts)
127
127
  assert_kind_of CPPWSShippingResponse, response
@@ -132,7 +132,7 @@ class RemoteCanadaPostPWSTest < Minitest::Test
132
132
  end
133
133
 
134
134
  def test_create_shipment_with_options
135
- #skip "Failing with 'Contract Number is a required field' after API change, skipping because no clue how to fix, might need different creds"
135
+ skip "Failing with 'Contract Number is a required field' after API change, skipping because no clue how to fix, might need different creds"
136
136
  opts = {:customer_number => @customer_number, :service => "USA.EP"}.merge(@shipping_opts1)
137
137
  response = @cp.create_shipment(@home_params, @dest_params, @pkg1, @line_item1, opts)
138
138
 
@@ -144,7 +144,7 @@ class RemoteCanadaPostPWSTest < Minitest::Test
144
144
  end
145
145
 
146
146
  def test_retrieve_shipping_label
147
- #skip "Failing with 'Contract Number is a required field' after API change, skipping because no clue how to fix, might need different creds"
147
+ skip "Failing with 'Contract Number is a required field' after API change, skipping because no clue how to fix, might need different creds"
148
148
  opts = {:customer_number => @customer_number, :service => "DOM.XP"}
149
149
  shipping_response = @cp.create_shipment(@home_params, @dom_params, @pkg1, @line_item1, opts)
150
150
 
@@ -160,7 +160,7 @@ class RemoteCanadaPostPWSTest < Minitest::Test
160
160
  end
161
161
 
162
162
  def test_create_shipment_with_invalid_customer_raises_exception
163
- #skip "Failing with 'Contract Number is a required field' after API change, skipping because no clue how to fix, might need different creds"
163
+ skip "Failing with 'Contract Number is a required field' after API change, skipping because no clue how to fix, might need different creds"
164
164
  opts = {:customer_number => "0000000000", :service => "DOM.XP"}
165
165
  assert_raises(ResponseError) do
166
166
  @cp.create_shipment(@home_params, @dom_params, @pkg1, @line_item1, opts)
@@ -242,6 +242,9 @@ class RemoteFedExTest < Minitest::Test
242
242
  )
243
243
  assert_equal destination_address.to_hash, response.destination.to_hash
244
244
  assert_equal 11, response.shipment_events.length
245
+ assert_equal 'OC', response.shipment_events.first.type_code
246
+ assert_equal 'PU', response.shipment_events.second.type_code
247
+ assert_equal 'AR', response.shipment_events.third.type_code
245
248
  end
246
249
 
247
250
  def test_find_tracking_info_for_in_transit_shipment_1
@@ -254,6 +257,9 @@ class RemoteFedExTest < Minitest::Test
254
257
  assert_equal 'FD', response.status_code
255
258
  assert_equal "At FedEx destination facility", response.status_description
256
259
  assert_equal 7, response.shipment_events.length
260
+ assert_equal 'PU', response.shipment_events.first.type_code
261
+ assert_equal 'OC', response.shipment_events.second.type_code
262
+ assert_equal 'AR', response.shipment_events.third.type_code
257
263
  assert_nil response.actual_delivery_date
258
264
  assert_equal nil, response.scheduled_delivery_date
259
265
  end
@@ -286,6 +292,9 @@ class RemoteFedExTest < Minitest::Test
286
292
  )
287
293
  assert_equal destination_address.to_hash, response.destination.to_hash
288
294
  assert_equal 3, response.shipment_events.length
295
+ assert_equal 'PU', response.shipment_events.first.type_code
296
+ assert_equal 'OC', response.shipment_events.second.type_code
297
+ assert_equal 'AR', response.shipment_events.third.type_code
289
298
  end
290
299
 
291
300
  def test_find_tracking_info_with_multiple_matches
@@ -316,6 +316,9 @@ class FedExTest < Minitest::Test
316
316
 
317
317
  assert_equal 11, response.shipment_events.length
318
318
  assert_equal 'Delivered', response.latest_event.name
319
+ assert_equal 'PU', response.shipment_events.first.type_code
320
+ assert_equal 'OC', response.shipment_events.second.type_code
321
+ assert_equal 'AR', response.shipment_events.third.type_code
319
322
  end
320
323
 
321
324
  def test_tracking_info_for_delivered_at_door
@@ -327,7 +330,11 @@ class FedExTest < Minitest::Test
327
330
  assert response.delivered?
328
331
  refute response.exception?
329
332
  assert_equal 10, response.shipment_events.length
333
+ assert_equal 'PU', response.shipment_events.first.type_code
334
+ assert_equal 'OC', response.shipment_events.second.type_code
335
+ assert_equal 'AR', response.shipment_events.third.type_code
330
336
  assert_equal 'Delivered', response.latest_event.name
337
+ assert_equal 'DL', response.latest_event.type_code
331
338
  assert_equal nil, response.delivery_signature
332
339
  end
333
340
 
@@ -377,6 +384,7 @@ class FedExTest < Minitest::Test
377
384
 
378
385
  assert_equal 1, response.shipment_events.length
379
386
  assert_equal 'In transit', response.latest_event.name
387
+ assert_equal 'IT', response.latest_event.type_code
380
388
  end
381
389
 
382
390
  def test_tracking_info_for_shipment_exception
@@ -410,6 +418,7 @@ class FedExTest < Minitest::Test
410
418
 
411
419
  assert_equal 8, response.shipment_events.length
412
420
  assert_equal "Shipment exception", response.latest_event.name
421
+ assert_equal "SE", response.latest_event.type_code
413
422
  end
414
423
 
415
424
  def test_tracking_info_without_status
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.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James MacAulay
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-10-14 00:00:00.000000000 Z
14
+ date: 2015-11-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: quantified