swiss_bank_validator 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +15 -15
- data/README.md +20 -2
- data/changelog.md +4 -0
- data/lib/swiss_bank_validator/locale/fr.yml +0 -1
- data/lib/swiss_bank_validator/validates_bank_field_of.rb +0 -1
- data/lib/swiss_bank_validator/version.rb +1 -1
- data/swiss_bank_validator.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08bba67328aa1349bac050e06d5ec0f7948296939cc7d56ec765412f8f8449e3'
|
4
|
+
data.tar.gz: 83e208219db70076efba71b5b92f3ed14908a35dac18951225f1f72681832f85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f1d15d310cb96034b718102457809b836abe7710f6874d3861f36ee81a5864db69898ab49862e6e3ea1a42644e1d029f420d3b4188c4df6dbce810a72c31076
|
7
|
+
data.tar.gz: bf6d1ad621f446ec98d817a07ebeef72fb103f47526272e88d537afa3bb0c620701bfbe7dece5c64b6855472ee73ef70dd6d66fc45c2a64a25ed10f10193a6dd
|
data/Gemfile.lock
CHANGED
@@ -1,33 +1,34 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
swiss_bank_validator (0.
|
4
|
+
swiss_bank_validator (0.6.1)
|
5
5
|
activemodel (~> 6.0)
|
6
|
+
rexml (~> 3.2.5)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
10
|
-
activemodel (6.
|
11
|
-
activesupport (= 6.
|
12
|
-
activesupport (6.
|
11
|
+
activemodel (6.1.3.2)
|
12
|
+
activesupport (= 6.1.3.2)
|
13
|
+
activesupport (6.1.3.2)
|
13
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
-
i18n (>=
|
15
|
-
minitest (
|
16
|
-
tzinfo (~>
|
17
|
-
zeitwerk (~> 2.
|
15
|
+
i18n (>= 1.6, < 2)
|
16
|
+
minitest (>= 5.1)
|
17
|
+
tzinfo (~> 2.0)
|
18
|
+
zeitwerk (~> 2.3)
|
18
19
|
ast (2.4.1)
|
19
|
-
concurrent-ruby (1.1.
|
20
|
+
concurrent-ruby (1.1.8)
|
20
21
|
diff-lcs (1.4.4)
|
21
|
-
i18n (1.8.
|
22
|
+
i18n (1.8.10)
|
22
23
|
concurrent-ruby (~> 1.0)
|
23
|
-
minitest (5.14.
|
24
|
+
minitest (5.14.4)
|
24
25
|
parallel (1.20.1)
|
25
26
|
parser (2.7.2.0)
|
26
27
|
ast (~> 2.4.1)
|
27
28
|
rainbow (3.0.0)
|
28
29
|
rake (12.3.3)
|
29
30
|
regexp_parser (2.0.0)
|
30
|
-
rexml (3.2.
|
31
|
+
rexml (3.2.5)
|
31
32
|
rspec (3.10.0)
|
32
33
|
rspec-core (~> 3.10.0)
|
33
34
|
rspec-expectations (~> 3.10.0)
|
@@ -53,9 +54,8 @@ GEM
|
|
53
54
|
rubocop-ast (1.3.0)
|
54
55
|
parser (>= 2.7.1.5)
|
55
56
|
ruby-progressbar (1.10.1)
|
56
|
-
|
57
|
-
|
58
|
-
thread_safe (~> 0.1)
|
57
|
+
tzinfo (2.0.4)
|
58
|
+
concurrent-ruby (~> 1.0)
|
59
59
|
unicode-display_width (1.7.0)
|
60
60
|
zeitwerk (2.4.2)
|
61
61
|
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
Allow to valid a Swiss Iban passed on the rules of http://www.swissiban.com/
|
4
4
|
|
5
|
+
You can also validate field to be complient with bank (without special character). Useful if you want to create batch paiement
|
6
|
+
|
5
7
|
## Installation
|
6
8
|
|
7
9
|
Add this line to your application's Gemfile:
|
@@ -20,6 +22,8 @@ Or install it yourself as:
|
|
20
22
|
|
21
23
|
## Usage
|
22
24
|
|
25
|
+
To validate an IBAN
|
26
|
+
|
23
27
|
```ruby
|
24
28
|
class Account < ActiveRecord::Base
|
25
29
|
validates_iban_format_of :account_number
|
@@ -32,6 +36,20 @@ Or install it yourself as:
|
|
32
36
|
end
|
33
37
|
```
|
34
38
|
|
39
|
+
To validate a bank field
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
class Account < ActiveRecord::Base
|
43
|
+
validates_bank_field_of :name
|
44
|
+
end
|
45
|
+
|
46
|
+
# or
|
47
|
+
|
48
|
+
class Account < ActiveRecord::Base
|
49
|
+
validates :name, bank_field: true
|
50
|
+
end
|
51
|
+
```
|
52
|
+
|
35
53
|
## Development
|
36
54
|
|
37
55
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -40,7 +58,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
40
58
|
|
41
59
|
## Contributing
|
42
60
|
|
43
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
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).
|
44
62
|
|
45
63
|
|
46
64
|
## License
|
@@ -49,4 +67,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
49
67
|
|
50
68
|
## Code of Conduct
|
51
69
|
|
52
|
-
Everyone interacting in the SwissBankValidator project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
70
|
+
Everyone interacting in the SwissBankValidator project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/qoqa/iban_validator/blob/master/CODE_OF_CONDUCT.md).
|
data/changelog.md
CHANGED
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [0.6.1]
|
9
|
+
|
10
|
+
- Fix Rexml vulnerabilities
|
11
|
+
|
8
12
|
## [0.6.0]
|
9
13
|
|
10
14
|
- Add validation for bank field that not accept special char
|
@@ -28,6 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ['lib']
|
29
29
|
|
30
30
|
spec.add_dependency 'activemodel', '~> 6.0'
|
31
|
+
spec.add_dependency 'rexml', '~> 3.2.5'
|
31
32
|
|
32
33
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
33
34
|
spec.add_development_dependency 'rubocop', '~> 1.5'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swiss_bank_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- QoQa dev Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '6.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rexml
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.2.5
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.2.5
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|