delivery_state_jp 1.0.9 → 1.0.10

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
- SHA1:
3
- metadata.gz: 1056c32682ab03438ed014b8e207e8095b118bf5
4
- data.tar.gz: 38b17e03f02816d073bbf1c129f90d0bb1ce4402
2
+ SHA256:
3
+ metadata.gz: 526aef57e5a545e6a08f3cfbd34af831575c0b5c29b3c789071a174c315bf685
4
+ data.tar.gz: 06f67ce4d819cb99c34abdb1574f0a42fe91eabb46d70fce2ca93cf252518d18
5
5
  SHA512:
6
- metadata.gz: 686053575b66c0e8b055b7a76ca806349df033bf1b90b6bf8b2767cf04ffd76590d5fed586d721d6def88b710107de818d1e7ea6c3980ec5d6e32fbe30300589
7
- data.tar.gz: b964e7a14b721795463bf4d26839f2377e1c46100b86bfa4f4dbb2691953f0e938900566a4d83e1202ca68e77c5bebdf5f6772b49c391f04609d9fa00b849547
6
+ metadata.gz: d5a9f1b0c6d58fbe68a049c86443da6c82f9c28c63066c317f0a6d465ba238bb98226344225fa4cd311bc25a98e94492cefdf28bd0c5f63f7698bf7956401873
7
+ data.tar.gz: 80c1112fe00b185aef0c836e6a3cd6bd3a433e944f9592304024ab471ed14989952dbce1eac195144957fdbe021f94a5dd4c2d889cf8927a848f2a54ba9dc7af
data/README.md CHANGED
@@ -47,4 +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.10.gem
50
51
  ```
@@ -28,6 +28,8 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["lib"]
29
29
 
30
30
  spec.add_dependency 'nokogiri', '~> 1.6'
31
+ spec.add_dependency 'capybara'
32
+ spec.add_dependency 'poltergeist'
31
33
 
32
34
  spec.add_development_dependency 'bundler', '~> 1.11'
33
35
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -1,3 +1,3 @@
1
1
  module DeliveryStateJp
2
- VERSION = "1.0.9"
2
+ VERSION = "1.0.10"
3
3
  end
@@ -1,5 +1,27 @@
1
+ require 'nokogiri'
2
+ require 'capybara'
3
+ require 'capybara/poltergeist'
4
+
1
5
  module DeliveryStateJp
2
6
  class Yamato < DeliveryStateJp::Base
7
+ def self.delivery_state(args)
8
+ # Capybara.register_driver :poltergeist do |app|
9
+ # Capybara::Poltergeist::Driver.new(app, js_errors: false,
10
+ # timeout: 1000,
11
+ # phantomjs: PhantomJs.path,
12
+ # phantomjs_options: ['--debug=no', '--load-images=no', '--ignore-ssl-errors=yes', '--ssl-protocol=TLSv1'],
13
+ # debug: false
14
+ # )
15
+ # end
16
+ Capybara.javascript_driver = :poltergeist
17
+ session = Capybara::Session.new(:poltergeist)
18
+ session.visit action_url
19
+ session.fill_in("number01", with: args.fetch(:number))
20
+ session.click_button('category')
21
+ doc = Nokogiri::HTML.parse(session.html)
22
+ doc.css('a[class=js-tracking-detail]').text
23
+ end
24
+
3
25
  def self.action_url
4
26
  'http://toi.kuronekoyamato.co.jp/cgi-bin/tneko'
5
27
  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.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - nyaahara
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-26 00:00:00.000000000 Z
11
+ date: 2021-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -24,6 +24,34 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: capybara
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: poltergeist
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: bundler
29
57
  requirement: !ruby/object:Gem::Requirement
@@ -96,7 +124,7 @@ licenses:
96
124
  - MIT
97
125
  metadata:
98
126
  allowed_push_host: https://rubygems.org
99
- post_install_message:
127
+ post_install_message:
100
128
  rdoc_options: []
101
129
  require_paths:
102
130
  - lib
@@ -111,9 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
139
  - !ruby/object:Gem::Version
112
140
  version: '0'
113
141
  requirements: []
114
- rubyforge_project:
115
- rubygems_version: 2.6.13
116
- signing_key:
142
+ rubygems_version: 3.2.3
143
+ signing_key:
117
144
  specification_version: 4
118
145
  summary: delivery_state_jp can get status from japanese delivery solutions
119
146
  test_files: []