itax_code 0.1.4 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e97e7183d8c6311ab15d58adef992c883882edb76045018da2497c10fb8c5bc5
4
- data.tar.gz: 845c4e2e027f06335b3aff1e2f03f7af44a60590de9b065a4c0edca444825c13
3
+ metadata.gz: 75e7183f6da4c2c4492b53d5942521ff51a9987862016e9b07ece6f0ee41d710
4
+ data.tar.gz: 89b10833a629223826fd6be3e8b40f04c1e6c6f7fe253e52321277d9ac664e88
5
5
  SHA512:
6
- metadata.gz: e00f7799aebc8babd76844fda3e3f02dff0b4fd06eacb073243466d93356be682d0563f7c874b9b506958793bf8661b2a3135a2c06644cf84fdac0c6a25eb309
7
- data.tar.gz: b78c6f9b881232b182a051d863246193df4353f77f78fcffa6acb7131a0df13cca3587b54d3351d95a32b5064d2163253c4100cd07483492af7aa4036ca35e40
6
+ metadata.gz: 67326622ca594d800c0cc30518fcc396182d7b1c8c47da3440eb04f057f4411730753337ab2d2f290f554c9be8eb3f0ad0765a539d8a68358204cc1a5a44fe37
7
+ data.tar.gz: 280471f1325998e1712b7541e43a579a06b512198470c507d268ce353faeca508bdb2f01f5f7a57b6e874c1e6b9c3494cc3983b706bb737ecd5583220a3c38d1
@@ -1,18 +1,20 @@
1
1
  name: Lint
2
2
 
3
- on: [push]
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
- - name: Checkout
10
- uses: actions/checkout@v2
11
- - name: Set up Ruby
12
- uses: ruby/setup-ruby@v1
14
+ - uses: actions/checkout@v2
15
+ - uses: ruby/setup-ruby@v1
13
16
  with:
14
17
  bundler-cache: true
15
- ruby-version: 2.7.0
18
+ ruby-version: 2.5.0
16
19
  - run: bundle install
17
- - name: Rubocop
18
- run: bundle exec rubocop
20
+ - run: bundle exec rubocop
@@ -0,0 +1,31 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ release-please:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: google-github-actions/release-please-action@v3
13
+ id: release
14
+ with:
15
+ package-name: itax_code
16
+ release-type: ruby
17
+ token: ${{secrets.GITHUB_TOKEN}}
18
+ version-file: "lib/itax_code/version.rb"
19
+ - uses: actions/checkout@v3
20
+ if: ${{steps.release.outputs.release_created}}
21
+ - uses: ruby/setup-ruby@v1
22
+ with:
23
+ bundler-cache: true
24
+ ruby-version: 2.7.0
25
+ if: ${{steps.release.outputs.release_created}}
26
+ - run: bundle install
27
+ if: ${{steps.release.outputs.release_created}}
28
+ - run: ./bin/release
29
+ env:
30
+ RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
31
+ if: ${{steps.release.outputs.release_created}}
@@ -1,20 +1,23 @@
1
1
  name: Test
2
2
 
3
- on: [push]
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
- - name: Checkout
15
- uses: actions/checkout@v2
16
- - name: Set up Ruby
17
- uses: ruby/setup-ruby@v1
19
+ - uses: actions/checkout@v2
20
+ - uses: ruby/setup-ruby@v1
18
21
  with:
19
22
  bundler-cache: true
20
23
  ruby-version: ${{ matrix.ruby }}
data/.gitignore CHANGED
@@ -3,9 +3,11 @@
3
3
  /_yardoc/
4
4
  /.bundle/
5
5
  /.byebug_history
6
+ /.ruby-version
6
7
  /.yardoc
7
8
  /coverage/
8
9
  /doc/
10
+ /Gemfile.lock
9
11
  /itax_code-*.gem
10
12
  /pkg/
11
13
  /spec/reports/
data/.rubocop.yml CHANGED
@@ -2,6 +2,10 @@
2
2
  require:
3
3
  - rubocop-minitest
4
4
  - rubocop-performance
5
+ - rubocop-rake
6
+
7
+ AllCops:
8
+ TargetRubyVersion: 2.5
5
9
 
6
10
  Bundler/OrderedGems:
7
11
  Enabled: false
@@ -16,11 +20,16 @@ Layout/IndentationConsistency:
16
20
 
17
21
  Layout/LineLength:
18
22
  Enabled: true
19
- Max: 80
23
+ Max: 100
20
24
 
21
25
  Metrics/AbcSize:
22
26
  Enabled: false
23
27
 
28
+ Metrics/BlockLength:
29
+ Enabled: true
30
+ Exclude:
31
+ - 'rakelib/**/*'
32
+
24
33
  Metrics/ClassLength:
25
34
  Enabled: true
26
35
  Exclude:
data/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ ## [0.3.0](https://github.com/matteoredz/itax-code/compare/v0.2.0...v0.3.0) (2023-06-30)
4
+
5
+
6
+ ### Features
7
+
8
+ * trigger release action on bump ([#9](https://github.com/matteoredz/itax-code/issues/9)) ([412f054](https://github.com/matteoredz/itax-code/commit/412f054a9e93d95bcf86244121c3097c8e76f515))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * restore release workflow ([#8](https://github.com/matteoredz/itax-code/issues/8)) ([876fc6b](https://github.com/matteoredz/itax-code/commit/876fc6bb69d31e73e611a0e74ee1b27ed2fea966))
data/Gemfile CHANGED
@@ -1,3 +1,13 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
+
5
+ gem "byebug"
6
+ gem "minitest"
7
+ gem "mocha"
8
+ gem "rake"
9
+ gem "rubocop"
10
+ gem "rubocop-minitest"
11
+ gem "rubocop-performance"
12
+ gem "rubocop-rake"
13
+ gem "simplecov"
data/README.md CHANGED
@@ -29,9 +29,9 @@ Or install it yourself as:
29
29
  ItaxCode.encode(
30
30
  surname: "Rossi",
31
31
  name: "Mario",
32
- gender: "M", # "M" or "F"
33
- birthdate: "1980-1-1", # String, Time, Date or DateTime
34
- birthplace: "Milano"
32
+ gender: "M", # M|F
33
+ birthdate: "1980-01-01", # String|Time|Date|DateTime
34
+ birthplace: "Milano" # Name(Milano)|code(F205)
35
35
  )
36
36
  ```
37
37
 
@@ -45,7 +45,7 @@ ItaxCode.decode("RSSMRA80A01F205X")
45
45
  # {
46
46
  # code: "RSSMRA80A01F205X",
47
47
  # gender: "M",
48
- # birthdate: "1980-1-1",
48
+ # birthdate: "1980-01-01",
49
49
  # birthplace: {
50
50
  # code: "F205",
51
51
  # province: "MI",
@@ -83,7 +83,7 @@ ItaxCode.valid?(
83
83
  surname: "Rossi",
84
84
  name: "Mario",
85
85
  gender: "M",
86
- birthdate: "1980-1-1",
86
+ birthdate: "1980-01-01",
87
87
  birthplace: "Milano"
88
88
  }
89
89
  )
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 Release
15
- bundle exec rake release
13
+ # Build and Push
14
+ gem build *.gemspec
15
+ gem push *.gem
data/itax_code.gemspec CHANGED
@@ -22,15 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.bindir = "exe"
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ["lib"]
25
-
26
25
  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"
36
26
  end