bank-contact 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -11
- data/data/iban.yml +6 -0
- data/lib/bank/version.rb +1 -1
- data/spec/iban_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e66150ba536a54d8dafcbb22ceb5894e5625f3f
|
4
|
+
data.tar.gz: d1b035d4d7e2c8bcad79826156f630a3892e798e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75b81dceae02c2112f17d97700141901904dce575802cabd5dcf653d6ab8a7421631b63138e3e953c3aac56f89b6a011bc0267642db39f7357ba5c8eda8d6032
|
7
|
+
data.tar.gz: 8532b5e956c0d5fd8d2e8350ae06a0100532bd824cd4ced9768c2bd45232c179a1689bbaee2dff3b268ed350dab78bc08804cd035e82a5affef4e1ecdcb9af2a
|
data/README.md
CHANGED
@@ -58,12 +58,13 @@ or as ActiveModel Validator (make sure you have 'active_model' in your Gemfile)
|
|
58
58
|
require 'bank/bic'
|
59
59
|
|
60
60
|
bic = Bank::BIC.new('BYLADEM1203')
|
61
|
-
bic.bank_code
|
62
|
-
bic.country_code
|
63
|
-
bic.location_code
|
64
|
-
bic.branch_code
|
65
|
-
bic.to_s
|
66
|
-
bic.
|
61
|
+
bic.bank_code # "BYLA"
|
62
|
+
bic.country_code # "DE"
|
63
|
+
bic.location_code # "M1"
|
64
|
+
bic.branch_code # "203"
|
65
|
+
bic.to_s # "BYLADEM1203"
|
66
|
+
bic.to_s(true) # "BYLA DE M1 203"
|
67
|
+
bic.valid? # true
|
67
68
|
|
68
69
|
or as ActiveModel Validator (make sure you have 'active_model' in your Gemfile)
|
69
70
|
|
@@ -79,11 +80,11 @@ or as ActiveModel Validator (make sure you have 'active_model' in your Gemfile)
|
|
79
80
|
|
80
81
|
# paramters: IBAN, BIC
|
81
82
|
contact = Bank::Contact.new('DE89 3704 0044 0532 0130 00', 'BYLADEM1203')
|
82
|
-
contact.iban
|
83
|
-
contact.bic
|
84
|
-
contact.to_h
|
85
|
-
contact.to_a
|
86
|
-
contact.valid?
|
83
|
+
contact.iban # <Bank::IBAN...>
|
84
|
+
contact.bic # <Bank::BIC...>
|
85
|
+
contact.to_h # {:iban=>"DE89370400440532013000", :bic=>"BYLADEM1203"}
|
86
|
+
contact.to_a # ["DE89370400440532013000", "BYLADEM1203"]
|
87
|
+
contact.valid? # true
|
87
88
|
|
88
89
|
|
89
90
|
## Contributing
|
data/data/iban.yml
CHANGED
@@ -213,6 +213,12 @@ kz: # Kazakhstan
|
|
213
213
|
(?<bank_identifier> \d{3})
|
214
214
|
(?<account_number> [A-Z0-9]{13})
|
215
215
|
|
216
|
+
xk: # Republic of Kosovo
|
217
|
+
length: 20
|
218
|
+
regexp: >
|
219
|
+
(?<bank_identifier> \d{4})
|
220
|
+
(?<account_number> \d{12})
|
221
|
+
|
216
222
|
kw: # Kuwait
|
217
223
|
length: 30
|
218
224
|
regexp: >
|
data/lib/bank/version.rb
CHANGED
data/spec/iban_spec.rb
CHANGED
@@ -138,7 +138,8 @@ describe Bank::IBAN do
|
|
138
138
|
'SN12K00100152000025690007542',
|
139
139
|
'TN5914207207100707129648',
|
140
140
|
'TR330006100519786457841326',
|
141
|
-
'AE260211000000230064016'
|
141
|
+
'AE260211000000230064016',
|
142
|
+
'XK051212012345678906',
|
142
143
|
].each do |code|
|
143
144
|
describe code do
|
144
145
|
it 'should be valid' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bank-contact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|