dji 0.4.0 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5aeb8cd99478d19c5f62866970aa376e4af9b89b
4
- data.tar.gz: 004f57e75bb00eac9fd1fcb30b44958fefcdc093
3
+ metadata.gz: 6c3a538f91ed7bd648f48b5ce41eb0024bc0067e
4
+ data.tar.gz: 252ae364633d25773b65eb41fbc7a5f2ac1aab4b
5
5
  SHA512:
6
- metadata.gz: 1374f48557599191d8717959f744e7304dc03bba55ea1b51415968bcde4428b517793850e5d60ab7b6c390d25a0b69b950eebbbc384a1a0c1c436b523d1b779e
7
- data.tar.gz: e8a75a552de1f4870d516658e687303008172d8e89fc86e9db33d6942b9c2e0c9a40ffeca789a1fc40991750ce53f7abb7580c1e6bd51b19d9c68c0177ef3c50
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 # Optional: Repat every INTERVAL seconds
41
- --publish # Optional: Publish your order details to http://dji-track.herokuapp.com/orders
42
-  -c, --country COUNTRY # Optional: Your country (use 3 letter code, such as USA)
43
- -u, --dji_username USERNAME # Optional: Your DJI Forum username
44
- -d, --debug # Optional: Some additional output for when emailing kevin@welikeinc.com for assistance
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: 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: options[:email_address],
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?
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module DJI
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
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.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Elliott