xpay 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/test/xpay_test.rb ADDED
@@ -0,0 +1,41 @@
1
+ require 'test_helper'
2
+ require 'xpay'
3
+ class XpayTest < Test::Unit::TestCase
4
+ context "the xpay module" do
5
+ setup do
6
+ @xpay = Xpay
7
+ end
8
+
9
+ should "have standard config xml" do
10
+ assert_kind_of(REXML::Document,@xpay.root_xml)
11
+ assert_equal @xpay.config, OpenStruct.new(xpay_config("default"))
12
+ end
13
+ should "have xml document formed to xpay spec" do
14
+ assert_equal @xpay.root_xml.root.to_s, root_xml_string
15
+ end
16
+ should "load a new config from yaml file" do
17
+ assert @xpay.load_config(File.expand_path(File.dirname(__FILE__)+ '/fixtures'))
18
+ end
19
+
20
+ context "with new configuration" do
21
+
22
+ should "have a new config" do
23
+ assert_equal @xpay.config, OpenStruct.new(xpay_config("config_load_test"))
24
+ end
25
+
26
+ should "have an environment" do
27
+ assert_equal @xpay.environment, "development"
28
+ end
29
+
30
+ should "have an app root" do
31
+ assert_equal @xpay.app_root, File.expand_path(File.dirname(__FILE__) + '/fixtures')
32
+ end
33
+ end
34
+
35
+ should "load a new config from hash" do
36
+ assert @xpay.set_config(xpay_config("default"))
37
+ assert_equal @xpay.config, OpenStruct.new(xpay_config("default"))
38
+ end
39
+
40
+ end
41
+ end
data/xpay.gemspec ADDED
@@ -0,0 +1,23 @@
1
+ # encoding: UTF-8
2
+ require File.expand_path('../lib/xpay/version', __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'xpay'
6
+ s.homepage = 'http://github.com/vpacher/xpay'
7
+ s.summary = 'Implementation of SecureTrading Xpay4 as gem'
8
+ s.description = 'This gem provides an abstraction layer to Xpay4. SecureTrading Xpay4 is a Java Applet that handles payments via SecureTrading and receives and sends xml documents.'
9
+ s.require_path = 'lib'
10
+ s.authors = ['Volker Pacher']
11
+ s.email = ['volker.pacher@gmail.com']
12
+ s.version = Xpay::Version
13
+ s.extra_rdoc_files = ["README.rdoc"]
14
+ s.rdoc_options = ["--line-numbers", "--main", "README.rdoc"]
15
+ s.files = Dir.glob("{bin,examples,lib,rails,test}/**/*") + %w[LICENSE UPGRADES README.rdoc] + `git ls-files`.split("\n")
16
+
17
+ s.add_development_dependency "active_support", ">= 3.0.0"
18
+ s.add_development_dependency "bundler", ">= 1.0.0"
19
+ s.add_development_dependency "rspec", ">= 2.0.0"
20
+ s.add_development_dependency "shoulda"
21
+ s.add_development_dependency 'mocha'
22
+ s.add_development_dependency 'log_buddy'
23
+ end
metadata ADDED
@@ -0,0 +1,193 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: xpay
3
+ version: !ruby/object:Gem::Version
4
+ hash: 21
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 5
10
+ version: 0.0.5
11
+ platform: ruby
12
+ authors:
13
+ - Volker Pacher
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-10-26 00:00:00 +01:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: active_support
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 7
30
+ segments:
31
+ - 3
32
+ - 0
33
+ - 0
34
+ version: 3.0.0
35
+ type: :development
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: bundler
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 23
46
+ segments:
47
+ - 1
48
+ - 0
49
+ - 0
50
+ version: 1.0.0
51
+ type: :development
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: rspec
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ hash: 15
62
+ segments:
63
+ - 2
64
+ - 0
65
+ - 0
66
+ version: 2.0.0
67
+ type: :development
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ name: shoulda
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ hash: 3
78
+ segments:
79
+ - 0
80
+ version: "0"
81
+ type: :development
82
+ version_requirements: *id004
83
+ - !ruby/object:Gem::Dependency
84
+ name: mocha
85
+ prerelease: false
86
+ requirement: &id005 !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 3
92
+ segments:
93
+ - 0
94
+ version: "0"
95
+ type: :development
96
+ version_requirements: *id005
97
+ - !ruby/object:Gem::Dependency
98
+ name: log_buddy
99
+ prerelease: false
100
+ requirement: &id006 !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ hash: 3
106
+ segments:
107
+ - 0
108
+ version: "0"
109
+ type: :development
110
+ version_requirements: *id006
111
+ description: This gem provides an abstraction layer to Xpay4. SecureTrading Xpay4 is a Java Applet that handles payments via SecureTrading and receives and sends xml documents.
112
+ email:
113
+ - volker.pacher@gmail.com
114
+ executables: []
115
+
116
+ extensions: []
117
+
118
+ extra_rdoc_files:
119
+ - README.rdoc
120
+ files:
121
+ - lib/xpay.rb
122
+ - lib/xpay/transaction.rb
123
+ - lib/xpay/version.rb
124
+ - lib/xpay/core/customer.rb
125
+ - lib/xpay/core/operation.rb
126
+ - lib/xpay/core/creditcard.rb
127
+ - lib/xpay/payment.rb
128
+ - rails/init.rb
129
+ - test/xpay_test.rb
130
+ - test/fixtures/customer.xml
131
+ - test/fixtures/operation.yml
132
+ - test/fixtures/operation.xml
133
+ - test/fixtures/response.xml
134
+ - test/fixtures/creditcards.yml
135
+ - test/fixtures/customer.yml
136
+ - test/fixtures/xpay_defaults.yml
137
+ - test/fixtures/request_rewritten.xml
138
+ - test/fixtures/response_3d.xml
139
+ - test/fixtures/root.xml
140
+ - test/fixtures/config/xpay.yml
141
+ - test/functional/payment_functional_test.rb
142
+ - test/test_helper.rb
143
+ - test/xpay/core/creditcard_test.rb
144
+ - test/xpay/core/customer_test.rb
145
+ - test/xpay/core/operation_test.rb
146
+ - test/xpay/payment_test.rb
147
+ - LICENSE
148
+ - UPGRADES
149
+ - README.rdoc
150
+ - .gitignore
151
+ - Gemfile
152
+ - Gemfile.lock
153
+ - Rakefile
154
+ - tasks/xpay_tasks.rake
155
+ - xpay.gemspec
156
+ has_rdoc: true
157
+ homepage: http://github.com/vpacher/xpay
158
+ licenses: []
159
+
160
+ post_install_message:
161
+ rdoc_options:
162
+ - --line-numbers
163
+ - --main
164
+ - README.rdoc
165
+ require_paths:
166
+ - lib
167
+ required_ruby_version: !ruby/object:Gem::Requirement
168
+ none: false
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ hash: 3
173
+ segments:
174
+ - 0
175
+ version: "0"
176
+ required_rubygems_version: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ hash: 3
182
+ segments:
183
+ - 0
184
+ version: "0"
185
+ requirements: []
186
+
187
+ rubyforge_project:
188
+ rubygems_version: 1.3.7
189
+ signing_key:
190
+ specification_version: 3
191
+ summary: Implementation of SecureTrading Xpay4 as gem
192
+ test_files: []
193
+