bank-validator 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c14e9da0b53505c9756e5cafa8c02180b932912
4
- data.tar.gz: 20f832a454a4f5ebfd0e2a333db90119fd97be2a
3
+ metadata.gz: 194a6aaded724df8793a2f9e51a4cd8bdb74c78a
4
+ data.tar.gz: 3c321814a1d8549e7cc7db980ee286bfeb0792c0
5
5
  SHA512:
6
- metadata.gz: 699cbf55abc1bfea2a67436404e46a4dc9a8a05d7b1dfee241dc97cbe3ee010b49d6c3c8fe43059b5eb0fdebd53aaf21baf752a53e148fac0771ac554e550dc9
7
- data.tar.gz: a7f936c57b827f58632ebb7774fa68dbf86e60fa3817499d0d9e90551a16e6cf73910e700bcc3c274b63026da584fb6f89c8cdae4dbd5570908f0cbe0f721e53
6
+ metadata.gz: eb2485213c20762ae815a365a2dac2d09b5cd5d2e20b394ea7ffdb64d8959f85be99a98174d9e62279266cb298776fcee2f79f3fd4d4f914f7aca25583a37ecc
7
+ data.tar.gz: 08966de96d54cb56706e400269de858a0db120c225277060c2263257b5b89050e9ef31ba46b0177b29c7ab8404a7270575973bec8c1d59e4d606c7484f43d9a0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: bank-validator 0.3.1 ruby lib
5
+ # stub: bank-validator 0.3.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "bank-validator"
9
- s.version = "0.3.1"
9
+ s.version = "0.3.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Adam Bahlke"]
14
- s.date = "2016-02-08"
14
+ s.date = "2016-02-17"
15
15
  s.description = "Validates IBAN and BIC account numbers. Still a work in progress"
16
16
  s.email = "adam.bahlke@hitfoxgroup.com"
17
17
  s.extra_rdoc_files = [
@@ -7,7 +7,7 @@ module BankValidator
7
7
  end
8
8
 
9
9
  def valid?
10
- BankValidator::Bic.valid_format?(value)
10
+ BankValidator::Bic.valid_format?(value) && (value.length == 8 || value.length == 11)
11
11
  end
12
12
 
13
13
  def self.valid_format?(bic)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ~/Workspace/bank-validator
3
3
  specs:
4
- bank-validator (0.3.0)
4
+ bank-validator (0.3.1)
5
5
  activemodel (>= 3.0)
6
6
 
7
7
  GEM
@@ -44,6 +44,9 @@ RSpec.describe 'testing the gem', type: :feature do
44
44
 
45
45
  @user.bic = 'D3UTDEBR'
46
46
  expect(@user.save).to be(false)
47
+
48
+ @user.bic = 'COBADEFXXX'
49
+ expect(@user.save).to be(false)
47
50
  end
48
51
 
49
52
  it 'validates a different bic types' do
@@ -55,7 +58,9 @@ RSpec.describe 'testing the gem', type: :feature do
55
58
  end
56
59
 
57
60
  it 'saves the bic' do
58
- user = User.create(name: 'Adam', iban: 'BE62510007547061', bic: 'DEUTDEFF500')
61
+ user = User.create(name: 'Adam', iban: 'BE62510007547061', bic: 'DEUTDEFF500', routing_number: '226073523')
62
+ user.save
63
+ expect(user.valid?).to be(true)
59
64
  expect(user.bic).to eq('DEUTDEFF500')
60
65
  end
61
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bank-validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Bahlke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-08 00:00:00.000000000 Z
11
+ date: 2016-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel