kontoapi-ruby 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: abadc2cbe7b40942326a26fa291fc8fed7ce955c
4
+ data.tar.gz: f73bbf5eb7609c35b5619989721648b0a4b26009
5
+ SHA512:
6
+ metadata.gz: 9e443d0757fe808d8a2b9f182241eb08420e9a2a4b9da20e178d72a8644ab1f0dbab0b16093c8e9287e83283979e0fe21330d748c51ff0f87ea8cb529db43e24
7
+ data.tar.gz: 0dda712ba22c85eea91a0388a0f05e90156e68a765fb09f93119709b02f0f69cadf886f9ae899926875fae6e8ef848490b2eeadc627208668048c14db7f7f73e
data/Gemfile CHANGED
@@ -1,12 +1,11 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'addressable'
4
- gem 'yajl-ruby'
3
+ gem 'addressable', '~> 2.3', '>= 2.3.7'
4
+ gem 'yajl-ruby', '~> 1.2', '>= 1.2.1'
5
5
 
6
6
  group :development do
7
- gem "rspec", "~> 2.3.0"
8
- gem "bundler", "~> 1.0.0"
9
- gem "jeweler", "~> 1.5.2"
10
- gem "rcov", ">= 0"
11
- gem "fakeweb"
7
+ gem "rspec", '~> 2.3', '>= 2.3.0'
8
+ gem "bundler", '~> 1'
9
+ gem "jeweler", '~> 2.0', '>= 2.0.1'
10
+ gem "fakeweb", '~> 1.3', '>= 1.3.0'
12
11
  end
data/Gemfile.lock CHANGED
@@ -1,16 +1,50 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.2.5)
5
- diff-lcs (1.1.2)
4
+ addressable (2.3.7)
5
+ builder (3.2.2)
6
+ descendants_tracker (0.0.4)
7
+ thread_safe (~> 0.3, >= 0.3.1)
8
+ diff-lcs (1.1.3)
6
9
  fakeweb (1.3.0)
7
- git (1.2.5)
8
- jeweler (1.5.2)
9
- bundler (~> 1.0.0)
10
+ faraday (0.9.1)
11
+ multipart-post (>= 1.2, < 3)
12
+ git (1.2.9.1)
13
+ github_api (0.12.3)
14
+ addressable (~> 2.3)
15
+ descendants_tracker (~> 0.0.4)
16
+ faraday (~> 0.8, < 0.10)
17
+ hashie (>= 3.3)
18
+ multi_json (>= 1.7.5, < 2.0)
19
+ nokogiri (~> 1.6.3)
20
+ oauth2
21
+ hashie (3.4.0)
22
+ highline (1.7.1)
23
+ jeweler (2.0.1)
24
+ builder
25
+ bundler (>= 1.0)
10
26
  git (>= 1.2.5)
27
+ github_api
28
+ highline (>= 1.6.15)
29
+ nokogiri (>= 1.5.10)
11
30
  rake
12
- rake (0.8.7)
13
- rcov (0.9.9)
31
+ rdoc
32
+ jwt (1.3.0)
33
+ mini_portile (0.6.2)
34
+ multi_json (1.10.1)
35
+ multi_xml (0.5.5)
36
+ multipart-post (2.0.0)
37
+ nokogiri (1.6.6.2)
38
+ mini_portile (~> 0.6.0)
39
+ oauth2 (1.0.0)
40
+ faraday (>= 0.8, < 0.10)
41
+ jwt (~> 1.0)
42
+ multi_json (~> 1.3)
43
+ multi_xml (~> 0.5)
44
+ rack (~> 1.2)
45
+ rack (1.6.0)
46
+ rake (10.4.2)
47
+ rdoc (4.2.0)
14
48
  rspec (2.3.0)
15
49
  rspec-core (~> 2.3.0)
16
50
  rspec-expectations (~> 2.3.0)
@@ -19,16 +53,16 @@ GEM
19
53
  rspec-expectations (2.3.0)
20
54
  diff-lcs (~> 1.1.2)
21
55
  rspec-mocks (2.3.0)
22
- yajl-ruby (0.8.2)
56
+ thread_safe (0.3.4)
57
+ yajl-ruby (1.2.1)
23
58
 
24
59
  PLATFORMS
25
60
  ruby
26
61
 
27
62
  DEPENDENCIES
