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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d18ddf910428b89314b870b8ee905cdca9c2609da53d2f58602bea071669c6d
4
- data.tar.gz: 03b7e5b6710129ac6d32deee505f9dac2116ae5362cf064f229395612f36a136
3
+ metadata.gz: 656575799eb1c37bf9f55133b012838f70035a2b49d3774509a6ea2bd7e29eb5
4
+ data.tar.gz: bd7897148bd2886904884e096ac12538d43a207b3a10197aabe0b645df1f8713
5
5
  SHA512:
6
- metadata.gz: e2c57e99f3270f05589c01a979eb3bb298f2413c680ba068fc1601785a69c992af7811c7122e2b7ab6426b5cd0daca3914dfd019ecaf74b7f1d86fe448d16337
7
- data.tar.gz: 65b92823bcc248b5a311cb18b2be545e38be6b4f619d0cad680ad3171b4b198c40f524effa4900cdbfcb889064e43dc05ae931fc548ebb05459c15283534c4f0
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
  [![Gem Version](http://img.shields.io/gem/v/jp_prefecture.svg?style=flat)](https://rubygems.org/gems/jp_prefecture)
6
- [![GitHub Actions](https://github.com/chocoby/jp_prefecture/workflows/Build/badge.svg)](https://github.com/chocoby/jp_prefecture)
6
+ [![GitHub Actions](https://github.com/chocoby/jp_prefecture/workflows/Build/badge.svg)](https://github.com/chocoby/jp_prefecture/actions)
7
7
  [![Coveralls](https://img.shields.io/coveralls/chocoby/jp_prefecture.svg)](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 0402 で定義されている都道府県コードをベースに、
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
- [http://rdoc.info/github/chocoby/jp_prefecture/main/frames/index](http://rdoc.info/github/chocoby/jp_prefecture/main/frames/index)
215
+ [https://rubydoc.info/gems/jp_prefecture](https://rubydoc.info/gems/jp_prefecture)
216
216
 
217
217
  ## サポートしているバージョン
218
218
 
219
- * Ruby: 2.4 - 3.1
220
- * Rails: 5.0 - 7.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
  [![Gem Version](http://img.shields.io/gem/v/jp_prefecture.svg?style=flat)](https://rubygems.org/gems/jp_prefecture)
6
- [![GitHub Actions](https://github.com/chocoby/jp_prefecture/workflows/Build/badge.svg)](https://github.com/chocoby/jp_prefecture)
6
+ [![GitHub Actions](https://github.com/chocoby/jp_prefecture/workflows/Build/badge.svg)](https://github.com/chocoby/jp_prefecture/actions)
7
7
  [![Coveralls](https://img.shields.io/coveralls/chocoby/jp_prefecture.svg)](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 0402. Remove 0 when prefecture code start with 0.
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
- [http://rdoc.info/github/chocoby/jp_prefecture/main/frames/index](http://rdoc.info/github/chocoby/jp_prefecture/main/frames/index)
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.1
223
- * Rails: 5.0 - 7.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
@@ -1,5 +1,6 @@
1
- # JIS X 0402 で定義されている都道府県コードと都道府県名をベースに
1
+ # JIS X 0401 で定義されている都道府県コードと都道府県名をベースに
2
2
  # コードがゼロから始まるもの(09 など)を 1 ケタにしたもの
3
+ # https://www.jisc.go.jp/app/jis/general/GnrJISNumberNameSearchList?show&jisStdNo=X0401
3
4
  ---
4
5
  1:
5
6
  :name: 北海道
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: 2022-03-07 01:11:32 UTC
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
- - 8710000
244
- - - 8710001
239
+ - 8701223
240
+ - - 8710000
245
241
  - 8710208
246
242
  - - 8710311
247
243
  - 8710716
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JpPrefecture
4
+ # 都道府県情報の設定
4
5
  class Config
5
6
  attr_accessor :mapping_data, :zip_mapping_data
6
7
  end
@@ -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].try(:capitalize)
30
- pref.name_r = result[:name_r].try(:capitalize)
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.try(:slice, -1)
36
+ case pref.name&.slice(-1)
37
37
  when '都', '道', '府', '県'
38
38
  pref.name[-1]
39
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JpPrefecture
4
- VERSION = '1.1.1'
4
+ VERSION = '1.1.2'
5
5
  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.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: 2022-03-25 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
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.2.32
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