trackerific 0.5.2 → 0.5.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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
@@ -9,11 +9,7 @@ module Trackerific
9
9
  # setup HTTParty
10
10
  include HTTParty
11
11
  format :xml
12
- # use the test site for Rails development, production for everything else
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('/ShippingAPITest.dll', :query => {:API => 'TrackV2', :XML => build_xml_request}.to_query)
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.2"
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-23}
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
- - 2
9
- version: 0.5.2
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-23 00:00:00 -07:00
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: 3953357878618140196
242
+ hash: 4454713478306083063
243
243
  segments:
244
244
  - 0
245
245
  version: "0"