dji 0.5.8 → 0.6.0
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.
- checksums.yaml +4 -4
- data/lib/dji/commands/track/track_command.rb +2 -1
- data/lib/dji/dhl/shipment.rb +5 -0
- data/lib/dji/order_tracking.rb +3 -3
- data/lib/dji/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e7c4c635b914833977002d2330f7816564abc006
|
|
4
|
+
data.tar.gz: f77af95f82c98e5c5c49db1974b73882175717f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1746c1802873a30a5fc654fce017efb2cb7c4c06deeb1dccf1f8a725966bf0b6b9e7f48697fdd8859f314452f755a6677fcebcd775128236cf0043695d52d4ad
|
|
7
|
+
data.tar.gz: cb5b10a7eeb27712c203073f77ef51eaf5b997f677791ca9c714597059ad8f603e0ce8caa32a2118d87131e0b283dcd155a3402b1a7a12c0fb72e66b8ae8fbb9
|
data/lib/dji/dhl/shipment.rb
CHANGED
|
@@ -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(' - ')
|
data/lib/dji/order_tracking.rb
CHANGED
|
@@ -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[:
|
|
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[:
|
|
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://
|
|
171
|
+
'http://www.dronehome.io/dji_track/orders'
|
|
172
172
|
end
|
|
173
173
|
|
|
174
174
|
end
|
data/lib/dji/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2016-11-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|