bcarpenter-active_shipping 0.0.2 → 0.0.5
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.
- data/CHANGELOG +1 -0
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/active_shipping/shipping/location.rb +1 -1
- data/test/remote/fedex_test.rb +1 -1
- data/test/unit/carriers/fedex_test.rb +6 -0
- metadata +2 -2
data/CHANGELOG
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
* Fixed bug that causes fedex tracking to crash on some tracking #s
|
|
1
2
|
* Remove ftools for Rails 1.9 compatibility and remove xml logging, as logging is now included in the connection [cody]
|
|
2
3
|
* Update connection code from ActiveMerchant [cody]
|
|
3
4
|
* Fix space-ridden USPS usernames when validating credentials [james]
|
data/Rakefile
CHANGED
|
@@ -44,7 +44,7 @@ begin
|
|
|
44
44
|
s.homepage = "http://github.com/bcarpenter/active_shipping"
|
|
45
45
|
s.description = "Use for Fedex/UPS/USPS tracking and more... Originally from: http://github.com/Shopify/active_shipping"
|
|
46
46
|
s.authors = ["Shopify"]
|
|
47
|
-
s.files = FileList["[A-Z]*", "{lib,examples}/**/*", "Rakefile"]
|
|
47
|
+
s.files = FileList["[A-Z]*", "{lib,examples}/**/*", "Rakefile"] - ["TODO.todo"]
|
|
48
48
|
s.add_dependency 'activesupport'
|
|
49
49
|
end
|
|
50
50
|
rescue LoadError
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.6
|
|
@@ -21,7 +21,7 @@ module ActiveMerchant #:nodoc:
|
|
|
21
21
|
alias_method :region, :province
|
|
22
22
|
|
|
23
23
|
def initialize(options = {})
|
|
24
|
-
@country = (options[:country].nil? or options[:country].is_a?(ActiveMerchant::Country)) ?
|
|
24
|
+
@country = (options[:country].nil? or options[:country] == '' or options[:country].is_a?(ActiveMerchant::Country)) ?
|
|
25
25
|
options[:country] :
|
|
26
26
|
ActiveMerchant::Country.find(options[:country])
|
|
27
27
|
@postal_code = options[:postal_code] || options[:postal] || options[:zip]
|
data/test/remote/fedex_test.rb
CHANGED
|
@@ -6,7 +6,7 @@ class FedExTest < Test::Unit::TestCase
|
|
|
6
6
|
@packages = TestFixtures.packages
|
|
7
7
|
@locations = TestFixtures.locations
|
|
8
8
|
@carrier = FedEx.new(fixtures(:fedex))
|
|
9
|
-
FedEx.logger = Logger.new('/
|
|
9
|
+
FedEx.logger = Logger.new(File.dirname(__FILE__) + '/../../log/fedex.log')
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def test_us_to_canada
|
|
@@ -42,6 +42,12 @@ class FedExTest < Test::Unit::TestCase
|
|
|
42
42
|
assert_equal response.shipment_events.map(&:time).sort, response.shipment_events.map(&:time)
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
+
def test_find_tracking_info_handles_missing_locations
|
|
46
|
+
@carrier.expects(:commit).returns(xml_fixture('fedex/tracking_response_oc_missing_address_info'))
|
|
47
|
+
response = @carrier.find_tracking_info('077973360403984', :test => true)
|
|
48
|
+
assert response.shipment_events.any? {|e| e.location.to_s == ''}
|
|
49
|
+
end
|
|
50
|
+
|
|
45
51
|
def test_building_request_and_parsing_response
|
|
46
52
|
expected_request = xml_fixture('fedex/ottawa_to_beverly_hills_rate_request')
|
|
47
53
|
mock_response = xml_fixture('fedex/ottawa_to_beverly_hills_rate_response')
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bcarpenter-active_shipping
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-09-
|
|
12
|
+
date: 2009-09-23 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|