swiss_bank_validator 0.6.0 → 0.6.2

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: '08e7b858c6c5456461922261471e0635f8716d9a5ce42e663b0c268201ce4f18'
4
+ data.tar.gz: 55a2e52618ed95f9504ac0c328053ecb8c22658da18996e3a705b1c6e5eed569
5
5
  SHA512:
6
- metadata.gz: 1978ceb8d56297d4e1e67407ecddcebac4885ed0c218ec0bd8abd480014cb89b1aef74297f09c807d24bc4bcb9b325e2cba93f9088101e8cba3884f567ca7120
7
- data.tar.gz: 347b4812293f6d5d926b7a3f02ac5d76e9aa2044742398a2d65339d9be5196e74fb64718769ece883cf6ae40135784c95e1a2d090d5ec0fcffe886c5d32f1e82
6
+ metadata.gz: 62332ceef1b371ed7cb27ae81192a7fd16892561f32c32d9ca817bb9861362961f525d1c8b7b72936536dd080988f8c23b286a96aad7c5ee4e9a475db9cb6a9c
7
+ data.tar.gz: f0800de414ca9e8ce5ece205789046ea4c1ba8bddd786090450a61e1e2576c9ef19a5764288e201c55dffe65a0a83815c9dd8463903e0917de4c6bb3df61ae94
data/Gemfile.lock CHANGED
@@ -1,33 +1,44 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- swiss_bank_validator (0.5.0)
5
- activemodel (~> 6.0)
4
+ swiss_bank_validator (0.6.2)
5
+ activemodel (>= 6.1.7.6)
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 (7.1.2)
12
+ activesupport (= 7.1.2)
13
+ activesupport (7.1.2)
14
+ base64
15
+ bigdecimal
13
16
  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)
17
+ connection_pool (>= 2.2.5)
18
+ drb
19
+ i18n (>= 1.6, < 2)
20
+ minitest (>= 5.1)
21
+ mutex_m
22
+ tzinfo (~> 2.0)
18
23
  ast (2.4.1)
19
- concurrent-ruby (1.1.7)
24
+ base64 (0.1.1)
25
+ bigdecimal (3.1.5)
26
+ concurrent-ruby (1.2.2)
27
+ connection_pool (2.4.1)
20
28
  diff-lcs (1.4.4)
21
- i18n (1.8.5)
29
+ drb (2.2.0)
30
+ ruby2_keywords
31
+ i18n (1.14.1)
22
32
  concurrent-ruby (~> 1.0)
23
- minitest (5.14.2)
33
+ minitest (5.20.0)
34
+ mutex_m (0.2.0)
24
35
  parallel (1.20.1)
25
36
  parser (2.7.2.0)
26
37
  ast (~> 2.4.1)
27
38
  rainbow (3.0.0)
28
39
  rake (12.3.3)
29
40
  regexp_parser (2.0.0)
30
- rexml (3.2.4)
41
+ rexml (3.2.5)
31
42
  rspec (3.10.0)
32
43
  rspec-core (~> 3.10.0)
33
44
  rspec-expectations (~> 3.10.0)
@@ -53,11 +64,10 @@ GEM
53
64
  rubocop-ast (1.3.0)
54
65
  parser (>= 2.7.1.5)
55
66
  ruby-progressbar (1.10.1)
56
- thread_safe (0.3.6)
57
- tzinfo (1.2.8)
58
- thread_safe (~> 0.1)
67
+ ruby2_keywords (0.0.5)
68
+ tzinfo (2.0.6)
69
+ concurrent-ruby (~> 1.0)
59
70
  unicode-display_width (1.7.0)
60
- zeitwerk (2.4.2)
61
71
 
62
72
  PLATFORMS
63
73
  ruby
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,14 @@ 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.2]
9
+
10
+ - Update ActiveSupport to fix multiple CVE
11
+
12
+ ## [0.6.1]
13
+
14
+ - Fix Rexml vulnerabilities
15
+
8
16
  ## [0.6.0]
9
17
 
10
18
  - Add validation for bank field that not accept special char
@@ -5,8 +5,6 @@ module SwissBankValidator
5
5
  IBAN_LENGTH = 21
6
6
 
7
7
  # Regex that allow only field accepted by Swiss bank to initiate a payment
8
- # rubocop:disable Style/RedundantRegexpEscape
9
- BANK_REGEX = %r{\A[a-zA-Z0-9\.\,\;\:\’\+\-\(\)\?\*\[\]\{\}\`\´\~\'\s\!\“#%÷=@_$£àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏ
10
- ÒÓÔÖÙÚÛÜÑ]*\z}.freeze
11
- # rubocop:enable Style/RedundantRegexpEscape
8
+ BANK_REGEX = %r{\A[a-zA-Z0-9.,;:’+\-()?*\[\]{}`´~'\s!“#%÷=@_$£
9
+ àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏÒÓÔÖÙÚÛÜÑ]*\z}x.freeze
12
10
  end
@@ -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.2'
5
5
  end
@@ -27,7 +27,8 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ['lib']
29
29
 
30
- spec.add_dependency 'activemodel', '~> 6.0'
30
+ spec.add_dependency 'activemodel', '>= 6.1.7.6'
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,29 +1,43 @@
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - QoQa dev Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-03 00:00:00.000000000 Z
11
+ date: 2024-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 6.1.7.6
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 6.1.7.6
27
+ - !ruby/object:Gem::Dependency
28
+ name: rexml
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - "~>"
18
32
  - !ruby/object:Gem::Version
19
- version: '6.0'
33
+ version: 3.2.5
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
38
  - - "~>"
25
39
  - !ruby/object:Gem::Version
26
- version: '6.0'
40
+ version: 3.2.5
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rspec
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,7 +66,7 @@ dependencies:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
68
  version: '1.5'
55
- description:
69
+ description:
56
70
  email:
57
71
  - dev@qoqa.com
58
72
  executables: []
@@ -88,7 +102,7 @@ metadata:
88
102
  homepage_uri: https://github.com/qoqa/swiss_bank_validator
89
103
  source_code_uri: https://github.com/qoqa/swiss_bank_validator
90
104
  changelog_uri: https://github.com/qoqa/swiss_bank_validator/main/changelog.md
91
- post_install_message:
105
+ post_install_message:
92
106
  rdoc_options: []
93
107
  require_paths:
94
108
  - lib
@@ -103,8 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
117
  - !ruby/object:Gem::Version
104
118
  version: '0'
105
119
  requirements: []
106
- rubygems_version: 3.1.4
107
- signing_key:
120
+ rubygems_version: 3.4.10
121
+ signing_key:
108
122
  specification_version: 4
109
123
  summary: All you need to validate a Swiss Iban
110
124
  test_files: []