delivery_state_jp 1.0.4 → 1.0.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5d8121a36e1e1602ec9beb341ab63a19caf780d
|
4
|
+
data.tar.gz: ce25cc41307a5b603ee46857bbf292a5a18425d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89386ee8a695fb75ef89f241aa40640997a18f2c8b35eadcad5fd5c9587e44b6285b68aeb3c9fcf3c6c714090595e33206bb6879a47a1e6f07766e0a17da3729
|
7
|
+
data.tar.gz: 28eb181f819afdfd88138ee4ecf19c2355784a93517e4c2eead8838b20e2b1b8f2722b59d6d394a43ee3b678e915795ca4743d9aec895f13362d1e993fca9920
|
@@ -11,6 +11,11 @@ module DeliveryStateJp
|
|
11
11
|
statuses.last
|
12
12
|
end
|
13
13
|
|
14
|
+
def self.tracking_error_message(args)
|
15
|
+
doc = Nokogiri::HTML.parse(response_body(args), nil, charset)
|
16
|
+
error_messages.map { |error_message| (doc.search "[text() *= '#{error_message}']").last }.compact.map(&:text).map(&:strip).join('、')
|
17
|
+
end
|
18
|
+
|
14
19
|
def self.response_body(args)
|
15
20
|
number = args.fetch(:number)
|
16
21
|
uri = URI.parse(action_url)
|
@@ -38,5 +43,9 @@ module DeliveryStateJp
|
|
38
43
|
def self.xpath(_index)
|
39
44
|
fail NotImplementedError
|
40
45
|
end
|
46
|
+
|
47
|
+
def self.error_messages
|
48
|
+
fail NotImplementedError
|
49
|
+
end
|
41
50
|
end
|
42
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delivery_state_jp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nyaahara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|