ibandit 0.11.26 → 0.11.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73a5ffec9e66a0ebf5dccf613bedb5e0da311444
4
- data.tar.gz: a6d3de9434b4b87e3df2b9a6a4e6c841331b949c
3
+ metadata.gz: 0ef65b4d6eedd45de97dbe15a3b2b3996df05e1c
4
+ data.tar.gz: 9e886c94b5513ad76d1d3941f1924db6a011608b
5
5
  SHA512:
6
- metadata.gz: ce3d098232431f5d49b2c533afe6eac7ca260cabfcda9add4ff4cc2b3b0a3bb1bae8d98e3a0bfda1416d5ea0c96533bb9b31b38ab4f5cc06800a49e93d7f19f0
7
- data.tar.gz: 6612b734b2bad0b49af6d2460b4536a26bea154ed81011c654c02202c68bc3d34db4b290dc1731831c0b77480202dc7f32c88bb86f507894a3bc3d23f9b4ddae
6
+ metadata.gz: 7b292f452af4977a2799591335975db4cec051ad0a8ce2c686eb89de0e8439476855885ed820f021508fca1f127b0622b098320855bc71e8e957e9f099049b8f
7
+ data.tar.gz: d01ef104eb0fad531e3b79dbf1973e9cfc94b786de4403915bbb95ba59060ef7f4d20e2719330f44aef9dc2b70b6f0456269342859592720f362ff0a1f3c6032
@@ -1,3 +1,7 @@
1
+ ## 0.11.27 - February 22, 2019
2
+
3
+ - Update US account number format validation to allow digits-only
4
+
1
5
  ## 0.11.26 - January 30, 2019
2
6
 
3
7
  - Add support for US pseudo-IBANs
@@ -902,8 +902,7 @@ US:
902
902
  :branch_code_length: 0
903
903
  :account_number_length: 17
904
904
  :bank_code_format: "\\d{9}"
905
- # TODO: update account number format based on inputs from user research
906
- :account_number_format: ".{1,17}"
905
+ :account_number_format: "\\A_*\\d{1,17}\\z"
907
906
  :national_id_length: 9
908
907
  :pseudo_iban_bank_code_length: 9
909
908
  :pseudo_iban_branch_code_length: 0
@@ -1,3 +1,3 @@
1
1
  module Ibandit
2
- VERSION = "0.11.26".freeze
2
+ VERSION = "0.11.27".freeze
3
3
  end
@@ -724,7 +724,7 @@ describe Ibandit::IBAN do
724
724
  its(:to_s) { is_expected.to eq("") }
725
725
  end
726
726
 
727
- context "when the input is an invalid US pseudo-IBAN" do
727
+ context "when the input pseudo-IBAN has an invalid US bank_code" do
728
728
  let(:arg) { "USZZ__012345601234567890123456" }
729
729
 
730
730
  it "is invalid and has the correct errors" do
@@ -733,6 +733,15 @@ describe Ibandit::IBAN do
733
733
  to eq(bank_code: "is the wrong length (should be 9 characters)")
734
734
  end
735
735
  end
736
+
737
+ context "when the input pseudo-IBAN has an invalid US account_number" do
738
+ let(:arg) { "USZZ965498456ABC01234567890123" }
739
+
740
+ it "is invalid and has an error populated" do
741
+ expect(subject.valid?).to eq(false)
742
+ expect(subject.errors).to eq(account_number: "is invalid")
743
+ end
744
+ end
736
745
  end
737
746
 
738
747
  describe "#to_s" do
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.11.26
4
+ version: 0.11.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-30 00:00:00.000000000 Z
11
+ date: 2019-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri