takuhai_status 1.8.8 → 1.8.9

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: 51189eba2971738d6291a3bb4145cf55eeca77d6d54e6532f26d0ca9ff91c75f
4
- data.tar.gz: 88bb16e7b54855b154609c3e01ddd71ef626a1d524dcabd55b06f4838720e36f
3
+ metadata.gz: 6f6ac61ac18877912736c4c2c53a9c3ff34403477ada3d8ed2e0ac7844e0c545
4
+ data.tar.gz: c272dab2cc9f290cbd510c9f9d7c471c53188dde6188b61638acdff469c8b82b
5
5
  SHA512:
6
- metadata.gz: 832f5dbc797e9eadd1b7093eebb0c03625f226a0709d8bde6221840e4c3813474264e4b3406220615a77b7bab62ddcf3e43a07097083bf15974e046fa8886c38
7
- data.tar.gz: 68e107ccd5e4a99e2d0bedee50d0032cb8e42bad0507bdc0f8281328e9574a400fc6b3a352050c717eadd9a6f273a3b9ebc9827d129465de81217241fc11068b
6
+ metadata.gz: 854508184c8f05885867d3a227437d9e388622480a9f10e299918e6c68c37c001422fbdfa900b8df841dc0a41da3dbc309e0919ccc29552bca80518fc9824d3f
7
+ data.tar.gz: a956f50442f3d675e7fb7605292e93572cae82e9c71be3ac842850567a26700be0d69a8546b1198c50fcf010f9323cd4928f35f04ab39cc23d37208b3a6b6e73
@@ -21,8 +21,7 @@ module TakuhaiStatus
21
21
 
22
22
  private
23
23
  def check
24
- @@conn = Faraday.new(url: 'https://track-a.tmg-group.jp'){|builder|
25
- #@@conn = Faraday.new(url: 'https://track-a.tmg-tms.com'){|builder|
24
+ @@conn = Faraday.new(url: 'https://track-a.tmg-tms.com'){|builder|
26
25
  builder.use :cookie_jar
27
26
  builder.use FaradayMiddleware::FollowRedirects
28
27
  builder.request :url_encoded
@@ -37,9 +36,10 @@ module TakuhaiStatus
37
36
  begin
38
37
  state = doc.css('#list tr td')[2].text.strip
39
38
  raise if state =~ /お荷物情報が見つかりません/
39
+ raise if state == '2' # skip error state occurs sometime
40
40
  return Time.now, state
41
41
  rescue
42
- raise NotMyKey
42
+ raise NotMyKey.new(state)
43
43
  end
44
44
  end
45
45
  end
@@ -1,3 +1,3 @@
1
1
  module TakuhaiStatus
2
- VERSION = "1.8.8"
2
+ VERSION = "1.8.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: takuhai_status
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.8
4
+ version: 1.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - TADA Tadashi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-13 00:00:00.000000000 Z
11
+ date: 2019-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday