swiss_bank_validator 1.0.2 → 1.0.4
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/ruby.yml +6 -7
- data/.gitignore +1 -0
- data/.rubocop.yml +2 -2
- data/.ruby-version +1 -0
- data/Gemfile.lock +58 -45
- data/README.md +7 -0
- data/lib/swiss_bank_validator/constants.rb +2 -2
- data/lib/swiss_bank_validator/version.rb +1 -1
- data/swiss_bank_validator.gemspec +2 -2
- metadata +7 -11
- 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: 2de8f8c2ac434447fbcb7a05158f8dfb25131e71ce16c9a5aa913e9f833df2eb
|
4
|
+
data.tar.gz: 970f13c27708eacee9c874d8e9089d316af7e93a01d6e7e3237a18666c47c10e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01324ed7b62d7c542f86901d611d9e0b1869794cb26ec3ae4ccc42585987214da558f2b5e462731e5c2dc5f36e1666ac3983444c5bc86da1c108b22fdf45fa12
|
7
|
+
data.tar.gz: 6adde04f7d24113a44ed685ec83ed8a673909522e3226333f09037200a1a237e5a2f74a504ebc9d214c464f64560cbca24bc87442b56dd37ccb7e30039f50379
|
data/.github/workflows/ruby.yml
CHANGED
@@ -8,22 +8,21 @@
|
|
8
8
|
name: Ruby
|
9
9
|
|
10
10
|
on:
|
11
|
-
|
12
|
-
|
13
|
-
pull_request:
|
11
|
+
- pull_request
|
12
|
+
- push:
|
14
13
|
branches: [ main ]
|
15
14
|
|
16
15
|
jobs:
|
17
16
|
test:
|
18
17
|
|
19
|
-
runs-on: ubuntu-
|
18
|
+
runs-on: ubuntu-latest
|
20
19
|
|
21
20
|
steps:
|
22
|
-
- uses: actions/checkout@
|
21
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
23
22
|
- name: Set up Ruby
|
24
|
-
uses: ruby/setup-ruby@v1
|
23
|
+
uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # v1.227.0
|
25
24
|
with:
|
26
|
-
ruby-version:
|
25
|
+
ruby-version: 3.1
|
27
26
|
- name: Install dependencies
|
28
27
|
run: bundle install
|
29
28
|
- name: Run tests & Rubocop
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.4.2
|
data/Gemfile.lock
CHANGED
@@ -1,73 +1,86 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
swiss_bank_validator (1.0.
|
4
|
+
swiss_bank_validator (1.0.3)
|
5
5
|
activemodel (>= 6.1.7.6)
|
6
|
-
rexml (~> 3.
|
6
|
+
rexml (~> 3.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (
|
12
|
-
activesupport (=
|
13
|
-
activesupport (
|
11
|
+
activemodel (8.0.2)
|
12
|
+
activesupport (= 8.0.2)
|
13
|
+
activesupport (8.0.2)
|
14
14
|
base64
|
15
|
+
benchmark (>= 0.3)
|
15
16
|
bigdecimal
|
16
|
-
concurrent-ruby (~> 1.0, >= 1.
|
17
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
17
18
|
connection_pool (>= 2.2.5)
|
18
19
|
drb
|
19
20
|
i18n (>= 1.6, < 2)
|
21
|
+
logger (>= 1.4.2)
|
20
22
|
minitest (>= 5.1)
|
21
|
-
|
22
|
-
tzinfo (~> 2.0)
|
23
|
-
|
23
|
+
securerandom (>= 0.3)
|
24
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
25
|
+
uri (>= 0.13.1)
|
26
|
+
ast (2.4.2)
|
24
27
|
base64 (0.2.0)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
28
|
+
benchmark (0.4.0)
|
29
|
+
bigdecimal (3.1.9)
|
30
|
+
concurrent-ruby (1.3.5)
|
31
|
+
connection_pool (2.5.0)
|
32
|
+
diff-lcs (1.6.0)
|
29
33
|
drb (2.2.1)
|
30
|
-
i18n (1.14.
|
34
|
+
i18n (1.14.7)
|
31
35
|
concurrent-ruby (~> 1.0)
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
+
json (2.10.2)
|
37
|
+
language_server-protocol (3.17.0.4)
|
38
|
+
lint_roller (1.1.0)
|
39
|
+
logger (1.6.6)
|
40
|
+
minitest (5.25.5)
|
41
|
+
parallel (1.26.3)
|
42
|
+
parser (3.3.7.1)
|
36
43
|
ast (~> 2.4.1)
|
37
|
-
|
44
|
+
racc
|
45
|
+
racc (1.8.1)
|
46
|
+
rainbow (3.1.1)
|
38
47
|
rake (12.3.3)
|
39
|
-
regexp_parser (2.
|
40
|
-
rexml (3.
|
41
|
-
|
42
|
-
|
43
|
-
rspec-
|
44
|
-
rspec-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
rspec-expectations (3.10.0)
|
48
|
+
regexp_parser (2.10.0)
|
49
|
+
rexml (3.4.1)
|
50
|
+
rspec (3.13.0)
|
51
|
+
rspec-core (~> 3.13.0)
|
52
|
+
rspec-expectations (~> 3.13.0)
|
53
|
+
rspec-mocks (~> 3.13.0)
|
54
|
+
rspec-core (3.13.3)
|
55
|
+
rspec-support (~> 3.13.0)
|
56
|
+
rspec-expectations (3.13.3)
|
49
57
|
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
-
rspec-support (~> 3.
|
51
|
-
rspec-mocks (3.
|
58
|
+
rspec-support (~> 3.13.0)
|
59
|
+
rspec-mocks (3.13.2)
|
52
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
53
|
-
rspec-support (~> 3.
|
54
|
-
rspec-support (3.
|
55
|
-
rubocop (1.
|
61
|
+
rspec-support (~> 3.13.0)
|
62
|
+
rspec-support (3.13.2)
|
63
|
+
rubocop (1.74.0)
|
64
|
+
json (~> 2.3)
|
65
|
+
language_server-protocol (~> 3.17.0.2)
|
66
|
+
lint_roller (~> 1.1.0)
|
56
67
|
parallel (~> 1.10)
|
57
|
-
parser (>=
|
68
|
+
parser (>= 3.3.0.2)
|
58
69
|
rainbow (>= 2.2.2, < 4.0)
|
59
|
-
regexp_parser (>= 2.0)
|
60
|
-
|
61
|
-
rubocop-ast (>= 1.2.0)
|
70
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
71
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
62
72
|
ruby-progressbar (~> 1.7)
|
63
|
-
unicode-display_width (>=
|
64
|
-
rubocop-ast (1.
|
65
|
-
parser (>=
|
66
|
-
ruby-progressbar (1.
|
67
|
-
|
73
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
74
|
+
rubocop-ast (1.40.0)
|
75
|
+
parser (>= 3.3.1.0)
|
76
|
+
ruby-progressbar (1.13.0)
|
77
|
+
securerandom (0.4.1)
|
68
78
|
tzinfo (2.0.6)
|
69
79
|
concurrent-ruby (~> 1.0)
|
70
|
-
unicode-display_width (1.
|
80
|
+
unicode-display_width (3.1.4)
|
81
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
82
|
+
unicode-emoji (4.0.4)
|
83
|
+
uri (1.0.3)
|
71
84
|
|
72
85
|
PLATFORMS
|
73
86
|
ruby
|
@@ -79,4 +92,4 @@ DEPENDENCIES
|
|
79
92
|
swiss_bank_validator!
|
80
93
|
|
81
94
|
BUNDLED WITH
|
82
|
-
2.
|
95
|
+
2.6.6
|
data/README.md
CHANGED
@@ -60,6 +60,13 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
60
60
|
|
61
61
|
Bug reports and pull requests are welcome on GitHub at https://github.com/qoqa/swiss_bank_validator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/qoqa/swiss_bank_validator/blob/master/CODE_OF_CONDUCT.md).
|
62
62
|
|
63
|
+
## Publishing
|
64
|
+
|
65
|
+
To publish a new version, you need to:
|
66
|
+
- Bump the version in `lib/swiss_bank_validator/version.rb`
|
67
|
+
- Create a new version on Github
|
68
|
+
- Run `gem build swiss_bank_validator`
|
69
|
+
- Run `gem push swiss_bank_validator-<version>.gem`
|
63
70
|
|
64
71
|
## License
|
65
72
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module SwissBankValidator
|
4
|
-
IBAN_REGEX = /\ACH[A-Z0-9]{2}\d{5}[A-Z0-9]{12}\z
|
4
|
+
IBAN_REGEX = /\ACH[A-Z0-9]{2}\d{5}[A-Z0-9]{12}\z/
|
5
5
|
IBAN_LENGTH = 21
|
6
6
|
|
7
7
|
# Regex that allow only field accepted by Swiss bank to initiate a payment
|
8
8
|
BANK_REGEX = %r{\A[a-zA-Z0-9.,;:’+\-()?*\[\]{}`´~'\s!“#%÷=@_$£
|
9
|
-
àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏÒÓÔÖÙÚÛÜÑ]*\z}x
|
9
|
+
àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏÒÓÔÖÙÚÛÜÑ]*\z}x
|
10
10
|
end
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.summary = 'All you need to validate a Swiss Iban'
|
13
13
|
spec.homepage = 'https://github.com/qoqa/swiss_bank_validator'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new('>=
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.1')
|
16
16
|
|
17
17
|
spec.metadata['homepage_uri'] = spec.homepage
|
18
18
|
spec.metadata['source_code_uri'] = 'https://github.com/qoqa/swiss_bank_validator'
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ['lib']
|
29
29
|
|
30
30
|
spec.add_dependency 'activemodel', '>= 6.1.7.6'
|
31
|
-
spec.add_dependency 'rexml', '~> 3.
|
31
|
+
spec.add_dependency 'rexml', '~> 3.0'
|
32
32
|
|
33
33
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
34
34
|
spec.add_development_dependency 'rubocop', '~> 1.5'
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swiss_bank_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- QoQa dev Team
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-19 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activemodel
|
@@ -30,14 +29,14 @@ dependencies:
|
|
30
29
|
requirements:
|
31
30
|
- - "~>"
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.
|
32
|
+
version: '3.0'
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
37
|
- - "~>"
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.
|
39
|
+
version: '3.0'
|
41
40
|
- !ruby/object:Gem::Dependency
|
42
41
|
name: rspec
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +65,6 @@ dependencies:
|
|
66
65
|
- - "~>"
|
67
66
|
- !ruby/object:Gem::Version
|
68
67
|
version: '1.5'
|
69
|
-
description:
|
70
68
|
email:
|
71
69
|
- dev@qoqa.com
|
72
70
|
executables: []
|
@@ -76,7 +74,7 @@ files:
|
|
76
74
|
- ".github/workflows/ruby.yml"
|
77
75
|
- ".gitignore"
|
78
76
|
- ".rubocop.yml"
|
79
|
-
- ".
|
77
|
+
- ".ruby-version"
|
80
78
|
- CODE_OF_CONDUCT.md
|
81
79
|
- Gemfile
|
82
80
|
- Gemfile.lock
|
@@ -102,7 +100,6 @@ metadata:
|
|
102
100
|
homepage_uri: https://github.com/qoqa/swiss_bank_validator
|
103
101
|
source_code_uri: https://github.com/qoqa/swiss_bank_validator
|
104
102
|
changelog_uri: https://github.com/qoqa/swiss_bank_validator/main/changelog.md
|
105
|
-
post_install_message:
|
106
103
|
rdoc_options: []
|
107
104
|
require_paths:
|
108
105
|
- lib
|
@@ -110,15 +107,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
107
|
requirements:
|
111
108
|
- - ">="
|
112
109
|
- !ruby/object:Gem::Version
|
113
|
-
version:
|
110
|
+
version: '3.1'
|
114
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
112
|
requirements:
|
116
113
|
- - ">="
|
117
114
|
- !ruby/object:Gem::Version
|
118
115
|
version: '0'
|
119
116
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
121
|
-
signing_key:
|
117
|
+
rubygems_version: 3.6.2
|
122
118
|
specification_version: 4
|
123
119
|
summary: All you need to validate a Swiss Iban
|
124
120
|
test_files: []
|