28
- addressable
29
- bundler (~> 1.0.0)
30
- fakeweb
31
- jeweler (~> 1.5.2)
32
- rcov
33
- rspec (~> 2.3.0)
34
- yajl-ruby
63
+ addressable (~> 2.3, >= 2.3.7)
64
+ bundler (~> 1)
65
+ fakeweb (~> 1.3, >= 1.3.0)
66
+ jeweler (~> 2.0, >= 2.0.1)
67
+ rspec (~> 2.3, >= 2.3.0)
68
+ yajl-ruby (~> 1.2, >= 1.2.1)
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011 General Scripting - Jan Schwenzien
1
+ Copyright (c) 2011-2015 General Scripting UG (haftungsbeschränkt)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.markdown CHANGED
@@ -44,4 +44,4 @@ USAGE
44
44
  Copyright
45
45
  ---------
46
46
 
47
- Copyright (c) 2011 General Scripting - Jan Schwenzien. See LICENSE for details.
47
+ Copyright (c) 2011-2015 General Scripting UG (haftungsbeschränkt). See LICENSE for details.
data/Rakefile CHANGED
@@ -39,7 +39,7 @@ end
39
39
 
40
40
  task :default => :spec
41
41
 
42
- require 'rake/rdoctask'
42
+ require 'rdoc/task'
43
43
  Rake::RDocTask.new do |rdoc|
44
44
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
45
45
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
@@ -2,14 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: kontoapi-ruby 0.3.0 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
8
  s.name = "kontoapi-ruby"
8
- s.version = "0.2.0"
9
+ s.version = "0.3.0"
9
10
 
10
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
11
13
  s.authors = ["Jan Schwenzien"]
12
- s.date = "2012-04-08"
14
+ s.date = "2015-03-01"
13
15
  s.description = "A ruby library to access the Konto API (https://www.kontoapi.de/), a webservice that performs validity checks and other services regarding german bank accounts."
14
16
  s.email = "jan@general-scripting.com"
15
17
  s.extra_rdoc_files = [
@@ -30,42 +32,34 @@ Gem::Specification.new do |s|
30
32
  ]
31
33
  s.homepage = "http://github.com/GeneralScripting/kontoapi-ruby"
32
34
  s.licenses = ["MIT"]
33
- s.require_paths = ["lib"]
34
- s.rubygems_version = "1.8.15"
35
+ s.rubygems_version = "2.4.5"
35
36
  s.summary = "Konto API Ruby Library"
36
- s.test_files = [
37
- "spec/kontoapi-ruby_spec.rb",
38
- "spec/spec_helper.rb"
39
- ]
40
37
 
41
38
  if s.respond_to? :specification_version then
42
- s.specification_version = 3
39
+ s.specification_version = 4
43
40
 
44
41
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
- s.add_runtime_dependency(%q<addressable>, [">= 0"])
46
- s.add_runtime_dependency(%q<yajl-ruby>, [">= 0"])
47
- s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
48
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
49
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
50
- s.add_development_dependency(%q<rcov>, [">= 0"])
51
- s.add_development_dependency(%q<fakeweb>, [">= 0"])
42
+ s.add_runtime_dependency(%q<addressable>, [">= 2.3.7", "~> 2.3"])
43
+ s.add_runtime_dependency(%q<yajl-ruby>, [">= 1.2.1", "~> 1.2"])
44
+ s.add_development_dependency(%q<rspec>, [">= 2.3.0", "~> 2.3"])
45
+ s.add_development_dependency(%q<bundler>, ["~> 1"])
46
+ s.add_development_dependency(%q<jeweler>, [">= 2.0.1", "~> 2.0"])
47
+ s.add_development_dependency(%q<fakeweb>, [">= 1.3.0", "~> 1.3"])
52
48
  else
53
- s.add_dependency(%q<addressable>, [">= 0"])
54
- s.add_dependency(%q<yajl-ruby>, [">= 0"])
55
- s.add_dependency(%q<rspec>, ["~> 2.3.0"])
56
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
57
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
58
- s.add_dependency(%q<rcov>, [">= 0"])
59
- s.add_dependency(%q<fakeweb>, [">= 0"])
49
+ s.add_dependency(%q<addressable>, [">= 2.3.7", "~> 2.3"])
50
+ s.add_dependency(%q<yajl-ruby>, [">= 1.2.1", "~> 1.2"])
51
+ s.add_dependency(%q<rspec>, [">= 2.3.0", "~> 2.3"])
52
+ s.add_dependency(%q<bundler>, ["~> 1"])
53
+ s.add_dependency(%q<jeweler>, [">= 2.0.1", "~> 2.0"])
54
+ s.add_dependency(%q<fakeweb>, [">= 1.3.0", "~> 1.3"])
60
55
  end
