ibanomat 1.1.0 → 1.2.0

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
  SHA1:
3
- metadata.gz: 213c2636b0263491c5414880435326d62950fae8
4
- data.tar.gz: fe6b7139e6c770ab743afa37de34ff319d5017f5
3
+ metadata.gz: 5d5f5539aeb52d8954f5a7bf849135b6e8efabd3
4
+ data.tar.gz: fe5eda3263d7deb50866c7aa6a3b84d2a4cfd3a2
5
5
  SHA512:
6
- metadata.gz: dfdaa460fd333c6c93c070f10c91e6df545341e2af1c5268e752e56dbed49f89a79a9f1ef170cdafabe7cc477601d96bac60ede612882e3b3eadb88691f0556c
7
- data.tar.gz: a1fff929f2a80b02f8609da2307159f02b9ae1b3b3c851eb434551e86d6a363ebf6f645040a0c2f34b07ea197023cc22fd4ee1c00ead88a2c06642cc00f3766f
6
+ metadata.gz: f0659e18f79ff93a423ee5a30fee1e1e993fc07be823d0713bb6fed987429f9b7b53fdfbc23f7ce1c58ce748f43f405b2b0dbc72adf236c9c3c1cbf031e62fb9
7
+ data.tar.gz: 643870f425bb610d38f05f8b629910387d8e9208e08a1918a4db17f816110300224e063c175992f33374fb6fdc796e5e5d21bbde86144353ff0d0f4c078359ff
data/README.md CHANGED
@@ -1,11 +1,12 @@
1
1
  # IBANomat
2
2
 
3
- [![Build Status](https://secure.travis-ci.org/ledermann/ibanomat.png)](http://travis-ci.org/ledermann/ibanomat)
4
- [![Code Climate](https://codeclimate.com/github/ledermann/ibanomat.png)](https://codeclimate.com/github/ledermann/ibanomat)
5
- [![Gem Version](https://badge.fury.io/rb/ibanomat.png)](http://badge.fury.io/rb/ibanomat)
6
- [![Dependency Status](https://gemnasium.com/ledermann/ibanomat.png)](https://gemnasium.com/ledermann/ibanomat)
3
+ [![Build Status](https://secure.travis-ci.org/ledermann/ibanomat.svg)](http://travis-ci.org/ledermann/ibanomat)
4
+ [![Code Climate](https://codeclimate.com/github/ledermann/ibanomat.svg)](https://codeclimate.com/github/ledermann/ibanomat)
5
+ [![Gem Version](https://badge.fury.io/rb/ibanomat.svg)](http://badge.fury.io/rb/ibanomat)
6
+ [![Dependency Status](https://gemnasium.com/ledermann/ibanomat.svg)](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
- # :bank-code => '37040044',
42
+ # :bank_code => '37040044',
42
43
  # :bank_account_number => '0532013000',
43
44
  # :return_code => '00'
44
45
  # }
@@ -2,7 +2,7 @@ require 'rest-client'
2
2
  require 'json'
3
3
 
4
4
  module Ibanomat
5
- URL = 'https://www.sparkasse-koelnbonn.de/module/iban/iban.php'
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
- 'bank-code' => options[:bank_code],
15
- 'bank-account-number' => options[:bank_account_number]
14
+ 'b' => options[:bank_code],
15
+ 'a' => options[:bank_account_number]
16
16
  },
17
17
  :accept => :json
18
18
  }
@@ -1,3 +1,3 @@
1
1
  module Ibanomat
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
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
- 'bank-code' => '37040044',
24
- 'bank-account-number' => '0532013000'
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
- 'bank-code' => '37040044',
53
- 'bank-account-number' => '0532013000'
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
- 'bank-code' => '37040044',
69
- 'bank-account-number' => '0532013000'
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
- 'bank-code' => '37040044',
86
- 'bank-account-number' => '0532013000'
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.1.0
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-09-11 00:00:00.000000000 Z
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.4.8
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