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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f464e213bf6ef3f5213b2d5fcd43e3d3c37142f0
4
- data.tar.gz: ac1081f6bab2b72ed7e14c900c7aee12fc6bf912
3
+ metadata.gz: 6160e5fe35970046f9d1720dcb4f5201813c5b2e
4
+ data.tar.gz: fcc4ec9df200a7b34f2c26a06c99c59dd2aff780
5
5
  SHA512:
6
- metadata.gz: 9c6f63ece886ff3043dc4eaa4b73cf25b708df90c9fa6082bb563501e4d4ca9db8eef2b0bfb931f0c4169d6d497b6019dcd6e2ddb774ccb7547ba416b42f517a
7
- data.tar.gz: 2bbfbfb0a6eaf32fc57ad8b19bf20d479a2b9e2968dcff6b28ea2207b903f3d489df3f15ca28655bb0c9ceb9730da4553f3471c643b7df951215bfecf3f59e0b
6
+ metadata.gz: 6509d5beaf6b45e7fbe1397d4f30b022c22cad4a983b9b8fc301d8dadce66b19c894bc2b97eb282dc557278cd9347f45ad4337479a1360691277f76dbae13e70
7
+ data.tar.gz: 59be3eb0de717d8ec3913b1b737af47b0145cf4a9d953973866df43e068ada7472d6a1fab3ce5336e9fc8de1f683ec7dd8391fcebbf722f1c46eac9e5e2bdebd
@@ -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!"
@@ -1,3 +1,3 @@
1
1
  module DJI
2
- VERSION = '0.7.1'
2
+ VERSION = '0.7.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Elliott