taiwan_validator 1.3.4 → 1.3.6

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: 92c06b9deeb7cbc47b3eb9e0f889cbe04f8f1630b77fc6a09e260c3ea7cf0359
4
- data.tar.gz: 61d31d2565eabfc88ab8a8018da79d035b0e44ccff580c82785f016ea7b08d09
3
+ metadata.gz: f1eb637db2f51053b511fcac19b1ac602ec0acc6ba9df5e15b36fb420f223c8e
4
+ data.tar.gz: a955de4102d93a3962d42f1b31cfd33735d2180dd7132f4a6af402e960eb9d27
5
5
  SHA512:
6
- metadata.gz: 1f31250474737520801e5897cdfdc556ca8b69b79452e50aceb6c7856ca8cb911bdcf8030e8920a6f336e1bb192d6c2fbc4989cce61496141aa7bc9de981be5a
7
- data.tar.gz: b24515b87cdbcab1830140449dcf31a7df23e5c83290990d12d58c63f6a74af0afcd1803fd811ebb0cc665dd81bc5272fde250726c553a2fbef9b7abc6baeda1
6
+ metadata.gz: 42b762c9d112bc6da7a17db48d25db0bd7c7672c61fde801f8d3da388d11d7020a06a1af719c5b26f1348a5d0561bd4a571e87c587f628f1ac73434b29807af5
7
+ data.tar.gz: 6def96fc22ee43677866ae668c5ef90347bbc4bcb036b6a03c0ae16e96b47382aa1d79b2d560932c20663f4be8576f1ace4d1472cbc66441f468bbe1b0de5860
@@ -0,0 +1,32 @@
1
+ name: build
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ test:
14
+ strategy:
15
+ matrix:
16
+ ruby-version: ['3.1', '3.2', '3.3', '3.4']
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+ bundler-cache: true
25
+
26
+ - name: Run tests
27
+ run: bundle exec rspec
28
+
29
+ - name: Publish code coverage
30
+ uses: paambaati/codeclimate-action@v9
31
+ env:
32
+ CC_TEST_REPORTER_ID: 85915b296b49680c2c4fd50d2be8f76cc094409297c63b37cf15c145968f1e91
data/Gemfile CHANGED
@@ -5,5 +5,6 @@ gemspec
5
5
 
6
6
  # CodeClimate Test Coverage
7
7
  group :test do
8
- gem 'simplecov', require: false, group: :test
8
+ gem "simplecov", require: false, group: :test
9
+ gem "simplecov_json_formatter", require: false, group: :test
9
10
  end
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TaiwanValidator
2
2
 
3
- [![Build Status](https://travis-ci.org/abookyun/taiwan_validator.svg)](https://travis-ci.org/abookyun/taiwan_validator)
3
+ [![build](https://github.com/abookyun/taiwan_validator/actions/workflows/build.yml/badge.svg)](https://github.com/abookyun/taiwan_validator/actions/workflows/build.yml)
4
4
  [![Code Climate](https://codeclimate.com/github/abookyun/taiwan_validator/badges/gpa.svg)](https://codeclimate.com/github/abookyun/taiwan_validator)
5
5
  [![Test Coverage](https://codeclimate.com/github/abookyun/taiwan_validator/badges/coverage.svg)](https://codeclimate.com/github/abookyun/taiwan_validator/coverage)
6
6
 
@@ -13,7 +13,7 @@ class TaiwanValidator::UbnValidator < ActiveModel::EachValidator
13
13
  digit
14
14
  end.inject(&:+)
15
15
 
16
- results % 10 == 0 || (ubn[6] == "7" && (results + 1) % 10 == 0)
16
+ results % 5 == 0 || (ubn[6] == "7" && (results + 1) % 5 == 0)
17
17
  end
18
18
 
19
19
  private
@@ -1,3 +1,3 @@
1
1
  module TaiwanValidator
2
- VERSION = "1.3.4"
2
+ VERSION = "1.3.6"
3
3
  end
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.add_dependency "activemodel", ">= 4.2"
21
21
  spec.add_dependency "activesupport", ">= 4.2"
22
22
 
23
- spec.add_development_dependency "bundler", "> 1.17"
24
- spec.add_development_dependency "rake", "~> 13.0"
25
- spec.add_development_dependency "rspec", "~> 3.3"
23
+ spec.add_development_dependency "bundler"
24
+ spec.add_development_dependency "rake"
25
+ spec.add_development_dependency "rspec"
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taiwan_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Yun
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-21 00:00:00.000000000 Z
11
+ date: 2025-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -42,44 +42,44 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.17'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.17'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '13.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '13.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '3.3'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '3.3'
82
+ version: '0'
83
83
  description: taiwan_validator provides a set of commonly used validators in Taiwan
84
84
  for Rails applications
85
85
  email:
@@ -88,9 +88,9 @@ executables: []
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
+ - ".github/workflows/build.yml"
91
92
  - ".gitignore"
92
93
  - ".rspec"
93
- - ".travis.yml"
94
94
  - Gemfile
95
95
  - LICENSE.txt
96
96
  - README.md
@@ -108,7 +108,7 @@ homepage: https://github.com/abookyun/taiwan_validator
108
108
  licenses:
109
109
  - MIT
110
110
  metadata: {}
111
- post_install_message:
111
+ post_install_message:
112
112
  rdoc_options: []
113
113
  require_paths:
114
114
  - lib
@@ -123,8 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.1.2
127
- signing_key:
126
+ rubygems_version: 3.4.10
127
+ signing_key:
128
128
  specification_version: 4
129
129
  summary: Collection of useful custom validators in Taiwan for Rails applications
130
130
  test_files: []
data/.travis.yml DELETED
@@ -1,17 +0,0 @@
1
- env:
2
- global:
3
- - CC_TEST_REPORTER_ID=85915b296b49680c2c4fd50d2be8f76cc094409297c63b37cf15c145968f1e91
4
- language: ruby
5
- rvm:
6
- - 2.5.5
7
- - 2.6.3
8
- - 2.7.0
9
- before_script:
10
- - gem install bundler
11
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
12
- - chmod +x ./cc-test-reporter
13
- - ./cc-test-reporter before-build
14
- script:
15
- - bundle exec rspec
16
- after_script:
17
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT