delivery_state_jp 1.0.10 → 1.0.14
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 -3
- data/lib/delivery_state_jp/base.rb +2 -0
- data/lib/delivery_state_jp/version.rb +1 -1
- data/lib/delivery_state_jp/yamato.rb +2 -18
- metadata +15 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd59f29d7d3325ddef6652a601aa89029a1636cebc8be16a0c0a3b022efe3b2e
|
4
|
+
data.tar.gz: 19d4c76fe94272b568e76a3419a10848db1d5ae8006d41ab8a4eb1f1ef59a485
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f862339cb0bb656512131ec5b1412ae6ddebd9cc2f38409f718bca9edd5d6bdde1525329c3b40d295bf533d1d151d01581fdd52ec26d9e2135ddeabd9277be52
|
7
|
+
data.tar.gz: f898c8684709d920d0e14a80bd38950898a58a8dc18eec71723b90070f948c9dcdc0070b495dc1ecf43a9af0ac5ab5cae70f94139c9a5d80b152cc09433654e9
|
data/README.md
CHANGED
data/delivery_state_jp.gemspec
CHANGED
@@ -28,11 +28,9 @@ 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'
|
33
31
|
|
34
32
|
spec.add_development_dependency 'bundler', '~> 1.11'
|
35
33
|
spec.add_development_dependency 'rake', '~> 10.0'
|
36
34
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
37
|
-
|
35
|
+
spec.add_dependency 'pry-byebug'
|
38
36
|
end
|
@@ -1,25 +1,9 @@
|
|
1
|
-
require 'nokogiri'
|
2
|
-
require 'capybara'
|
3
|
-
require 'capybara/poltergeist'
|
4
|
-
|
5
1
|
module DeliveryStateJp
|
6
2
|
class Yamato < DeliveryStateJp::Base
|
7
3
|
def self.delivery_state(args)
|
8
|
-
|
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)
|
4
|
+
doc = Nokogiri::HTML.parse(response_body(args), nil, charset)
|
22
5
|
doc.css('a[class=js-tracking-detail]').text
|
6
|
+
'test code'
|
23
7
|
end
|
24
8
|
|
25
9
|
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.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nyaahara
|
@@ -24,34 +24,6 @@ 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'
|
55
27
|
- !ruby/object:Gem::Dependency
|
56
28
|
name: bundler
|
57
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +66,20 @@ dependencies:
|
|
94
66
|
- - "~>"
|
95
67
|
- !ruby/object:Gem::Version
|
96
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'
|
97
83
|
description: delivery_state_jp can get status from japanese delivery solutions
|
98
84
|
email:
|
99
85
|
- d.niihara@gmail.com
|