iban_bic 1.4.4 → 1.4.5

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
- SHA256:
3
- metadata.gz: dadcecd0c6f5eab68d8c3eef535e241dca26b721be4f042ef6a8195e1d064edc
4
- data.tar.gz: 14037577140c4e14bb4022bb0343e3443c7b981e548219b469d204e0a370e583
2
+ SHA1:
3
+ metadata.gz: f2651f4f3ff003d3c6e37078d480f835358165dd
4
+ data.tar.gz: cd2a59c0312bc577ff3f569c3de46b65f0025257
5
5
  SHA512:
6
- metadata.gz: 456f725f7ad7f0669cc56c35413d101139e703044ef589b46b3303ffcadeb17d7fe8791bf8939121d3021b2d4aaaf5b3c0cb73ee935d62c8ec1155f8ee77b623
7
- data.tar.gz: 85f51082cd8d0100ffd64ae05e905eb8e143daad3fe1cf408a05302a7b5de33f6d7e588cfa5ada747ba4afb71c77006904ec95fe48acbbce5259e0cce4fadd7f
6
+ metadata.gz: 331416989965fa9b86b67f362e56aff8e84eda9830be2a3b81223b503ae4440ef90b1e582cd23df1153f0eb05fc338f11b070a44129a9f9e5439a1bedbc15242
7
+ data.tar.gz: 4bd37ec79d8a815369e41d044f159a466cce55376eeb18ff795e339602e33374caa1abf887a45b04700c9f810dda5c1118bdb53bf4e5b5be90a821be605e42bd
data/README.md CHANGED
@@ -47,52 +47,52 @@ validates :bic, bic: { country: :pais }
47
47
  3. IBAN control digits calculation
48
48
 
49
49
  ```ruby
50
- 2.4.1 :001 > IbanBic.calculate_check("ES0000030000300000000000")
50
+ IbanBic.calculate_check("ES0000030000300000000000")
51
51
  => 87
52
52
  ```
53
53
 
54
54
  4. IBAN parsing
55
55
 
56
56
  ```ruby
57
- 2.4.1 :001 > IbanBic.parse("ES8700030000300000000000")
57
+ IbanBic.parse("ES8700030000300000000000")
58
58
  => {"country"=>"ES", "iban_check"=>"87", "bank"=>"0003", "branch"=>"0000", "check"=>"30", "account"=>"0000000000"}
59
59
  ```
60
60
 
61
61
  5. IBAN fixing (IBAN control digits and country control digits, if that code is available)
62
62
 
63
63
  ```ruby
64
- 2.4.1 :001 > IbanBic.fix("ES0000030000200000000000")
64
+ IbanBic.fix("ES0000030000200000000000")
65
65
  => "ES8700030000300000000000"
66
66
  ```
67
67
 
68
68
  6. BIC calculation (bank code must be in the static file or in the database)
69
69
 
70
70
  ```ruby
71
- 2.4.1 :001 > IbanBic.calculate_bic("ES8700030000300000000000")
71
+ IbanBic.calculate_bic("ES8700030000300000000000")
72
72
  => "BDEPESM1XXX"
73
73
  ```
74
74
 
75
75
  7. Pattern generation for SQL LIKE queries.
76
76
 
77
77
  ```ruby
78
- 2.4.1 :001 > IbanBic.like_pattern("ES8700030000300000000000", :country, :bank)
78
+ IbanBic.like_pattern("ES8700030000300000000000", :country, :bank)
79
79
  => "ES__0003________________"
80
- 2.4.1 :002 > IbanBic.like_pattern_from_parts(country: "ES", bank: "0003")
80
+ IbanBic.like_pattern_from_parts(country: "ES", bank: "0003")
81
81
  => "ES__0003________________"
82
82
  ```
83
83
 
84
84
  8. Random IBAN generation
85
85
 
86
86
  ```ruby
87
- 2.4.1 :001 > require "iban_bic/random"
87
+ require "iban_bic/random"
88
88
  => true
89
- 2.4.1 :002 > IbanBic.random_iban
89
+ IbanBic.random_iban
90
90
  => "MU52BOIR2768144336487102000AWQ"
91
- 2.4.1 :003 > IbanBic.random_iban country: "ES"
91
+ IbanBic.random_iban country: "ES"
92
92
  => "ES6111051493192369291292"
93
- 2.4.1 :004 > IbanBic.random_iban tags: [:sepa]
93
+ IbanBic.random_iban tags: [:sepa]
94
94
  => "FI5584518206233159"
95
- 2.4.1 :005 > IbanBic.random_iban not_tags: [:sepa]
95
+ IbanBic.random_iban not_tags: [:sepa]
96
96
  => "IL317532867920826062774"
97
97
  ```
98
98
 
@@ -4,8 +4,8 @@ module IbanBic
4
4
  class Configuration
5
5
  attr_accessor :iban_meta_path, :use_static_bics, :bics_table_name, :static_bics_path
6
6
 
7
- def add(country)
8
- IbanBic.country_validators[country] = Proc.new
7
+ def add(country, &block)
8
+ IbanBic.country_validators[country] = block
9
9
  end
10
10
 
11
11
  def static_bics?
data/lib/iban_bic/core.rb CHANGED
@@ -15,8 +15,8 @@ module IbanBic
15
15
  @configuration ||= Configuration.new
16
16
  end
17
17
 
18
- def configure
19
- configuration.instance_eval(&Proc.new)
18
+ def configure(&block)
19
+ configuration.instance_eval(&block)
20
20
  end
21
21
 
22
22
  def parse(iban)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IbanBic
4
- VERSION = "1.4.4"
4
+ VERSION = "1.4.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iban_bic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonardo Diez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-03 00:00:00.000000000 Z
11
+ date: 2021-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '5.1'
19
+ version: '6.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '5.1'
26
+ version: '6.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: regexp-examples
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,42 +72,42 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.6'
75
+ version: '5.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.6'
82
+ version: '5.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.54.0
89
+ version: 0.63.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.54.0
96
+ version: 0.63.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sqlite3
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '1.3'
103
+ version: 1.4.2
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '1.3'
110
+ version: 1.4.2
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: virtus
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  version: '0'
170
170
  requirements: []
171
171
  rubyforge_project:
172
- rubygems_version: 2.7.7
172
+ rubygems_version: 2.5.2.1
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: IBAN and BIC tools for Rails applications