ibanomat 1.1.0 → 1.2.0
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 +4 -4
- data/README.md +7 -6
- data/lib/ibanomat/client.rb +3 -3
- data/lib/ibanomat/version.rb +1 -1
- data/spec/client_spec.rb +8 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d5f5539aeb52d8954f5a7bf849135b6e8efabd3
|
4
|
+
data.tar.gz: fe5eda3263d7deb50866c7aa6a3b84d2a4cfd3a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0659e18f79ff93a423ee5a30fee1e1e993fc07be823d0713bb6fed987429f9b7b53fdfbc23f7ce1c58ce748f43f405b2b0dbc72adf236c9c3c1cbf031e62fb9
|
7
|
+
data.tar.gz: 643870f425bb610d38f05f8b629910387d8e9208e08a1918a4db17f816110300224e063c175992f33374fb6fdc796e5e5d21bbde86144353ff0d0f4c078359ff
|
data/README.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# IBANomat
|
2
2
|
|
3
|
-
[](http://travis-ci.org/ledermann/ibanomat)
|
4
|
+
[](https://codeclimate.com/github/ledermann/ibanomat)
|
5
|
+
[](http://badge.fury.io/rb/ibanomat)
|
6
|
+
[](https://gemnasium.com/ledermann/ibanomat)
|
7
|
+
|
8
|
+
The gem is a Ruby wrapper for a [web service of the german "Sparkasse"](https://www.sparkasse.de/unsere-loesungen/privatkunden/rund-ums-konto/iban-rechner.html). It calculates the **IBAN** for a given bank code (in German "Bankleitzahl") and bank account number ("Kontonummer"). Behind the scenes the web service returns JSON ([Example here](https://www.sparkasse.de/bin/servlets/sparkasse/iban?a=0532013000&b=37040044))
|
7
9
|
|
8
|
-
The gem is a Ruby wrapper for a [web service of the german "Sparkasse"](https://www.sparkasse-koelnbonn.de/privatkunden/banking/auslandszahlungen/iban/). It calculates the **IBAN** for a given bank code (in German "Bankleitzahl") and bank account number ("Kontonummer"). Behind the scenes the web service returns JSON ([Example here](https://www.sparkasse-koelnbonn.de/module/iban/iban.php?bank-code=37040044&bank-account-number=0532013000))
|
9
10
|
|
10
11
|
**WARNING: I'm not affiliated in any way with the web service or the Sparkasse. The web service seems not to be official. Maybe it will be offline soon. I didn't find any terms of use on their website. Use this gem at your own risk!**
|
11
12
|
|
@@ -38,7 +39,7 @@ Or install it yourself as:
|
|
38
39
|
# :bank_name => 'Commerzbank',
|
39
40
|
# :bic => 'COBADEFFXXX',
|
40
41
|
# :iban => 'DE89370400440532013000',
|
41
|
-
# :
|
42
|
+
# :bank_code => '37040044',
|
42
43
|
# :bank_account_number => '0532013000',
|
43
44
|
# :return_code => '00'
|
44
45
|
# }
|
data/lib/ibanomat/client.rb
CHANGED
@@ -2,7 +2,7 @@ require 'rest-client'
|
|
2
2
|
require 'json'
|
3
3
|
|
4
4
|
module Ibanomat
|
5
|
-
URL = 'https://www.sparkasse
|
5
|
+
URL = 'https://www.sparkasse.de/bin/servlets/sparkasse/iban'
|
6
6
|
|
7
7
|
def self.find(options)
|
8
8
|
raise ArgumentError.new unless options.is_a?(Hash)
|
@@ -11,8 +11,8 @@ module Ibanomat
|
|
11
11
|
|
12
12
|
response = RestClient.get URL, {
|
13
13
|
:params => {
|
14
|
-
'
|
15
|
-
'
|
14
|
+
'b' => options[:bank_code],
|
15
|
+
'a' => options[:bank_account_number]
|
16
16
|
},
|
17
17
|
:accept => :json
|
18
18
|
}
|
data/lib/ibanomat/version.rb
CHANGED
data/spec/client_spec.rb
CHANGED
@@ -20,8 +20,8 @@ describe Ibanomat do
|
|
20
20
|
|
21
21
|
stub_request(:get, Ibanomat::URL).
|
22
22
|
with(:query => {
|
23
|
-
'
|
24
|
-
'
|
23
|
+
'b' => '37040044',
|
24
|
+
'a' => '0532013000'
|
25
25
|
}).
|
26
26
|
to_return(:status => 200, :body => json_response)
|
27
27
|
end
|
@@ -49,8 +49,8 @@ describe Ibanomat do
|
|
49
49
|
|
50
50
|
stub_request(:get, Ibanomat::URL).
|
51
51
|
with(:query => {
|
52
|
-
'
|
53
|
-
'
|
52
|
+
'b' => '37040044',
|
53
|
+
'a' => '0532013000'
|
54
54
|
}).
|
55
55
|
to_return(:status => 200, :body => json_response)
|
56
56
|
end
|
@@ -65,8 +65,8 @@ describe Ibanomat do
|
|
65
65
|
before :each do
|
66
66
|
stub_request(:get, Ibanomat::URL).
|
67
67
|
with(:query => {
|
68
|
-
'
|
69
|
-
'
|
68
|
+
'b' => '37040044',
|
69
|
+
'a' => '0532013000'
|
70
70
|
}).
|
71
71
|
to_return(:status => 404)
|
72
72
|
end
|
@@ -82,8 +82,8 @@ describe Ibanomat do
|
|
82
82
|
before :each do
|
83
83
|
stub_request(:get, Ibanomat::URL).
|
84
84
|
with(:query => {
|
85
|
-
'
|
86
|
-
'
|
85
|
+
'b' => '37040044',
|
86
|
+
'a' => '0532013000'
|
87
87
|
}).
|
88
88
|
to_timeout
|
89
89
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibanomat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georg Ledermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project:
|
139
|
-
rubygems_version: 2.
|
139
|
+
rubygems_version: 2.5.0
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Wrapper for a web service to calculate the IBAN of german bank account numbers
|