61
56
  else
62
- s.add_dependency(%q<addressable>, [">= 0"])
63
- s.add_dependency(%q<yajl-ruby>, [">= 0"])
64
- s.add_dependency(%q<rspec>, ["~> 2.3.0"])
65
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
66
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
67
- s.add_dependency(%q<rcov>, [">= 0"])
68
- s.add_dependency(%q<fakeweb>, [">= 0"])
57
+ s.add_dependency(%q<addressable>, [">= 2.3.7", "~> 2.3"])
58
+ s.add_dependency(%q<yajl-ruby>, [">= 1.2.1", "~> 1.2"])
59
+ s.add_dependency(%q<rspec>, [">= 2.3.0", "~> 2.3"])
60
+ s.add_dependency(%q<bundler>, ["~> 1"])
61
+ s.add_dependency(%q<jeweler>, [">= 2.0.1", "~> 2.0"])
62
+ s.add_dependency(%q<fakeweb>, [">= 1.3.0", "~> 1.3"])
69
63
  end
70
64
  end
71
65
 
data/lib/kontoapi-ruby.rb CHANGED
@@ -7,9 +7,10 @@ module KontoAPI
7
7
 
8
8
  extend self
9
9
 
10
- RootCA = '/etc/ssl/certs'
11
- VALIDITY_URL = Addressable::URI.parse 'https://ask.kontoapi.de/for/validity.json'
12
- BANKNAME_URL = Addressable::URI.parse 'https://ask.kontoapi.de/for/bankname.json'
10
+ RootCA = '/etc/ssl/certs'
11
+ VALIDITY_URL = Addressable::URI.parse 'https://ask.kontoapi.de/for/validity.json'
12
+ BANKNAME_URL = Addressable::URI.parse 'https://ask.kontoapi.de/for/bankname.json'
13
+ IBAN_AND_BIC_URL = Addressable::URI.parse 'https://ask.kontoapi.de/for/iban_and_bic.json'
13
14
  DEFAULT_TIMEOUT = 10
14
15
 
15
16
  @@api_key = nil
@@ -40,6 +41,15 @@ module KontoAPI
40
41
  response['answer'].empty? ? nil : response['answer']
41
42
  end
42
43
 
44
+ def iban_and_bic(ktn, blz)
45
+ stripped_ktn = ktn.to_s.strip
46
+ stripped_blz = blz.to_s.strip
47
+ return nil if stripped_ktn.empty?
48
+ return nil if stripped_blz.empty?
49
+ response = ask_for(:iban_and_bic, { :ktn => stripped_ktn, :blz => stripped_blz })
50
+ response['answer']
51
+ end
52
+
43
53
 
44
54
 
45
55
  private
metadata CHANGED
@@ -1,136 +1,139 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: kontoapi-ruby
3
- version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 0
10
- version: 0.2.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Jan Schwenzien
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2012-04-08 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
- none: false
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- hash: 3
27
- segments:
28
- - 0
29
- version: "0"
11
+ date: 2015-03-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
30
14
  name: addressable
31
- prerelease: false
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.3.7
20
+ - - "~>"
21
+ - !ruby/object:Gem::Version
22
+ version: '2.3'
32
23
  type: :runtime
33
- requirement: *id001
34
- - !ruby/object:Gem::Dependency
35
- version_requirements: &id002 !ruby/object:Gem::Requirement
36
- none: false
37
- requirements:
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
38
27
  - - ">="
39
- - !ruby/object:Gem::Version
40
- hash: 3
41
- segments:
42
- - 0
43
- version: "0"
28
+ - !ruby/object:Gem::Version
29
+ version: 2.3.7
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.3'
33
+ - !ruby/object:Gem::Dependency
44
34
  name: yajl-ruby
45
- prerelease: false
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 1.2.1
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '1.2'
46
43
  type: :runtime
47
- requirement: *id002
48
- - !ruby/object:Gem::Dependency
49
- version_requirements: &id003 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- hash: 3
55
- segments:
56
- - 2
57
- - 3
58
- - 0
59
- version: 2.3.0
60
- name: rspec
61
44
  prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 1.2.1
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '1.2'
53
+ - !ruby/object:Gem::Dependency
54
+ name: rspec
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 2.3.0
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '2.3'
62
63
  type: :development
63
- requirement: *id003
64
- - !ruby/object:Gem::Dependency
65
- version_requirements: &id004 !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ~>
69
- - !ruby/object:Gem::Version
70
- hash: 23
71
- segments:
72
- - 1
73
- - 0
74
- - 0
75
- version: 1.0.0
76
- name: bundler
77
64
  prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 2.3.0
