ibandit 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/ibandit/iban.rb +3 -3
- data/lib/ibandit/version.rb +1 -1
- data/spec/ibandit/iban_spec.rb +27 -0
- 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: d98d0e6148aa8b276eb107e70a0fa9967b0720dd
|
4
|
+
data.tar.gz: 8102f44a3a4dfabb24658cc5ff9e5a9efea2ec45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0f2f4de753002a818d09e09004708747bd80584bb4c1211d236b1ebc31d31425bc44c5d04c8fd1b8b20d5af7e1e601208129b15a34468deb2e98960b57dbea7
|
7
|
+
data.tar.gz: 6d663575b3d182fb4ab5ba9c2b9e78be8814445df4c3820d2fc5765a8de3bc2474b56599e9fcd6a24326c591504dca3da01be68c53c78a6e9411a060faee0848
|
data/CHANGELOG.md
CHANGED
data/lib/ibandit/iban.rb
CHANGED
@@ -385,21 +385,21 @@ module Ibandit
|
|
385
385
|
end
|
386
386
|
|
387
387
|
def valid_modulus_check_bank_code?
|
388
|
-
return true if Ibandit.modulus_checker.valid_bank_code?(
|
388
|
+
return true if Ibandit.modulus_checker.valid_bank_code?(self)
|
389
389
|
|
390
390
|
@errors[:bank_code] = Ibandit.translate(:is_invalid)
|
391
391
|
false
|
392
392
|
end
|
393
393
|
|
394
394
|
def valid_modulus_check_branch_code?
|
395
|
-
return true if Ibandit.modulus_checker.valid_branch_code?(
|
395
|
+
return true if Ibandit.modulus_checker.valid_branch_code?(self)
|
396
396
|
|
397
397
|
@errors[:branch_code] = Ibandit.translate(:is_invalid)
|
398
398
|
false
|
399
399
|
end
|
400
400
|
|
401
401
|
def valid_modulus_check_account_number?
|
402
|
-
return true if Ibandit.modulus_checker.valid_account_number?(
|
402
|
+
return true if Ibandit.modulus_checker.valid_account_number?(self)
|
403
403
|
|
404
404
|
@errors[:account_number] = Ibandit.translate(:is_invalid)
|
405
405
|
false
|
data/lib/ibandit/version.rb
CHANGED
data/spec/ibandit/iban_spec.rb
CHANGED
@@ -1149,7 +1149,16 @@ describe Ibandit::IBAN do
|
|
1149
1149
|
let(:valid_branch_code) { true }
|
1150
1150
|
let(:valid_account_number) { true }
|
1151
1151
|
|
1152
|
+
it 'calls valid_bank_code? with an IBAN object' do
|
1153
|
+
expect(Ibandit.modulus_checker).
|
1154
|
+
to receive(:valid_bank_code?).
|
1155
|
+
with(instance_of(Ibandit::IBAN))
|
1156
|
+
|
1157
|
+
iban.valid_local_modulus_check?
|
1158
|
+
end
|
1159
|
+
|
1152
1160
|
it { is_expected.to be(false) }
|
1161
|
+
|
1153
1162
|
context 'locale en', locale: :en do
|
1154
1163
|
specify { expect(iban.errors).to include(bank_code: 'is invalid') }
|
1155
1164
|
end
|
@@ -1190,7 +1199,16 @@ describe Ibandit::IBAN do
|
|
1190
1199
|
let(:valid_branch_code) { false }
|
1191
1200
|
let(:valid_account_number) { true }
|
1192
1201
|
|
1202
|
+
it 'calls valid_branch_code? with an IBAN object' do
|
1203
|
+
expect(Ibandit.modulus_checker).
|
1204
|
+
to receive(:valid_branch_code?).
|
1205
|
+
with(instance_of(Ibandit::IBAN))
|
1206
|
+
|
1207
|
+
iban.valid_local_modulus_check?
|
1208
|
+
end
|
1209
|
+
|
1193
1210
|
it { is_expected.to be(false) }
|
1211
|
+
|
1194
1212
|
context 'locale en', locale: :en do
|
1195
1213
|
specify do
|
1196
1214
|
expect(iban.errors).to include(branch_code: 'is invalid')
|
@@ -1239,7 +1257,16 @@ describe Ibandit::IBAN do
|
|
1239
1257
|
let(:valid_branch_code) { true }
|
1240
1258
|
let(:valid_account_number) { false }
|
1241
1259
|
|
1260
|
+
it 'calls valid_account_number? with an IBAN object' do
|
1261
|
+
expect(Ibandit.modulus_checker).
|
1262
|
+
to receive(:valid_account_number?).
|
1263
|
+
with(instance_of(Ibandit::IBAN))
|
1264
|
+
|
1265
|
+
iban.valid_local_modulus_check?
|
1266
|
+
end
|
1267
|
+
|
1242
1268
|
it { is_expected.to be(false) }
|
1269
|
+
|
1243
1270
|
context 'locale en', locale: :en do
|
1244
1271
|
specify do
|
1245
1272
|
expect(iban.errors).to include(account_number: 'is invalid')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibandit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grey Baker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|