dji 0.5.8 → 0.6.0

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: 91853ee5a462b2d89a6f963f6da8dfdc0f7a1d22
4
- data.tar.gz: 792a15fc690d1e406f2668dc9861a4fc7eda4d44
3
+ metadata.gz: e7c4c635b914833977002d2330f7816564abc006
4
+ data.tar.gz: f77af95f82c98e5c5c49db1974b73882175717f7
5
5
  SHA512:
6
- metadata.gz: 019cbaec18978b92687399fd124436c5ba56d18319731fa0af780ee750ae396e847cb17aa73d3f3493493c1e502012d1f93856196e5c98c1610058eb777084f4
7
- data.tar.gz: fcba88df85549e8c3441f505f5fcbc3d1f7d5abfbaa8e9b11a988b7840f8d90978e1530f8d8e621f309ba5585b33defd7ed444397762473a3067eb62cbafc810
6
+ metadata.gz: 1746c1802873a30a5fc654fce017efb2cb7c4c06deeb1dccf1f8a725966bf0b6b9e7f48697fdd8859f314452f755a6677fcebcd775128236cf0043695d52d4ad
7
+ data.tar.gz: cb5b10a7eeb27712c203073f77ef51eaf5b997f677791ca9c714597059ad8f603e0ce8caa32a2118d87131e0b283dcd155a3402b1a7a12c0fb72e66b8ae8fbb9
@@ -27,7 +27,8 @@ module DJI
27
27
  debug: options[:debug],
28
28
  dji_username: options[:dji_username],
29
29
  email_address: options[:email_address],
30
- debug: true
30
+ debug: options[:debug],
31
+ output: true
31
32
  }
32
33
 
33
34
  if options[:repeat].present?
@@ -19,6 +19,11 @@ module DJI
19
19
  @checkpoints = []
20
20
  end
21
21
 
22
+ def delivered_at
23
+ puts checkpoints.first.inspect
24
+ checkpoints.first.datetime if delivery_status == 'delivered'
25
+ end
26
+
22
27
  def destination=(value)
23
28
  @destination = value
24
29
  self.destination_city, self.destination_region, self.destination_country = value.split(' - ')
@@ -65,7 +65,7 @@ module DJI
65
65
  content = page.at_xpath('//div[@id="main"]/div[@class="container"]/div[@class="row"]/div[@class="col-xs-9"]/div[@class="col-xs-10 well"][2]')
66
66
 
67
67
  if content.text.blank? || content.text.include?('Sorry, record not found.')
68
- puts "Order #{options[:order_number]}/#{options[:phone_tail]} not found!" if options[:debug]
68
+ puts "Order #{options[:order_number]}/#{options[:phone_tail]} not found!" if options[:output]
69
69
  else
70
70
  data = {}
71
71
  data[:order_number] = content.at_xpath('div[1]').text.split(' ')[-1]
@@ -90,7 +90,7 @@ module DJI
90
90
  data[:order_time] = options[:order_time] if options[:order_time].present?
91
91
  data[:shipping_country] = options[:country] if options[:country].present?
92
92
 
93
- print_tracking_details(data) if options[:debug]
93
+ print_tracking_details(data) if options[:output]
94
94
  end
95
95
 
96
96
  data
@@ -168,7 +168,7 @@ module DJI
168
168
 
169
169
  def publish_url
170
170
  # 'http://localhost:3000/orders'
171
- 'http://dji-track.herokuapp.com/orders'
171
+ 'http://www.dronehome.io/dji_track/orders'
172
172
  end
173
173
 
174
174
  end
@@ -1,3 +1,3 @@
1
1
  module DJI
2
- VERSION = '0.5.8'
2
+ VERSION = '0.6.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Elliott
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-07 00:00:00.000000000 Z
11
+ date: 2016-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport