bs2_api 1.1.1 → 1.1.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
  SHA256:
3
- metadata.gz: 866ff976be9cf9abe7ccabd6828f051b537269e8f55a99c6bf8064c8f1e95bd0
4
- data.tar.gz: cc8a0b055ac239dcb0f663e7fe581d99f741103649dc59118329b21ad995dbb7
3
+ metadata.gz: 2b3224179dc0824ec6bd97ad39ea0069086ed63c83438add32914a6f5336b8e4
4
+ data.tar.gz: 543ed7441a126e649ba442b1ff3144bfa6967fc8136ab58ccc6775537e1477fc
5
5
  SHA512:
6
- metadata.gz: 31257e2378352cc08cd37684e554936d1a613afecd42bfa6c19322c981fc9776415859974da2f9823d656eea8896b25f1ed61126bd09a3c1b1ffe4c6bab0f0db
7
- data.tar.gz: 6273ff5a29f9fd05170b7dce718cdcb2864243719667c979e3aff361542f38ade0bc94948f0ed941ce42b81995af741cade4c78aefc502c7aeaf0983b6e833c0
6
+ metadata.gz: 76d95274953486d82a83b863bd37f5a7dc47b86a35732ade87b3e2c27bd79a330d10ae7b6cc2895665cf4b96ff1cfa05910bc94d7b84d84ec6576192c08b39e1
7
+ data.tar.gz: 6f5013bf0e2b1f9f3bf771f74cf4d4265d78627ccc0c934301a29e8e6f2fe5d4898300acb0211f99037a97eff26110ee943d2ddfe70fad6bb8ff3addd40a94cc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bs2_api (1.1.0)
4
+ bs2_api (1.1.1)
5
5
  activesupport
6
6
  builder
7
7
  bundler
@@ -7,13 +7,14 @@ module Bs2Api
7
7
  class BankService
8
8
  class << self
9
9
  def find_by_code code
10
- bank = bank_list.find {|b| b["code"].to_s == code.to_s }
11
- raise Bs2Api::Errors::MissingBank, "Bank with code #{code} not registered into util/banks.yml file" if bank.blank?
10
+ code = code.to_s.strip
11
+ bank = bank_list.find {|b| b["code"] == code }
12
+ raise Bs2Api::Errors::MissingBank, "Bank with code '#{code}' not registered into util/banks.yml file" if bank.blank?
12
13
  bank
13
14
  end
14
15
 
15
16
  def bank_list
16
- @bank_list ||= YAML.load_file(File.join(__dir__, 'banks.yml'))
17
+ YAML.load_file(File.join(__dir__, 'banks.yml'))
17
18
  end
18
19
  end
19
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bs2Api
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bs2_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kim Pastro