jp_local_gov 0.3.0 → 0.3.1

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: 4e26bf255e214fe5c02ed9107514ea8ef6035f30d05fe6d8c81046b207017d6f
4
- data.tar.gz: 91459fd623a506b3d413822c315c1e8dd9a2c4836f72f8f57610e56ef9bafda3
3
+ metadata.gz: 4f627a940405e1c5f1339526132b70637a1e4243546d550bd6710f7c71339d19
4
+ data.tar.gz: e40ce4f88624c7abe41bf365feb0d64567b96d63449737618c7acbc4c6b563d4
5
5
  SHA512:
6
- metadata.gz: 5b823186ad99d95abbe568abcde106dc6a219325925ebd86e33b68d8a0298493d780189827e62d4d592c1af3ca62f4c30ab1213ea01379f9e6fd976eba622e93
7
- data.tar.gz: 401a89148433d2061da067688160c25d381544184f2601b948bd0f2bd6f2efdf9346f5404b5c36736408e97cd38c0cdc3c94afcf8e0cc96c8689b054d2d6dc92
6
+ metadata.gz: 468b26d385a1cc82a35c993b29cea69e9991e3d0ca28a2d4cac02ab15dd9a1ea195b732a717a320e15f8eee365bab779a4691212614cbb166b672d0406431e3c
7
+ data.tar.gz: 9d1850d5b14e67260e4a83ec7da3ca2a3c9041f6bebfdae2abc34be71030c63eec171321c84766f56e51c95f863f24a5cdcdf3c4670d320130537097e1797587
@@ -13,6 +13,7 @@ jobs:
13
13
  - name: Set up Ruby
14
14
  uses: ruby/setup-ruby@v1
15
15
  with:
16
+ ruby-version: 3.1
16
17
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
17
18
  - name: update jplocalgov data
18
19
  run: bundle exec rake jplocalgov:data:update_all
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # [0.3.1](https://github.com/IkumaTadokoro/jp_local_gov/compare/v0.3.0...v0.3.1) (2022-02-03)
2
+
3
+
4
+ ### feat
5
+
6
+ * Specify ruby version in auto-update workflow ([572fc5e](https://github.com/IkumaTadokoro/jp_local_gov/commit/572fc5e3cd316f5d194dc8affdbf161acd3b864f)), closes [#77](https://github.com/IkumaTadokoro/jp_local_gov/issues/77) [#79](https://github.com/IkumaTadokoro/jp_local_gov/issues/79)
7
+
8
+ ### fix
9
+
10
+ * Fix JpLocalGov.valid_code?'s condition ([5e1ccf4](https://github.com/IkumaTadokoro/jp_local_gov/commit/5e1ccf4415d5e2e5752d904334e07b550e0d6d5d)), closes [#85](https://github.com/IkumaTadokoro/jp_local_gov/issues/85)
11
+
1
12
  # [0.3.0](https://github.com/IkumaTadokoro/jp_local_gov/compare/v0.2.1...v0.3.0) (2022-01-28)
2
13
 
3
14
  ### feat
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JpLocalGov
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
data/lib/jp_local_gov.rb CHANGED
@@ -55,7 +55,7 @@ module JpLocalGov
55
55
  .map.with_index { |digit, index| digit.to_i * (CHECK_DIGITS_INDEX - index + 1) }
56
56
  .sum
57
57
  candidate = (CHECK_BASE - sub_total % CHECK_BASE) % 10
58
- check_digits = sub_total > CHECK_BASE ? candidate : CHECK_BASE - sub_total
58
+ check_digits = sub_total >= CHECK_BASE ? candidate : CHECK_BASE - sub_total
59
59
  code[CHECK_DIGITS_INDEX] == check_digits.to_s
60
60
  end
61
61
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jp_local_gov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ikuma-t
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-28 00:00:00.000000000 Z
11
+ date: 2022-02-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Convert japan local government code (JIS X 0402 based) into the local
14
14
  government name.