banking_data 0.9.0 → 0.9.1

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: 5dfb494c20fe9405c662d8266b3da4457c082e80d92d84c0744b09507c327829
4
- data.tar.gz: 66babc00d38a2efa966edc4187daa535c1f546eac62c810948560719e972e93f
3
+ metadata.gz: c50828f42426f24cb180c8613e88ffa8a057e90760a7fc51406f07f168a5a283
4
+ data.tar.gz: 98a94e2f0ad6715a7d65887021f598878cded14217e5df27776a2a67d6447451
5
5
  SHA512:
6
- metadata.gz: 124367140688cb0c1c741fc6d067ad50126ef2109b44fc03018de74b021c5ca29c4486d2c6d55c5f51ab078a785da6924cc2f0b9d2f4e96c38083b3722d5fc90
7
- data.tar.gz: 7515051b86cbb9a29a1a67bba33a524327f982243213378332795da61dd8bf176f1121cef2a24c81df3abfe8229610dab8211dec936f1e038e77ea78ac55aadd
6
+ metadata.gz: 0753545b5982f5c9ddb18e3956a10bff95dce8c121fbf2a648531c5faa573fb10d9dbf113325bd801a8c6464514f0b589dc2b2c7aed3d3e10e9d0d13a9ab0c3c
7
+ data.tar.gz: 13434649b7fac5f4e39a32b2c075d4cd196128212f8681a512a6ce50ee091f68465819ff36490ee05b85e8781dd84f9a8affec1f58519f89fac801643be2b8c6
data/README.md CHANGED
@@ -8,6 +8,10 @@ Banking data (including SWIFT-codes/BIC) for Germany, Austria, Switzerland, Neth
8
8
 
9
9
  ## CHANGELOG
10
10
 
11
+ ### 0.9.1
12
+
13
+ * bugfix: return empty array, when bank not known
14
+
11
15
  ### 0.9.0
12
16
 
13
17
  * add SWIFT data of dutch banks
@@ -27,6 +27,8 @@ module BankingData
27
27
  end
28
28
 
29
29
  def to_a
30
+ return [] if bank.nil?
31
+
30
32
  data = bank.all
31
33
  .select { |bank| @options.map { |k, v| bank.send(k) == v }.all? }
32
34
  if @attributes
@@ -1,4 +1,4 @@
1
1
  module BankingData
2
2
  # banking_data version
3
- VERSION = '0.9.0'
3
+ VERSION = '0.9.1'
4
4
  end
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+ require 'banking_data'
3
+
4
+ describe BankingData::Query do
5
+ describe '#to_a' do
6
+ it 'returns [] for unknown banks' do
7
+ locale = :li
8
+
9
+ bank = BankingData::Bank.subclasses.find do |bank_class|
10
+ bank_class::LOCALE == locale
11
+ end
12
+
13
+ expect(bank).to be_nil
14
+
15
+ query = BankingData::Query.new(
16
+ locale: :li,
17
+ blz: '8800'
18
+ )
19
+
20
+ expect(query.to_a).to be_empty
21
+ end
22
+ end
23
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: banking_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank C. Eckert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-06 00:00:00.000000000 Z
11
+ date: 2019-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -178,6 +178,7 @@ files:
178
178
  - spec/banking_data/german_bank_spec.rb
179
179
  - spec/banking_data/swiss_bank_spec.rb
180
180
  - spec/banking_data_spec.rb
181
+ - spec/query_spec.rb
181
182
  - spec/spec_helper.rb
182
183
  homepage: https://github.com/opahk/banking_data
183
184
  licenses:
@@ -198,8 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
199
  - !ruby/object:Gem::Version
199
200
  version: '0'
200
201
  requirements: []
201
- rubyforge_project:
202
- rubygems_version: 2.7.6
202
+ rubygems_version: 3.0.3
203
203
  signing_key:
204
204
  specification_version: 4
205
205
  summary: Banking data for German, Austrian and Swiss banks
@@ -210,4 +210,5 @@ test_files:
210
210
  - spec/banking_data/german_bank_spec.rb
211
211
  - spec/banking_data/swiss_bank_spec.rb
212
212
  - spec/banking_data_spec.rb
213
+ - spec/query_spec.rb
213
214
  - spec/spec_helper.rb