vindicia 0.2.4 → 0.2.5
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/Isolate +6 -3
- data/README.md +2 -2
- data/Rakefile +3 -0
- data/VERSION +1 -1
- data/lib/vindicia.rb +6 -1
- data/spec/vindicia_spec.rb +9 -1
- metadata +46 -4
data/Isolate
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@ This library is an API wrapper for the [Vindicia][] payment gateway.
|
|
2
2
|
|
3
3
|
# Dependencies
|
4
4
|
|
5
|
-
As of the 0.2.0 release, this gem targets Ruby 1.9.
|
5
|
+
As of the 0.2.0 release, this gem targets both Ruby 1.8 and 1.9.
|
6
6
|
|
7
7
|
It requires the [savon][] SOAP client library, and will use [httpclient][] if present (otherwise just using net/http).
|
8
8
|
|
@@ -31,7 +31,7 @@ To run the specs, you'll need to copy `authenticate.example.rb` to `authenticate
|
|
31
31
|
|
32
32
|
# Known Issues
|
33
33
|
|
34
|
-
|
34
|
+
Savon and HTTPI are noisy logging to stdout by default, see the top of vindicia_spec.rb for some sample code to quiet them.
|
35
35
|
|
36
36
|
WSDL files are being live-downloaded every run. It'd be nice to cache them locally.
|
37
37
|
|
data/Rakefile
CHANGED
@@ -14,6 +14,9 @@ begin
|
|
14
14
|
gemspec.homepage = "http://github.com/almlabs/vindicia"
|
15
15
|
gemspec.authors = ["Jamie Macey"]
|
16
16
|
gemspec.add_dependency('savon', '=0.8.2')
|
17
|
+
gemspec.add_development_dependency('isolate')
|
18
|
+
gemspec.add_development_dependency('rspec')
|
19
|
+
gemspec.add_development_dependency('jeweler')
|
17
20
|
end
|
18
21
|
rescue LoadError
|
19
22
|
puts "Jeweler not available. Install it with: gem install jeweler"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/lib/vindicia.rb
CHANGED
@@ -161,6 +161,8 @@ module Vindicia
|
|
161
161
|
xml.tag!(name, value, {"xsi:nil" => true})
|
162
162
|
else
|
163
163
|
type = type.sub(/^tns/,'vin')
|
164
|
+
# format dates/times with full timestamp
|
165
|
+
value = value.strftime('%Y-%m-%dT%H:%M:%S%z') if value.respond_to?(:strftime) && type == 'xsd:dateTime'
|
164
166
|
xml.tag!(name, value, {"xsi:type" => type})
|
165
167
|
end
|
166
168
|
end
|
@@ -179,7 +181,10 @@ module Vindicia
|
|
179
181
|
method = underscore(method.to_s).to_sym # back compatability from camelCase api
|
180
182
|
out_vars = nil # set up outside variable
|
181
183
|
|
182
|
-
response = soap.request(:wsdl, method) do |soap, wsdl|
|
184
|
+
response = soap.request(:wsdl, method) do |soap, wsdl, http|
|
185
|
+
# Don't care about broken SSL when testing
|
186
|
+
http.auth.ssl.verify_mode = :none if Vindicia.environment == 'prodtest'
|
187
|
+
|
183
188
|
out_vars = wsdl.arg_list["#{method.to_s.lower_camelcase}_out"]
|
184
189
|
|
185
190
|
soap.namespaces["xmlns:vin"] = Vindicia::NAMESPACE
|
data/spec/vindicia_spec.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'vindicia'
|
2
2
|
require 'authenticate'
|
3
3
|
|
4
|
+
def HTTPI.log(*args); end
|
4
5
|
Savon.configure do |config|
|
5
6
|
config.log = false # disable logging
|
6
7
|
#config.log_level = :info # changing the log level
|
@@ -226,6 +227,13 @@ describe Vindicia do
|
|
226
227
|
|
227
228
|
autobill.request_status.code.should == 200
|
228
229
|
end
|
230
|
+
|
231
|
+
it 'should find date-boxed autobill updates' do
|
232
|
+
date = Date.new(2011,1,1)
|
233
|
+
ret, autobills = Vindicia::AutoBill.fetchDeltaSince(date, 1, 5, date+1)
|
234
|
+
ret.code.should == 200
|
235
|
+
autobills.size.should == 5
|
236
|
+
end
|
229
237
|
end
|
230
238
|
|
231
239
|
describe Vindicia::Transaction do
|
@@ -246,7 +254,7 @@ describe Vindicia do
|
|
246
254
|
}, 100, false)
|
247
255
|
transaction.request_status.code.should == 200
|
248
256
|
end
|
249
|
-
|
257
|
+
|
250
258
|
it 'should auth a purchase with payment method ID' do
|
251
259
|
payment_id = @account.paymentMethods.first.merchant_payment_method_id
|
252
260
|
transaction = Vindicia::Transaction.auth({
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vindicia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jamie Macey
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-03-04 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -34,6 +34,48 @@ dependencies:
|
|
34
34
|
version: 0.8.2
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: isolate
|
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
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: rspec
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
63
|
+
type: :development
|
64
|
+
version_requirements: *id003
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: jeweler
|
67
|
+
prerelease: false
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
type: :development
|
78
|
+
version_requirements: *id004
|
37
79
|
description: Wrapper interface to Vindicia's SOAP API
|
38
80
|
email: jamie@almlabs.com
|
39
81
|
executables: []
|