iso-iban 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/iso-iban.gemspec +1 -1
- data/lib/iso/iban.rb +5 -2
- data/lib/iso/iban/version.rb +1 -1
- data/test/unit/lib/iso/iban.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dab7b32e738763d4edd921bb3a9f32555105f51
|
4
|
+
data.tar.gz: 8d98494b70cb198d78130acf0dc259cb5b9c3a4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da2844427c7e2766c23f510604495ac90d9700b43874c45e91df9bce081aac5eb3e179f5c5a52880f85d655a9df36204c284b39906d0f6f889104760101abe54
|
7
|
+
data.tar.gz: 607166d6cb2757c9ca185460e7842c28eaa655a70b8cc2a5af45f29d100a74c6cfb449859f44826ebd467eaa154375d86125ef0d8ba8f0adfce7dc1e231324df
|
data/iso-iban.gemspec
CHANGED
data/lib/iso/iban.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'iso/iban/specification'
|
4
4
|
require 'iso/iban/version'
|
5
|
+
require 'yaml'
|
5
6
|
|
6
7
|
module ISO
|
7
8
|
|
@@ -247,7 +248,7 @@ module ISO
|
|
247
248
|
# IBAN in its numeric form, i.e. all characters a-z are replaced with their corresponding
|
248
249
|
# digit sequences.
|
249
250
|
def numeric
|
250
|
-
self.class.numerify(@compact[4..-1]+@compact[0,4])
|
251
|
+
@compact.size < 5 ? nil : self.class.numerify(@compact[4..-1]+@compact[0,4])
|
251
252
|
end
|
252
253
|
|
253
254
|
# @return [true, false]
|
@@ -330,7 +331,9 @@ module ISO
|
|
330
331
|
|
331
332
|
# @return [true, false] Whether the checksum of the IBAN is valid.
|
332
333
|
def valid_checksum?
|
333
|
-
|
334
|
+
numerified = numeric()
|
335
|
+
|
336
|
+
numerified && (numerified % 97 == 1)
|
334
337
|
end
|
335
338
|
|
336
339
|
# See Object#<=>
|
data/lib/iso/iban/version.rb
CHANGED
data/test/unit/lib/iso/iban.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iso-iban
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Rusterholz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |-
|
14
14
|
ISO::IBAN implements IBAN (International Bank Account Number) specification as per ISO 13616-1.
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
version: 1.3.1
|
54
54
|
requirements: []
|
55
55
|
rubyforge_project:
|
56
|
-
rubygems_version: 2.
|
56
|
+
rubygems_version: 2.1.5
|
57
57
|
signing_key:
|
58
58
|
specification_version: 3
|
59
59
|
summary: Utilities for International Bank Account Numbers (IBAN) as per ISO 13616-1.
|