dji 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dji/fedex.rb +2 -3
- data/lib/dji/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6160e5fe35970046f9d1720dcb4f5201813c5b2e
|
4
|
+
data.tar.gz: fcc4ec9df200a7b34f2c26a06c99c59dd2aff780
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6509d5beaf6b45e7fbe1397d4f30b022c22cad4a983b9b8fc301d8dadce66b19c894bc2b97eb282dc557278cd9347f45ad4337479a1360691277f76dbae13e70
|
7
|
+
data.tar.gz: 59be3eb0de717d8ec3913b1b737af47b0145cf4a9d953973866df43e068ada7472d6a1fab3ce5336e9fc8de1f683ec7dd8391fcebbf722f1c46eac9e5e2bdebd
|
data/lib/dji/fedex.rb
CHANGED
@@ -11,7 +11,7 @@ module DJI
|
|
11
11
|
|
12
12
|
class << self
|
13
13
|
|
14
|
-
def track(tracking_number)
|
14
|
+
def track(tracking_number, options = {})
|
15
15
|
uri = URI.parse(tracking_url_json)
|
16
16
|
|
17
17
|
params = {
|
@@ -56,14 +56,13 @@ module DJI
|
|
56
56
|
case res
|
57
57
|
when Net::HTTPSuccess, Net::HTTPRedirection
|
58
58
|
# OK
|
59
|
-
# puts res.body
|
60
59
|
response = JSON.parse(res.body)['TrackPackagesResponse']
|
61
60
|
tpr = DJI::Fedex::TrackPackagesResponse.new_from_response(response)
|
62
61
|
|
63
62
|
data = { tracking_number: tracking_number }
|
64
63
|
if tpr.present?
|
65
64
|
data[:track_packages_response] = tpr
|
66
|
-
print_track_packages_response(data)
|
65
|
+
print_track_packages_response(data) if options[:debug]
|
67
66
|
else
|
68
67
|
puts response
|
69
68
|
puts "Nothing parsed!"
|
data/lib/dji/version.rb
CHANGED