japan_etc 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/database/japan_etc_tollbooths.csv +2741 -2701
- data/lib/japan_etc/database.rb +1 -2
- data/lib/japan_etc/database_provider/central_nexco.rb +1 -1
- data/lib/japan_etc/tollbooth.rb +7 -1
- data/lib/japan_etc/version.rb +1 -1
- metadata +2 -2
data/lib/japan_etc/database.rb
CHANGED
@@ -12,7 +12,7 @@ module JapanETC
|
|
12
12
|
class CentralNEXCO < Base
|
13
13
|
include Util
|
14
14
|
|
15
|
-
URL = 'https://highwaypost.c-nexco.co.jp/faq/etc/use/documents/
|
15
|
+
URL = 'https://highwaypost.c-nexco.co.jp/faq/etc/use/documents/etcriyoukanouic.pdf'
|
16
16
|
|
17
17
|
WHITESPACE = /[\s ]/.freeze
|
18
18
|
|
data/lib/japan_etc/tollbooth.rb
CHANGED
@@ -62,7 +62,7 @@ module JapanETC
|
|
62
62
|
|
63
63
|
def to_a
|
64
64
|
[
|
65
|
-
identifier.
|
65
|
+
identifier.to_s,
|
66
66
|
road.to_a,
|
67
67
|
name,
|
68
68
|
direction,
|
@@ -161,12 +161,18 @@ module JapanETC
|
|
161
161
|
def initialize(road_number, tollbooth_number)
|
162
162
|
road_number = convert_to_integer(road_number)
|
163
163
|
raise ValidationError, '#road_number cannot be nil' if road_number.nil?
|
164
|
+
raise ValidationError, '#road_number must be lower than 100' if road_number >= 100
|
164
165
|
|
165
166
|
tollbooth_number = convert_to_integer(tollbooth_number)
|
166
167
|
raise ValidationError, '#tollbooth_number cannot be nil' if tollbooth_number.nil?
|
168
|
+
raise ValidationError, '#road_number must be lower than 1000' if tollbooth_number >= 1000
|
167
169
|
|
168
170
|
super(road_number, tollbooth_number)
|
169
171
|
end
|
172
|
+
|
173
|
+
def to_s
|
174
|
+
format('%02d-%03d', road_number, tollbooth_number)
|
175
|
+
end
|
170
176
|
end
|
171
177
|
end
|
172
178
|
end
|
data/lib/japan_etc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: japan_etc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuji Nakayama
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06
|
11
|
+
date: 2019-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|