active_shipping 1.0.0.pre4 → 1.0.0
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.yardopts +0 -1
- data/CHANGELOG.md +17 -0
- data/CONTRIBUTING.md +2 -2
- data/Gemfile.activesupport32 +1 -0
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/active_shipping.gemspec +2 -2
- data/lib/active_shipping.rb +2 -3
- data/lib/active_shipping/carriers.rb +1 -0
- data/lib/active_shipping/carriers/canada_post_pws.rb +281 -266
- data/lib/active_shipping/carriers/correios.rb +285 -0
- data/lib/active_shipping/carriers/fedex.rb +205 -199
- data/lib/active_shipping/carriers/stamps.rb +218 -219
- data/lib/active_shipping/carriers/ups.rb +287 -48
- data/lib/active_shipping/carriers/usps.rb +3 -3
- data/lib/active_shipping/delivery_date_estimate.rb +21 -0
- data/lib/active_shipping/delivery_date_estimates_response.rb +11 -0
- data/lib/active_shipping/errors.rb +20 -1
- data/lib/active_shipping/location.rb +0 -5
- data/lib/active_shipping/response.rb +0 -15
- data/lib/active_shipping/version.rb +1 -1
- data/test/credentials.yml +11 -3
- data/test/fixtures/xml/correios/book_response.xml +13 -0
- data/test/fixtures/xml/correios/book_response_invalid.xml +13 -0
- data/test/fixtures/xml/correios/clothes_response.xml +43 -0
- data/test/fixtures/xml/correios/poster_response.xml +23 -0
- data/test/fixtures/xml/correios/shoes_response.xml +43 -0
- data/test/fixtures/xml/fedex/tracking_request.xml +13 -11
- data/test/fixtures/xml/fedex/tracking_response_bad_tracking_number.xml +20 -0
- data/test/fixtures/xml/fedex/tracking_response_delivered_at_door.xml +254 -0
- data/test/fixtures/xml/fedex/tracking_response_delivered_at_facility.xml +403 -0
- data/test/fixtures/xml/fedex/tracking_response_delivered_with_signature.xml +269 -0
- data/test/fixtures/xml/fedex/tracking_response_in_transit.xml +127 -0
- data/test/fixtures/xml/fedex/tracking_response_multiple_results.xml +100 -0
- data/test/fixtures/xml/fedex/tracking_response_not_found.xml +52 -0
- data/test/fixtures/xml/fedex/tracking_response_shipment_exception.xml +209 -0
- data/test/fixtures/xml/ups/delivery_dates_response.xml +140 -0
- data/test/fixtures/xml/ups/package_exceeds_maximum_length.xml +12 -0
- data/test/fixtures/xml/ups/rate_single_service.xml +54 -0
- data/test/fixtures/xml/ups/rescheduled_shipment.xml +204 -0
- data/test/fixtures/xml/ups/test_real_home_as_residential_destination_response.xml +290 -1
- data/test/fixtures/xml/usps/delivered_extended_tracking_response.xml +11 -0
- data/test/remote/canada_post_pws_platform_test.rb +35 -22
- data/test/remote/canada_post_pws_test.rb +32 -40
- data/test/remote/correios_test.rb +83 -0
- data/test/remote/fedex_test.rb +95 -13
- data/test/remote/stamps_test.rb +1 -0
- data/test/remote/ups_test.rb +77 -40
- data/test/remote/usps_test.rb +13 -1
- data/test/test_helper.rb +12 -2
- data/test/unit/carriers/canada_post_pws_rating_test.rb +66 -59
- data/test/unit/carriers/canada_post_pws_shipping_test.rb +34 -23
- data/test/unit/carriers/correios_test.rb +244 -0
- data/test/unit/carriers/fedex_test.rb +161 -156
- data/test/unit/carriers/ups_test.rb +193 -1
- data/test/unit/carriers/usps_test.rb +14 -0
- data/test/unit/location_test.rb +0 -10
- metadata +63 -46
- metadata.gz.sig +0 -0
- data/lib/vendor/test_helper.rb +0 -6
- data/lib/vendor/xml_node/README +0 -36
- data/lib/vendor/xml_node/Rakefile +0 -21
- data/lib/vendor/xml_node/benchmark/bench_generation.rb +0 -30
- data/lib/vendor/xml_node/init.rb +0 -1
- data/lib/vendor/xml_node/lib/xml_node.rb +0 -221
- data/lib/vendor/xml_node/test/test_generating.rb +0 -89
- data/lib/vendor/xml_node/test/test_parsing.rb +0 -40
- data/test/fixtures/xml/fedex/tracking_response.xml +0 -151
- data/test/fixtures/xml/fedex/tracking_response_empty_destination.xml +0 -76
- data/test/fixtures/xml/fedex/tracking_response_no_destination.xml +0 -139
- data/test/fixtures/xml/fedex/tracking_response_no_ship_time.xml +0 -150
- data/test/fixtures/xml/fedex/tracking_response_with_estimated_delivery_date.xml +0 -95
- data/test/fixtures/xml/fedex/tracking_response_with_shipper_address.xml +0 -71
@@ -10,6 +10,7 @@ class UPSTest < Minitest::Test
|
|
10
10
|
:password => 'password'
|
11
11
|
)
|
12
12
|
@tracking_response = xml_fixture('ups/shipment_from_tiger_direct')
|
13
|
+
@delivery_dates_response = xml_fixture('ups/delivery_dates_response')
|
13
14
|
end
|
14
15
|
|
15
16
|
def test_initialize_options_requirements
|
@@ -134,6 +135,38 @@ class UPSTest < Minitest::Test
|
|
134
135
|
assert_equal Time.parse('2008-06-25 11:19:00 UTC'), response.actual_delivery_date
|
135
136
|
end
|
136
137
|
|
138
|
+
def test_find_tracking_info_should_return_correct_rescheduled_delivery_date
|
139
|
+
@carrier.expects(:commit).returns(xml_fixture('ups/rescheduled_shipment'))
|
140
|
+
response = @carrier.find_tracking_info('1Z5FX0076803466397')
|
141
|
+
assert_equal Time.parse('2015-01-29 00:00:00 UTC'), response.scheduled_delivery_date
|
142
|
+
end
|
143
|
+
|
144
|
+
def test_response_parsing_an_oversize_package
|
145
|
+
mock_response = xml_fixture('ups/package_exceeds_maximum_length')
|
146
|
+
@carrier.expects(:commit).returns(mock_response)
|
147
|
+
|
148
|
+
e = assert_raises(ActiveShipping::ResponseError) do
|
149
|
+
@carrier.find_rates(location_fixtures[:beverly_hills],
|
150
|
+
location_fixtures[:real_home_as_residential],
|
151
|
+
package_fixtures.values_at(:chocolate_stuff))
|
152
|
+
end
|
153
|
+
|
154
|
+
assert_equal "Failure: Package exceeds the maximum length constraint of 108 inches. Length is the longest side of a package.", e.message
|
155
|
+
end
|
156
|
+
|
157
|
+
def test_response_parsing_an_unknown_error
|
158
|
+
mock_response = '<RatingServiceSelectionResponse><Response><ResponseStatusCode>0</ResponseStatusCode></Response></RatingServiceSelectionResponse>'
|
159
|
+
@carrier.expects(:commit).returns(mock_response)
|
160
|
+
|
161
|
+
e = assert_raises(ActiveShipping::ResponseError) do
|
162
|
+
@carrier.find_rates(location_fixtures[:beverly_hills],
|
163
|
+
location_fixtures[:real_home_as_residential],
|
164
|
+
package_fixtures.values_at(:chocolate_stuff))
|
165
|
+
end
|
166
|
+
|
167
|
+
assert_equal "UPS could not process the request.", e.message
|
168
|
+
end
|
169
|
+
|
137
170
|
def test_response_parsing
|
138
171
|
mock_response = xml_fixture('ups/test_real_home_as_residential_destination_response')
|
139
172
|
@carrier.expects(:commit).returns(mock_response)
|
@@ -268,7 +301,6 @@ class UPSTest < Minitest::Test
|
|
268
301
|
end
|
269
302
|
|
270
303
|
def test_saturday_delivery
|
271
|
-
# It's ok to use Nokogiri for development, right?
|
272
304
|
response = Nokogiri::XML @carrier.send(:build_shipment_request,
|
273
305
|
location_fixtures[:beverly_hills],
|
274
306
|
location_fixtures[:annapolis],
|
@@ -281,6 +313,19 @@ class UPSTest < Minitest::Test
|
|
281
313
|
refute_empty saturday
|
282
314
|
end
|
283
315
|
|
316
|
+
def test_label_request_prepay
|
317
|
+
response = Nokogiri::XML @carrier.send(:build_shipment_request,
|
318
|
+
location_fixtures[:beverly_hills],
|
319
|
+
location_fixtures[:annapolis],
|
320
|
+
package_fixtures.values_at(:chocolate_stuff),
|
321
|
+
:test => true,
|
322
|
+
:prepay => true
|
323
|
+
)
|
324
|
+
|
325
|
+
prepay = response.search '/ShipmentConfirmRequest/Shipment/PaymentInformation/Prepaid'
|
326
|
+
refute_empty prepay
|
327
|
+
end
|
328
|
+
|
284
329
|
def test_label_request_negotiated_rates_presence
|
285
330
|
response = Nokogiri::XML @carrier.send(:build_shipment_request,
|
286
331
|
location_fixtures[:beverly_hills],
|
@@ -308,4 +353,151 @@ class UPSTest < Minitest::Test
|
|
308
353
|
assert_equal address.text, shipper.address1
|
309
354
|
refute_equal address.text, pickup.address1
|
310
355
|
end
|
356
|
+
|
357
|
+
def test_label_request_domestic_reference_numbers
|
358
|
+
# Domestic Shipments use package level reference numbers
|
359
|
+
response = Nokogiri::XML @carrier.send(:build_shipment_request,
|
360
|
+
location_fixtures[:beverly_hills],
|
361
|
+
location_fixtures[:annapolis],
|
362
|
+
package_fixtures.values_at(:chocolate_stuff),
|
363
|
+
:test => true,
|
364
|
+
:reference_numbers => [{value: 'REF_NUM'}]
|
365
|
+
)
|
366
|
+
ref_vals = response.search '/ShipmentConfirmRequest/Shipment/Package/ReferenceNumber/Value'
|
367
|
+
assert_equal ref_vals.first.text, 'REF_NUM'
|
368
|
+
end
|
369
|
+
|
370
|
+
def test_label_request_international_reference_numbers
|
371
|
+
# International Shipments use shipment level reference numbers
|
372
|
+
response = Nokogiri::XML @carrier.send(:build_shipment_request,
|
373
|
+
location_fixtures[:beverly_hills],
|
374
|
+
location_fixtures[:ottawa_with_name],
|
375
|
+
package_fixtures.values_at(:books),
|
376
|
+
:test => true,
|
377
|
+
:reference_numbers => [{value: 'REF_NUM'}]
|
378
|
+
)
|
379
|
+
ref_vals = response.search '/ShipmentConfirmRequest/Shipment/ReferenceNumber/Value'
|
380
|
+
assert_equal ref_vals.first.text, 'REF_NUM'
|
381
|
+
end
|
382
|
+
|
383
|
+
def test_label_request_international_with_paperless_invoice
|
384
|
+
response = Nokogiri::XML @carrier.send(:build_shipment_request,
|
385
|
+
location_fixtures[:beverly_hills],
|
386
|
+
location_fixtures[:ottawa_with_name],
|
387
|
+
package_fixtures.values_at(:books),
|
388
|
+
:test => true,
|
389
|
+
:paperless_invoice => true
|
390
|
+
)
|
391
|
+
international_form = response.search '/ShipmentConfirmRequest/Shipment/ShipmentServiceOptions/InternationalForms'
|
392
|
+
refute_empty international_form
|
393
|
+
end
|
394
|
+
|
395
|
+
def test_label_request_international_with_delivery_duty_paid
|
396
|
+
# setting terms_of_shipment to DDP, Delivery Duty Paid, means the shipper will pay duties and taxes
|
397
|
+
response = Nokogiri::XML @carrier.send(:build_shipment_request,
|
398
|
+
location_fixtures[:beverly_hills],
|
399
|
+
location_fixtures[:ottawa_with_name],
|
400
|
+
package_fixtures.values_at(:books),
|
401
|
+
:test => true,
|
402
|
+
:paperless_invoice => true,
|
403
|
+
:terms_of_shipment => 'DDP'
|
404
|
+
)
|
405
|
+
terms_of_shipment = response.search '/ShipmentConfirmRequest/Shipment/ShipmentServiceOptions/InternationalForms/TermsOfShipment'
|
406
|
+
duties_and_taxes_payment_info = response.css('ShipmentCharge Type:contains("02")').first.parent
|
407
|
+
|
408
|
+
refute_empty terms_of_shipment
|
409
|
+
refute_empty duties_and_taxes_payment_info.search('BillShipper')
|
410
|
+
end
|
411
|
+
|
412
|
+
def test_label_request_shipment_level_delivery_confirmation
|
413
|
+
result = Nokogiri::XML(@carrier.send(:build_shipment_request,
|
414
|
+
location_fixtures[:beverly_hills],
|
415
|
+
location_fixtures[:ottawa_with_name],
|
416
|
+
package_fixtures.values_at(:chocolate_stuff),
|
417
|
+
:test => true,
|
418
|
+
:delivery_confirmation => :delivery_confirmation_adult_signature_required))
|
419
|
+
assert_equal '2', result.search('/ShipmentConfirmRequest/Shipment/ShipmentServiceOptions/DeliveryConfirmation/DCISType').text
|
420
|
+
end
|
421
|
+
|
422
|
+
def test_label_request_package_level_delivery_confirmation
|
423
|
+
packages = package_fixtures.values_at(:chocolate_stuff)
|
424
|
+
packages.each {|p| p.options[:delivery_confirmation] = :delivery_confirmation }
|
425
|
+
result = Nokogiri::XML(@carrier.send(:build_shipment_request,
|
426
|
+
location_fixtures[:beverly_hills],
|
427
|
+
location_fixtures[:annapolis],
|
428
|
+
packages,
|
429
|
+
:test => true))
|
430
|
+
assert_equal '1', result.search('/ShipmentConfirmRequest/Shipment/Package/PackageServiceOptions/DeliveryConfirmation/DCISType').text
|
431
|
+
end
|
432
|
+
|
433
|
+
def test_label_request_shipment_level_delivery_confirmation_moved_to_package_level
|
434
|
+
# Domestic shipments should have their delivery confirmation specified at package level and not shipment-level
|
435
|
+
result = Nokogiri::XML(@carrier.send(:build_shipment_request,
|
436
|
+
location_fixtures[:beverly_hills],
|
437
|
+
location_fixtures[:annapolis],
|
438
|
+
package_fixtures.values_at(:chocolate_stuff),
|
439
|
+
:test => true,
|
440
|
+
:delivery_confirmation => :delivery_confirmation))
|
441
|
+
assert_equal '1', result.search('/ShipmentConfirmRequest/Shipment/Package/PackageServiceOptions/DeliveryConfirmation/DCISType').text
|
442
|
+
assert_empty result.search('/ShipmentConfirmRequest/Shipment/ShipmentServiceOptions/DeliveryConfirmation/DCISType').text
|
443
|
+
end
|
444
|
+
|
445
|
+
def test_get_delivery_date_estimates_can_parse_delivery_estimates
|
446
|
+
@carrier.expects(:commit).returns(@delivery_dates_response)
|
447
|
+
monday = Date.parse('0201', '%m%d') # Feb to avoid holidays http://www.ups.com/content/us/en/resources/ship/imp_exp/operation.html
|
448
|
+
monday += 1.day while monday.wday != 1
|
449
|
+
|
450
|
+
response = @carrier.get_delivery_date_estimates(
|
451
|
+
location_fixtures[:new_york_with_name],
|
452
|
+
location_fixtures[:real_home_as_residential],
|
453
|
+
package_fixtures.values_at(:books),
|
454
|
+
pickup_date=monday,
|
455
|
+
{
|
456
|
+
:test => true
|
457
|
+
}
|
458
|
+
)
|
459
|
+
assert response.is_a?(ActiveShipping::DeliveryDateEstimatesResponse)
|
460
|
+
assert_equal 6, response.delivery_estimates.size
|
461
|
+
ground_estimate = response.delivery_estimates.select{ |de| de.service_name == "UPS Ground"}.first
|
462
|
+
assert_equal Date.parse('2015-02-5'), ground_estimate.date
|
463
|
+
assert_equal 3, ground_estimate.business_transit_days
|
464
|
+
end
|
465
|
+
|
466
|
+
def test_get_delivery_date_estimates_can_translate_service_codes
|
467
|
+
# The TimeInTransit API returns service codes that are different from those used by
|
468
|
+
# other API's. So we need to translate the codes into the ones used elsewhere.
|
469
|
+
@carrier.expects(:commit).returns(@delivery_dates_response)
|
470
|
+
monday = Date.parse('0201', '%m%d') # Feb to avoid holidays http://www.ups.com/content/us/en/resources/ship/imp_exp/operation.html
|
471
|
+
monday += 1.day while monday.wday != 1
|
472
|
+
|
473
|
+
response = @carrier.get_delivery_date_estimates(
|
474
|
+
location_fixtures[:new_york_with_name],
|
475
|
+
location_fixtures[:real_home_as_residential],
|
476
|
+
package_fixtures.values_at(:books),
|
477
|
+
pickup_date=monday,
|
478
|
+
{
|
479
|
+
:test => true
|
480
|
+
}
|
481
|
+
)
|
482
|
+
|
483
|
+
response.delivery_estimates.each do |delivery_estimate|
|
484
|
+
assert delivery_estimate.service_name, UPS::DEFAULT_SERVICES[delivery_estimate.service_code]
|
485
|
+
end
|
486
|
+
end
|
487
|
+
|
488
|
+
def test_get_rates_for_single_serivce
|
489
|
+
mock_response = xml_fixture("ups/rate_single_service")
|
490
|
+
@carrier.expects(:commit).returns(mock_response)
|
491
|
+
|
492
|
+
response = @carrier.find_rates(
|
493
|
+
location_fixtures[:new_york_with_name],
|
494
|
+
location_fixtures[:real_home_as_residential],
|
495
|
+
package_fixtures.values_at(:books),
|
496
|
+
{
|
497
|
+
:service => UPS::DEFAULT_SERVICE_NAME_TO_CODE["UPS Ground"],
|
498
|
+
:test => true
|
499
|
+
}
|
500
|
+
)
|
501
|
+
assert_equal ["UPS Ground"], response.rates.map(&:service_name)
|
502
|
+
end
|
311
503
|
end
|
@@ -117,6 +117,12 @@ class USPSTest < Minitest::Test
|
|
117
117
|
assert_equal true, response.delivered?
|
118
118
|
end
|
119
119
|
|
120
|
+
def test_find_tracking_info_with_extended_response_format_should_have_correct_delivered
|
121
|
+
@carrier.expects(:commit).returns(xml_fixture('usps/delivered_extended_tracking_response'))
|
122
|
+
response = @carrier.find_tracking_info('9102901000462189604217')
|
123
|
+
assert_equal true, response.delivered?
|
124
|
+
end
|
125
|
+
|
120
126
|
def test_size_codes
|
121
127
|
assert_equal 'REGULAR', USPS.size_code_for(Package.new(2, [1, 12, 1], :units => :imperial))
|
122
128
|
assert_equal 'LARGE', USPS.size_code_for(Package.new(2, [12.1, 1, 1], :units => :imperial))
|
@@ -134,6 +140,14 @@ class USPSTest < Minitest::Test
|
|
134
140
|
@carrier.find_rates(location_fixtures[:beverly_hills], location_fixtures[:new_york], package, :test => true, :container => :rectangular)
|
135
141
|
end
|
136
142
|
|
143
|
+
def test_build_us_rate_request_uses_proper_container_when_none_is_specified
|
144
|
+
expected_request = xml_fixture('usps/us_rate_request')
|
145
|
+
@carrier.expects(:commit).with(:us_rates, expected_request, false).returns(expected_request)
|
146
|
+
@carrier.expects(:parse_rate_response)
|
147
|
+
package = package_fixtures[:book]
|
148
|
+
@carrier.find_rates(location_fixtures[:beverly_hills], location_fixtures[:new_york], package, :test => true)
|
149
|
+
end
|
150
|
+
|
137
151
|
def test_build_world_rate_request
|
138
152
|
expected_request = xml_fixture('usps/world_rate_request_without_value')
|
139
153
|
@carrier.expects(:commit).with(:world_rates, expected_request, false).returns(expected_request)
|
data/test/unit/location_test.rb
CHANGED
@@ -90,16 +90,6 @@ class LocationTest < Minitest::Test
|
|
90
90
|
assert_equal location_fixtures[:ottawa].to_hash, JSON.parse(location_json).symbolize_keys
|
91
91
|
end
|
92
92
|
|
93
|
-
def test_default_to_xml
|
94
|
-
location_xml = location_fixtures[:ottawa].to_xml
|
95
|
-
assert_equal location_fixtures[:ottawa].to_hash, Hash.from_xml(location_xml)["location"].symbolize_keys
|
96
|
-
end
|
97
|
-
|
98
|
-
def test_custom_root_to_xml
|
99
|
-
location_xml = location_fixtures[:ottawa].to_xml(:root => "destination")
|
100
|
-
assert_equal location_fixtures[:ottawa].to_hash, Hash.from_xml(location_xml)["destination"].symbolize_keys
|
101
|
-
end
|
102
|
-
|
103
93
|
def test_zip_plus_4_with_no_dash
|
104
94
|
zip = "33333"
|
105
95
|
plus_4 = "1234"
|
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.0.0
|
4
|
+
version: 1.0.0
|
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-
|
36
|
+
date: 2015-05-06 00:00:00.000000000 Z
|
37
37
|
dependencies:
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: quantified
|
@@ -41,14 +41,14 @@ dependencies:
|
|
41
41
|
requirements:
|
42
42
|
- - "~>"
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
44
|
+
version: 1.0.1
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
47
|
version_requirements: !ruby/object:Gem::Requirement
|
48
48
|
requirements:
|
49
49
|
- - "~>"
|
50
50
|
- !ruby/object:Gem::Version
|
51
|
-
version:
|
51
|
+
version: 1.0.1
|
52
52
|
- !ruby/object:Gem::Dependency
|
53
53
|
name: activesupport
|
54
54
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,26 +83,6 @@ dependencies:
|
|
83
83
|
- - "~>"
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: 3.0.0
|
86
|
-
- !ruby/object:Gem::Dependency
|
87
|
-
name: builder
|
88
|
-
requirement: !ruby/object:Gem::Requirement
|
89
|
-
requirements:
|
90
|
-
- - ">="
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: 2.1.2
|
93
|
-
- - "<"
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: 4.0.0
|
96
|
-
type: :runtime
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 2.1.2
|
103
|
-
- - "<"
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version: 4.0.0
|
106
86
|
- !ruby/object:Gem::Dependency
|
107
87
|
name: nokogiri
|
108
88
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,6 +153,20 @@ dependencies:
|
|
173
153
|
- - ">="
|
174
154
|
- !ruby/object:Gem::Version
|
175
155
|
version: '0'
|
156
|
+
- !ruby/object:Gem::Dependency
|
157
|
+
name: business_time
|
158
|
+
requirement: !ruby/object:Gem::Requirement
|
159
|
+
requirements:
|
160
|
+
- - ">="
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0'
|
163
|
+
type: :development
|
164
|
+
prerelease: false
|
165
|
+
version_requirements: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0'
|
176
170
|
description: Get rates and tracking info from various shipping carriers. Extracted
|
177
171
|
from Shopify.
|
178
172
|
email:
|
@@ -202,6 +196,7 @@ files:
|
|
202
196
|
- lib/active_shipping/carriers/bogus_carrier.rb
|
203
197
|
- lib/active_shipping/carriers/canada_post.rb
|
204
198
|
- lib/active_shipping/carriers/canada_post_pws.rb
|
199
|
+
- lib/active_shipping/carriers/correios.rb
|
205
200
|
- lib/active_shipping/carriers/fedex.rb
|
206
201
|
- lib/active_shipping/carriers/kunaki.rb
|
207
202
|
- lib/active_shipping/carriers/new_zealand_post.rb
|
@@ -209,6 +204,8 @@ files:
|
|
209
204
|
- lib/active_shipping/carriers/stamps.rb
|
210
205
|
- lib/active_shipping/carriers/ups.rb
|
211
206
|
- lib/active_shipping/carriers/usps.rb
|
207
|
+
- lib/active_shipping/delivery_date_estimate.rb
|
208
|
+
- lib/active_shipping/delivery_date_estimates_response.rb
|
212
209
|
- lib/active_shipping/errors.rb
|
213
210
|
- lib/active_shipping/label_response.rb
|
214
211
|
- lib/active_shipping/location.rb
|
@@ -222,14 +219,6 @@ files:
|
|
222
219
|
- lib/active_shipping/tracking_response.rb
|
223
220
|
- lib/active_shipping/version.rb
|
224
221
|
- lib/certs/eParcel.dtd
|
225
|
-
- lib/vendor/test_helper.rb
|
226
|
-
- lib/vendor/xml_node/README
|
227
|
-
- lib/vendor/xml_node/Rakefile
|
228
|
-
- lib/vendor/xml_node/benchmark/bench_generation.rb
|
229
|
-
- lib/vendor/xml_node/init.rb
|
230
|
-
- lib/vendor/xml_node/lib/xml_node.rb
|
231
|
-
- lib/vendor/xml_node/test/test_generating.rb
|
232
|
-
- lib/vendor/xml_node/test/test_parsing.rb
|
233
222
|
- shipit.rubygems.yml
|
234
223
|
- test/credentials.yml
|
235
224
|
- test/fixtures/files/label1.pdf
|
@@ -273,6 +262,11 @@ files:
|
|
273
262
|
- test/fixtures/xml/canadapost_pws/tracking_details_en_undelivered.xml
|
274
263
|
- test/fixtures/xml/canadapost_pws/tracking_details_fr.xml
|
275
264
|
- test/fixtures/xml/canadapost_pws/tracking_details_no_expected_delivery_date.xml
|
265
|
+
- test/fixtures/xml/correios/book_response.xml
|
266
|
+
- test/fixtures/xml/correios/book_response_invalid.xml
|
267
|
+
- test/fixtures/xml/correios/clothes_response.xml
|
268
|
+
- test/fixtures/xml/correios/poster_response.xml
|
269
|
+
- test/fixtures/xml/correios/shoes_response.xml
|
276
270
|
- test/fixtures/xml/fedex/freight_rate_request.xml
|
277
271
|
- test/fixtures/xml/fedex/freight_rate_response.xml
|
278
272
|
- test/fixtures/xml/fedex/invalid_fedex_reply.xml
|
@@ -282,12 +276,14 @@ files:
|
|
282
276
|
- test/fixtures/xml/fedex/raterequest_reply.xml
|
283
277
|
- test/fixtures/xml/fedex/reply_without_notifications.xml
|
284
278
|
- test/fixtures/xml/fedex/tracking_request.xml
|
285
|
-
- test/fixtures/xml/fedex/
|
286
|
-
- test/fixtures/xml/fedex/
|
287
|
-
- test/fixtures/xml/fedex/
|
288
|
-
- test/fixtures/xml/fedex/
|
289
|
-
- test/fixtures/xml/fedex/
|
290
|
-
- test/fixtures/xml/fedex/
|
279
|
+
- test/fixtures/xml/fedex/tracking_response_bad_tracking_number.xml
|
280
|
+
- test/fixtures/xml/fedex/tracking_response_delivered_at_door.xml
|
281
|
+
- test/fixtures/xml/fedex/tracking_response_delivered_at_facility.xml
|
282
|
+
- test/fixtures/xml/fedex/tracking_response_delivered_with_signature.xml
|
283
|
+
- test/fixtures/xml/fedex/tracking_response_in_transit.xml
|
284
|
+
- test/fixtures/xml/fedex/tracking_response_multiple_results.xml
|
285
|
+
- test/fixtures/xml/fedex/tracking_response_not_found.xml
|
286
|
+
- test/fixtures/xml/fedex/tracking_response_shipment_exception.xml
|
291
287
|
- test/fixtures/xml/fedex/unknown_fedex_document_reply.xml
|
292
288
|
- test/fixtures/xml/kunaki/invalid_state_response.xml
|
293
289
|
- test/fixtures/xml/kunaki/no_valid_items_response.xml
|
@@ -317,9 +313,13 @@ files:
|
|
317
313
|
- test/fixtures/xml/stamps/track_shipment_response.xml
|
318
314
|
- test/fixtures/xml/ups/delivered_shipment_with_refund.xml
|
319
315
|
- test/fixtures/xml/ups/delivered_shipment_without_events_tracking_response.xml
|
316
|
+
- test/fixtures/xml/ups/delivery_dates_response.xml
|
320
317
|
- test/fixtures/xml/ups/example_tracking_response.xml
|
321
318
|
- test/fixtures/xml/ups/in_transit_shipment.xml
|
322
319
|
- test/fixtures/xml/ups/out_for_delivery_shipment.xml
|
320
|
+
- test/fixtures/xml/ups/package_exceeds_maximum_length.xml
|
321
|
+
- test/fixtures/xml/ups/rate_single_service.xml
|
322
|
+
- test/fixtures/xml/ups/rescheduled_shipment.xml
|
323
323
|
- test/fixtures/xml/ups/shipment_accept_response.xml
|
324
324
|
- test/fixtures/xml/ups/shipment_confirm_response.xml
|
325
325
|
- test/fixtures/xml/ups/shipment_from_tiger_direct.xml
|
@@ -334,6 +334,7 @@ files:
|
|
334
334
|
- test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_commercial_base_rate_response.xml
|
335
335
|
- test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_commercial_plus_rate_response.xml
|
336
336
|
- test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_rate_response.xml
|
337
|
+
- test/fixtures/xml/usps/delivered_extended_tracking_response.xml
|
337
338
|
- test/fixtures/xml/usps/delivered_tracking_response.xml
|
338
339
|
- test/fixtures/xml/usps/first_class_packages_with_invalid_mail_type_response.xml
|
339
340
|
- test/fixtures/xml/usps/first_class_packages_with_mail_type_response.xml
|
@@ -350,6 +351,7 @@ files:
|
|
350
351
|
- test/remote/canada_post_pws_platform_test.rb
|
351
352
|
- test/remote/canada_post_pws_test.rb
|
352
353
|
- test/remote/canada_post_test.rb
|
354
|
+
- test/remote/correios_test.rb
|
353
355
|
- test/remote/fedex_test.rb
|
354
356
|
- test/remote/kunaki_test.rb
|
355
357
|
- test/remote/new_zealand_post_test.rb
|
@@ -364,6 +366,7 @@ files:
|
|
364
366
|
- test/unit/carriers/canada_post_pws_shipping_test.rb
|
365
367
|
- test/unit/carriers/canada_post_pws_tracking_test.rb
|
366
368
|
- test/unit/carriers/canada_post_test.rb
|
369
|
+
- test/unit/carriers/correios_test.rb
|
367
370
|
- test/unit/carriers/fedex_test.rb
|
368
371
|
- test/unit/carriers/kunaki_test.rb
|
369
372
|
- test/unit/carriers/new_zealand_post_test.rb
|
@@ -393,9 +396,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
393
396
|
version: '0'
|
394
397
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
395
398
|
requirements:
|
396
|
-
- - "
|
399
|
+
- - ">="
|
397
400
|
- !ruby/object:Gem::Version
|
398
|
-
version:
|
401
|
+
version: '0'
|
399
402
|
requirements: []
|
400
403
|
rubyforge_project:
|
401
404
|
rubygems_version: 2.2.2
|
@@ -445,6 +448,11 @@ test_files:
|
|
445
448
|
- test/fixtures/xml/canadapost_pws/tracking_details_en_undelivered.xml
|
446
449
|
- test/fixtures/xml/canadapost_pws/tracking_details_fr.xml
|
447
450
|
- test/fixtures/xml/canadapost_pws/tracking_details_no_expected_delivery_date.xml
|
451
|
+
- test/fixtures/xml/correios/book_response.xml
|
452
|
+
- test/fixtures/xml/correios/book_response_invalid.xml
|
453
|
+
- test/fixtures/xml/correios/clothes_response.xml
|
454
|
+
- test/fixtures/xml/correios/poster_response.xml
|
455
|
+
- test/fixtures/xml/correios/shoes_response.xml
|
448
456
|
- test/fixtures/xml/fedex/freight_rate_request.xml
|
449
457
|
- test/fixtures/xml/fedex/freight_rate_response.xml
|
450
458
|
- test/fixtures/xml/fedex/invalid_fedex_reply.xml
|
@@ -454,12 +462,14 @@ test_files:
|
|
454
462
|
- test/fixtures/xml/fedex/raterequest_reply.xml
|
455
463
|
- test/fixtures/xml/fedex/reply_without_notifications.xml
|
456
464
|
- test/fixtures/xml/fedex/tracking_request.xml
|
457
|
-
- test/fixtures/xml/fedex/
|
458
|
-
- test/fixtures/xml/fedex/
|
459
|
-
- test/fixtures/xml/fedex/
|
460
|
-
- test/fixtures/xml/fedex/
|
461
|
-
- test/fixtures/xml/fedex/
|
462
|
-
- test/fixtures/xml/fedex/
|
465
|
+
- test/fixtures/xml/fedex/tracking_response_bad_tracking_number.xml
|
466
|
+
- test/fixtures/xml/fedex/tracking_response_delivered_at_door.xml
|
467
|
+
- test/fixtures/xml/fedex/tracking_response_delivered_at_facility.xml
|
468
|
+
- test/fixtures/xml/fedex/tracking_response_delivered_with_signature.xml
|
469
|
+
- test/fixtures/xml/fedex/tracking_response_in_transit.xml
|
470
|
+
- test/fixtures/xml/fedex/tracking_response_multiple_results.xml
|
471
|
+
- test/fixtures/xml/fedex/tracking_response_not_found.xml
|
472
|
+
- test/fixtures/xml/fedex/tracking_response_shipment_exception.xml
|
463
473
|
- test/fixtures/xml/fedex/unknown_fedex_document_reply.xml
|
464
474
|
- test/fixtures/xml/kunaki/invalid_state_response.xml
|
465
475
|
- test/fixtures/xml/kunaki/no_valid_items_response.xml
|
@@ -489,9 +499,13 @@ test_files:
|
|
489
499
|
- test/fixtures/xml/stamps/track_shipment_response.xml
|
490
500
|
- test/fixtures/xml/ups/delivered_shipment_with_refund.xml
|
491
501
|
- test/fixtures/xml/ups/delivered_shipment_without_events_tracking_response.xml
|
502
|
+
- test/fixtures/xml/ups/delivery_dates_response.xml
|
492
503
|
- test/fixtures/xml/ups/example_tracking_response.xml
|
493
504
|
- test/fixtures/xml/ups/in_transit_shipment.xml
|
494
505
|
- test/fixtures/xml/ups/out_for_delivery_shipment.xml
|
506
|
+
- test/fixtures/xml/ups/package_exceeds_maximum_length.xml
|
507
|
+
- test/fixtures/xml/ups/rate_single_service.xml
|
508
|
+
- test/fixtures/xml/ups/rescheduled_shipment.xml
|
495
509
|
- test/fixtures/xml/ups/shipment_accept_response.xml
|
496
510
|
- test/fixtures/xml/ups/shipment_confirm_response.xml
|
497
511
|
- test/fixtures/xml/ups/shipment_from_tiger_direct.xml
|
@@ -506,6 +520,7 @@ test_files:
|
|
506
520
|
- test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_commercial_base_rate_response.xml
|
507
521
|
- test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_commercial_plus_rate_response.xml
|
508
522
|
- test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_rate_response.xml
|
523
|
+
- test/fixtures/xml/usps/delivered_extended_tracking_response.xml
|
509
524
|
- test/fixtures/xml/usps/delivered_tracking_response.xml
|
510
525
|
- test/fixtures/xml/usps/first_class_packages_with_invalid_mail_type_response.xml
|
511
526
|
- test/fixtures/xml/usps/first_class_packages_with_mail_type_response.xml
|
@@ -522,6 +537,7 @@ test_files:
|
|
522
537
|
- test/remote/canada_post_pws_platform_test.rb
|
523
538
|
- test/remote/canada_post_pws_test.rb
|
524
539
|
- test/remote/canada_post_test.rb
|
540
|
+
- test/remote/correios_test.rb
|
525
541
|
- test/remote/fedex_test.rb
|
526
542
|
- test/remote/kunaki_test.rb
|
527
543
|
- test/remote/new_zealand_post_test.rb
|
@@ -536,6 +552,7 @@ test_files:
|
|
536
552
|
- test/unit/carriers/canada_post_pws_shipping_test.rb
|
537
553
|
- test/unit/carriers/canada_post_pws_tracking_test.rb
|
538
554
|
- test/unit/carriers/canada_post_test.rb
|
555
|
+
- test/unit/carriers/correios_test.rb
|
539
556
|
- test/unit/carriers/fedex_test.rb
|
540
557
|
- test/unit/carriers/kunaki_test.rb
|
541
558
|
- test/unit/carriers/new_zealand_post_test.rb
|