delivery_state_jp 1.0.8 → 1.0.12

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: cbb60f08e5411c6e878a335a4dd520780db127dd
4
- data.tar.gz: 06a21c615502421946ee2cd8d4487a7fdf76f645
2
+ SHA256:
3
+ metadata.gz: a41381f4fcfcf88210f1fa51fccc61e34f4335cc7e958b0eb9358d44e22e34c6
4
+ data.tar.gz: 70688350f459acef811faa757b1592d9167f360677efa7b834052dd5d9cd9363
5
5
  SHA512:
6
- metadata.gz: 5f44bd007dfe225fd636d6bdb1e7206b99911fceb1abf9b2f62835e441fabe9ca5b47ff9e4debe35a462222c19e462b1f085fa7174496c4bb123bdd13e92ffd6
7
- data.tar.gz: f1f91c91c90baf8d10d33038a7bf26ea0b69a2c627e1ce4c0d8eecb9142fe4fc31aced934440f79fbd0caad503de4231cbb6707a55bbc96fddb842f83765aece
6
+ metadata.gz: 133f08137248847a669f4b20da108b9909b641cc759e724f463ea1dfa9f2ff787dc80717724c5ee7ca29331b735d56d991e5265ef60cd6e3868b378d15eb6d59
7
+ data.tar.gz: 18050cdc74d63ed60fcd0bd052bf004b996808efbcf911e3abe49aae23517d455040f56d8f7b06f5476f05cc7812f21ffdf0ac5292811e020bdef40bf37d11a2
data/README.md CHANGED
@@ -42,3 +42,10 @@ irb(main):007:0> DeliveryStateJp::Seino.delivery_state(number: 'xxxx-xxxx-xxxx-x
42
42
 
43
43
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
44
44
 
45
+
46
+ ## For gem uploading for developers.
47
+
48
+ ```angular2
49
+ gem build delivery_state_jp.gemspec
50
+ gem push delivery_state_jp-1.0.12.gem
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_development_dependency 'pry-byebug', '~> 0'
35
+ spec.add_dependency 'pry-byebug'
36
36
  end
@@ -1,3 +1,5 @@
1
+ require 'net/http'
2
+
1
3
  module DeliveryStateJp
2
4
  class Base
3
5
  def self.delivery_state(args)
@@ -1,15 +1,31 @@
1
1
  module DeliveryStateJp
2
2
  class Sagawa < DeliveryStateJp::Base
3
3
  def self.action_url
4
- 'http://k2k.sagawa-exp.co.jp/p/web/okurijosearch.do'
4
+ 'https://k2k.sagawa-exp.co.jp/p/sagawa/web/okurijoinput.jsp'
5
5
  end
6
6
 
7
7
  def self.post_params(number)
8
- {'okurijoNo' => number}
8
+ {
9
+ 'jsf_tree_64' => 'H4sIAAAAAAAAAK1Vy27TQBQdlZSCUonXgi0SSAiEnMZ20lbd0FYqTdWqEm1BKAtrak8TR/aMGV+36QaJBXvWiC9A/QK+gB1bfoIta8YTN07GF1IJIsXyHJ25955zJpOLn2Q+leSFkD2LJtTvMys+P6E+S9UyiUKfQii4dSgZOwCZ+ZBJtkc57TH5qAQ3RZwIzjhsvbn/4/POr+9zpNYlNz2/H0aBVDjZ6e6qFo1Ri0bRojHRonHVFmu75JbnX642I5qmQO7uDugpbUSU9xqKH/Keoi2WtE7wlrwjc12y4OWdQW25153Ys388YD6sDSW5nYNWDlojkJSfYZLJQsn/MGvt68Xjb3c+fPwyp0rn89VUj8U0fyNZ/ryu1vXROgHyJJ9saI36jZVZfYgja1s99jNIMjhkQwBS88KgmRRb82d9hNkI5iCYi2AtBGsj2DKCrSDYqoHN5zMvYWBTqV8fJEq0ldIePaMeGybWiZ8dM8uPPPBDKz1PgcUTtmRh+X7U2WY0GHVFG5i2aPDSl3EUrkGCECKG7TTd0+DYPiA2coCMQFWKOtQ9lirJLC2KmH5r0DRcg6bjGsQstzFHbPPwaBCzyTaPjwYxB2zzAGkQU2RjimxMkY0pcjBFDqbIMRUtxIL3BK9wuWh6zTJA5+oBdvj4R3lNVcGGmHLwteZhTjtulYeZ77SqPCwPp13lYRE5y1Uel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81DslwykSylfwWTAqTybNB9hYJeSmzEI2qamM/hJj2FMKkf1ZvUtE0px+d8sBSRQcE0tIPVIXdZpCOKpqlR6TH4xrARRG1iHFd1BAm7f+bsObP2iQMZaqQz0NLU4/xIR+tIj8Z5G4uxu/0ZIc/2lPIl3hDCm/WEBqOHG6v14FYlNFFuC6eb/zKwgGgeZ1v9M1AWKSyW5xuNzWI6V2nF1GrVekgq3ijZpITXbBF0fJ3aj3Htx7n2LTtT0Oj2hqyX3G/mTq9WFXy2AwRU1ebti/8LQYdwNQ64Dty49zWWHwS8Tv0Rz8h+uIMBcSY2bVNxFpi8hgr9ZAfDPCxbs0pYAlY0FIt1ss7200CRR9sgtw02/Gg6D4/LELxhIdKJHD/+v7XlF3cU2TZD7EejgfJ/stVCseuzbRXAKVHyIX3PNDQMRNwQ8naI2dDXy3ywPBtLMuIlRTNWsOJc6lnLMD+nX4UEIVLcomLxB0L4j20r40/8iSdv8OTPrAbmM2xVcMJLwYOrOJM2dbtl6e2YTu5gSAAPbthAGffPRB3nNN+iGqU4o4GKc1srw62XymufJaUY63a35QLh//C8dau/kqd0RNr+ENpH2Yn4/XYOabk8/x0iyea8RdYedbTiTl7kH7p3a1neHvsSY+KJHmY08oEeigXqQWHnxf8BpNHdyIw+AAA=',
11
+ 'jsf_viewid' => '/web/okurijoinput.jsp',
12
+ 'main:no1' => number,
13
+ 'main:no2' => '',
14
+ 'main:no3' => '',
15
+ 'main:no4' => '',
16
+ 'main:no5' => '',
17
+ 'main:no6' => '',
18
+ 'main:no7' => '',
19
+ 'main:no8' => '',
20
+ 'main:no9' => '',
21
+ 'main:no10' => '',
22
+ 'main:toiStart' => '.',
23
+ 'main_SUBMIT' => '1',
24
+ }
9
25
  end
10
26
 
11
27
  def self.xpath(index)
12
- "//*[@id=\"detail-1\"]/table[2]/tbody/tr[#{index + 1}]/td[1]/text()"
28
+ "//*[@id=\"detail1\"]/table[2]/tbody/tr[#{index + 2}]/td[1]/text()"
13
29
  end
14
30
 
15
31
  def self.charset
@@ -1,3 +1,3 @@
1
1
  module DeliveryStateJp
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.12"
3
3
  end
@@ -1,5 +1,10 @@
1
1
  module DeliveryStateJp
2
2
  class Yamato < DeliveryStateJp::Base
3
+ def self.delivery_state(args)
4
+ doc = Nokogiri::HTML.parse(response_body(args), nil, charset)
5
+ doc.css('a[class=js-tracking-detail]').text
6
+ end
7
+
3
8
  def self.action_url
4
9
  'http://toi.kuronekoyamato.co.jp/cgi-bin/tneko'
5
10
  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.8
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - nyaahara
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-13 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
@@ -66,6 +66,20 @@ 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'
69
83
  description: delivery_state_jp can get status from japanese delivery solutions
70
84
  email:
71
85
  - d.niihara@gmail.com
@@ -96,7 +110,7 @@ licenses:
96
110
  - MIT
97
111
  metadata:
98
112
  allowed_push_host: https://rubygems.org
99
- post_install_message:
113
+ post_install_message:
100
114
  rdoc_options: []
101
115
  require_paths:
102
116
  - lib
@@ -111,9 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
125
  - !ruby/object:Gem::Version
112
126
  version: '0'
113
127
  requirements: []
114
- rubyforge_project:
115
- rubygems_version: 2.6.13
116
- signing_key:
128
+ rubygems_version: 3.2.3
129
+ signing_key:
117
130
  specification_version: 4
118
131
  summary: delivery_state_jp can get status from japanese delivery solutions
119
132
  test_files: []