bicvalidator 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +98 -0
- data/Rakefile +6 -0
- data/bicvalidator.gemspec +50 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/bicvalidator.rb +159 -0
- data/lib/bicvalidator/version.rb +3 -0
- metadata +128 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c1c4948e91746bcb124c9d33372fda62cbbc8a50
|
4
|
+
data.tar.gz: 3f3c9a92e6ddbc64f51f083173c93d0698c8e864
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6d8faf6aec2ea70def953d1cce0690c95624b25308a48c44dcf70a011e96d71aedc0fbb4a3653bf066f3479f4f9c8a88ed80411af44660b714468f26eb2bd959
|
7
|
+
data.tar.gz: ac67c7a192dd9a59cb068651c6339c0ba6146dd2300f8791c75946abf35498607a042a50fbb051ea674017d0f07093b4539dc2dff091258d5f8d63770bb18f7e
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at TODO: Write your email address. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 TODO: Write your name
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
# Bicvalidator
|
2
|
+
Mit dem BicValidator kann man eine Validitäsprüfung und Korrektur (Leerzeichen, Groß/Kleinschreibung) von übergebenen BIC werten durchführen um diese zu prüfen bevor man diese weiterverarbeitet.
|
3
|
+
Neben der Länge des Codes und den möglichen Ländercodes kann man auch überprüfen ob das Land der BIC (4+5 Stelle) am SepaSchema teilnimmt.
|
4
|
+
Optional kann man den Check auch ausstellen.
|
5
|
+
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Das muss ins Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'bicvalidator',:git => 'https://github.com/olafkaderka/bicvalidator.git', :branch => 'master'
|
13
|
+
```
|
14
|
+
|
15
|
+
Und dann ausführen:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
### Sepa-Ländercodesänderung (falls gewünscht)
|
22
|
+
Man kann die standardmäßig vorgegebenen Ländercodes die zum Separaum gehören überschreiben z.b. in einem Rails initializer.
|
23
|
+
Zur Zeit wird dieser Wert standardmäßig gesetzt auf alle Länder gemäß [dieser Liste](https://wiki.xmldation.com/Support/EPC/List_of_SEPA_countries).
|
24
|
+
|
25
|
+
In den Bics sind mehr Länder als in den IBANS, denn die französischen und englischen Kolonien haben gemaess BIC einen eigenen Ländercode , in der IBAN aber nicht.
|
26
|
+
* ["GF","GP","GG","IM","JE","MQ","YT","RE","BL","MF","PM", "PF", "TF", "NC","WF"] sind die Ländercodes der Kolonien.
|
27
|
+
|
28
|
+
* **Bicvalidator.sepa_bic_countries = []**
|
29
|
+
|
30
|
+
### Instanz Initialisierung
|
31
|
+
**Bicvalidator::Validate.new(options={})**
|
32
|
+
|
33
|
+
Das Objekt erwartet nur einen Parameter options als hash in dem man die möglichen vorhanden Wert übergeben kann
|
34
|
+
* **:bic_code** String mit dem BicCode
|
35
|
+
* **:bic_bankcode** String lokale BLZ des Landes, (Land muss dann auch kommen)
|
36
|
+
* **:bic_country** String ISO 3166-1 alpha-2 (2 Stellig)
|
37
|
+
* **:sepa_country_check** true/false soll direkt überprüft werden ob das land im Separaum ist. **default => true**
|
38
|
+
|
39
|
+
Alle übergeben Werte werden automatsich korrigiert falls möglich (Gross/Klein, Leerzeichen entfernt)
|
40
|
+
Das Object hat dann folgende Attribute auf die man zugreifen kann:
|
41
|
+
* **:errorcode, :bic_bankcode, :bic_code, :bic_country, :sepa_country**
|
42
|
+
|
43
|
+
### Beipiele
|
44
|
+
**bv = Bicvalidator::Validate.new({:bic_code => " GENODEM 1A HL "})**
|
45
|
+
* bv.bic_code => "GENODEM1AHL"
|
46
|
+
* bv.bic_country => "DE"
|
47
|
+
* bv.errorcode => nil
|
48
|
+
* bv.sepa_country => true
|
49
|
+
|
50
|
+
**bv = Bicvalidator::Validate.new({:bic_code => "GENNAEXS"})**
|
51
|
+
* bv.bic_code => "GENNAEXS"
|
52
|
+
* bv.bic_country => "AE"
|
53
|
+
* bv.errorcode => "BV0026" (Kein SEPA Land)
|
54
|
+
* bv.sepa_country => false
|
55
|
+
|
56
|
+
**bv = Bicvalidator::Validate.new({:bic_code => "GENNAEXS", :sepa_country_check => false})**
|
57
|
+
* bv.bic_code => "GENNAEXS"
|
58
|
+
* bv.bic_country => "AE"
|
59
|
+
* bv.errorcode => nil
|
60
|
+
* bv.sepa_country => false
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
### Errorcodes
|
65
|
+
|
66
|
+
* "BV0000": BicValidator keine Werte zum überprüfen
|
67
|
+
* "BV0010": BIC ungültige Zeichen
|
68
|
+
* "BV0011": BIC ungültige Länge
|
69
|
+
* "BV0020": BIC Land ungültige Zeichen
|
70
|
+
* "BV0021": BIC Land ungültige Länge
|
71
|
+
* "BV0025": BIC Land unbekannt
|
72
|
+
* "BV0026": BIC Land Kein SEPA Land
|
73
|
+
* "BV0030": BIC Bankcode ohne Land
|
74
|
+
* "BV0032": BIC Bankcode undgültige Zeichen (allgemein)
|
75
|
+
* "BV0040": BIC Bankcode ungültig (länderspezfisch)
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
### Tests per Rspec
|
80
|
+
bundle exec rspec spec
|
81
|
+
|
82
|
+
## Development
|
83
|
+
|
84
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
85
|
+
|
86
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
87
|
+
|
88
|
+
## Contributing
|
89
|
+
|
90
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/olafkaderka/bicvalidator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
91
|
+
|
92
|
+
## License
|
93
|
+
|
94
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
95
|
+
|
96
|
+
## Code of Conduct
|
97
|
+
|
98
|
+
Everyone interacting in the Bicvalidator project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/olafkaderka/bicvalidator/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "bicvalidator/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "bicvalidator"
|
8
|
+
spec.version = Bicvalidator::VERSION
|
9
|
+
spec.authors = ["Olaf Kaderka"]
|
10
|
+
spec.email = ["okaderka@yahoo.de"]
|
11
|
+
|
12
|
+
spec.summary = %q{Klasse um BICS auf Konsistenz zur validieren}
|
13
|
+
spec.description = %q{prüft den Ländercode und die Zugehörigkeit zum SepaSchema}
|
14
|
+
spec.homepage = "https://github.com/olafkaderka/bicvalidator/"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
21
|
+
else
|
22
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
+
"public gem pushes."
|
24
|
+
end
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
34
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
35
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
36
|
+
|
37
|
+
|
38
|
+
#for mattr_accessor, reverse_merge
|
39
|
+
spec.add_dependency "activesupport", '~> 4.0'
|
40
|
+
|
41
|
+
#laender
|
42
|
+
#Countries is a collection of all sorts of useful information for every country in the ISO 3166 standard.
|
43
|
+
#It contains info for the following standards ISO3166-1 (countries),
|
44
|
+
#ISO3166-2 (states/subdivisions), ISO4217 (currency) and E.164 (phone numbers)
|
45
|
+
#https://github.com/hexorx/countries
|
46
|
+
spec.add_dependency "countries", '~> 2.1'
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "bicvalidator"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/bicvalidator.rb
ADDED
@@ -0,0 +1,159 @@
|
|
1
|
+
require "bicvalidator/version"
|
2
|
+
require 'active_support'
|
3
|
+
require 'active_support/core_ext'
|
4
|
+
#brauch ich fuer laendercodes ISO3166::Country
|
5
|
+
require 'countries'
|
6
|
+
|
7
|
+
module Bicvalidator
|
8
|
+
#mattr_accessor kommt aus active_support/core_ext'
|
9
|
+
mattr_accessor :sepa_bic_countries
|
10
|
+
|
11
|
+
##https://wiki.xmldation.com/Support/EPC/List_of_SEPA_countries
|
12
|
+
#kann ich somit in einem initailizer wieder ueberschreiben
|
13
|
+
Bicvalidator.sepa_bic_countries = ["AT", "BE", "BG", "CH", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "GR", "HR", "HU", "IE", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK", "SM", "GI", "GF", "GP", "GG", "IS", "IM", "JE", "MQ", "YT", "RE", "BL", "MF", "PM"]
|
14
|
+
|
15
|
+
|
16
|
+
class Validate
|
17
|
+
attr_accessor :errorcode, :bic_bankcode, :bic_code, :bic_country, :sepa_country
|
18
|
+
|
19
|
+
def initialize(options={})
|
20
|
+
default_options = {
|
21
|
+
:bic_code => nil,
|
22
|
+
:bic_bankcode => nil,
|
23
|
+
:bic_country => nil,
|
24
|
+
:sepa_country_check => true,
|
25
|
+
}
|
26
|
+
@options = options.reverse_merge(default_options)
|
27
|
+
@errorcode = nil
|
28
|
+
@sepa_country = false
|
29
|
+
self.start_validation
|
30
|
+
end
|
31
|
+
|
32
|
+
def start_validation
|
33
|
+
#hier muss auch = "" abgefangen werden, daher check mit blank?
|
34
|
+
@bic_code = @options[:bic_code].blank? ? nil : @options[:bic_code]
|
35
|
+
@bic_bankcode = @options[:bic_bankcode].blank? ? nil : @options[:bic_bankcode]
|
36
|
+
@bic_country = @options[:bic_country].blank? ? nil : @options[:bic_country]
|
37
|
+
|
38
|
+
|
39
|
+
if [@bic_code,@bic_bankcode,@bic_country].all? {|x| x.nil?}
|
40
|
+
@errorcode = "BV0000"
|
41
|
+
return
|
42
|
+
end
|
43
|
+
|
44
|
+
@sepa_country_check = @options[:sepa_country_check]
|
45
|
+
|
46
|
+
if @bic_code
|
47
|
+
#strip reicht nicht denn strip entfernt nur leerzeichen vorne und hinten
|
48
|
+
@bic_code = self.canonicalize_str(@bic_code)
|
49
|
+
|
50
|
+
#invalid character
|
51
|
+
if (@bic_code =~ /^[A-Z0-9]+$/).nil?
|
52
|
+
@bic_code = nil
|
53
|
+
@errorcode = "BV0010"
|
54
|
+
return
|
55
|
+
end
|
56
|
+
|
57
|
+
#muss 8 oder 11 stellen haben
|
58
|
+
case @bic_code.length
|
59
|
+
when 8
|
60
|
+
#wir furllen immer mit XXX auf 11 Stellen auf
|
61
|
+
@bic_code = "#{@bic_code}XXX"
|
62
|
+
when 11
|
63
|
+
|
64
|
+
else
|
65
|
+
@bic_code = nil
|
66
|
+
@errorcode = "BV0011"
|
67
|
+
return
|
68
|
+
end
|
69
|
+
#wir setzen bic_country auf die 4+5 Stelle des der BIC
|
70
|
+
@bic_country = @bic_code[4..5]
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
#egal ob durch biccode gesetzt oder das land ubergeben wurde immer st checkn ob da was geht
|
75
|
+
if @bic_country
|
76
|
+
#strip reicht nicht denn strip entfernt nur leerzeichen vorne und hinten
|
77
|
+
@bic_country = self.canonicalize_str(@bic_country)
|
78
|
+
|
79
|
+
if @bic_country.length != 2
|
80
|
+
@bic_country = nil
|
81
|
+
@errorcode = "BV0020"
|
82
|
+
return
|
83
|
+
end
|
84
|
+
if (@bic_country =~ /^[A-Z]+$/).nil?
|
85
|
+
@bic_country = nil
|
86
|
+
@errorcode = "BV0021"
|
87
|
+
return
|
88
|
+
end
|
89
|
+
|
90
|
+
#gibts das land uberhaupt zb wenn ZZ kommt
|
91
|
+
if ISO3166::Country.new("#{@bic_country}").nil?
|
92
|
+
@bic_country = nil
|
93
|
+
@errorcode = "BV0025"
|
94
|
+
return
|
95
|
+
end
|
96
|
+
|
97
|
+
if Bicvalidator.sepa_bic_countries.include? @bic_country
|
98
|
+
@sepa_country = true
|
99
|
+
end
|
100
|
+
|
101
|
+
if @sepa_country_check and !@sepa_country
|
102
|
+
@errorcode = "BV0026"
|
103
|
+
return
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
107
|
+
|
108
|
+
if @bic_bankcode
|
109
|
+
|
110
|
+
if !@bic_country
|
111
|
+
#bankcode ohne land geht nicht
|
112
|
+
@errorcode = "BV0030"
|
113
|
+
return
|
114
|
+
end
|
115
|
+
|
116
|
+
#strip reicht nicht denn strip entfernt nur leerzeichen vorne und hinten
|
117
|
+
@bic_bankcode = self.canonicalize_str(@bic_bankcode)
|
118
|
+
|
119
|
+
#es duerfen nur A-Z und 0-9 kommne, keine Sonderzeichen
|
120
|
+
if (@bic_bankcode =~ /^[A-Z0-9]+$/).nil?
|
121
|
+
@bic_bankcode = nil
|
122
|
+
@errorcode = "BV0032"
|
123
|
+
return
|
124
|
+
end
|
125
|
+
|
126
|
+
return if !["DE","AT","ES","CH"].include? @bic_country
|
127
|
+
|
128
|
+
#kontonummer in DE 8 stellig
|
129
|
+
case @bic_country
|
130
|
+
when "AT","CH"
|
131
|
+
#kontonummer in AT 5 stellig Zahlen
|
132
|
+
rule = '^[0-9]{5}$'
|
133
|
+
when "DE","ES"
|
134
|
+
#kontonummer in DE 8 stellig Zahlen
|
135
|
+
rule = '^[0-9]{8}$'
|
136
|
+
end
|
137
|
+
|
138
|
+
if regexp = Regexp.new(rule).match(@bic_bankcode)
|
139
|
+
#hat er gefunden
|
140
|
+
else
|
141
|
+
@bic_bankcode = nil
|
142
|
+
@errorcode = "BV0040"
|
143
|
+
return
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
|
148
|
+
|
149
|
+
end
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
def canonicalize_str(str)
|
154
|
+
str.strip.gsub(/\s+/, '').upcase
|
155
|
+
end
|
156
|
+
|
157
|
+
end
|
158
|
+
|
159
|
+
end
|
metadata
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bicvalidator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Olaf Kaderka
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-10-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: activesupport
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '4.0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '4.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: countries
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.1'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.1'
|
83
|
+
description: prüft den Ländercode und die Zugehörigkeit zum SepaSchema
|
84
|
+
email:
|
85
|
+
- okaderka@yahoo.de
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".travis.yml"
|
93
|
+
- CODE_OF_CONDUCT.md
|
94
|
+
- Gemfile
|
95
|
+
- LICENSE.txt
|
96
|
+
- README.md
|
97
|
+
- Rakefile
|
98
|
+
- bicvalidator.gemspec
|
99
|
+
- bin/console
|
100
|
+
- bin/setup
|
101
|
+
- lib/bicvalidator.rb
|
102
|
+
- lib/bicvalidator/version.rb
|
103
|
+
homepage: https://github.com/olafkaderka/bicvalidator/
|
104
|
+
licenses:
|
105
|
+
- MIT
|
106
|
+
metadata:
|
107
|
+
allowed_push_host: https://rubygems.org
|
108
|
+
post_install_message:
|
109
|
+
rdoc_options: []
|
110
|
+
require_paths:
|
111
|
+
- lib
|
112
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
requirements: []
|
123
|
+
rubyforge_project:
|
124
|
+
rubygems_version: 2.6.13
|
125
|
+
signing_key:
|
126
|
+
specification_version: 4
|
127
|
+
summary: Klasse um BICS auf Konsistenz zur validieren
|
128
|
+
test_files: []
|