delivery_state_jp 1.0.14 → 1.0.15

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: fd59f29d7d3325ddef6652a601aa89029a1636cebc8be16a0c0a3b022efe3b2e
4
- data.tar.gz: 19d4c76fe94272b568e76a3419a10848db1d5ae8006d41ab8a4eb1f1ef59a485
3
+ metadata.gz: 0c6a38481dabc89b53493509801da344af904edfee0fae51a96dbfbbead5dd06
4
+ data.tar.gz: d3a270aa5d60cd4c44bc1cf5645cf49a3abeca8751a00c34812e94c29fb71972
5
5
  SHA512:
6
- metadata.gz: f862339cb0bb656512131ec5b1412ae6ddebd9cc2f38409f718bca9edd5d6bdde1525329c3b40d295bf533d1d151d01581fdd52ec26d9e2135ddeabd9277be52
7
- data.tar.gz: f898c8684709d920d0e14a80bd38950898a58a8dc18eec71723b90070f948c9dcdc0070b495dc1ecf43a9af0ac5ab5cae70f94139c9a5d80b152cc09433654e9
6
+ metadata.gz: f420e7bb6fa26b65f1edded31be1ebd0e8ecef0ad7e76ce3e9ca354c3a84bc968a73865f395d083bbcbeff2355ee7d0966315faeedf76bb87cd4fcba49df3f3b
7
+ data.tar.gz: 2fcb8690e9c5f39e0d9bce85fe934e78954dfbb535bbf4962f8fc932f1f98d86bc8ed16ebd9bc0b6a1a005bd54ddb42e4cef3318c3c09f1ecbb47ba583e381b4
data/README.md CHANGED
@@ -47,5 +47,5 @@ The gem is available as open source under the terms of the [MIT License](http://
47
47
 
48
48
  ```angular2
49
49
  gem build delivery_state_jp.gemspec
50
- gem push delivery_state_jp-1.0.14.gem
50
+ gem push delivery_state_jp-1.0.15.gem
51
51
  ```
@@ -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.add_dependency 'pry-byebug'
35
+ # spec.add_development_dependency 'pry-byebug', '~> 0'
36
36
  end
@@ -1,5 +1,3 @@
1
- require 'net/http'
2
-
3
1
  module DeliveryStateJp
4
2
  class Base
5
3
  def self.delivery_state(args)
@@ -1,3 +1,3 @@
1
1
  module DeliveryStateJp
2
- VERSION = "1.0.14"
2
+ VERSION = "1.0.15"
3
3
  end
@@ -2,8 +2,12 @@ module DeliveryStateJp
2
2
  class Yamato < DeliveryStateJp::Base
3
3
  def self.delivery_state(args)
4
4
  doc = Nokogiri::HTML.parse(response_body(args), nil, charset)
5
- doc.css('a[class=js-tracking-detail]').text
6
- 'test code'
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.14
4
+ version: 1.0.15
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