Skip to content

Commit

Permalink
Merge pull request #207 from gocardless/dependabot/bundler/gc_rubocon…
Browse files Browse the repository at this point in the history
…fig-tw-2.29.0

Update gc_ruboconfig requirement from ~> 2.26.0 to ~> 2.29.0
  • Loading branch information
JoeSouthan authored Oct 20, 2021
2 parents 946b231 + 1ee0cb6 commit 380f726
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ibandit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require File.expand_path("lib/ibandit/version", __dir__)

Gem::Specification.new do |gem|
gem.add_development_dependency "gc_ruboconfig", "~> 2.26.0"
gem.add_development_dependency "gc_ruboconfig", "~> 2.29.0"
gem.add_development_dependency "nokogiri", "~> 1.6"
gem.add_development_dependency "pry", "~> 0.13"
gem.add_development_dependency "pry-byebug", "~> 3.9"
Expand Down
6 changes: 4 additions & 2 deletions lib/ibandit/german_details_converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,15 @@ def padded_account_number_for_validity
when "13"
if unpadded_account_number.size.between?(6, 7)
unpadded_account_number + "00"
else @account_number
else
@account_number
end
when "76"
case unpadded_account_number.size
when 7..8
if Check76.new(@account_number).valid? then @account_number
else unpadded_account_number + "00"
else
unpadded_account_number + "00"
end
when 5..6 then unpadded_account_number + "00"
else @account_number
Expand Down
3 changes: 2 additions & 1 deletion lib/ibandit/local_details_cleaner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def self.required_fields(country_code)
%i[account_number]
when "GB", "IE", "MT"
if Ibandit.bic_finder.nil? then %i[bank_code branch_code account_number]
else %i[branch_code account_number]
else
%i[branch_code account_number]
end
when "AU"
%i[branch_code account_number]
Expand Down
4 changes: 2 additions & 2 deletions spec/ibandit/german_details_converter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

convertor.fetch("valid", []).each do |tuple|
context "bank code: #{tuple['bank_code']} account number " \
"#{tuple['account_number']}" do
"#{tuple['account_number']}" do
let(:bank_code) do
tuple["bank_code"]
end
Expand All @@ -44,7 +44,7 @@

convertor.fetch("invalid", []).each do |tuple|
context "bank code: #{tuple['bank_code']} account number " \
"#{tuple['account_number']}" do
"#{tuple['account_number']}" do
let(:bank_code) { tuple["bank_code"] || "00000000" }
let(:account_number) { tuple["account_number"] }

Expand Down
4 changes: 2 additions & 2 deletions spec/ibandit/iban_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@
iban.valid_length?
expect(iban.errors).
to include(length: "Length doesn't match SWIFT specification " \
"(expected 22 characters, received 20)")
"(expected 22 characters, received 20)")
end
end

Expand Down Expand Up @@ -1313,7 +1313,7 @@
iban.valid_branch_code_length?
expect(iban.errors).
to include(branch_code: "is the wrong length (should be 6 " \
"characters)")
"characters)")
end
end

Expand Down

0 comments on commit 380f726

Please sign in to comment.