binarylogic-shippinglogic 1.0.2 → 1.0.3
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.rdoc +6 -2
- data/Rakefile +2 -12
- data/VERSION.yml +2 -2
- data/lib/shippinglogic/fedex/enumerations.rb +5 -2
- data/lib/shippinglogic/fedex/request.rb +1 -5
- data/shippinglogic.gemspec +4 -1
- data/spec/fedex/request_spec.rb +1 -1
- metadata +11 -1
data/CHANGELOG.rdoc
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
-
== 1.0.
|
1
|
+
== 1.0.3 released 2009-07-08
|
2
|
+
|
3
|
+
* Rails uses United States not United State of America
|
4
|
+
|
5
|
+
== 1.0.2 released 2009-07-08
|
2
6
|
|
3
7
|
* Remove notifications with a successful severity in the errors message.
|
4
|
-
* Added country code mapping so that we can pass full country
|
8
|
+
* Added country code mapping so that we can pass full country names and have it convert it to a FedEx friendly code behind the scenes.
|
5
9
|
|
6
10
|
== 1.0.1 released 2009-07-08
|
7
11
|
|
data/Rakefile
CHANGED
@@ -11,10 +11,11 @@ begin
|
|
11
11
|
gem.homepage = "http://github.com/binarylogic/shippinglogic"
|
12
12
|
gem.authors = ["Ben Johnson of Binary Logic"]
|
13
13
|
gem.rubyforge_project = "shippinglogic"
|
14
|
+
gem.add_development_dependency "rspec"
|
14
15
|
gem.add_dependency "activesupport", ">= 2.2.0"
|
15
16
|
gem.add_dependency "httparty", ">= 0.4.4"
|
16
17
|
end
|
17
|
-
|
18
|
+
Jeweler::RubyforgeTasks.new
|
18
19
|
rescue LoadError
|
19
20
|
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
20
21
|
end
|
@@ -32,14 +33,3 @@ Spec::Rake::SpecTask.new(:rcov) do |spec|
|
|
32
33
|
end
|
33
34
|
|
34
35
|
task :default => :spec
|
35
|
-
|
36
|
-
begin
|
37
|
-
require 'rake/contrib/sshpublisher'
|
38
|
-
namespace :rubyforge do
|
39
|
-
desc "Release gem to RubyForge"
|
40
|
-
task :release => ["rubyforge:release:gem"]
|
41
|
-
end
|
42
|
-
rescue LoadError
|
43
|
-
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
|
44
|
-
end
|
45
|
-
|
data/VERSION.yml
CHANGED
@@ -59,7 +59,7 @@ module Shippinglogic
|
|
59
59
|
DROP_OFF_TYPES = ["REGULAR_PICKUP", "REQUEST_COURIER", "DROP_BOX", "BUSINESS_SERVICE_CENTER", "STATION"]
|
60
60
|
RATE_REQUEST_TYPES = ["ACCOUNT", "LIST", "MULTIWEIGHT"]
|
61
61
|
|
62
|
-
|
62
|
+
FEDEX_COUNTRY_CODES = {
|
63
63
|
"Albania" => "AL",
|
64
64
|
"Algeria" => "DZ",
|
65
65
|
"American Samoa" => "AS",
|
@@ -246,7 +246,6 @@ module Shippinglogic
|
|
246
246
|
"U.A.E." => "AE",
|
247
247
|
"U.S. Virgin Islands" => "VI",
|
248
248
|
"U.S.A." => "US",
|
249
|
-
"United States of America" => "US",
|
250
249
|
"Uganda" => "UG",
|
251
250
|
"Ukraine" => "UA",
|
252
251
|
"United Kingdom" => "GB",
|
@@ -261,6 +260,10 @@ module Shippinglogic
|
|
261
260
|
"Zambia" => "ZM",
|
262
261
|
"Zimbabwe" => "ZW"
|
263
262
|
}
|
263
|
+
|
264
|
+
RAILS_COUNTRY_CODES = {
|
265
|
+
"United States" => "US"
|
266
|
+
}
|
264
267
|
end
|
265
268
|
end
|
266
269
|
end
|
@@ -92,11 +92,7 @@ module Shippinglogic
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def country_code(value)
|
95
|
-
|
96
|
-
Enumerations::COUNTRY_CODES[value.to_s]
|
97
|
-
else
|
98
|
-
value.to_s
|
99
|
-
end
|
95
|
+
Enumerations::FEDEX_COUNTRY_CODES[value.to_s] || Enumerations::RAILS_COUNTRY_CODES[value.to_s] || value.to_s
|
100
96
|
end
|
101
97
|
end
|
102
98
|
end
|
data/shippinglogic.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{shippinglogic}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ben Johnson of Binary Logic"]
|
@@ -92,13 +92,16 @@ Gem::Specification.new do |s|
|
|
92
92
|
s.specification_version = 3
|
93
93
|
|
94
94
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
95
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
95
96
|
s.add_runtime_dependency(%q<activesupport>, [">= 2.2.0"])
|
96
97
|
s.add_runtime_dependency(%q<httparty>, [">= 0.4.4"])
|
97
98
|
else
|
99
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
98
100
|
s.add_dependency(%q<activesupport>, [">= 2.2.0"])
|
99
101
|
s.add_dependency(%q<httparty>, [">= 0.4.4"])
|
100
102
|
end
|
101
103
|
else
|
104
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
102
105
|
s.add_dependency(%q<activesupport>, [">= 2.2.0"])
|
103
106
|
s.add_dependency(%q<httparty>, [">= 0.4.4"])
|
104
107
|
end
|
data/spec/fedex/request_spec.rb
CHANGED
@@ -4,6 +4,6 @@ describe "FedEx Attributes" do
|
|
4
4
|
it "should convert full country names to country codes" do
|
5
5
|
fedex = new_fedex
|
6
6
|
rates = fedex.rate
|
7
|
-
rates.send(:country_code, "United States
|
7
|
+
rates.send(:country_code, "United States").should == "US"
|
8
8
|
end
|
9
9
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binarylogic-shippinglogic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Johnson of Binary Logic
|
@@ -12,6 +12,16 @@ cert_chain: []
|
|
12
12
|
date: 2009-08-08 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rspec
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
15
25
|
- !ruby/object:Gem::Dependency
|
16
26
|
name: activesupport
|
17
27
|
type: :runtime
|