ipizza 0.5.1 → 0.5.2
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.
- data/Gemfile.lock +13 -1
- data/Guardfile +5 -0
- data/ipizza.gemspec +1 -0
- data/lib/ipizza.rb +1 -0
- data/lib/ipizza/provider.rb +23 -0
- data/lib/ipizza/version.rb +1 -1
- data/spec/ipizza/provider_spec.rb +28 -0
- metadata +21 -4
- data/autotest/discover.rb +0 -1
data/Gemfile.lock
CHANGED
@@ -1,12 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ipizza (0.5.
|
4
|
+
ipizza (0.5.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: http://rubygems.org/
|
8
8
|
specs:
|
9
|
+
configuration (0.0.5)
|
9
10
|
diff-lcs (1.1.2)
|
11
|
+
guard (0.3.0)
|
12
|
+
open_gem (~> 1.4.2)
|
13
|
+
thor (~> 0.14.6)
|
14
|
+
launchy (0.3.7)
|
15
|
+
configuration (>= 0.0.5)
|
16
|
+
rake (>= 0.8.1)
|
17
|
+
open_gem (1.4.2)
|
18
|
+
launchy (~> 0.3.5)
|
19
|
+
rake (0.8.7)
|
10
20
|
rspec (2.5.0)
|
11
21
|
rspec-core (~> 2.5.0)
|
12
22
|
rspec-expectations (~> 2.5.0)
|
@@ -15,10 +25,12 @@ GEM
|
|
15
25
|
rspec-expectations (2.5.0)
|
16
26
|
diff-lcs (~> 1.1.2)
|
17
27
|
rspec-mocks (2.5.0)
|
28
|
+
thor (0.14.6)
|
18
29
|
|
19
30
|
PLATFORMS
|
20
31
|
ruby
|
21
32
|
|
22
33
|
DEPENDENCIES
|
34
|
+
guard
|
23
35
|
ipizza!
|
24
36
|
rspec (= 2.5.0)
|
data/Guardfile
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
guard 'rspec', :version => 2, :cli => "--color", :bundler => true, :all_on_start => false, :all_after_pass => false, :keep_failed => true, :notification => false do
|
2
|
+
watch('spec/spec_helper.rb') { "spec" }
|
3
|
+
watch(%r{^spec/.+_spec\.rb})
|
4
|
+
watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
5
|
+
end
|
data/ipizza.gemspec
CHANGED
@@ -13,6 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.description = %q{Simplifies generating payment requests and parsing responses from banks when using iPizza protocol.}
|
14
14
|
|
15
15
|
s.add_development_dependency 'rspec', '= 2.5.0'
|
16
|
+
s.add_development_dependency 'guard'
|
16
17
|
|
17
18
|
s.files = `git ls-files`.split("\n")
|
18
19
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
data/lib/ipizza.rb
CHANGED
@@ -7,6 +7,7 @@ require 'ipizza/payment_request'
|
|
7
7
|
require 'ipizza/payment_response'
|
8
8
|
require 'ipizza/authentication_request'
|
9
9
|
require 'ipizza/authentication_response'
|
10
|
+
require 'ipizza/provider'
|
10
11
|
require 'ipizza/provider/swedbank'
|
11
12
|
require 'ipizza/provider/seb'
|
12
13
|
require 'ipizza/provider/sampo'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Ipizza
|
2
|
+
module Provider
|
3
|
+
|
4
|
+
class << self
|
5
|
+
def get(provider_name)
|
6
|
+
case provider_name.downcase
|
7
|
+
when 'swedbank'
|
8
|
+
Ipizza::Provider::Swedbank.new
|
9
|
+
when 'hp'
|
10
|
+
Ipizza::Provider::Swedbank.new
|
11
|
+
when 'eyp'
|
12
|
+
Ipizza::Provider::Seb.new
|
13
|
+
when 'seb'
|
14
|
+
Ipizza::Provider::Seb.new
|
15
|
+
when 'sampo'
|
16
|
+
Ipizza::Provider::Sampo.new
|
17
|
+
when 'nordea'
|
18
|
+
Ipizza::Provider::Nordea.new
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/ipizza/version.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
|
3
|
+
describe Ipizza::Provider do
|
4
|
+
describe '.get' do
|
5
|
+
it 'returns swedbank provider for "swedbank" attribute' do
|
6
|
+
Ipizza::Provider.get('swedbank').should be_a(Ipizza::Provider::Swedbank)
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'returns swedbank provider for "hp" attribute' do
|
10
|
+
Ipizza::Provider.get('hp').should be_a(Ipizza::Provider::Swedbank)
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'returns seb provider for "eyp" attribute' do
|
14
|
+
Ipizza::Provider.get('eyp').should be_a(Ipizza::Provider::Seb)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'returns seb provider for "seb" attribute' do
|
18
|
+
Ipizza::Provider.get('seb').should be_a(Ipizza::Provider::Seb)
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'returns sampo provider for "sampo" attribute' do
|
22
|
+
Ipizza::Provider.get('sampo').should be_a(Ipizza::Provider::Sampo)
|
23
|
+
end
|
24
|
+
it 'returns nordea provider for "nordea" attribute' do
|
25
|
+
Ipizza::Provider.get('nordea').should be_a(Ipizza::Provider::Nordea)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ipizza
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 2
|
10
|
+
version: 0.5.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Priit Haamer
|
@@ -34,6 +34,20 @@ dependencies:
|
|
34
34
|
version: 2.5.0
|
35
35
|
type: :development
|
36
36
|
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: guard
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
version: "0"
|
49
|
+
type: :development
|
50
|
+
version_requirements: *id002
|
37
51
|
description: Simplifies generating payment requests and parsing responses from banks when using iPizza protocol.
|
38
52
|
email:
|
39
53
|
- priit@fraktal.ee
|
@@ -48,9 +62,9 @@ files:
|
|
48
62
|
- .rspec
|
49
63
|
- Gemfile
|
50
64
|
- Gemfile.lock
|
65
|
+
- Guardfile
|
51
66
|
- README.markdown
|
52
67
|
- Rakefile
|
53
|
-
- autotest/discover.rb
|
54
68
|
- init.rb
|
55
69
|
- ipizza.gemspec
|
56
70
|
- lib/ipizza.rb
|
@@ -60,6 +74,7 @@ files:
|
|
60
74
|
- lib/ipizza/payment.rb
|
61
75
|
- lib/ipizza/payment_request.rb
|
62
76
|
- lib/ipizza/payment_response.rb
|
77
|
+
- lib/ipizza/provider.rb
|
63
78
|
- lib/ipizza/provider/nordea.rb
|
64
79
|
- lib/ipizza/provider/nordea/authentication_request.rb
|
65
80
|
- lib/ipizza/provider/nordea/authentication_response.rb
|
@@ -93,6 +108,7 @@ files:
|
|
93
108
|
- spec/ipizza/provider/sampo_spec.rb
|
94
109
|
- spec/ipizza/provider/seb_spec.rb
|
95
110
|
- spec/ipizza/provider/swedbank_spec.rb
|
111
|
+
- spec/ipizza/provider_spec.rb
|
96
112
|
- spec/ipizza/util_spec.rb
|
97
113
|
- spec/spec_helper.rb
|
98
114
|
- spec/support/pizza.rb
|
@@ -152,6 +168,7 @@ test_files:
|
|
152
168
|
- spec/ipizza/provider/sampo_spec.rb
|
153
169
|
- spec/ipizza/provider/seb_spec.rb
|
154
170
|
- spec/ipizza/provider/swedbank_spec.rb
|
171
|
+
- spec/ipizza/provider_spec.rb
|
155
172
|
- spec/ipizza/util_spec.rb
|
156
173
|
- spec/spec_helper.rb
|
157
174
|
- spec/support/pizza.rb
|
data/autotest/discover.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Autotest.add_discovery { "rspec2" }
|