dji 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -5
- data/lib/dji/commands/track/track_command.rb +8 -8
- data/lib/dji/order_tracking.rb +3 -1
- 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: 6c3a538f91ed7bd648f48b5ce41eb0024bc0067e
|
4
|
+
data.tar.gz: 252ae364633d25773b65eb41fbc7a5f2ac1aab4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c55289d434be6f23d458879ee803a34603b476f4add2a533f76d6ace4120f33b22c077139e9ef323c4847ea068f399305b10217dc5988dadde8d1b64d3e280c3
|
7
|
+
data.tar.gz: 2939effff36c04caf3d127280ecc7641959db965ff6429cd0e9d43e1cce6264556433ca6ab4459f496c2ea446393a1ca00541ac8bbd07788813862af07e12111
|
data/README.md
CHANGED
@@ -37,11 +37,12 @@ REQUIRED:
|
|
37
37
|
|
38
38
|
OPTIONAL:
|
39
39
|
|
40
|
-
-r, --repeat INTERVAL #
|
41
|
-
--publish #
|
42
|
-
-c, --country COUNTRY #
|
43
|
-
|
44
|
-
-
|
40
|
+
-r, --repeat INTERVAL # Repat every INTERVAL seconds
|
41
|
+
--publish # Publish your order details to http://dji-track.herokuapp.com/orders
|
42
|
+
-c, --country COUNTRY # Your country (use 3 letter code, such as USA)
|
43
|
+
-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)")
|
44
|
+
-u, --dji_username USERNAME # Your DJI Forum username
|
45
|
+
-d, --debug # Some additional output for when emailing kevin@welikeinc.com for assistance
|
45
46
|
```
|
46
47
|
|
47
48
|
#### Example: Track an order
|
@@ -13,20 +13,20 @@ module DJI
|
|
13
13
|
option :country, required: false, aliases: :c
|
14
14
|
option :debug, required: false, default: false, aliases: :d
|
15
15
|
option :dji_username, required: false, aliases: [:username, :u]
|
16
|
-
option :order_time, required: false, aliases: :t
|
17
16
|
option :email_address, required: false, aliases: [:email, :e]
|
17
|
+
option :order_time, required: false, aliases: :t
|
18
18
|
|
19
19
|
def track
|
20
20
|
order_time = Time.parse(options[:order_time]) if options[:order_time].present?
|
21
21
|
|
22
22
|
provided_options = {
|
23
|
-
order_number:
|
24
|
-
order_time:
|
25
|
-
phone_tail:
|
26
|
-
country:
|
27
|
-
debug:
|
28
|
-
dji_username:
|
29
|
-
|
23
|
+
order_number: options[:order_number],
|
24
|
+
order_time: order_time,
|
25
|
+
phone_tail: options[:phone_tail],
|
26
|
+
country: options[:country],
|
27
|
+
debug: options[:debug],
|
28
|
+
dji_username: options[:dji_username],
|
29
|
+
email_address: options[:email_address],
|
30
30
|
}
|
31
31
|
|
32
32
|
if options[:repeat].present?
|
data/lib/dji/order_tracking.rb
CHANGED
@@ -72,9 +72,9 @@ module DJI
|
|
72
72
|
data[:shipping_company] = content.at_xpath('div[5]/span').text
|
73
73
|
data[:tracking_number] = content.at_xpath('div[6]/a').text
|
74
74
|
|
75
|
-
data[:email_address] = options[:email_address] if options[:email_address].present?
|
76
75
|
data[:debug] = options[:debug] if options[:debug].present?
|
77
76
|
data[:dji_username] = options[:dji_username] if options[:dji_username].present?
|
77
|
+
data[:email_address] = options[:email_address] if options[:email_address].present?
|
78
78
|
data[:order_time] = options[:order_time] if options[:order_time].present?
|
79
79
|
data[:shipping_country] = options[:country] if options[:country].present?
|
80
80
|
|
@@ -100,6 +100,7 @@ module DJI
|
|
100
100
|
puts "ORDER TRACKING AS OF #{now}"
|
101
101
|
puts "------------------------------------------------------"
|
102
102
|
puts "DJI Forum Username : #{data[:dji_username]}" if data[:dji_username].present?
|
103
|
+
puts "Email Address : #{data[:email_address]}" if data[:email_address].present?
|
103
104
|
puts "Order Number : #{data[:order_number]}"
|
104
105
|
puts "Order Time : #{data[:order_time]}" if data[:order_time].present?
|
105
106
|
puts "Total : #{data[:total]}"
|
@@ -126,6 +127,7 @@ module DJI
|
|
126
127
|
shipping_company: data[:shipping_company],
|
127
128
|
tracking_number: data[:tracking_number],
|
128
129
|
dji_username: data[:dji_username],
|
130
|
+
email_address: data[:email_address],
|
129
131
|
}
|
130
132
|
}
|
131
133
|
|
data/lib/dji/version.rb
CHANGED