itax_code 2.0.0 → 2.0.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/.github/workflows/lint.yml +2 -1
- data/.github/workflows/release.yml +27 -5
- data/.github/workflows/test.yml +24 -4
- data/.rubocop.yml +1 -0
- data/CHANGELOG.md +33 -0
- data/Gemfile +1 -0
- data/README.md +2 -3
- data/itax_code.gemspec +0 -1
- data/lib/itax_code/data/cities.csv +211 -164
- data/lib/itax_code/encoder.rb +6 -7
- data/lib/itax_code/error.rb +20 -0
- data/lib/itax_code/parser.rb +6 -10
- data/lib/itax_code/transliterator.rb +211 -0
- data/lib/itax_code/utils.rb +22 -5
- data/lib/itax_code/version.rb +1 -1
- data/lib/itax_code.rb +1 -4
- data/rakelib/cities.rake +1 -1
- metadata +5 -18
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f9a3fe75a4e8f5c3de8c43680261cea42ee2ab4a4146be4ea3b7ba1a58def000
|
|
4
|
+
data.tar.gz: c736ec5f0541b0d62d9f8e38cecbcbb915f7a5f2d71a906b437dc9836dde5151
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55ef80049f4b9e4bfc47937ddb127643ac16c5ea1b754fb1a976d4ca301463cf72293c918d41c02270537ad1e30bd1e19f790bd2dbc6db98d3297c43917417d0
|
|
7
|
+
data.tar.gz: 9bd055d8d7aea94dfc5c1adf155096d93e60541555cad86e5a090782d7f7804c1017b0348a2023623212fc5acb5aaa077315d1c44c2f0092b13e9613e19ba29e
|
data/.github/workflows/lint.yml
CHANGED
|
@@ -5,12 +5,20 @@ on:
|
|
|
5
5
|
branches:
|
|
6
6
|
- main
|
|
7
7
|
|
|
8
|
-
permissions:
|
|
9
|
-
contents: write
|
|
10
|
-
pull-requests: write
|
|
11
|
-
|
|
12
8
|
jobs:
|
|
9
|
+
lint:
|
|
10
|
+
uses: ./.github/workflows/lint.yml
|
|
11
|
+
test:
|
|
12
|
+
uses: ./.github/workflows/test.yml
|
|
13
|
+
secrets:
|
|
14
|
+
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
|
|
13
15
|
release-please:
|
|
16
|
+
needs:
|
|
17
|
+
- lint
|
|
18
|
+
- test
|
|
19
|
+
permissions:
|
|
20
|
+
contents: write
|
|
21
|
+
pull-requests: write
|
|
14
22
|
runs-on: ubuntu-latest
|
|
15
23
|
steps:
|
|
16
24
|
- uses: google-github-actions/release-please-action@v3
|
|
@@ -20,7 +28,21 @@ jobs:
|
|
|
20
28
|
release-type: ruby
|
|
21
29
|
token: ${{secrets.GITHUB_TOKEN}}
|
|
22
30
|
version-file: "lib/itax_code/version.rb"
|
|
23
|
-
|
|
31
|
+
changelog-types: >
|
|
32
|
+
[
|
|
33
|
+
{ "type": "build", "section": "Build System", "hidden": false },
|
|
34
|
+
{ "type": "ci", "section": "Continuous Integration", "hidden": false },
|
|
35
|
+
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": false },
|
|
36
|
+
{ "type": "docs", "section": "Documentation", "hidden": false },
|
|
37
|
+
{ "type": "feat", "section": "Features", "hidden": false },
|
|
38
|
+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
|
|
39
|
+
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
|
|
40
|
+
{ "type": "revert", "section": "Reverts", "hidden": false },
|
|
41
|
+
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
|
|
42
|
+
{ "type": "style", "section": "Styles", "hidden": false },
|
|
43
|
+
{ "type": "test", "section": "Tests", "hidden": false }
|
|
44
|
+
]
|
|
45
|
+
- uses: actions/checkout@v4
|
|
24
46
|
if: ${{steps.release.outputs.release_created}}
|
|
25
47
|
- uses: ruby/setup-ruby@v1
|
|
26
48
|
with:
|
data/.github/workflows/test.yml
CHANGED
|
@@ -6,20 +6,40 @@ on:
|
|
|
6
6
|
- opened
|
|
7
7
|
- reopened
|
|
8
8
|
- synchronize
|
|
9
|
+
workflow_call:
|
|
10
|
+
secrets:
|
|
11
|
+
CC_TEST_REPORTER_ID:
|
|
12
|
+
required: true
|
|
9
13
|
|
|
10
14
|
jobs:
|
|
11
15
|
test:
|
|
12
16
|
runs-on: ubuntu-latest
|
|
13
|
-
continue-on-error: ${{
|
|
17
|
+
continue-on-error: ${{endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug'}}
|
|
14
18
|
strategy:
|
|
15
19
|
fail-fast: false
|
|
16
20
|
matrix:
|
|
17
|
-
ruby: [2.5, 2.6, 2.7, '3.0', 3.1, head]
|
|
21
|
+
ruby: [2.5, 2.6, 2.7, '3.0', 3.1, 3.2, head]
|
|
18
22
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
23
|
+
- uses: actions/checkout@v4
|
|
20
24
|
- uses: ruby/setup-ruby@v1
|
|
21
25
|
with:
|
|
22
26
|
bundler-cache: true
|
|
23
|
-
ruby-version: ${{
|
|
27
|
+
ruby-version: ${{matrix.ruby}}
|
|
24
28
|
- run: bundle install
|
|
25
29
|
- run: bundle exec rake
|
|
30
|
+
coverage:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
- uses: ruby/setup-ruby@v1
|
|
35
|
+
with:
|
|
36
|
+
bundler-cache: true
|
|
37
|
+
ruby-version: 3.2
|
|
38
|
+
- run: bundle install
|
|
39
|
+
- name: Test & publish code coverage
|
|
40
|
+
uses: paambaati/codeclimate-action@v5.0.0
|
|
41
|
+
env:
|
|
42
|
+
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
|
|
43
|
+
with:
|
|
44
|
+
coverageCommand: bundle exec rake
|
|
45
|
+
debug: true
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.2](https://github.com/matteoredz/itax-code/compare/v2.0.1...v2.0.2) (2023-11-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Continuous Integration
|
|
7
|
+
|
|
8
|
+
* remove .travis.yml ([#49](https://github.com/matteoredz/itax-code/issues/49)) ([179141c](https://github.com/matteoredz/itax-code/commit/179141c9fc6aedefaad7f38cab70d6aa0d31e478))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Miscellaneous Chores
|
|
12
|
+
|
|
13
|
+
* add quality badges + enable branch coverage ([#41](https://github.com/matteoredz/itax-code/issues/41)) ([cd3a950](https://github.com/matteoredz/itax-code/commit/cd3a950d85bf499526e7aa89dd468cb324e60e1b))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* display all changelog-types ([#47](https://github.com/matteoredz/itax-code/issues/47)) ([d4eddf1](https://github.com/matteoredz/itax-code/commit/d4eddf109fc2bf112ded9f7ee7fca4d188269aaa))
|
|
19
|
+
* pass CC_TEST_REPORTER_ID top-down to test workflow ([#45](https://github.com/matteoredz/itax-code/issues/45)) ([89398f2](https://github.com/matteoredz/itax-code/commit/89398f2fd681f62296268a1aeffd6f0782ccdf95))
|
|
20
|
+
* require lint and test workflows run also on main ([#43](https://github.com/matteoredz/itax-code/issues/43)) ([f0a0d06](https://github.com/matteoredz/itax-code/commit/f0a0d06cc3682c39b2a5036d7bddc205eb0fc21c))
|
|
21
|
+
* update README.md for SEO ([#48](https://github.com/matteoredz/itax-code/issues/48)) ([04db3eb](https://github.com/matteoredz/itax-code/commit/04db3eb4299e22b598fd13223fb4f8e36da52539))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Code Refactoring
|
|
25
|
+
|
|
26
|
+
* make gem errors inherit from base classes ([#37](https://github.com/matteoredz/itax-code/issues/37)) ([99b00f1](https://github.com/matteoredz/itax-code/commit/99b00f152d9172bebd5f59d4d69e187cf7968a23))
|
|
27
|
+
* remove ActiveSupport dependency ([#39](https://github.com/matteoredz/itax-code/issues/39)) ([9302954](https://github.com/matteoredz/itax-code/commit/93029541f510924a92acdf413f33a1b9ea939230))
|
|
28
|
+
|
|
29
|
+
## [2.0.1](https://github.com/matteoredz/itax-code/compare/v2.0.0...v2.0.1) (2023-10-06)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* fix encoding error in cities.rake and update cities.csv ([#34](https://github.com/matteoredz/itax-code/issues/34)) ([80ff044](https://github.com/matteoredz/itax-code/commit/80ff044cfd4961348304f3d99b3f7bbe96773a4f))
|
|
35
|
+
|
|
3
36
|
## [2.0.0](https://github.com/matteoredz/itax-code/compare/v1.0.1...v2.0.0) (2023-10-01)
|
|
4
37
|
|
|
5
38
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# ItaxCode
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://badge.fury.io/rb/itax_code) [](https://codeclimate.com/github/matteoredz/itax-code/maintainability) [](https://codeclimate.com/github/matteoredz/itax-code/test_coverage)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
It also handles [omocodia](https://it.wikipedia.org/wiki/Omocodia) complexity.
|
|
5
|
+
A Ruby Gem to encode, decode, and validate the Italian Tax Code (Fiscal Code, Codice Fiscale), dealing with [Omocodia](https://it.wikipedia.org/wiki/Omocodia) too.
|
|
7
6
|
|
|
8
7
|
## Installation
|
|
9
8
|
|
data/itax_code.gemspec
CHANGED