70
+ - - "~>"
71
+ - !ruby/object:Gem::Version
72
+ version: '2.3'
73
+ - !ruby/object:Gem::Dependency
74
+ name: bundler
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '1'
78
80
  type: :development
79
- requirement: *id004
80
- - !ruby/object:Gem::Dependency
81
- version_requirements: &id005 !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
84
- - - ~>
85
- - !ruby/object:Gem::Version
86
- hash: 7
87
- segments:
88
- - 1
89
- - 5
90
- - 2
91
- version: 1.5.2
92
- name: jeweler
93
81
  prerelease: false
94
- type: :development
95
- requirement: *id005
96
- - !ruby/object:Gem::Dependency
97
- version_requirements: &id006 !ruby/object:Gem::Requirement
98
- none: false
99
- requirements:
82
+ version_requirements: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - "~>"
85
+ - !ruby/object:Gem::Version
86
+ version: '1'
87
+ - !ruby/object:Gem::Dependency
88
+ name: jeweler
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
100
91
  - - ">="
101
- - !ruby/object:Gem::Version
102
- hash: 3
103
- segments:
104
- - 0
105
- version: "0"
106
- name: rcov
107
- prerelease: false
92
+ - !ruby/object:Gem::Version
93
+ version: 2.0.1
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '2.0'
108
97
  type: :development
109
- requirement: *id006
110
- - !ruby/object:Gem::Dependency
111
- version_requirements: &id007 !ruby/object:Gem::Requirement
112
- none: false
113
- requirements:
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
114
101
  - - ">="
115
- - !ruby/object:Gem::Version
116
- hash: 3
117
- segments:
118
- - 0
119
- version: "0"
102
+ - !ruby/object:Gem::Version
103
+ version: 2.0.1
104
+ - - "~>"
105
+ - !ruby/object:Gem::Version
106
+ version: '2.0'
107
+ - !ruby/object:Gem::Dependency
120
108
  name: fakeweb
121
- prerelease: false
109
+ requirement: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: 1.3.0
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '1.3'
122
117
  type: :development
123
- requirement: *id007
124
- description: A ruby library to access the Konto API (https://www.kontoapi.de/), a webservice that performs validity checks and other services regarding german bank accounts.
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: 1.3.0
124
+ - - "~>"
125
+ - !ruby/object:Gem::Version
126
+ version: '1.3'
127
+ description: A ruby library to access the Konto API (https://www.kontoapi.de/), a
128
+ webservice that performs validity checks and other services regarding german bank
129
+ accounts.
125
130
  email: jan@general-scripting.com
126
131
  executables: []
127
-
128
132
  extensions: []
129
-
130
- extra_rdoc_files:
133
+ extra_rdoc_files:
131
134
  - LICENSE
132
135
  - README.markdown
133
- files:
136
+ files:
134
137
  - Gemfile
135
138
  - Gemfile.lock
136
139
  - LICENSE
@@ -142,38 +145,27 @@ files:
142
145
  - spec/kontoapi-ruby_spec.rb
143
146
  - spec/spec_helper.rb
144
147
  homepage: http://github.com/GeneralScripting/kontoapi-ruby
145
- licenses:
148
+ licenses:
146
149
  - MIT
150
+ metadata: {}
147
151
  post_install_message:
148
152
  rdoc_options: []
149
-
150
- require_paths:
153
+ require_paths:
151
154
  - lib
152
- required_ruby_version: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
+ required_ruby_version: !ruby/object:Gem::Requirement
156
+ requirements:
155
157
  - - ">="
156
- - !ruby/object:Gem::Version
157
- hash: 3
158
- segments:
159
- - 0
160
- version: "0"
161
- required_rubygems_version: !ruby/object:Gem::Requirement
162
- none: false
163
- requirements:
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ required_rubygems_version: !ruby/object:Gem::Requirement
161
+ requirements:
164
162
  - - ">="
165
- - !ruby/object:Gem::Version
166
- hash: 3
167
- segments:
168
- - 0
169
- version: "0"
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
170
165
  requirements: []
171
-
172
166
  rubyforge_project:
173
- rubygems_version: 1.8.15
167
+ rubygems_version: 2.4.5
174
168
  signing_key:
175
- specification_version: 3
169
+ specification_version: 4
176
170
  summary: Konto API Ruby Library
177
- test_files:
178
- - spec/kontoapi-ruby_spec.rb
179
- - spec/spec_helper.rb
171
+ test_files: []