jpostcode 1.0.0.20201001 → 1.0.0.20201101
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +12 -0
- data/CHANGELOG.md +11 -1
- data/Gemfile.lock +20 -20
- data/jpostcode-data/data/json/004.json +13 -0
- data/jpostcode-data/data/json/038.json +5 -5
- data/jpostcode-data/data/json/060.json +0 -13
- data/jpostcode-data/data/json/063.json +13 -0
- data/jpostcode-data/data/json/079.json +8 -73
- data/jpostcode-data/data/json/102.json +3 -3
- data/jpostcode-data/data/json/103.json +4 -4
- data/jpostcode-data/data/json/105.json +26 -26
- data/jpostcode-data/data/json/113.json +13 -28
- data/jpostcode-data/data/json/135.json +0 -13
- data/jpostcode-data/data/json/150.json +5 -5
- data/jpostcode-data/data/json/163.json +1 -1
- data/jpostcode-data/data/json/203.json +3 -3
- data/jpostcode-data/data/json/210.json +0 -26
- data/jpostcode-data/data/json/212.json +0 -52
- data/jpostcode-data/data/json/220.json +13 -0
- data/jpostcode-data/data/json/223.json +3 -3
- data/jpostcode-data/data/json/224.json +2 -2
- data/jpostcode-data/data/json/235.json +2 -2
- data/jpostcode-data/data/json/237.json +0 -26
- data/jpostcode-data/data/json/241.json +3 -3
- data/jpostcode-data/data/json/242.json +2 -15
- data/jpostcode-data/data/json/248.json +1 -1
- data/jpostcode-data/data/json/253.json +4 -30
- data/jpostcode-data/data/json/259.json +3 -16
- data/jpostcode-data/data/json/301.json +6 -6
- data/jpostcode-data/data/json/310.json +1 -1
- data/jpostcode-data/data/json/395.json +13 -0
- data/jpostcode-data/data/json/399.json +5 -5
- data/jpostcode-data/data/json/400.json +3 -3
- data/jpostcode-data/data/json/453.json +0 -13
- data/jpostcode-data/data/json/515.json +2 -2
- data/jpostcode-data/data/json/525.json +28 -13
- data/jpostcode-data/data/json/564.json +5 -5
- data/jpostcode-data/data/json/651.json +3 -3
- data/jpostcode-data/data/json/720.json +2 -2
- data/jpostcode-data/data/json/742.json +3 -3
- data/jpostcode-data/data/json/760.json +13 -0
- data/jpostcode-data/data/json/810.json +0 -13
- data/jpostcode-data/data/json/819.json +26 -0
- data/jpostcode-data/data/json/849.json +5 -5
- data/jpostcode-data/data/json/852.json +1 -1
- data/jpostcode-data/data/json/907.json +13 -0
- data/jpostcode-data/data/json/920.json +65 -0
- data/jpostcode-data/data/json/958.json +5 -5
- data/jpostcode-data/data/json/984.json +3 -3
- data/lib/jpostcode.rb +2 -2
- data/lib/jpostcode/version.rb +1 -1
- metadata +2 -2
@@ -1930,11 +1930,11 @@
|
|
1930
1930
|
"prefecture_code": 15,
|
1931
1931
|
"city": "村上市",
|
1932
1932
|
"city_kana": "ムラカミシ",
|
1933
|
-
"town": "
|
1934
|
-
"town_kana": "
|
1935
|
-
"street": "
|
1936
|
-
"office_name": "村上総合病院",
|
1937
|
-
"office_name_kana": "ムラカミソウゴウビヨウイン"
|
1933
|
+
"town": "緑町",
|
1934
|
+
"town_kana": "ミドリマチ",
|
1935
|
+
"street": "5丁目8番1号",
|
1936
|
+
"office_name": "新潟県厚生農業協同組合連合会 村上総合病院",
|
1937
|
+
"office_name_kana": "ニイガタケンコウセイノウギヨウキヨウドウクミアイレンゴウカイ ムラカミソウゴウビヨウイン"
|
1938
1938
|
},
|
1939
1939
|
"8555": {
|
1940
1940
|
"postcode": "9588555",
|
@@ -1241,9 +1241,9 @@
|
|
1241
1241
|
"prefecture_code": 4,
|
1242
1242
|
"city": "仙台市若林区",
|
1243
1243
|
"city_kana": "センダイシワカバヤシク",
|
1244
|
-
"town": "
|
1245
|
-
"town_kana": "
|
1246
|
-
"street": "
|
1244
|
+
"town": "荒井東",
|
1245
|
+
"town_kana": "アライヒガシ",
|
1246
|
+
"street": "1−1−10",
|
1247
1247
|
"office_name": "ダイト薬品 株式会社",
|
1248
1248
|
"office_name_kana": "ダイトヤクヒン カブシキガイシヤ"
|
1249
1249
|
},
|
data/lib/jpostcode.rb
CHANGED
@@ -5,7 +5,7 @@ require 'jpostcode/address'
|
|
5
5
|
require 'json'
|
6
6
|
|
7
7
|
module Jpostcode
|
8
|
-
DATA_DIR = File.dirname(__FILE__)
|
8
|
+
DATA_DIR = "#{File.dirname(__FILE__)}/../jpostcode-data/data/json/"
|
9
9
|
|
10
10
|
module_function
|
11
11
|
|
@@ -13,7 +13,7 @@ module Jpostcode
|
|
13
13
|
zip_code = raw_zip_code.to_s.delete('-')
|
14
14
|
return nil unless /^\d{7,7}$/ =~ zip_code
|
15
15
|
|
16
|
-
json_file = DATA_DIR
|
16
|
+
json_file = "#{DATA_DIR}#{zip_code.slice(0, 3)}.json"
|
17
17
|
return nil unless File.exist?(json_file)
|
18
18
|
|
19
19
|
data = JSON.parse(File.open(json_file).read)
|
data/lib/jpostcode/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jpostcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.20201101
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kakipo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|