takuhai_status 1.8.1 → 1.8.2

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
  SHA256:
3
- metadata.gz: ed2db8aae5fed40752347a6f60e990a97b5c81077525919d2dc6426055f832b9
4
- data.tar.gz: 6b72759578390a483719d6b7b643b57ff99dbc6c71df38634fe3d14d68644825
3
+ metadata.gz: 1d2a4a7fabf7a2abd08e23983986e988eb1228559298f94dfc09ca43e67a2d25
4
+ data.tar.gz: 9b9dce93a78662311fe2ebe934819b870e736d2cc40fa6554f00d39fe1bf9cb7
5
5
  SHA512:
6
- metadata.gz: ebd4cf407b922c128980e234fd0a6fc52cb22aba452784ba0d4d7216a5d2aefd952910fb4bab1defc662ff351d3c4ab2e82280aa5406077e3b685da4c7359190
7
- data.tar.gz: 1e97d4d8e8f4c52d1395202cad34158b751c25b81a14aa1a721d34fbae1fe88f7b595ab112c3193463173264478be18eab02d6ee57217ba4e095c77384f1328e
6
+ metadata.gz: cf3e3005ed57b718293a287e77633102792a5cff7b109f185df2e9470d7f2d5de104e2e0851cf890d7215f9398d6d194fc4ee68c790e9b3a10a20b7f0c851a0e
7
+ data.tar.gz: 52f1c1542faf872e64521cafca8af6f0e4e4cd9cc8389fd647b1ddf80d50a032f7fb257ec4a4d55b85ac176f293b74fe5edfcc5ef747149e10ffc822d4a82d17
@@ -21,9 +21,9 @@ module TakuhaiStatus
21
21
  url = "https://tools.usps.com/go/TrackConfirmAction?tLabels=#{@key}"
22
22
  html = Faraday.new(url: url).get.body
23
23
  date, status, detail = Nokogiri(html).css('div.status_feed p');
24
- date_str = date.text.strip
25
- status_str = status.text.gsub(/\u00A0/, ' ').strip
26
- detail_str = detail.text.gsub(/\u00A0/, ' ').strip
24
+ date_str = date ? date.text.strip : ''
25
+ status_str = status ? status.text.gsub(/\u00A0/, ' ').strip : ''
26
+ detail_str = detail ? detail.text.gsub(/\u00A0/, ' ').strip : ''
27
27
 
28
28
  unless date_str.empty?
29
29
  return Time.parse(date_str), "#{status_str} (#{detail_str})"
@@ -1,3 +1,3 @@
1
1
  module TakuhaiStatus
2
- VERSION = "1.8.1"
2
+ VERSION = "1.8.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: takuhai_status
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - TADA Tadashi