jp_prefecture 1.1.1 → 1.1.2
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 +26 -0
- data/README.md +5 -5
- data/README_EN.md +5 -5
- data/data/prefecture.yml +2 -1
- data/data/zip.yml +3 -7
- data/lib/jp_prefecture/config.rb +1 -0
- data/lib/jp_prefecture/prefecture.rb +3 -3
- data/lib/jp_prefecture/version.rb +1 -1
- metadata +5 -159
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 656575799eb1c37bf9f55133b012838f70035a2b49d3774509a6ea2bd7e29eb5
|
4
|
+
data.tar.gz: bd7897148bd2886904884e096ac12538d43a207b3a10197aabe0b645df1f8713
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1717be483dad3bc2e0ced9b5b69744261a14a9309173004f784d45d8658ebb2d78ce1678197856b588761dcc9318b0ddf46cb71b12ffc983792957bf6191a96
|
7
|
+
data.tar.gz: 3d44f593affd7a8241043745b6f682c2409a342ea195f711f70c61cb72acd188f8a90befd1f3f93baf10dbf7009ef03d67051c26ada069386a5d0b936e9457c5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
## 1.1.2 (2025-02-24)
|
4
|
+
|
5
|
+
### Features
|
6
|
+
|
7
|
+
* Ruby 3.2 をサポートに追加 (PR [#61](https://github.com/chocoby/jp_prefecture/pull/61)/[@chocoby](https://github.com/chocoby))
|
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))
|
14
|
+
|
15
|
+
### Bug fix
|
16
|
+
|
17
|
+
* `bundle exec rake create_zip_code_data` 実行時のランタイムエラーを修正/郵便番号データ更新 (PR [#70](https://github.com/chocoby/jp_prefecture/pull/70)/[@ydah](https://github.com/ydah))
|
18
|
+
|
19
|
+
### Documentation
|
20
|
+
|
21
|
+
* 都道府県コードの参照先を `JIS X 0401` に修正 (PR [#71](https://github.com/chocoby/jp_prefecture/pull/71)/[@ydah](https://github.com/ydah))
|
22
|
+
|
23
|
+
### Misc
|
24
|
+
|
25
|
+
* RuboCop の警告を修正 (PR [#69](https://github.com/chocoby/jp_prefecture/pull/69)/[@ydah](https://github.com/ydah))
|
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))
|
28
|
+
|
3
29
|
## 1.1.1 (2022-03-25)
|
4
30
|
|
5
31
|
### Bug fix
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
[**English**](README_EN.md)
|
4
4
|
|
5
5
|
[](https://rubygems.org/gems/jp_prefecture)
|
6
|
-
[](https://github.com/chocoby/jp_prefecture)
|
6
|
+
[](https://github.com/chocoby/jp_prefecture/actions)
|
7
7
|
[](https://coveralls.io/r/chocoby/jp_prefecture)
|
8
8
|
|
9
9
|
https://rubygems.org/gems/jp_prefecture
|
@@ -12,7 +12,7 @@ https://rubygems.org/gems/jp_prefecture
|
|
12
12
|
|
13
13
|
都道府県コードと都道府県名を変換するライブラリです。
|
14
14
|
|
15
|
-
JIS X
|
15
|
+
JIS X 0401 で定義されている都道府県コードをベースに、
|
16
16
|
ゼロから始まるものはゼロを削除して使用しています。
|
17
17
|
|
18
18
|
```
|
@@ -212,12 +212,12 @@ $ gem install jp_prefecture
|
|
212
212
|
|
213
213
|
## ドキュメント
|
214
214
|
|
215
|
-
[
|
215
|
+
[https://rubydoc.info/gems/jp_prefecture](https://rubydoc.info/gems/jp_prefecture)
|
216
216
|
|
217
217
|
## サポートしているバージョン
|
218
218
|
|
219
|
-
* Ruby: 2.4 - 3.
|
220
|
-
* Rails: 5.0 -
|
219
|
+
* Ruby: 2.4 - 3.4
|
220
|
+
* Rails: 5.0 - 8.0
|
221
221
|
|
222
222
|
これより古い Ruby/Rails バージョンを使用する場合は、[`v0.11.0`](https://github.com/chocoby/jp_prefecture/tree/0.x) を利用してください。
|
223
223
|
|
data/README_EN.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
[**Japanese**](README.md)
|
4
4
|
|
5
5
|
[](https://rubygems.org/gems/jp_prefecture)
|
6
|
-
[](https://github.com/chocoby/jp_prefecture)
|
6
|
+
[](https://github.com/chocoby/jp_prefecture/actions)
|
7
7
|
[](https://coveralls.io/r/chocoby/jp_prefecture)
|
8
8
|
|
9
9
|
https://rubygems.org/gems/jp_prefecture
|
@@ -12,7 +12,7 @@ https://rubygems.org/gems/jp_prefecture
|
|
12
12
|
|
13
13
|
Convert prefecture code to prefecture name in Japan.
|
14
14
|
|
15
|
-
Based on JIS X
|
15
|
+
Based on JIS X 0401. Remove 0 when prefecture code start with 0.
|
16
16
|
|
17
17
|
```
|
18
18
|
Hokkaido: 01 -> 1
|
@@ -215,12 +215,12 @@ $ gem install jp_prefecture
|
|
215
215
|
|
216
216
|
## Documentation
|
217
217
|
|
218
|
-
[
|
218
|
+
[https://rubydoc.info/gems/jp_prefecture](https://rubydoc.info/gems/jp_prefecture)
|
219
219
|
|
220
220
|
## Supported versions
|
221
221
|
|
222
|
-
* Ruby: 2.4 - 3.
|
223
|
-
* Rails: 5.0 -
|
222
|
+
* Ruby: 2.4 - 3.4
|
223
|
+
* Rails: 5.0 - 8.0
|
224
224
|
|
225
225
|
If you are using an older Ruby/Rails version, please use [`v0.11.0`](https://github.com/chocoby/jp_prefecture/tree/0.x).
|
226
226
|
|
data/data/prefecture.yml
CHANGED
data/data/zip.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# { prefecture_code: [[from_zip_1, to_zip_1], [from_zip_2, to_zip_2], ...], ... }
|
2
|
-
# Last updated:
|
2
|
+
# Last updated: 2025-02-24 06:01:54 UTC
|
3
3
|
---
|
4
4
|
1:
|
5
5
|
- - 10000
|
@@ -136,8 +136,6 @@
|
|
136
136
|
- - 5200461
|
137
137
|
- 5200465
|
138
138
|
- - 6000000
|
139
|
-
- 6170857
|
140
|
-
- - 6180000
|
141
139
|
- 6180000
|
142
140
|
- - 6180071
|
143
141
|
- 6293579
|
@@ -147,8 +145,6 @@
|
|
147
145
|
- - 5640000
|
148
146
|
- 5998276
|
149
147
|
- - 6180000
|
150
|
-
- 6180000
|
151
|
-
- - 6180001
|
152
148
|
- 6180024
|
153
149
|
- - 6300271
|
154
150
|
- 6300272
|
@@ -240,8 +236,8 @@
|
|
240
236
|
- - 8391421
|
241
237
|
- 8391421
|
242
238
|
- - 8700001
|
243
|
-
-
|
244
|
-
- -
|
239
|
+
- 8701223
|
240
|
+
- - 8710000
|
245
241
|
- 8710208
|
246
242
|
- - 8710311
|
247
243
|
- 8710716
|
data/lib/jp_prefecture/config.rb
CHANGED
@@ -26,14 +26,14 @@ module JpPrefecture
|
|
26
26
|
|
27
27
|
pref.code = code
|
28
28
|
pref.name = result[:name]
|
29
|
-
pref.name_e = result[:name_e]
|
30
|
-
pref.name_r = result[:name_r]
|
29
|
+
pref.name_e = result[:name_e]&.capitalize
|
30
|
+
pref.name_r = result[:name_r]&.capitalize
|
31
31
|
pref.name_h = result[:name_h]
|
32
32
|
pref.name_k = result[:name_k]
|
33
33
|
pref.zips = ZipMapping.data[code]
|
34
34
|
pref.area = result[:area]
|
35
35
|
pref.type =
|
36
|
-
case pref.name
|
36
|
+
case pref.name&.slice(-1)
|
37
37
|
when '都', '道', '府', '県'
|
38
38
|
pref.name[-1]
|
39
39
|
end
|
metadata
CHANGED
@@ -1,170 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jp_prefecture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- chocoby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
name: activerecord
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 5.0.0
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 5.0.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: appraisal
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rubocop
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop-performance
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop-rake
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rubocop-rspec
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: simplecov
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: simplecov-lcov
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: sqlite3
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
|
-
description: Convert japan prefecture code (JIS X 0402 based) into prefecture name.
|
11
|
+
date: 2025-02-24 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Convert japan prefecture code (JIS X 0401 based) into prefecture name.
|
168
14
|
email:
|
169
15
|
- chocoby@himajin.dev
|
170
16
|
executables: []
|
@@ -205,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
51
|
- !ruby/object:Gem::Version
|
206
52
|
version: '0'
|
207
53
|
requirements: []
|
208
|
-
rubygems_version: 3.
|
54
|
+
rubygems_version: 3.5.11
|
209
55
|
signing_key:
|
210
56
|
specification_version: 4
|
211
57
|
summary: Convert japan prefecture code into prefecture name
|