trackerific 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/trackerific/services/usps.rb +8 -6
- data/trackerific.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
@@ -9,11 +9,7 @@ module Trackerific
|
|
9
9
|
# setup HTTParty
|
10
10
|
include HTTParty
|
11
11
|
format :xml
|
12
|
-
|
13
|
-
base_uri defined?(Rails) ? case Rails.env
|
14
|
-
when 'test', 'development' then 'http://testing.shippingapis.com'
|
15
|
-
when 'production' then 'https://secure.shippingapis.com'
|
16
|
-
end : 'https://secure.shippingapis.com'
|
12
|
+
base_uri Rails.env.production? ? "https://secure.shippingapis.com" : "http://testing.shippingapis.com"
|
17
13
|
|
18
14
|
class << self
|
19
15
|
# An Array of Regexp that matches valid USPS package IDs
|
@@ -42,7 +38,13 @@ module Trackerific
|
|
42
38
|
def track_package(package_id)
|
43
39
|
super
|
44
40
|
# connect to the USPS shipping API via HTTParty
|
45
|
-
response = self.class.get(
|
41
|
+
response = self.class.get(
|
42
|
+
Rails.env.production? ? "/ShippingAPI.dll" : "/ShippingAPITest.dll",
|
43
|
+
:query => {
|
44
|
+
:API => 'TrackV2',
|
45
|
+
:XML => build_xml_request
|
46
|
+
}.to_query
|
47
|
+
)
|
46
48
|
# throw any HTTP errors
|
47
49
|
response.error! unless response.code == 200
|
48
50
|
# raise a Trackerific::Error if there is an error in the response, or if the
|
data/trackerific.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{trackerific}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Travis Haynes"]
|
12
|
-
s.date = %q{2011-06-
|
12
|
+
s.date = %q{2011-06-24}
|
13
13
|
s.description = %q{Trackerific provides USPS, FedEx and UPS package tracking to Rails.}
|
14
14
|
s.email = %q{travis.j.haynes@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 3
|
9
|
+
version: 0.5.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Travis Haynes
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-06-
|
17
|
+
date: 2011-06-24 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -239,7 +239,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
239
239
|
requirements:
|
240
240
|
- - ">="
|
241
241
|
- !ruby/object:Gem::Version
|
242
|
-
hash:
|
242
|
+
hash: 4454713478306083063
|
243
243
|
segments:
|
244
244
|
- 0
|
245
245
|
version: "0"
|