itax_code 0.2.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/lint.yml +10 -8
- data/.github/workflows/release.yml +35 -0
- data/.github/workflows/test.yml +10 -7
- data/.gitignore +2 -0
- data/.rubocop.yml +11 -4
- data/CHANGELOG.md +25 -0
- data/Gemfile +12 -0
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/bin/release +3 -3
- data/itax_code.gemspec +3 -10
- data/lib/itax_code/data/cities.csv +19306 -13832
- data/lib/itax_code/data/countries.csv +277 -277
- data/lib/itax_code/encoder.rb +3 -4
- data/lib/itax_code/omocode.rb +23 -12
- data/lib/itax_code/parser.rb +48 -38
- data/lib/itax_code/utils.rb +18 -19
- data/lib/itax_code/validator.rb +2 -0
- data/lib/itax_code/version.rb +3 -1
- data/lib/itax_code.rb +2 -0
- data/rakelib/cities.rake +35 -0
- metadata +11 -121
- data/.github/workflows/build-and-push.yml +0 -27
- data/Gemfile.lock +0 -74
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef915bc679fc9d2e15a5935b64e4c31cab6b638d0dc077d25f1f3ba7ab2859ef
|
4
|
+
data.tar.gz: 5c4ad64f192cae5530e5a434984539b9f5c0e27ad771d4bbd461118151ba5472
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f80f432773b74fe19d74312c249279204681f211ab73bdaf60bde1c4a4fac1eace749a2bfaae75a38cf692e08b42f88723d27de9e9b29da81580980e9a79039
|
7
|
+
data.tar.gz: c0758b8d0fc862dd67e5a50842c17723368cbcc7a9e987c3e9d2683e992f55fb346cc6bc2e87374069304f247d1d0e24917c5eb0eee8b9d67b665444f79c0984
|
data/.github/workflows/lint.yml
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
name: Lint
|
2
2
|
|
3
|
-
on:
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
types:
|
6
|
+
- opened
|
7
|
+
- reopened
|
8
|
+
- synchronize
|
4
9
|
|
5
10
|
jobs:
|
6
11
|
lint:
|
7
12
|
runs-on: ubuntu-latest
|
8
13
|
steps:
|
9
|
-
-
|
10
|
-
|
11
|
-
- name: Set up Ruby
|
12
|
-
uses: ruby/setup-ruby@v1
|
14
|
+
- uses: actions/checkout@v3
|
15
|
+
- uses: ruby/setup-ruby@v1
|
13
16
|
with:
|
14
17
|
bundler-cache: true
|
15
|
-
ruby-version: 2.
|
18
|
+
ruby-version: 2.5.0
|
16
19
|
- run: bundle install
|
17
|
-
-
|
18
|
-
run: bundle exec rubocop
|
20
|
+
- run: bundle exec rubocop
|
@@ -0,0 +1,35 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
|
8
|
+
permissions:
|
9
|
+
contents: write
|
10
|
+
pull-requests: write
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
release-please:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
steps:
|
16
|
+
- uses: google-github-actions/release-please-action@v3
|
17
|
+
id: release
|
18
|
+
with:
|
19
|
+
package-name: itax_code
|
20
|
+
release-type: ruby
|
21
|
+
token: ${{secrets.GITHUB_TOKEN}}
|
22
|
+
version-file: "lib/itax_code/version.rb"
|
23
|
+
- uses: actions/checkout@v3
|
24
|
+
if: ${{steps.release.outputs.release_created}}
|
25
|
+
- uses: ruby/setup-ruby@v1
|
26
|
+
with:
|
27
|
+
bundler-cache: true
|
28
|
+
ruby-version: 2.7.0
|
29
|
+
if: ${{steps.release.outputs.release_created}}
|
30
|
+
- run: bundle install
|
31
|
+
if: ${{steps.release.outputs.release_created}}
|
32
|
+
- run: ./bin/release
|
33
|
+
env:
|
34
|
+
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
35
|
+
if: ${{steps.release.outputs.release_created}}
|
data/.github/workflows/test.yml
CHANGED
@@ -1,20 +1,23 @@
|
|
1
1
|
name: Test
|
2
2
|
|
3
|
-
on:
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
types:
|
6
|
+
- opened
|
7
|
+
- reopened
|
8
|
+
- synchronize
|
4
9
|
|
5
10
|
jobs:
|
6
11
|
test:
|
7
12
|
runs-on: ubuntu-latest
|
13
|
+
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
|
8
14
|
strategy:
|
9
15
|
fail-fast: false
|
10
16
|
matrix:
|
11
|
-
ruby: [2.5, 2.6, 2.7, head]
|
12
|
-
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
|
17
|
+
ruby: [2.5, 2.6, 2.7, '3.0', 3.1, head]
|
13
18
|
steps:
|
14
|
-
-
|
15
|
-
|
16
|
-
- name: Set up Ruby
|
17
|
-
uses: ruby/setup-ruby@v1
|
19
|
+
- uses: actions/checkout@v3
|
20
|
+
- uses: ruby/setup-ruby@v1
|
18
21
|
with:
|
19
22
|
bundler-cache: true
|
20
23
|
ruby-version: ${{ matrix.ruby }}
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
require:
|
3
3
|
- rubocop-minitest
|
4
4
|
- rubocop-performance
|
5
|
+
- rubocop-rake
|
6
|
+
|
7
|
+
AllCops:
|
8
|
+
NewCops: enable
|
9
|
+
TargetRubyVersion: 2.5
|
5
10
|
|
6
11
|
Bundler/OrderedGems:
|
7
12
|
Enabled: false
|
@@ -16,11 +21,16 @@ Layout/IndentationConsistency:
|
|
16
21
|
|
17
22
|
Layout/LineLength:
|
18
23
|
Enabled: true
|
19
|
-
Max:
|
24
|
+
Max: 100
|
20
25
|
|
21
26
|
Metrics/AbcSize:
|
22
27
|
Enabled: false
|
23
28
|
|
29
|
+
Metrics/BlockLength:
|
30
|
+
Enabled: true
|
31
|
+
Exclude:
|
32
|
+
- 'rakelib/**/*'
|
33
|
+
|
24
34
|
Metrics/ClassLength:
|
25
35
|
Enabled: true
|
26
36
|
Exclude:
|
@@ -33,9 +43,6 @@ Metrics/MethodLength:
|
|
33
43
|
Style/Documentation:
|
34
44
|
Enabled: false
|
35
45
|
|
36
|
-
Style/FrozenStringLiteralComment:
|
37
|
-
Enabled: false
|
38
|
-
|
39
46
|
Style/StringLiterals:
|
40
47
|
Enabled: true
|
41
48
|
EnforcedStyle: double_quotes
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [0.4.0](https://github.com/matteoredz/itax-code/compare/v0.3.0...v0.4.0) (2023-08-08)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* improve omocodes algo ([0834c43](https://github.com/matteoredz/itax-code/commit/0834c4372d300e29057bc283556b6af532cca722))
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* explicit the workflow permissions ([#17](https://github.com/matteoredz/itax-code/issues/17)) ([41d3515](https://github.com/matteoredz/itax-code/commit/41d35154db7f18622369a0b35ce0eb6b13fe4812))
|
14
|
+
|
15
|
+
## [0.3.0](https://github.com/matteoredz/itax-code/compare/v0.2.0...v0.3.0) (2023-06-30)
|
16
|
+
|
17
|
+
|
18
|
+
### Features
|
19
|
+
|
20
|
+
* trigger release action on bump ([#9](https://github.com/matteoredz/itax-code/issues/9)) ([412f054](https://github.com/matteoredz/itax-code/commit/412f054a9e93d95bcf86244121c3097c8e76f515))
|
21
|
+
|
22
|
+
|
23
|
+
### Bug Fixes
|
24
|
+
|
25
|
+
* restore release workflow ([#8](https://github.com/matteoredz/itax-code/issues/8)) ([876fc6b](https://github.com/matteoredz/itax-code/commit/876fc6bb69d31e73e611a0e74ee1b27ed2fea966))
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/bin/release
CHANGED
@@ -7,9 +7,9 @@ chmod 0600 ~/.gem/credentials
|
|
7
7
|
|
8
8
|
cat << EOF > ~/.gem/credentials
|
9
9
|
---
|
10
|
-
:github: Bearer ${GITHUB_TOKEN}
|
11
10
|
:rubygems_api_key: ${RUBYGEMS_API_KEY}
|
12
11
|
EOF
|
13
12
|
|
14
|
-
# Build and
|
15
|
-
|
13
|
+
# Build and Push
|
14
|
+
gem build *.gemspec
|
15
|
+
gem push *.gem
|
data/itax_code.gemspec
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative "lib/itax_code/version"
|
2
4
|
|
3
5
|
Gem::Specification.new do |spec|
|
@@ -22,15 +24,6 @@ Gem::Specification.new do |spec|
|
|
22
24
|
spec.bindir = "exe"
|
23
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
26
|
spec.require_paths = ["lib"]
|
25
|
-
|
26
27
|
spec.add_dependency "activesupport"
|
27
|
-
|
28
|
-
spec.add_development_dependency "byebug"
|
29
|
-
spec.add_development_dependency "minitest"
|
30
|
-
spec.add_development_dependency "mocha"
|
31
|
-
spec.add_development_dependency "rake"
|
32
|
-
spec.add_development_dependency "rubocop"
|
33
|
-
spec.add_development_dependency "rubocop-minitest"
|
34
|
-
spec.add_development_dependency "rubocop-performance"
|
35
|
-
spec.add_development_dependency "simplecov"
|
28
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
36
29
|
end
|