jpostcode 1.0.0.20201001 → 1.0.0.20210301
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 +28 -10
- data/.ruby-version +1 -1
- data/CHANGELOG.md +62 -1
- data/Gemfile.lock +37 -37
- data/jpostcode-data/data/json/003.json +13 -0
- data/jpostcode-data/data/json/004.json +26 -0
- data/jpostcode-data/data/json/010.json +3 -3
- data/jpostcode-data/data/json/014.json +3 -3
- data/jpostcode-data/data/json/024.json +26 -0
- data/jpostcode-data/data/json/026.json +13 -0
- data/jpostcode-data/data/json/038.json +5 -5
- data/jpostcode-data/data/json/060.json +9 -22
- data/jpostcode-data/data/json/063.json +13 -0
- data/jpostcode-data/data/json/064.json +5 -5
- data/jpostcode-data/data/json/079.json +11 -76
- data/jpostcode-data/data/json/080.json +13 -0
- data/jpostcode-data/data/json/088.json +2 -2
- data/jpostcode-data/data/json/100.json +16 -16
- data/jpostcode-data/data/json/101.json +26 -26
- data/jpostcode-data/data/json/102.json +3 -16
- data/jpostcode-data/data/json/103.json +7 -20
- data/jpostcode-data/data/json/104.json +3 -3
- data/jpostcode-data/data/json/105.json +533 -26
- data/jpostcode-data/data/json/106.json +3 -3
- data/jpostcode-data/data/json/108.json +18 -5
- data/jpostcode-data/data/json/110.json +13 -0
- data/jpostcode-data/data/json/112.json +2 -2
- data/jpostcode-data/data/json/113.json +26 -28
- data/jpostcode-data/data/json/114.json +3 -3
- data/jpostcode-data/data/json/115.json +13 -0
- data/jpostcode-data/data/json/135.json +5 -18
- data/jpostcode-data/data/json/136.json +0 -13
- data/jpostcode-data/data/json/140.json +13 -0
- data/jpostcode-data/data/json/141.json +19 -6
- data/jpostcode-data/data/json/150.json +5 -5
- data/jpostcode-data/data/json/151.json +1 -1
- data/jpostcode-data/data/json/158.json +3 -16
- data/jpostcode-data/data/json/163.json +1 -1
- data/jpostcode-data/data/json/164.json +0 -13
- data/jpostcode-data/data/json/166.json +13 -0
- data/jpostcode-data/data/json/192.json +2 -2
- data/jpostcode-data/data/json/203.json +3 -3
- data/jpostcode-data/data/json/210.json +13 -26
- data/jpostcode-data/data/json/212.json +0 -52
- data/jpostcode-data/data/json/215.json +3 -16
- data/jpostcode-data/data/json/216.json +0 -13
- data/jpostcode-data/data/json/220.json +26 -0
- data/jpostcode-data/data/json/221.json +13 -0
- data/jpostcode-data/data/json/222.json +2 -2
- data/jpostcode-data/data/json/223.json +3 -3
- data/jpostcode-data/data/json/224.json +2 -2
- data/jpostcode-data/data/json/231.json +51 -90
- data/jpostcode-data/data/json/235.json +2 -2
- data/jpostcode-data/data/json/236.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/251.json +13 -0
- data/jpostcode-data/data/json/252.json +54 -2
- data/jpostcode-data/data/json/253.json +4 -30
- data/jpostcode-data/data/json/254.json +27 -14
- data/jpostcode-data/data/json/257.json +17 -4
- data/jpostcode-data/data/json/259.json +3 -29
- data/jpostcode-data/data/json/272.json +4 -4
- data/jpostcode-data/data/json/289.json +0 -13
- data/jpostcode-data/data/json/297.json +13 -0
- data/jpostcode-data/data/json/301.json +6 -6
- data/jpostcode-data/data/json/307.json +16 -16
- data/jpostcode-data/data/json/310.json +1 -1
- data/jpostcode-data/data/json/321.json +3 -3
- data/jpostcode-data/data/json/330.json +16 -3
- data/jpostcode-data/data/json/350.json +13 -0
- data/jpostcode-data/data/json/351.json +13 -0
- data/jpostcode-data/data/json/362.json +13 -0
- data/jpostcode-data/data/json/395.json +13 -0
- data/jpostcode-data/data/json/399.json +5 -18
- data/jpostcode-data/data/json/400.json +3 -3
- data/jpostcode-data/data/json/409.json +6 -32
- data/jpostcode-data/data/json/414.json +1 -1
- data/jpostcode-data/data/json/440.json +0 -13
- data/jpostcode-data/data/json/444.json +13 -0
- data/jpostcode-data/data/json/448.json +13 -0
- data/jpostcode-data/data/json/453.json +0 -13
- data/jpostcode-data/data/json/455.json +13 -0
- data/jpostcode-data/data/json/503.json +3 -3
- data/jpostcode-data/data/json/505.json +13 -0
- data/jpostcode-data/data/json/506.json +5 -5
- data/jpostcode-data/data/json/515.json +2 -2
- data/jpostcode-data/data/json/516.json +13 -0
- data/jpostcode-data/data/json/518.json +17 -4
- data/jpostcode-data/data/json/519.json +13 -0
- data/jpostcode-data/data/json/520.json +13 -0
- data/jpostcode-data/data/json/525.json +28 -13
- data/jpostcode-data/data/json/530.json +13 -0
- data/jpostcode-data/data/json/536.json +1 -1
- data/jpostcode-data/data/json/539.json +8 -8
- data/jpostcode-data/data/json/560.json +13 -0
- data/jpostcode-data/data/json/564.json +5 -5
- data/jpostcode-data/data/json/575.json +5 -5
- data/jpostcode-data/data/json/604.json +3 -3
- data/jpostcode-data/data/json/616.json +3 -3
- data/jpostcode-data/data/json/620.json +315 -104
- data/jpostcode-data/data/json/630.json +13 -0
- data/jpostcode-data/data/json/651.json +3 -3
- data/jpostcode-data/data/json/657.json +1 -1
- data/jpostcode-data/data/json/670.json +3 -3
- data/jpostcode-data/data/json/701.json +13 -0
- data/jpostcode-data/data/json/720.json +2 -2
- data/jpostcode-data/data/json/733.json +0 -13
- data/jpostcode-data/data/json/742.json +3 -3
- data/jpostcode-data/data/json/754.json +13 -0
- data/jpostcode-data/data/json/760.json +13 -26
- data/jpostcode-data/data/json/761.json +26 -0
- data/jpostcode-data/data/json/781.json +2 -2
- data/jpostcode-data/data/json/790.json +107 -3
- data/jpostcode-data/data/json/798.json +1 -1
- data/jpostcode-data/data/json/799.json +0 -104
- data/jpostcode-data/data/json/800.json +13 -0
- data/jpostcode-data/data/json/810.json +0 -26
- data/jpostcode-data/data/json/812.json +1 -1
- data/jpostcode-data/data/json/815.json +13 -0
- data/jpostcode-data/data/json/819.json +29 -3
- data/jpostcode-data/data/json/839.json +2 -2
- data/jpostcode-data/data/json/849.json +5 -5
- data/jpostcode-data/data/json/852.json +1 -1
- data/jpostcode-data/data/json/861.json +3 -3
- data/jpostcode-data/data/json/870.json +40 -14
- data/jpostcode-data/data/json/879.json +0 -13
- data/jpostcode-data/data/json/901.json +2 -2
- data/jpostcode-data/data/json/907.json +13 -0
- data/jpostcode-data/data/json/918.json +2 -2
- data/jpostcode-data/data/json/920.json +74 -22
- data/jpostcode-data/data/json/925.json +91 -0
- data/jpostcode-data/data/json/926.json +2 -2
- data/jpostcode-data/data/json/929.json +13 -104
- data/jpostcode-data/data/json/940.json +13 -0
- data/jpostcode-data/data/json/945.json +3 -3
- data/jpostcode-data/data/json/948.json +26 -0
- data/jpostcode-data/data/json/949.json +14 -1
- data/jpostcode-data/data/json/955.json +2 -2
- data/jpostcode-data/data/json/958.json +5 -5
- data/jpostcode-data/data/json/960.json +13 -0
- data/jpostcode-data/data/json/961.json +4 -4
- data/jpostcode-data/data/json/963.json +3 -3
- data/jpostcode-data/data/json/964.json +1 -1
- data/jpostcode-data/data/json/969.json +4 -4
- data/jpostcode-data/data/json/980.json +1 -1
- data/jpostcode-data/data/json/981.json +39 -13
- data/jpostcode-data/data/json/984.json +3 -3
- data/jpostcode-data/data/json/986.json +39 -0
- data/jpostcode-data/data/json/989.json +39 -0
- data/jpostcode-data/data/json/990.json +1 -1
- data/jpostcode.gemspec +2 -1
- data/lib/jpostcode.rb +2 -2
- data/lib/jpostcode/version.rb +1 -1
- metadata +6 -6
@@ -701,6 +701,19 @@
|
|
701
701
|
"office_name": null,
|
702
702
|
"office_name_kana": null
|
703
703
|
},
|
704
|
+
"0507": {
|
705
|
+
"postcode": "9810507",
|
706
|
+
"prefecture": "宮城県",
|
707
|
+
"prefecture_kana": "ミヤギケン",
|
708
|
+
"prefecture_code": 4,
|
709
|
+
"city": "東松島市",
|
710
|
+
"city_kana": "ヒガシマツシマシ",
|
711
|
+
"town": "みそら",
|
712
|
+
"town_kana": "ミソラ",
|
713
|
+
"street": null,
|
714
|
+
"office_name": null,
|
715
|
+
"office_name_kana": null
|
716
|
+
},
|
704
717
|
"0901": {
|
705
718
|
"postcode": "9810901",
|
706
719
|
"prefecture": "宮城県",
|
@@ -6042,6 +6055,19 @@
|
|
6042
6055
|
"office_name": "アルプス電気 株式会社 中央研究所",
|
6043
6056
|
"office_name_kana": "アルプスデンキ カブシキガイシヤ チユウオウケンキユウシヨ"
|
6044
6057
|
},
|
6058
|
+
"3281": {
|
6059
|
+
"postcode": "9813281",
|
6060
|
+
"prefecture": "宮城県",
|
6061
|
+
"prefecture_kana": "ミヤギケン",
|
6062
|
+
"prefecture_code": 4,
|
6063
|
+
"city": "仙台市泉区",
|
6064
|
+
"city_kana": "センダイシイズミク",
|
6065
|
+
"town": "紫山",
|
6066
|
+
"town_kana": "ムラサキヤマ",
|
6067
|
+
"street": "2丁目1−1",
|
6068
|
+
"office_name": "独立行政法人 地域医療機能推進機構 仙台病院",
|
6069
|
+
"office_name_kana": "ドクリツギヨウセイホウジン チイキイリヨウキノウスイシンキコウ センダイビヨウイン"
|
6070
|
+
},
|
6045
6071
|
"3287": {
|
6046
6072
|
"postcode": "9813287",
|
6047
6073
|
"prefecture": "宮城県",
|
@@ -7396,19 +7422,6 @@
|
|
7396
7422
|
"office_name": "大衡村役場",
|
7397
7423
|
"office_name_kana": "オオヒラムラヤクバ"
|
7398
7424
|
},
|
7399
|
-
"3693": {
|
7400
|
-
"postcode": "9813693",
|
7401
|
-
"prefecture": "宮城県",
|
7402
|
-
"prefecture_kana": "ミヤギケン",
|
7403
|
-
"prefecture_code": 4,
|
7404
|
-
"city": "黒川郡大衡村",
|
7405
|
-
"city_kana": "クロカワグンオオヒラムラ",
|
7406
|
-
"town": "沖の平",
|
7407
|
-
"town_kana": "オキノダイラ",
|
7408
|
-
"street": "1番",
|
7409
|
-
"office_name": "ラピスセミコンダクタ宮城 株式会社",
|
7410
|
-
"office_name_kana": "ラピスセミコンダクタミヤギ カブシキガイシヤ"
|
7411
|
-
},
|
7412
7425
|
"3697": {
|
7413
7426
|
"postcode": "9813697",
|
7414
7427
|
"prefecture": "宮城県",
|
@@ -8919,6 +8932,19 @@
|
|
8919
8932
|
"office_name": null,
|
8920
8933
|
"office_name_kana": null
|
8921
8934
|
},
|
8935
|
+
"4369": {
|
8936
|
+
"postcode": "9814369",
|
8937
|
+
"prefecture": "宮城県",
|
8938
|
+
"prefecture_kana": "ミヤギケン",
|
8939
|
+
"prefecture_code": 4,
|
8940
|
+
"city": "加美郡加美町",
|
8941
|
+
"city_kana": "カミグンカミマチ",
|
8942
|
+
"town": "新松田",
|
8943
|
+
"town_kana": "シンマツタ",
|
8944
|
+
"street": null,
|
8945
|
+
"office_name": null,
|
8946
|
+
"office_name_kana": null
|
8947
|
+
},
|
8922
8948
|
"4371": {
|
8923
8949
|
"postcode": "9814371",
|
8924
8950
|
"prefecture": "宮城県",
|
@@ -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
|
},
|
@@ -2391,6 +2391,45 @@
|
|
2391
2391
|
"office_name": null,
|
2392
2392
|
"office_name_kana": null
|
2393
2393
|
},
|
2394
|
+
"0881": {
|
2395
|
+
"postcode": "9860881",
|
2396
|
+
"prefecture": "宮城県",
|
2397
|
+
"prefecture_kana": "ミヤギケン",
|
2398
|
+
"prefecture_code": 4,
|
2399
|
+
"city": "石巻市",
|
2400
|
+
"city_kana": "イシノマキシ",
|
2401
|
+
"town": "明神南",
|
2402
|
+
"town_kana": "ミョウジンミナミ",
|
2403
|
+
"street": null,
|
2404
|
+
"office_name": null,
|
2405
|
+
"office_name_kana": null
|
2406
|
+
},
|
2407
|
+
"0882": {
|
2408
|
+
"postcode": "9860882",
|
2409
|
+
"prefecture": "宮城県",
|
2410
|
+
"prefecture_kana": "ミヤギケン",
|
2411
|
+
"prefecture_code": 4,
|
2412
|
+
"city": "石巻市",
|
2413
|
+
"city_kana": "イシノマキシ",
|
2414
|
+
"town": "浦屋敷南",
|
2415
|
+
"town_kana": "ウラヤシキミナミ",
|
2416
|
+
"street": null,
|
2417
|
+
"office_name": null,
|
2418
|
+
"office_name_kana": null
|
2419
|
+
},
|
2420
|
+
"0883": {
|
2421
|
+
"postcode": "9860883",
|
2422
|
+
"prefecture": "宮城県",
|
2423
|
+
"prefecture_kana": "ミヤギケン",
|
2424
|
+
"prefecture_code": 4,
|
2425
|
+
"city": "石巻市",
|
2426
|
+
"city_kana": "イシノマキシ",
|
2427
|
+
"town": "新館南",
|
2428
|
+
"town_kana": "シンタテミナミ",
|
2429
|
+
"street": null,
|
2430
|
+
"office_name": null,
|
2431
|
+
"office_name_kana": null
|
2432
|
+
},
|
2394
2433
|
"1111": {
|
2395
2434
|
"postcode": "9861111",
|
2396
2435
|
"prefecture": "宮城県",
|
@@ -4722,6 +4722,19 @@
|
|
4722
4722
|
"office_name": null,
|
4723
4723
|
"office_name_kana": null
|
4724
4724
|
},
|
4725
|
+
"2325": {
|
4726
|
+
"postcode": "9892325",
|
4727
|
+
"prefecture": "宮城県",
|
4728
|
+
"prefecture_kana": "ミヤギケン",
|
4729
|
+
"prefecture_code": 4,
|
4730
|
+
"city": "亘理郡亘理町",
|
4731
|
+
"city_kana": "ワタリグンワタリチョウ",
|
4732
|
+
"town": "花苺",
|
4733
|
+
"town_kana": "ハナイチゴ",
|
4734
|
+
"street": null,
|
4735
|
+
"office_name": null,
|
4736
|
+
"office_name_kana": null
|
4737
|
+
},
|
4725
4738
|
"2331": {
|
4726
4739
|
"postcode": "9892331",
|
4727
4740
|
"prefecture": "宮城県",
|
@@ -4735,6 +4748,32 @@
|
|
4735
4748
|
"office_name": null,
|
4736
4749
|
"office_name_kana": null
|
4737
4750
|
},
|
4751
|
+
"2332": {
|
4752
|
+
"postcode": "9892332",
|
4753
|
+
"prefecture": "宮城県",
|
4754
|
+
"prefecture_kana": "ミヤギケン",
|
4755
|
+
"prefecture_code": 4,
|
4756
|
+
"city": "亘理郡亘理町",
|
4757
|
+
"city_kana": "ワタリグンワタリチョウ",
|
4758
|
+
"town": "苺浜",
|
4759
|
+
"town_kana": "イチゴハマ",
|
4760
|
+
"street": null,
|
4761
|
+
"office_name": null,
|
4762
|
+
"office_name_kana": null
|
4763
|
+
},
|
4764
|
+
"2333": {
|
4765
|
+
"postcode": "9892333",
|
4766
|
+
"prefecture": "宮城県",
|
4767
|
+
"prefecture_kana": "ミヤギケン",
|
4768
|
+
"prefecture_code": 4,
|
4769
|
+
"city": "亘理郡亘理町",
|
4770
|
+
"city_kana": "ワタリグンワタリチョウ",
|
4771
|
+
"town": "苺里",
|
4772
|
+
"town_kana": "イチゴサト",
|
4773
|
+
"street": null,
|
4774
|
+
"office_name": null,
|
4775
|
+
"office_name_kana": null
|
4776
|
+
},
|
4738
4777
|
"2341": {
|
4739
4778
|
"postcode": "9892341",
|
4740
4779
|
"prefecture": "宮城県",
|
data/jpostcode.gemspec
CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.description = 'A Ruby implementation for Japan postcode.'
|
15
15
|
spec.homepage = 'https://github.com/kufu/jpostcode-rb'
|
16
16
|
spec.license = 'MIT'
|
17
|
+
spec.required_ruby_version = '>= 2.5'
|
17
18
|
|
18
19
|
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
19
20
|
# delete this section to allow pushing this gem to any host.
|
@@ -29,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
29
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
31
|
spec.require_paths = ['lib']
|
31
32
|
|
32
|
-
spec.add_development_dependency 'bundler', '
|
33
|
+
spec.add_development_dependency 'bundler', '>= 2.1'
|
33
34
|
spec.add_development_dependency 'guard'
|
34
35
|
spec.add_development_dependency 'guard-bundler'
|
35
36
|
spec.add_development_dependency 'guard-rubocop'
|
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,27 +1,27 @@
|
|
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.20210301
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kakipo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -1156,14 +1156,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1156
1156
|
requirements:
|
1157
1157
|
- - ">="
|
1158
1158
|
- !ruby/object:Gem::Version
|
1159
|
-
version: '
|
1159
|
+
version: '2.5'
|
1160
1160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1161
1161
|
requirements:
|
1162
1162
|
- - ">="
|
1163
1163
|
- !ruby/object:Gem::Version
|
1164
1164
|
version: '0'
|
1165
1165
|
requirements: []
|
1166
|
-
rubygems_version: 3.
|
1166
|
+
rubygems_version: 3.2.3
|
1167
1167
|
signing_key:
|
1168
1168
|
specification_version: 4
|
1169
1169
|
summary: A Ruby implementation for Japan postcode.
|