ibanvalidator 0.1.3 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5b2772a3fa9f13eaab3ed001c23139494403649
4
- data.tar.gz: 58315bd4c85ffa6fa8f8e0f6d0f0655b30d0cedc
3
+ metadata.gz: c71abec60c5af64bf945ff6969d57ebae0b3c17e
4
+ data.tar.gz: 2da9e29e64f2ed2cdcb9c187600e41c852c6679f
5
5
  SHA512:
6
- metadata.gz: a44ccca6b26456d2a872480723a9cc089c8c8e746dc522759f268ccffc8c0fd1587fc15f6ceb7c8754a59d4a0f3e3635176bffe91facdaea2b0e93bf40c533fb
7
- data.tar.gz: 782d8ccbcc97d2b5d335edef8cd9ed8e1b1699ea9d6c3eb2ed16a86d151364c8e6ece62d056889bc31d6780bbe94536eabece0e993672ae252bd5601e989f0aa
6
+ metadata.gz: a630d06a3eef1d1bfbee771dde29ead7f42d9b764dd72fb07bf6001dc1c24bc6963f4d43d199878770be5e91bd8a291d40b41a1e9fde2776adfec1c636f36b90
7
+ data.tar.gz: 0fe35e47016615b9ce8f323607e5e5a6e4c05be28e4ff1dd9c70f299241ff541d7ef5cec0497b74d4d5ea868fa714c5af2f9b2cc9ff5c4b0fb75930e3f925ed7
data/README.md CHANGED
@@ -40,11 +40,12 @@ Or install it yourself as:
40
40
  iban.prettify => "DE89 3704 0044 0532 0130 00"
41
41
 
42
42
 
43
- Ibanvalidator.rules, liefert alle IBAN Regeln
43
+ Ibanvalidator.default_rules, liefert alle IBAN Regeln
44
44
  **Ibanvalidator.rule_countries**, liefert ein Array mit allen Ländern für die eine Rule hinterlegt ist
45
45
  => ["AD", "AE", "AL", "AT", "AZ", "BA", "BE", "BG", "BH", "BR", "CH", "CY", "CZ", "DE", "DK", "DO", "EE", "ES", "FI", "FO", "FR", "GB", "GE", "GI", "GL", "GR", "HR", "HU", "IE", "IL", "IS", "IT", "JO", "KW", "KZ", "LB", "LI", "LT", "LU", "LV", "MC", "MD", "ME", "MK", "MR", "MT", "MU", "NL", "NO", "PK", "PL", "PT", "PS", "QA", "RO", "RS", "SA", "SE", "SI", "SK", "SM", "TN", "TR", "UA", "VG"]
46
46
 
47
47
 
48
+
48
49
  ## Development
49
50
 
50
51
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,18 +1,15 @@
1
1
  require 'active_support'
2
2
  require 'active_support/core_ext'
3
- require 'yaml'
4
3
  require "ibanvalidator/version"
5
4
  require 'ibanvalidator/conversion.rb'
6
5
  require 'ibanvalidator/iban.rb'
7
6
  require 'ibanvalidator/iban_rules.rb'
8
- require 'ibanvalidator/iban_rules.rb'
9
-
10
7
 
11
8
  module Ibanvalidator
12
- mattr_accessor :default_rules
13
- mattr_accessor :rule_countries
14
- mattr_accessor :default_conversions
15
- mattr_accessor :default_conversion_countries
9
+ mattr_accessor :default_rules #all rules from yaml file 'rules'
10
+ mattr_accessor :rule_countries ##country_keys from default_rules
11
+ mattr_accessor :default_conversions ##all rules from yaml file 'conversion_rules'
12
+ mattr_accessor :default_conversion_countries #country_keys from default_conversions
16
13
 
17
14
 
18
15
  #falls noch nciht gesetzt zb in einem initializer.....
@@ -25,7 +22,6 @@ module Ibanvalidator
25
22
  Ibanvalidator.default_conversions = YAML.load_file(File.join(File.dirname(__FILE__), '/ibanvalidator', 'conversion_rules.yml'))
26
23
  end
27
24
 
28
-
29
25
  Ibanvalidator.rule_countries = (Ibanvalidator.rule_countries || Ibanvalidator.default_rules.keys)
30
26
  Ibanvalidator.default_conversion_countries = (Ibanvalidator.default_conversion_countries || Ibanvalidator.default_conversions.keys)
31
27
 
@@ -137,6 +137,13 @@
137
137
  bank_code: 4!a
138
138
  account_number: 15!c
139
139
 
140
+ 'GT':
141
+ # Guatemala https://bank.codes/iban/structure/guatemala/
142
+ bank_code: 4!a
143
+ currency: 2!n
144
+ account_type: 2!n
145
+ account_number: 16!c
146
+
140
147
  'GL':
141
148
  bank_code: 4!n
142
149
  account_number: 10!n
@@ -335,3 +342,6 @@
335
342
  'VG':
336
343
  bank_code: 4!c
337
344
  account_number: 16!n
345
+ 'XK':
346
+ bank_code: 4!c
347
+ account_number: 12!n
@@ -130,6 +130,11 @@
130
130
  length: 27
131
131
  bban_pattern: '\d{7}[A-Z0-9]{16}'
132
132
 
133
+ 'GT':
134
+ # Guatemala https://bank.codes/iban/structure/guatemala/
135
+ length: 28
136
+ bban_pattern: '[A-Z]{4}\d{20}'
137
+
133
138
  'HR':
134
139
  # Croatia
135
140
  length: 21
@@ -324,3 +329,7 @@
324
329
  # Virgin Islands
325
330
  length: 24
326
331
  bban_pattern: '[A-Z0-9]{4}\d{16}'
332
+ 'XK':
333
+ # Kosovo https://bank.codes/iban/structure/kosovo/
334
+ length: 20
335
+ bban_pattern: '\d{16}'
@@ -1,3 +1,3 @@
1
1
  module Ibanvalidator
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibanvalidator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olaf Kaderka