dji 0.5.6 → 0.5.7
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/README.md +2 -2
- data/lib/dji/order_tracking.rb +10 -2
- 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: 06ed17c5d1dc6efd545de17be18b4f68d213c6dc
|
4
|
+
data.tar.gz: c2cfa4dd30d70011e43620ca62dde7b7562b9bdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a187c73ff07f3ca25133e723d938dd4fca5905701e820808eb0ca4f25b0ba86bb5448107b0c6d4ffb0ce3d7413261a9573475eee8ef9be45beda90bb6f037950
|
7
|
+
data.tar.gz: 1b734513a21709c84bd4d67db3968d69ae9b2ecd3ebb25ec44c8640e56ee54368b92fc4152cbaa26432bf61db3321c535b79e208f8c1f39549c0925be1aaef83
|
data/README.md
CHANGED
@@ -38,12 +38,12 @@ REQUIRED:
|
|
38
38
|
|
39
39
|
OPTIONAL:
|
40
40
|
|
41
|
-
-r, --repeat INTERVAL #
|
41
|
+
-r, --repeat INTERVAL # Repeat every INTERVAL seconds
|
42
42
|
--publish # Publish your order details to http://dji-track.herokuapp.com/orders
|
43
43
|
-c, --country COUNTRY # Your country (use 3 letter code, such as USA)
|
44
44
|
-t, --order_time TIMESTAMP # The timestamp from your private order page at https://accounts.dji.com/user/orders surrounded by quotes (i.e. "2016-09-29 11:21:21 (UTC)")
|
45
45
|
-u, --dji_username USERNAME # Your DJI Forum username
|
46
|
-
-d, --debug # Some additional output
|
46
|
+
-d, --debug # Some additional output used when emailing kevin@welikeinc.com for assistance
|
47
47
|
```
|
48
48
|
|
49
49
|
#### Example: Track an order
|
data/lib/dji/order_tracking.rb
CHANGED
@@ -72,8 +72,16 @@ module DJI
|
|
72
72
|
data[:total] = content.at_xpath('div[2]').text.split(' ')[1..-1].join(' ')
|
73
73
|
data[:payment_status] = content.at_xpath('div[3]').text.split(': ')[1]
|
74
74
|
data[:shipping_status] = content.at_xpath('div[4]').text.split(': ')[1]
|
75
|
-
data[:shipping_company] = content.at_xpath('div[5]/span').
|
76
|
-
|
75
|
+
data[:shipping_company] = if content.at_xpath('div[5]/span').present?
|
76
|
+
content.at_xpath('div[5]/span').text
|
77
|
+
else
|
78
|
+
'Tba'
|
79
|
+
end
|
80
|
+
data[:tracking_number] = if content.at_xpath('div[6]/a').present?
|
81
|
+
content.at_xpath('div[6]/a').text
|
82
|
+
else
|
83
|
+
nil
|
84
|
+
end
|
77
85
|
|
78
86
|
data[:debug] = options[:debug] if options[:debug].present?
|
79
87
|
data[:dji_username] = options[:dji_username] if options[:dji_username].present?
|
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.5.
|
4
|
+
version: 0.5.7
|
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-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|