dji 0.5.6 → 0.5.7

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: fbecb1d2492877f00631f6b660e4e238fa5d5d89
4
- data.tar.gz: a043aa75066b672146175fbce2f3e8eb8349c87b
3
+ metadata.gz: 06ed17c5d1dc6efd545de17be18b4f68d213c6dc
4
+ data.tar.gz: c2cfa4dd30d70011e43620ca62dde7b7562b9bdb
5
5
  SHA512:
6
- metadata.gz: db2e124665265aba80fd38dbda529b29a5acf9596adfc535e00ee5ba9e69ab3175f47f9d00bc2ab616bbe2fe2cfb19567f1664596065970ae3c8388f5072f9ce
7
- data.tar.gz: d691782cc7a62700d4a0cf28920b34ba7b0a8a45a4902df2a34c9e25745e47d85ee9f8a22a5d4b56232a0a42b47178ddfb1d76b85d79e5ffa59cdcdefc983fe4
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 # Repat every INTERVAL seconds
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 for when emailing kevin@welikeinc.com for assistance
46
+ -d, --debug # Some additional output used when emailing kevin@welikeinc.com for assistance
47
47
  ```
48
48
 
49
49
  #### Example: Track an order
@@ -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').text
76
- data[:tracking_number] = content.at_xpath('div[6]/a').text
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?
@@ -1,3 +1,3 @@
1
1
  module DJI
2
- VERSION = '0.5.6'
2
+ VERSION = '0.5.7'
3
3
  end
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.6
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-01 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport