dji 0.1.0 → 0.1.1

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: f7c13726726cac5f389ff3afdb5bb756b3805316
4
- data.tar.gz: f902274bcd1157a40499916494148b45f47f26d7
3
+ metadata.gz: 99c613192536d1beb1acc577ae701ec56b25dfaf
4
+ data.tar.gz: df2972a66397e7d063fb3b69b77a0d8a387029c2
5
5
  SHA512:
6
- metadata.gz: affb1a2ea0208affab2c2c00a971e59b4f35608c067e841619e41f20769409e0f9d79585b87609c636e8bd5fa459159aaa38d68252c0a31d6e4079180f30876b
7
- data.tar.gz: ae750d8f08cfa3b631760dc27875b6d16e4392ad89750d7405c7fcb5046bad465df25bc5f69a3f8291a58549f9c886890eb719a299d77a6425a66270a64a0818
6
+ metadata.gz: 0d14ba56c39806c116901a2015b9b1ec3ee36629609dae3ef0cd443b46309f9790bdea2b8fad4cc9c52ef931755263e8cd46079b98a56b59068b3aa7dc42646d
7
+ data.tar.gz: fbe12e7d0bc3c125b81541173e0ed680c9bbbcc02262db078c17d04b43dfaa383c8006615d3cdd4b0d91b9be23e327b2beceb7d9e1279bb70c248492c28be6b6
data/README.md CHANGED
@@ -18,7 +18,16 @@ Open a command line (Terminal on macOS):
18
18
 
19
19
  Use your order number in place of ORDER_NUMBER and the last 4 digits of your phone number for PHONE_TAIL. A full example might look like this:
20
20
 
21
- $ dji track -o 1234567890 -p 1234
21
+ $ dji track -o 123456789012 -p 1234
22
+
23
+ ORDER TRACKING AS OF 2016-10-27 01:12:27 -0700
24
+ ------------------------------------------------------
25
+ Order Number : 123456789012
26
+ Total : USD $1,398.00
27
+ Payment Status : Pay Confirmed
28
+ Shipping Status : Pending
29
+ Shipping Company : Tba
30
+ Tracking Number :
22
31
 
23
32
  ## Development
24
33
 
@@ -4,9 +4,21 @@ module DJI
4
4
  desc 'track ORDER_NUMBER PHONE_TAIL', 'track an order'
5
5
  option :order_number, required: true, aliases: :o
6
6
  option :phone_tail, required: true, aliases: :p
7
+ option :repeat, aliases: :r
7
8
 
8
9
  def track
9
- DJI::OrderTracking.tracking_details(options[:order_number], options[:phone_tail])
10
+ if options[:repeat].present?
11
+ interval = options[:repeat].to_i.presence || 300
12
+ puts
13
+ puts "Requesting order tracking details every #{interval} seconds. Press CONTROL-C to stop..."
14
+
15
+ while true
16
+ DJI::OrderTracking.tracking_details(options[:order_number], options[:phone_tail])
17
+ sleep(interval)
18
+ end
19
+ else
20
+ DJI::OrderTracking.tracking_details(options[:order_number], options[:phone_tail])
21
+ end
10
22
  end
11
23
  end
12
24
  end
@@ -1,3 +1,3 @@
1
1
  module DJI
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Elliott