dji 0.7.3 → 0.7.4

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: 9dc6efd18b9adfd31bd9ba9b43fa021f1e3ab0fc
4
- data.tar.gz: 9ce0895b190909d224f92427f0ac8856155ca4e8
3
+ metadata.gz: 7aba532042ed1552502a65c50788e3ab99d2e01b
4
+ data.tar.gz: 327f92e33e0734032822b97f682578a7e29917f6
5
5
  SHA512:
6
- metadata.gz: 2ebecfb6548532f2261eeb3d7916966bbbfbf19df882349458ea161b2fa493b4b6381d2c16a38171f9e7f68f323eedad5541647a6f6aea55ac8fb29b5e02fe49
7
- data.tar.gz: 5e559b1cb3b36472ffbffa6a3d437843c5657c33435232d454ea565ec32f966b5df62cf60bade092abf5b1fa79b3daf49bdaafd32923445a1e38ef67a249611b
6
+ metadata.gz: d873d8562bdb90a5126838033014cf31f53fac958e9878c3af0fbcbd2d4e2896ab6d7b5b05828c2aa9979c0bea1b0d97fbe2b440597b03986e04b44b1d5ab130
7
+ data.tar.gz: 52bf5decfba89a07cce0a1fc0141c4dcfe1e837936daf688a37d2bbb700c50909926a5c004e75320b4e4ed68a87bd0f879dc4c5c93e507d1e47e5170bcc92271
@@ -69,6 +69,7 @@ module DJI
69
69
  page = Nokogiri::HTML(response.body)
70
70
 
71
71
  content = page.at_xpath('//div[@id="custom-info"]/div[@class="order-tracking"]')
72
+ puts content.to_html if options[:debug]
72
73
 
73
74
  if content.text.blank? || content.text.include?('Sorry, record not found.')
74
75
  puts "Order #{options[:order_number]}/#{options[:phone_tail]} not found!" if options[:output]
@@ -78,10 +79,10 @@ module DJI
78
79
  data[:total] = content.at_xpath('p[2]').text.split(' ')[1..-1].join(' ')
79
80
  data[:payment_status] = content.at_xpath('p[3]').text.split(': ')[1]
80
81
  data[:shipping_status] = content.at_xpath('p[4]').text.split(': ')[1]
81
- data[:shipping_company] = if content.at_xpath('p[5]/span').present?
82
- content.at_xpath('p[5]/span').text
82
+ data[:shipping_company] = if content.at_xpath('p[5]').present?
83
+ content.at_xpath('p[5]').text.split(': ')[1].downcase
83
84
  else
84
- 'Tba'
85
+ 'tba'
85
86
  end
86
87
  data[:tracking_number] = if content.at_xpath('p[6]/a').present?
87
88
  content.at_xpath('p[6]/a').text
@@ -1,3 +1,3 @@
1
1
  module DJI
2
- VERSION = '0.7.3'
2
+ VERSION = '0.7.4'
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.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Elliott