delivery_state_jp 1.0.14 → 1.0.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/delivery_state_jp.gemspec +1 -1
- data/lib/delivery_state_jp/base.rb +0 -2
- data/lib/delivery_state_jp/version.rb +1 -1
- data/lib/delivery_state_jp/yamato.rb +7 -3
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0186a4528a2ef682624b413d0d7ee0491ba19ebd51489ebe78d529632e1110a4'
|
4
|
+
data.tar.gz: 5d27e5cba77e7e0e6f7db39d4d5d550d05d2bf4b86bdbbc4ac01d3a21b305bee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38b6219ed56074ff20e48dee1203cf43e0efc83972cbe1f98b4e28b808659a2bc058c50227282277f78487a679dabcba8cfb7c02c8e8648fd9b01fb5b85e9f71
|
7
|
+
data.tar.gz: 529d6f90ef8c23ba7a6cc4f30cf0fe46a189cf2bfb8c8328a6c5f96ca8fe52edbc340d55f76ddabf2e30a45fc689e361d5f5340a2bb1744f0fa7862dc761e90e
|
data/README.md
CHANGED
data/delivery_state_jp.gemspec
CHANGED
@@ -32,5 +32,5 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_development_dependency 'bundler', '~> 1.11'
|
33
33
|
spec.add_development_dependency 'rake', '~> 10.0'
|
34
34
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
35
|
-
spec.
|
35
|
+
# spec.add_development_dependency 'pry-byebug', '~> 0'
|
36
36
|
end
|
@@ -1,9 +1,13 @@
|
|
1
1
|
module DeliveryStateJp
|
2
2
|
class Yamato < DeliveryStateJp::Base
|
3
3
|
def self.delivery_state(args)
|
4
|
-
doc = Nokogiri::HTML.parse(response_body(args), nil, charset)
|
5
|
-
doc.
|
6
|
-
|
4
|
+
doc = Nokogiri::HTML.parse(response_body(args).force_encoding("UTF-8"), nil, charset)
|
5
|
+
content = doc.xpath('/html/body/p/script[4]').first.children.first.content
|
6
|
+
if m = content.match(/1件目.+\n.+.+\n.+\n.+swd.write.+>(?<state>.+)\<br\>\<\/font\>\<\/td\>/)
|
7
|
+
m[:state]
|
8
|
+
else
|
9
|
+
'不明'
|
10
|
+
end
|
7
11
|
end
|
8
12
|
|
9
13
|
def self.action_url
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nyaahara
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pry-byebug
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
69
|
description: delivery_state_jp can get status from japanese delivery solutions
|
84
70
|
email:
|
85
71
|
- d.niihara@gmail.com
|