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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c95af9dbac771f3438878918843a5c83977c9788cb5184664b1f5fc7a377c60d
4
- data.tar.gz: 3fcffd6c211e8fbe883eec96f8102c80a2014383053f821e10154c316316afa0
3
+ metadata.gz: '08bba67328aa1349bac050e06d5ec0f7948296939cc7d56ec765412f8f8449e3'
4
+ data.tar.gz: 83e208219db70076efba71b5b92f3ed14908a35dac18951225f1f72681832f85
5
5
  SHA512:
6
- metadata.gz: 1978ceb8d56297d4e1e67407ecddcebac4885ed0c218ec0bd8abd480014cb89b1aef74297f09c807d24bc4bcb9b325e2cba93f9088101e8cba3884f567ca7120
7
- data.tar.gz: 347b4812293f6d5d926b7a3f02ac5d76e9aa2044742398a2d65339d9be5196e74fb64718769ece883cf6ae40135784c95e1a2d090d5ec0fcffe886c5d32f1e82
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.5.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.0.3.4)
11
- activesupport (= 6.0.3.4)
12
- activesupport (6.0.3.4)
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 (>= 0.7, < 2)
15
- minitest (~> 5.1)
16
- tzinfo (~> 1.1)
17
- zeitwerk (~> 2.2, >= 2.2.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.7)
20
+ concurrent-ruby (1.1.8)
20
21
  diff-lcs (1.4.4)
21
- i18n (1.8.5)
22
+ i18n (1.8.10)
22
23
  concurrent-ruby (~> 1.0)
23
- minitest (5.14.2)
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.4)
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
- thread_safe (0.3.6)
57
- tzinfo (1.2.8)
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/[USERNAME]/iban_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/[USERNAME]/iban_validator/blob/master/CODE_OF_CONDUCT.md).
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/[USERNAME]/iban_validator/blob/master/CODE_OF_CONDUCT.md).
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
@@ -8,6 +8,5 @@ fr:
8
8
  must_start_with_ch: "doit commencer par CH"
9
9
  invalid_bank_field: Ce champ n'accepte pas certains caractères spéciaux (&/<>°\|...)
10
10
 
11
-
12
11
  activerecord:
13
12
  <<: *activemodel
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Based on http://www.swissiban.com/fr.htm
4
3
  module ActiveModel
5
4
  module Validations
6
5
  class BankFieldValidator < EachValidator
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SwissBankValidator
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.1'
5
5
  end
@@ -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.0
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: 2020-12-03 00:00:00.000000000 Z
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