jp_prefecture 1.1.2 → 1.2.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/CHANGELOG.md +142 -90
- data/README.md +18 -5
- data/README_EN.md +18 -4
- data/data/zip.yml +1 -1
- data/lib/jp_prefecture/base.rb +1 -0
- data/lib/jp_prefecture/deprecation.rb +19 -0
- data/lib/jp_prefecture/prefecture/finder.rb +27 -8
- data/lib/jp_prefecture/prefecture.rb +80 -2
- data/lib/jp_prefecture/version.rb +1 -1
- data/lib/jp_prefecture/zip_mapping.rb +12 -3
- data/lib/jp_prefecture.rb +2 -0
- metadata +4 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: be694d4725ff39c6ce23218d76bd061eb7a3d84ea07d1c59f646d20f90297d72
|
|
4
|
+
data.tar.gz: a82aa74c001b12b7becb27e59c59c708e416aa4d3d4d6a4ea974998dc6627f67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa29d152ffdfc4fb84e53067ff7b5841f4d96bad356edf74cc91a71afd93b161212fbf0c809f0ed0e4332c3376fc7b358091ece0fa20e7f3a83b45d87d972763
|
|
7
|
+
data.tar.gz: 54cfed45404672136b45280c9deb61f4076016593c10519b68c9e9fc1b6159a89ed073a01c2db969239c6dd0bad77d9a89a84dc54bd88f648e91f3535a7219aa
|
data/CHANGELOG.md
CHANGED
|
@@ -1,156 +1,208 @@
|
|
|
1
|
-
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## [Unreleased]
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## [1.2.0] - 2026-08-11
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
* Rails 7.1 をサポートに追加 (PR [#63](https://github.com/chocoby/jp_prefecture/pull/63)/[@chocoby](https://github.com/chocoby))
|
|
9
|
-
* Ruby 3.3 をサポートに追加 (PR [#64](https://github.com/chocoby/jp_prefecture/pull/64)/[@chocoby](https://github.com/chocoby))
|
|
10
|
-
* Rails 7.2 をサポートに追加 (PR [#65](https://github.com/chocoby/jp_prefecture/pull/65)/[@y-yagi](https://github.com/y-yagi))
|
|
11
|
-
* Ruby 3.4 をサポートに追加 (PR [#67](https://github.com/chocoby/jp_prefecture/pull/67)/[@chocoby](https://github.com/chocoby))
|
|
12
|
-
* Rails 8.0 をサポートに追加 (PR [#68](https://github.com/chocoby/jp_prefecture/pull/68)/[@chocoby](https://github.com/chocoby))
|
|
13
|
-
* 郵便番号データの更新 (PR [#74](https://github.com/chocoby/jp_prefecture/pull/74)/[@chocoby](https://github.com/chocoby))
|
|
7
|
+
### Added
|
|
14
8
|
|
|
15
|
-
|
|
9
|
+
- Rails 8.1 をサポートに追加 ([#78](https://github.com/chocoby/jp_prefecture/pull/78), [@chocoby](https://github.com/chocoby))
|
|
10
|
+
- Ruby 4.0 をサポートに追加 ([#80](https://github.com/chocoby/jp_prefecture/pull/80), [@chocoby](https://github.com/chocoby))
|
|
11
|
+
- 前方一致するすべての都道府県を返す `JpPrefecture::Prefecture.where` を追加 ([#90](https://github.com/chocoby/jp_prefecture/pull/90), [@chocoby](https://github.com/chocoby))
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
### Changed
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
- RuboCop の `TargetRubyVersion` を RuboCop がサポートする Ruby 2.7 に変更 ([#75](https://github.com/chocoby/jp_prefecture/pull/75), [@chocoby](https://github.com/chocoby))
|
|
16
|
+
- Dependabot で GitHub Actions を更新する ([#76](https://github.com/chocoby/jp_prefecture/pull/76), [@chocoby](https://github.com/chocoby))
|
|
17
|
+
- テストする Ruby/Rails の組み合わせを代表的なものに絞る ([#82](https://github.com/chocoby/jp_prefecture/pull/82), [@chocoby](https://github.com/chocoby))
|
|
18
|
+
- 郵便番号データを毎月更新するワークフローを追加 ([#85](https://github.com/chocoby/jp_prefecture/pull/85), [#93](https://github.com/chocoby/jp_prefecture/pull/93), [@chocoby](https://github.com/chocoby))
|
|
19
|
+
- リリース時に RubyGems へ gem を自動公開する ([#88](https://github.com/chocoby/jp_prefecture/pull/88), [@chocoby](https://github.com/chocoby))
|
|
20
|
+
- CHANGELOG を Keep a Changelog 形式に変更 ([#91](https://github.com/chocoby/jp_prefecture/pull/91), [@chocoby](https://github.com/chocoby))
|
|
21
|
+
- Pull Request テンプレートを追加 ([#92](https://github.com/chocoby/jp_prefecture/pull/92), [@chocoby](https://github.com/chocoby))
|
|
22
|
+
- 開発用の対話コンソール `bin/console` を追加し、CONTRIBUTING.md の開発手順を整備 ([#96](https://github.com/chocoby/jp_prefecture/pull/96), [@chocoby](https://github.com/chocoby))
|
|
23
|
+
- RuboCop の `.rubocop_todo.yml` を削除し、`rubocop-performance` と `rubocop-rake` を有効化 ([#97](https://github.com/chocoby/jp_prefecture/pull/97), [@chocoby](https://github.com/chocoby))
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
### Deprecated
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
- `JpPrefecture::Prefecture.find` に対応していない引数を渡した場合に非推奨の警告を表示 ([#94](https://github.com/chocoby/jp_prefecture/pull/94), [@chocoby](https://github.com/chocoby))
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
* appraisal gem の依存を削除 (PR [#73](https://github.com/chocoby/jp_prefecture/pull/73)/[@chocoby](https://github.com/chocoby))
|
|
27
|
-
* concurrent-ruby gem v1.3.5 で `logger` の依存が削除されたことへの対応 (PR [#72](https://github.com/chocoby/jp_prefecture/pull/72)/[@chocoby](https://github.com/chocoby))
|
|
29
|
+
未知のフィールド名、複数キー、空の Hash、`nil` キーを渡した場合が対象です。v2.0.0 以降は `ArgumentError` を発生させる予定です。
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
### Fixed
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
- カスタムの `zip_mapping_data` で範囲検索が動作しない問題を修正 ([#83](https://github.com/chocoby/jp_prefecture/pull/83), [@chocoby](https://github.com/chocoby))
|
|
34
|
+
- `ken_all.zip` のダウンロード URL を修正/郵便番号データ更新 ([#84](https://github.com/chocoby/jp_prefecture/pull/84), [#86](https://github.com/chocoby/jp_prefecture/pull/86), [@chocoby](https://github.com/chocoby))
|
|
35
|
+
- 都道府県名の検索で String 以外の値を渡すとエラーになる問題を修正 ([#89](https://github.com/chocoby/jp_prefecture/pull/89), [@chocoby](https://github.com/chocoby))
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
## [1.1.2] - 2025-02-24
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
### Added
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
- Ruby 3.2 をサポートに追加 ([#61](https://github.com/chocoby/jp_prefecture/pull/61), [@chocoby](https://github.com/chocoby))
|
|
42
|
+
- Rails 7.1 をサポートに追加 ([#63](https://github.com/chocoby/jp_prefecture/pull/63), [@chocoby](https://github.com/chocoby))
|
|
43
|
+
- Ruby 3.3 をサポートに追加 ([#64](https://github.com/chocoby/jp_prefecture/pull/64), [@chocoby](https://github.com/chocoby))
|
|
44
|
+
- Rails 7.2 をサポートに追加 ([#65](https://github.com/chocoby/jp_prefecture/pull/65), [@y-yagi](https://github.com/y-yagi))
|
|
45
|
+
- Ruby 3.4 をサポートに追加 ([#67](https://github.com/chocoby/jp_prefecture/pull/67), [@chocoby](https://github.com/chocoby))
|
|
46
|
+
- Rails 8.0 をサポートに追加 ([#68](https://github.com/chocoby/jp_prefecture/pull/68), [@chocoby](https://github.com/chocoby))
|
|
38
47
|
|
|
39
|
-
|
|
40
|
-
* Ruby 3.1 をサポートに追加 (PR [#54](https://github.com/chocoby/jp_prefecture/pull/54)/[@chocoby](https://github.com/chocoby))
|
|
41
|
-
* Rails 7.0 をサポート (PR [#55](https://github.com/chocoby/jp_prefecture/pull/55)/[@chocoby](https://github.com/chocoby))
|
|
48
|
+
### Changed
|
|
42
49
|
|
|
43
|
-
|
|
50
|
+
- 郵便番号データの更新 ([#74](https://github.com/chocoby/jp_prefecture/pull/74), [@chocoby](https://github.com/chocoby))
|
|
51
|
+
- 都道府県コードの参照先を `JIS X 0401` に修正 ([#71](https://github.com/chocoby/jp_prefecture/pull/71), [@ydah](https://github.com/ydah))
|
|
52
|
+
- RuboCop の警告を修正 ([#69](https://github.com/chocoby/jp_prefecture/pull/69), [@ydah](https://github.com/ydah))
|
|
53
|
+
- appraisal gem の依存を削除 ([#73](https://github.com/chocoby/jp_prefecture/pull/73), [@chocoby](https://github.com/chocoby))
|
|
44
54
|
|
|
45
|
-
###
|
|
55
|
+
### Fixed
|
|
46
56
|
|
|
47
|
-
|
|
57
|
+
- `bundle exec rake create_zip_code_data` 実行時のランタイムエラーを修正/郵便番号データ更新 ([#70](https://github.com/chocoby/jp_prefecture/pull/70), [@ydah](https://github.com/ydah))
|
|
58
|
+
- concurrent-ruby gem v1.3.5 で `logger` の依存が削除されたことへの対応 ([#72](https://github.com/chocoby/jp_prefecture/pull/72), [@chocoby](https://github.com/chocoby))
|
|
48
59
|
|
|
49
|
-
## 1.
|
|
60
|
+
## [1.1.1] - 2022-03-25
|
|
50
61
|
|
|
51
|
-
###
|
|
62
|
+
### Fixed
|
|
52
63
|
|
|
53
|
-
|
|
64
|
+
- マッピングに項目が存在しない場合にエラーが発生する問題を修正 ([#59](https://github.com/chocoby/jp_prefecture/pull/59), [@chocoby](https://github.com/chocoby))
|
|
54
65
|
|
|
55
|
-
|
|
66
|
+
## [1.1.0] - 2022-03-17
|
|
56
67
|
|
|
57
|
-
|
|
58
|
-
Ruby/Rails のメンテナンスポリシーで決められているバージョンは最低限サポートし、実装やテストのメンテナンスが困難になったバージョンからサポートを終了する方針で検討しています。ご意見があればください。
|
|
68
|
+
### Added
|
|
59
69
|
|
|
60
|
-
|
|
70
|
+
- 都道府県情報にローマ字表記を追加 ([#57](https://github.com/chocoby/jp_prefecture/pull/57), [@sondh5](https://github.com/sondh5))
|
|
71
|
+
- Ruby 3.1 をサポートに追加 ([#54](https://github.com/chocoby/jp_prefecture/pull/54), [@chocoby](https://github.com/chocoby))
|
|
72
|
+
- Rails 7.0 をサポート ([#55](https://github.com/chocoby/jp_prefecture/pull/55), [@chocoby](https://github.com/chocoby))
|
|
61
73
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
## [1.0.0] - 2021-02-24
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
|
|
78
|
+
- 毎週月曜日の 09:00 (JST) にテストを実行する ([#52](https://github.com/chocoby/jp_prefecture/pull/52), [@chocoby](https://github.com/chocoby))
|
|
65
79
|
|
|
66
|
-
|
|
80
|
+
## [1.0.0.rc1] - 2021-02-10
|
|
67
81
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
82
|
+
### Added
|
|
83
|
+
|
|
84
|
+
- Ruby 3.0 をサポートに追加 ([#42](https://github.com/chocoby/jp_prefecture/pull/42), [@chocoby](https://github.com/chocoby))
|
|
85
|
+
- `JpPrefecture::Prefecture` クラスに都道府県コードから都道府県インスタンスを作成する `build_by_code` メソッドを追加 ([#44](https://github.com/chocoby/jp_prefecture/pull/44), [@chocoby](https://github.com/chocoby))
|
|
71
86
|
|
|
72
87
|
都道府県コードを指定すると、それに対応した都道府県の `JpPrefecture::Prefecture` インスタンスを取得するメソッドを追加しました。
|
|
73
88
|
`JpPrefecture::Prefecture.build` メソッドは参照している処理がなくなったため、削除しました。
|
|
74
89
|
|
|
75
|
-
###
|
|
90
|
+
### Changed
|
|
91
|
+
|
|
92
|
+
- 文字列による検索は項目を指定して検索する ([#43](https://github.com/chocoby/jp_prefecture/pull/43), [#24](https://github.com/chocoby/jp_prefecture/issues/24), [#27](https://github.com/chocoby/jp_prefecture/issues/27), [@chocoby](https://github.com/chocoby))
|
|
76
93
|
|
|
77
|
-
|
|
94
|
+
`JpPrefecture::Prefecture.find(name: '東')` を実行すると、青森県が取得されていた問題への対応です。これはマッピングのすべての項目を検索していたためです。
|
|
95
|
+
対応として、`name` を指定した場合は漢字表記、`name_e` は英語表記など、指定した項目のみを検索するように変更しました。詳しい使い方は README を参照してください。
|
|
96
|
+
以前のように、すべての項目から検索したい場合は `JpPrefecture::Prefecture.find(all_fields: 'string')` を使用してください。
|
|
97
|
+
|
|
98
|
+
- 郵便番号データを更新 ([#46](https://github.com/chocoby/jp_prefecture/pull/46), [@chocoby](https://github.com/chocoby))
|
|
99
|
+
- CONTRIBUTING.md を追加 ([#41](https://github.com/chocoby/jp_prefecture/pull/41), [@chocoby](https://github.com/chocoby))
|
|
100
|
+
- RuboCop を導入 ([#40](https://github.com/chocoby/jp_prefecture/pull/40), [@chocoby](https://github.com/chocoby))
|
|
101
|
+
- Gem に含めるファイルを最低限のものにする ([#48](https://github.com/chocoby/jp_prefecture/pull/48), [@chocoby](https://github.com/chocoby))
|
|
102
|
+
|
|
103
|
+
### Removed
|
|
78
104
|
|
|
79
|
-
|
|
105
|
+
- Ruby 1.9.3 - 2.3/Rails 3.2 - 4.2 のサポートを終了 ([#39](https://github.com/chocoby/jp_prefecture/pull/39), [@chocoby](https://github.com/chocoby))
|
|
106
|
+
|
|
107
|
+
古い Ruby/Rails のサポートを終了しました。今後も大きな不具合が見つかった場合、可能な限りは対応する予定です。
|
|
108
|
+
|
|
109
|
+
サポートするバージョンの範囲は Ruby/Rails のメンテナンスポリシーに則るのがシンプルですが、この Gem では厳しくする必要はないと考えています。
|
|
110
|
+
Ruby/Rails のメンテナンスポリシーで決められているバージョンは最低限サポートし、実装やテストのメンテナンスが困難になったバージョンからサポートを終了する方針で検討しています。ご意見があればください。
|
|
80
111
|
|
|
81
|
-
|
|
82
|
-
* Gem に含めるファイルを最低限のものにする (PR [#48](https://github.com/chocoby/jp_prefecture/pull/48)/[@chocoby](https://github.com/chocoby))
|
|
112
|
+
## [0.11.0] - 2020-12-18
|
|
83
113
|
|
|
84
|
-
|
|
114
|
+
- Rails 6.1 をサポート ([#37](https://github.com/chocoby/jp_prefecture/pull/37), [@chocoby](https://github.com/chocoby))
|
|
115
|
+
- GitHub Actions でビルドを実行するようにした ([#34](https://github.com/chocoby/jp_prefecture/pull/34), [@chocoby](https://github.com/chocoby))
|
|
85
116
|
|
|
86
|
-
|
|
87
|
-
* GitHub Actions でビルドを実行するようにした (PR [#34](https://github.com/chocoby/jp_prefecture/pull/34)/[@chocoby](https://github.com/chocoby))
|
|
117
|
+
## [0.10.0] - 2019-08-19
|
|
88
118
|
|
|
89
|
-
|
|
119
|
+
- Rails 6.0 をサポート ([#33](https://github.com/chocoby/jp_prefecture/pull/33), [@chocoby](https://github.com/chocoby))
|
|
90
120
|
|
|
91
|
-
|
|
121
|
+
## [0.9.0] - 2017-01-15
|
|
92
122
|
|
|
93
|
-
|
|
123
|
+
- Add English Readme ([#22](https://github.com/chocoby/jp_prefecture/pull/22), [#21](https://github.com/chocoby/jp_prefecture/issues/21), [@PeterTeng](https://github.com/PeterTeng))
|
|
124
|
+
- 都道府県情報に種類を追加 ([#23](https://github.com/chocoby/jp_prefecture/pull/23), [@gazayas](https://github.com/gazayas))
|
|
94
125
|
|
|
95
|
-
|
|
96
|
-
* 都道府県情報に種類を追加 (PR [#23](https://github.com/chocoby/jp_prefecture/pull/23)/[@gazayas](https://github.com/gazayas))
|
|
126
|
+
## [0.8.1] - 2016-03-30
|
|
97
127
|
|
|
98
|
-
|
|
128
|
+
- `JpPrefecture::Prefecture.find(name: name)` に `nil` や空文字を渡した時に `nil` を返す ([#19](https://github.com/chocoby/jp_prefecture/pull/19), [#18](https://github.com/chocoby/jp_prefecture/issues/18), [@k-motoyan](https://github.com/k-motoyan))
|
|
99
129
|
|
|
100
|
-
|
|
130
|
+
## [0.8.0] - 2014-09-07
|
|
101
131
|
|
|
102
|
-
|
|
132
|
+
- 都道府県情報に八地方区分情報を追加 ([#14](https://github.com/chocoby/jp_prefecture/pull/14), [@kkosuge](https://github.com/kkosuge))
|
|
103
133
|
|
|
104
|
-
|
|
134
|
+
## [0.7.0] - 2014-06-18
|
|
105
135
|
|
|
106
|
-
|
|
136
|
+
- 都道府県名にひらがな、カタカナを追加 ([#12](https://github.com/chocoby/jp_prefecture/pull/12), [@yukihr](https://github.com/yukihr))
|
|
107
137
|
|
|
108
|
-
|
|
138
|
+
## [0.6.0] - 2014-03-10
|
|
109
139
|
|
|
110
|
-
|
|
140
|
+
- 都道府県名を前方一致で検索できるようにした ([#11](https://github.com/chocoby/jp_prefecture/pull/11), [@yuuna](https://github.com/yuuna))
|
|
141
|
+
- 都道府県名の検索ロジックを高速化
|
|
111
142
|
|
|
112
|
-
|
|
113
|
-
* 都道府県名の検索ロジックを高速化
|
|
143
|
+
## [0.5.0] - 2013-11-30
|
|
114
144
|
|
|
115
|
-
|
|
145
|
+
- 郵便番号から都道府県を検索する機能の追加 ([#9](https://github.com/chocoby/jp_prefecture/pull/9), [@fruwe](https://github.com/fruwe))
|
|
116
146
|
|
|
117
|
-
|
|
147
|
+
## [0.4.0] - 2013-07-08
|
|
118
148
|
|
|
119
|
-
|
|
149
|
+
- 都道府県のマッピングを変更する機能の追加 ([#8](https://github.com/chocoby/jp_prefecture/pull/8), [@mizoR](https://github.com/mizoR))
|
|
120
150
|
|
|
121
|
-
|
|
151
|
+
## [0.3.2] - 2013-06-12
|
|
122
152
|
|
|
123
|
-
|
|
153
|
+
- 文字列を downcase してから都道府県の検索を行うようにした
|
|
124
154
|
|
|
125
|
-
|
|
155
|
+
## [0.3.1] - 2013-06-11
|
|
126
156
|
|
|
127
|
-
|
|
157
|
+
- name で渡した文字列が変更されるバグを修正
|
|
128
158
|
|
|
129
|
-
|
|
159
|
+
## [0.3.0] - 2013-06-11
|
|
130
160
|
|
|
131
|
-
|
|
161
|
+
- 都道府県名(英語表記含む)から都道府県を検索できるようにした
|
|
162
|
+
- 都道府県名からの検索と同様の方法で、都道府県コードを検索できるようにした
|
|
163
|
+
- String 型の都道府県コードに対応
|
|
132
164
|
|
|
133
|
-
|
|
134
|
-
* 都道府県名からの検索と同様の方法で、都道府県コードを検索できるようにした
|
|
135
|
-
* String 型の都道府県コードに対応
|
|
165
|
+
## [0.2.0] - 2013-06-09
|
|
136
166
|
|
|
137
|
-
|
|
167
|
+
- 英語表記を追加
|
|
168
|
+
- Ruby 1.8.7 のサポートを終了
|
|
138
169
|
|
|
139
|
-
|
|
140
|
-
* Ruby 1.8.7 のサポートを終了
|
|
170
|
+
## [0.1.1] - 2013-03-01
|
|
141
171
|
|
|
142
|
-
|
|
172
|
+
- モデルで使用する時に、生成するメソッド名を指定できるようにした
|
|
173
|
+
- Configuration モデル/Model モジュールを廃止
|
|
174
|
+
- extend による使用を廃止
|
|
175
|
+
- Travis CI によるテストを行うようにした
|
|
143
176
|
|
|
144
|
-
|
|
145
|
-
* Configuration モデル/Model モジュールを廃止
|
|
146
|
-
* extend による使用を廃止
|
|
147
|
-
* Travis CI によるテストを行うようにした
|
|
177
|
+
## [0.1.0] - 2013-02-17
|
|
148
178
|
|
|
149
|
-
|
|
179
|
+
- モデルで使用する時に、対象のカラム名を指定するようにした
|
|
150
180
|
|
|
151
|
-
|
|
181
|
+
## [0.0.1] - 2013-02-14
|
|
152
182
|
|
|
153
|
-
|
|
183
|
+
- 都道府県の変換
|
|
184
|
+
- 簡単な Rails サポート
|
|
154
185
|
|
|
155
|
-
|
|
156
|
-
|
|
186
|
+
[Unreleased]: https://github.com/chocoby/jp_prefecture/compare/v1.2.0...HEAD
|
|
187
|
+
[1.2.0]: https://github.com/chocoby/jp_prefecture/compare/v1.1.2...v1.2.0
|
|
188
|
+
[1.1.2]: https://github.com/chocoby/jp_prefecture/compare/v1.1.1...v1.1.2
|
|
189
|
+
[1.1.1]: https://github.com/chocoby/jp_prefecture/compare/v1.1.0...v1.1.1
|
|
190
|
+
[1.1.0]: https://github.com/chocoby/jp_prefecture/compare/v1.0.0...v1.1.0
|
|
191
|
+
[1.0.0]: https://github.com/chocoby/jp_prefecture/compare/v1.0.0.rc1...v1.0.0
|
|
192
|
+
[1.0.0.rc1]: https://github.com/chocoby/jp_prefecture/compare/v0.11.0...v1.0.0.rc1
|
|
193
|
+
[0.11.0]: https://github.com/chocoby/jp_prefecture/compare/v0.10.0...v0.11.0
|
|
194
|
+
[0.10.0]: https://github.com/chocoby/jp_prefecture/compare/v0.9.0...v0.10.0
|
|
195
|
+
[0.9.0]: https://github.com/chocoby/jp_prefecture/compare/v0.8.1...v0.9.0
|
|
196
|
+
[0.8.1]: https://github.com/chocoby/jp_prefecture/compare/v0.8.0...v0.8.1
|
|
197
|
+
[0.8.0]: https://github.com/chocoby/jp_prefecture/compare/v0.7.0...v0.8.0
|
|
198
|
+
[0.7.0]: https://github.com/chocoby/jp_prefecture/compare/v0.6.0...v0.7.0
|
|
199
|
+
[0.6.0]: https://github.com/chocoby/jp_prefecture/compare/v0.5.0...v0.6.0
|
|
200
|
+
[0.5.0]: https://github.com/chocoby/jp_prefecture/compare/v0.4.0...v0.5.0
|
|
201
|
+
[0.4.0]: https://github.com/chocoby/jp_prefecture/compare/v0.3.2...v0.4.0
|
|
202
|
+
[0.3.2]: https://github.com/chocoby/jp_prefecture/compare/v0.3.1...v0.3.2
|
|
203
|
+
[0.3.1]: https://github.com/chocoby/jp_prefecture/compare/v0.3.0...v0.3.1
|
|
204
|
+
[0.3.0]: https://github.com/chocoby/jp_prefecture/compare/v0.2.0...v0.3.0
|
|
205
|
+
[0.2.0]: https://github.com/chocoby/jp_prefecture/compare/v0.1.1...v0.2.0
|
|
206
|
+
[0.1.1]: https://github.com/chocoby/jp_prefecture/compare/v0.1.0...v0.1.1
|
|
207
|
+
[0.1.0]: https://github.com/chocoby/jp_prefecture/compare/v0.0.1...v0.1.0
|
|
208
|
+
[0.0.1]: https://github.com/chocoby/jp_prefecture/releases/tag/v0.0.1
|
data/README.md
CHANGED
|
@@ -27,7 +27,6 @@ JIS X 0401 で定義されている都道府県コードをベースに、
|
|
|
27
27
|
|
|
28
28
|
また、Rails のプラグインとして使用することもできます。
|
|
29
29
|
|
|
30
|
-
|
|
31
30
|
## 使い方
|
|
32
31
|
|
|
33
32
|
### ライブラリの読み込み
|
|
@@ -69,6 +68,8 @@ JpPrefecture::Prefecture.find(code: 13)
|
|
|
69
68
|
|
|
70
69
|
### 都道府県を検索
|
|
71
70
|
|
|
71
|
+
`find` は複数の都道府県に一致する場合、都道府県コード順で最初の 1 件を返します。
|
|
72
|
+
|
|
72
73
|
前方一致で都道府県を検索します:
|
|
73
74
|
|
|
74
75
|
```ruby
|
|
@@ -97,6 +98,20 @@ JpPrefecture::Prefecture.find(name_k: "トウキョウト")
|
|
|
97
98
|
JpPrefecture::Prefecture.find(all_fields: "東京")
|
|
98
99
|
```
|
|
99
100
|
|
|
101
|
+
`find` で検索できる項目は `name` / `name_e` / `name_r` / `name_h` / `name_k` / `code` / `zip` / `all_fields` です。対応していない項目を指定した場合、または項目がちょうど 1 つでない場合は非推奨の警告を出力します。jp_prefecture 2.0.0 では `ArgumentError` が発生する予定です。
|
|
102
|
+
|
|
103
|
+
一致したすべての都道府県が必要な場合は `where` を使用します:
|
|
104
|
+
|
|
105
|
+
```ruby
|
|
106
|
+
JpPrefecture::Prefecture.where(name: "山")
|
|
107
|
+
# => [山形県, 山梨県, 山口県]
|
|
108
|
+
|
|
109
|
+
JpPrefecture::Prefecture.where(name_e: "o")
|
|
110
|
+
# => [大阪府, 岡山県, 大分県, 沖縄県]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
`where` で検索できる項目は `name` / `name_e` / `name_r` / `name_h` / `name_k` です。対応していない項目を指定した場合は `ArgumentError` が発生します。
|
|
114
|
+
|
|
100
115
|
### 都道府県の一覧を取得
|
|
101
116
|
|
|
102
117
|
```ruby
|
|
@@ -192,7 +207,6 @@ end
|
|
|
192
207
|
|
|
193
208
|
データのフォーマットについては [zip.yml](https://github.com/chocoby/jp_prefecture/blob/main/data/zip.yml) を参考にしてください。
|
|
194
209
|
|
|
195
|
-
|
|
196
210
|
## インストール
|
|
197
211
|
|
|
198
212
|
以下の行を `Gemfile` に記述してから:
|
|
@@ -209,15 +223,14 @@ gem 'jp_prefecture'
|
|
|
209
223
|
$ gem install jp_prefecture
|
|
210
224
|
```
|
|
211
225
|
|
|
212
|
-
|
|
213
226
|
## ドキュメント
|
|
214
227
|
|
|
215
228
|
[https://rubydoc.info/gems/jp_prefecture](https://rubydoc.info/gems/jp_prefecture)
|
|
216
229
|
|
|
217
230
|
## サポートしているバージョン
|
|
218
231
|
|
|
219
|
-
|
|
220
|
-
|
|
232
|
+
- Ruby: 2.4 - 4.0
|
|
233
|
+
- Rails: 5.0 - 8.1
|
|
221
234
|
|
|
222
235
|
これより古い Ruby/Rails バージョンを使用する場合は、[`v0.11.0`](https://github.com/chocoby/jp_prefecture/tree/0.x) を利用してください。
|
|
223
236
|
|
data/README_EN.md
CHANGED
|
@@ -66,6 +66,8 @@ JpPrefecture::Prefecture.find(code: 13)
|
|
|
66
66
|
|
|
67
67
|
### Search by Prefecture Name
|
|
68
68
|
|
|
69
|
+
`find` returns the first match in prefecture code order when multiple prefectures match.
|
|
70
|
+
|
|
69
71
|
Search for a prefecture by forward match.
|
|
70
72
|
|
|
71
73
|
```ruby
|
|
@@ -94,6 +96,20 @@ Search all items in the mapping (not recommended).
|
|
|
94
96
|
JpPrefecture::Prefecture.find(all_fields: "東京")
|
|
95
97
|
```
|
|
96
98
|
|
|
99
|
+
`find` supports `name` / `name_e` / `name_r` / `name_h` / `name_k` / `code` / `zip` / `all_fields`. Specifying any other item, or specifying a Hash that does not have exactly one key, prints a deprecation warning. It will raise `ArgumentError` in jp_prefecture 2.0.0.
|
|
100
|
+
|
|
101
|
+
Use `where` when you need all matching prefectures.
|
|
102
|
+
|
|
103
|
+
```ruby
|
|
104
|
+
JpPrefecture::Prefecture.where(name: "山")
|
|
105
|
+
# => [山形県, 山梨県, 山口県]
|
|
106
|
+
|
|
107
|
+
JpPrefecture::Prefecture.where(name_e: "o")
|
|
108
|
+
# => [大阪府, 岡山県, 大分県, 沖縄県]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`where` supports `name` / `name_e` / `name_r` / `name_h` / `name_k`. Specifying any other item raises `ArgumentError`.
|
|
112
|
+
|
|
97
113
|
### All Prefectures
|
|
98
114
|
|
|
99
115
|
```ruby
|
|
@@ -191,7 +207,6 @@ end
|
|
|
191
207
|
|
|
192
208
|
Check out [zip.yml](https://github.com/chocoby/jp_prefecture/blob/main/data/zip.yml) for data format.
|
|
193
209
|
|
|
194
|
-
|
|
195
210
|
## Installation
|
|
196
211
|
|
|
197
212
|
Add this line in Gemfile.
|
|
@@ -212,15 +227,14 @@ Or install gem with `gem install`
|
|
|
212
227
|
$ gem install jp_prefecture
|
|
213
228
|
```
|
|
214
229
|
|
|
215
|
-
|
|
216
230
|
## Documentation
|
|
217
231
|
|
|
218
232
|
[https://rubydoc.info/gems/jp_prefecture](https://rubydoc.info/gems/jp_prefecture)
|
|
219
233
|
|
|
220
234
|
## Supported versions
|
|
221
235
|
|
|
222
|
-
|
|
223
|
-
|
|
236
|
+
- Ruby: 2.4 - 4.0
|
|
237
|
+
- Rails: 5.0 - 8.1
|
|
224
238
|
|
|
225
239
|
If you are using an older Ruby/Rails version, please use [`v0.11.0`](https://github.com/chocoby/jp_prefecture/tree/0.x).
|
|
226
240
|
|
data/data/zip.yml
CHANGED
data/lib/jp_prefecture/base.rb
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module JpPrefecture
|
|
4
|
+
# 非推奨機能の告知
|
|
5
|
+
module Deprecation
|
|
6
|
+
PREFIX = '[jp_prefecture] DEPRECATION WARNING:'
|
|
7
|
+
|
|
8
|
+
# 非推奨の警告を標準エラー出力に出す
|
|
9
|
+
#
|
|
10
|
+
# Kernel#warn は $VERBOSE が nil のとき (ruby -W0, RUBYOPT=-W0) 何も出力しない。
|
|
11
|
+
# 破壊的変更の告知が届かなくなるため $stderr へ直接書き出す
|
|
12
|
+
#
|
|
13
|
+
# @param message [String] 警告の本文
|
|
14
|
+
# @return [void]
|
|
15
|
+
def self.warn(message)
|
|
16
|
+
$stderr.puts "#{PREFIX} #{message}" # rubocop:disable Style/StderrPuts
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -7,6 +7,12 @@ module JpPrefecture
|
|
|
7
7
|
class Prefecture
|
|
8
8
|
# 都道府県の検索を行うクラス
|
|
9
9
|
class Finder
|
|
10
|
+
# 名前を前方一致で検索できる項目
|
|
11
|
+
NAME_FIELDS = %i[name name_e name_r name_h name_k].freeze
|
|
12
|
+
|
|
13
|
+
# find で検索できる項目
|
|
14
|
+
FIELDS = (NAME_FIELDS + %i[code zip all_fields]).freeze
|
|
15
|
+
|
|
10
16
|
def initialize
|
|
11
17
|
@mapping = Mapping.data
|
|
12
18
|
end
|
|
@@ -22,20 +28,35 @@ module JpPrefecture
|
|
|
22
28
|
JpPrefecture::Prefecture.build_by_code(code)
|
|
23
29
|
end
|
|
24
30
|
|
|
31
|
+
# 指定した項目を前方一致で検索し、一致したすべての都道府県を返す
|
|
32
|
+
#
|
|
33
|
+
# @param field [Symbol] 検索する項目。NAME_FIELDS 以外を指定した場合は空配列
|
|
34
|
+
# @param value [String] 検索する内容
|
|
35
|
+
# @return [Array<JpPrefecture::Prefecture>] 一致した都道府県インスタンスの配列 (コード順)
|
|
36
|
+
def where(field:, value:)
|
|
37
|
+
return [] unless NAME_FIELDS.include?(field)
|
|
38
|
+
|
|
39
|
+
value = value.to_s.downcase
|
|
40
|
+
return [] if value.empty?
|
|
41
|
+
|
|
42
|
+
@mapping.select { |_code, names| names[field].start_with?(value) }
|
|
43
|
+
.map { |code, _names| JpPrefecture::Prefecture.build_by_code(code) }
|
|
44
|
+
end
|
|
45
|
+
|
|
25
46
|
private
|
|
26
47
|
|
|
27
48
|
# @param field [Symbol] 検索する項目
|
|
28
49
|
# @param value [String, Integer] 検索する内容
|
|
29
50
|
# @return [Integer] 見つかった場合は都道府県コード
|
|
30
51
|
# @return [nil] 見つからない場合は nil
|
|
31
|
-
def find_code(field, value)
|
|
52
|
+
def find_code(field, value) # rubocop:disable Metrics/MethodLength
|
|
32
53
|
return value.to_i if field.nil?
|
|
33
54
|
|
|
34
55
|
case field
|
|
35
56
|
when :all_fields
|
|
36
|
-
find_code_by_name_from_all_fields(value)
|
|
37
|
-
when
|
|
38
|
-
find_code_by_name(field, value)
|
|
57
|
+
find_code_by_name_from_all_fields(value.to_s)
|
|
58
|
+
when *NAME_FIELDS
|
|
59
|
+
find_code_by_name(field, value.to_s)
|
|
39
60
|
when :code
|
|
40
61
|
value.to_i
|
|
41
62
|
when :zip
|
|
@@ -45,9 +66,8 @@ module JpPrefecture
|
|
|
45
66
|
|
|
46
67
|
# すべての項目を前方一致で検索
|
|
47
68
|
def find_code_by_name_from_all_fields(value)
|
|
48
|
-
return if value.nil? || value.empty?
|
|
49
|
-
|
|
50
69
|
value = value.downcase
|
|
70
|
+
return if value.empty?
|
|
51
71
|
|
|
52
72
|
@mapping.each do |m|
|
|
53
73
|
m[1].each_value do |v|
|
|
@@ -58,9 +78,8 @@ module JpPrefecture
|
|
|
58
78
|
|
|
59
79
|
# 指定した項目を前方一致で検索
|
|
60
80
|
def find_code_by_name(field, value)
|
|
61
|
-
return if value.nil? || value.empty?
|
|
62
|
-
|
|
63
81
|
value = value.downcase
|
|
82
|
+
return if value.empty?
|
|
64
83
|
|
|
65
84
|
@mapping.each do |m|
|
|
66
85
|
return m[0] if m[1][field].start_with?(value)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'jp_prefecture/deprecation'
|
|
3
4
|
require 'jp_prefecture/prefecture/finder'
|
|
4
5
|
require 'jp_prefecture/mapping'
|
|
5
6
|
require 'jp_prefecture/zip_mapping'
|
|
@@ -9,6 +10,10 @@ module JpPrefecture
|
|
|
9
10
|
class Prefecture
|
|
10
11
|
attr_accessor :code, :name, :name_e, :name_r, :name_h, :name_k, :zips, :area, :type
|
|
11
12
|
|
|
13
|
+
# 非推奨の警告の末尾に付ける、例外化の予告文
|
|
14
|
+
DEPRECATION_SUFFIX = 'This will raise ArgumentError in jp_prefecture 2.0.0.'
|
|
15
|
+
private_constant :DEPRECATION_SUFFIX
|
|
16
|
+
|
|
12
17
|
# 都道府県コードから都道府県インスタンスを作成
|
|
13
18
|
#
|
|
14
19
|
# @example
|
|
@@ -18,7 +23,7 @@ module JpPrefecture
|
|
|
18
23
|
# @param code [Integer] 都道府県コード
|
|
19
24
|
# @return [JpPrefecture::Prefecture] 都道府県インスタンス
|
|
20
25
|
# @return [nil] 都道府県が見つからない場合は nil
|
|
21
|
-
def self.build_by_code(code) # rubocop:disable Metrics/AbcSize
|
|
26
|
+
def self.build_by_code(code) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
22
27
|
result = Mapping.data[code]
|
|
23
28
|
return unless result
|
|
24
29
|
|
|
@@ -62,6 +67,12 @@ module JpPrefecture
|
|
|
62
67
|
#
|
|
63
68
|
# 文字列は前方一致で検索する
|
|
64
69
|
#
|
|
70
|
+
# 複数の都道府県に一致する場合は、都道府県コード順で最初の 1 件を返す。
|
|
71
|
+
# 一致したすべての都道府県が必要な場合は {.where} を使用する
|
|
72
|
+
#
|
|
73
|
+
# 対応していない項目を指定した場合、または項目がちょうど 1 つでない場合は非推奨の警告を出力する。
|
|
74
|
+
# jp_prefecture 2.0.0 では ArgumentError になる予定
|
|
75
|
+
#
|
|
65
76
|
# @example
|
|
66
77
|
# # 都道府県コードを検索
|
|
67
78
|
# JpPrefecture::Prefecture.find(1)
|
|
@@ -92,7 +103,7 @@ module JpPrefecture
|
|
|
92
103
|
# @param args [Hash<Symbol, Integer>] :code 都道府県コード
|
|
93
104
|
# @param args [Hash<Symbol, String>] :name 漢字表記/:name_e 英語表記/:name_r ローマ字表記/:name_h ひらがな表記/:name_k カタカナ表記
|
|
94
105
|
# @param args [Hash<Symbol, Integer>] :zip 郵便番号
|
|
95
|
-
# @param args [Hash<Symbol,
|
|
106
|
+
# @param args [Hash<Symbol, String>] :all_fields マッピングに定義しているすべてのフィールドから検索
|
|
96
107
|
# @return [JpPrefecture::Prefecture] 都道府県が見つかった場合は都道府県インスタンス
|
|
97
108
|
# @return [nil] 都道府県が見つからない場合は nil
|
|
98
109
|
def self.find(args)
|
|
@@ -102,11 +113,78 @@ module JpPrefecture
|
|
|
102
113
|
when Integer, String
|
|
103
114
|
JpPrefecture::Prefecture::Finder.new.find(field: nil, value: args)
|
|
104
115
|
when Hash
|
|
116
|
+
warn_unsupported_args(args)
|
|
117
|
+
|
|
105
118
|
search_field = args.keys.first
|
|
106
119
|
search_value = args.values.first
|
|
107
120
|
|
|
108
121
|
JpPrefecture::Prefecture::Finder.new.find(field: search_field, value: search_value)
|
|
109
122
|
end
|
|
110
123
|
end
|
|
124
|
+
|
|
125
|
+
# 都道府県を検索し、一致したすべての都道府県を返す
|
|
126
|
+
#
|
|
127
|
+
# 文字列は前方一致で検索する
|
|
128
|
+
#
|
|
129
|
+
# @example
|
|
130
|
+
# # 複数の都道府県に一致する検索
|
|
131
|
+
# JpPrefecture::Prefecture.where(name: '山')
|
|
132
|
+
# # => [山形県, 山梨県, 山口県]
|
|
133
|
+
#
|
|
134
|
+
# # 英語表記で検索
|
|
135
|
+
# JpPrefecture::Prefecture.where(name_e: 'o')
|
|
136
|
+
# # => [大阪府, 岡山県, 大分県, 沖縄県]
|
|
137
|
+
#
|
|
138
|
+
# @param args [Hash<Symbol, String>] :name 漢字表記/:name_e 英語表記/:name_r ローマ字表記/:name_h ひらがな表記/:name_k カタカナ表記
|
|
139
|
+
# @return [Array<JpPrefecture::Prefecture>] 一致した都道府県インスタンスの配列 (コード順)。一致しない場合は空配列
|
|
140
|
+
# @raise [ArgumentError] 対応していない項目、または項目が 1 つでない場合
|
|
141
|
+
def self.where(args)
|
|
142
|
+
unless args.is_a?(Hash) && args.size == 1
|
|
143
|
+
raise ArgumentError, "expected a Hash with exactly one key, got: #{inspect_args(args)}"
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
field, value = args.first
|
|
147
|
+
|
|
148
|
+
unless Finder::NAME_FIELDS.include?(field)
|
|
149
|
+
raise ArgumentError, "unsupported field: #{field.inspect} (supported: #{Finder::NAME_FIELDS.join(', ')})"
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
JpPrefecture::Prefecture::Finder.new.where(field: field, value: value)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# find に対応していない引数が渡された場合に非推奨の警告を出力する
|
|
156
|
+
#
|
|
157
|
+
# 空の Hash は「項目が 1 つでない」と「対応していない項目 (nil)」の両方に該当するため、
|
|
158
|
+
# 警告が二重に出ないよう elsif で判定する
|
|
159
|
+
#
|
|
160
|
+
# @param args [Hash] find に渡された引数
|
|
161
|
+
# @return [void]
|
|
162
|
+
def self.warn_unsupported_args(args) # rubocop:disable Metrics/MethodLength
|
|
163
|
+
field = args.keys.first
|
|
164
|
+
|
|
165
|
+
message =
|
|
166
|
+
if args.size != 1
|
|
167
|
+
"expected a Hash with exactly one key, got: #{inspect_args(args)}"
|
|
168
|
+
elsif field.nil?
|
|
169
|
+
'the nil key is deprecated; use find(code) or find(code: code) instead'
|
|
170
|
+
elsif !Finder::FIELDS.include?(field)
|
|
171
|
+
"unsupported field: #{field.inspect} (supported: #{Finder::FIELDS.join(', ')})"
|
|
172
|
+
end
|
|
173
|
+
return unless message
|
|
174
|
+
|
|
175
|
+
Deprecation.warn("#{message}. #{DEPRECATION_SUFFIX}")
|
|
176
|
+
end
|
|
177
|
+
private_class_method :warn_unsupported_args
|
|
178
|
+
|
|
179
|
+
# メッセージに埋め込む引数の表現を返す
|
|
180
|
+
#
|
|
181
|
+
# 値には利用者の入力が入りうるため、Hash はキーだけを、それ以外は型名を出す
|
|
182
|
+
#
|
|
183
|
+
# @param args [Object] find / where に渡された引数
|
|
184
|
+
# @return [String] Hash ならキーの配列の inspect、それ以外はクラス名
|
|
185
|
+
def self.inspect_args(args)
|
|
186
|
+
args.is_a?(Hash) ? args.keys.inspect : args.class.to_s
|
|
187
|
+
end
|
|
188
|
+
private_class_method :inspect_args
|
|
111
189
|
end
|
|
112
190
|
end
|
|
@@ -5,12 +5,21 @@ require 'yaml'
|
|
|
5
5
|
module JpPrefecture
|
|
6
6
|
# コードと郵便番号のマッピング
|
|
7
7
|
module ZipMapping
|
|
8
|
+
# [from, to] のペア配列を Range へ変換する
|
|
9
|
+
def self.convert_to_ranges(data)
|
|
10
|
+
data.transform_values do |pairs|
|
|
11
|
+
pairs.collect { |zip_from, zip_to| zip_from..zip_to }
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
private_class_method :convert_to_ranges
|
|
16
|
+
|
|
8
17
|
filepath = File.join(File.dirname(__FILE__), '../../data/zip.yml')
|
|
9
|
-
@data = YAML.load_file(filepath)
|
|
10
|
-
@data = Hash[*@data.collect { |code, arr| [code, arr.collect { |zip_from, zip_to| zip_from..zip_to }] }.flatten(1)]
|
|
18
|
+
@data = convert_to_ranges(YAML.load_file(filepath))
|
|
11
19
|
|
|
12
20
|
def self.data
|
|
13
|
-
JpPrefecture.config.zip_mapping_data
|
|
21
|
+
raw = JpPrefecture.config.zip_mapping_data
|
|
22
|
+
raw ? convert_to_ranges(raw) : @data
|
|
14
23
|
end
|
|
15
24
|
|
|
16
25
|
def self.code_for_zip(zip)
|
data/lib/jp_prefecture.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jp_prefecture
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- chocoby
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
12
|
description: Convert japan prefecture code (JIS X 0401 based) into prefecture name.
|
|
14
13
|
email:
|
|
@@ -26,6 +25,7 @@ files:
|
|
|
26
25
|
- lib/jp_prefecture.rb
|
|
27
26
|
- lib/jp_prefecture/base.rb
|
|
28
27
|
- lib/jp_prefecture/config.rb
|
|
28
|
+
- lib/jp_prefecture/deprecation.rb
|
|
29
29
|
- lib/jp_prefecture/mapping.rb
|
|
30
30
|
- lib/jp_prefecture/prefecture.rb
|
|
31
31
|
- lib/jp_prefecture/prefecture/finder.rb
|
|
@@ -36,7 +36,6 @@ licenses:
|
|
|
36
36
|
- MIT
|
|
37
37
|
metadata:
|
|
38
38
|
rubygems_mfa_required: 'true'
|
|
39
|
-
post_install_message:
|
|
40
39
|
rdoc_options: []
|
|
41
40
|
require_paths:
|
|
42
41
|
- lib
|
|
@@ -51,8 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
51
50
|
- !ruby/object:Gem::Version
|
|
52
51
|
version: '0'
|
|
53
52
|
requirements: []
|
|
54
|
-
rubygems_version:
|
|
55
|
-
signing_key:
|
|
53
|
+
rubygems_version: 4.0.16
|
|
56
54
|
specification_version: 4
|
|
57
55
|
summary: Convert japan prefecture code into prefecture name
|
|
58
56
|
test_files: []
|