fat_zebra 2.0.8 → 2.0.9
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.
- checksums.yaml +8 -8
- data/lib/fat_zebra/config.rb +1 -1
- data/lib/fat_zebra/gateway.rb +18 -0
- data/lib/fat_zebra/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDcxZDYzZmQwODgxNjYyZjAzZmVkMzkyY2RhMTZhYWZkN2NjZWFmNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmRjNDI0ZGQxMGQ1NmRkNWE1NDFkNTkwMDIwYTdiMmUxMTM2NTFjMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWNmZTg1N2Y3MmE0NmY5ZmExOGIwMGRlZmMzZjgwMjUwMjE1NmQzNTAzNjcx
|
10
|
+
MTY4MjRkZWE3MjhiZjRkYjE0ZWUxODI3NTkyODEwOTJmNjkzNjk0NWFjNTVm
|
11
|
+
ZmE2NGVmMTc2ZWFjZmM4NjBlNzFhODY5NGYwMzE4MjIxMGZhMDI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGEzMDBmODNlY2YyNWJkN2U5YzIzYjdhY2Q3ZDI5MWZmYzJkZDk3N2EwNDJi
|
14
|
+
OTQwNzQwZmQxOWNkODUwNDU0NWQ5ZmFkN2U1MTM4ZTJiMmIyMTY4ZTg2MDAz
|
15
|
+
YTQ2MzYwNGMzZTc1NjkyMDQ4OGYwOTE1NzM5YWYzMTAzNGRiZjM=
|
data/lib/fat_zebra/config.rb
CHANGED
@@ -6,7 +6,7 @@ module FatZebra
|
|
6
6
|
@config ||= {}
|
7
7
|
end
|
8
8
|
|
9
|
-
[:username, :token, :test_mode, :sandbox, :options, :gateway].each do |attr|
|
9
|
+
[:username, :token, :test_mode, :sandbox, :options, :gateway, :proxy].each do |attr|
|
10
10
|
define_method "#{attr}" do |value = nil|
|
11
11
|
if value.nil?
|
12
12
|
config[attr.to_s]
|
data/lib/fat_zebra/gateway.rb
CHANGED
@@ -10,6 +10,7 @@ module FatZebra
|
|
10
10
|
g.options ||= {}
|
11
11
|
g.options[:test_mode] = config.test_mode
|
12
12
|
g.options.merge!(config.options || {})
|
13
|
+
g.proxy = g.options[:proxy]
|
13
14
|
|
14
15
|
g
|
15
16
|
end
|
@@ -28,10 +29,27 @@ module FatZebra
|
|
28
29
|
self.token = token
|
29
30
|
self.gateway_server = gateway_server
|
30
31
|
self.options = DEFAULT_OPTIONS.merge(options)
|
32
|
+
self.proxy = self.options[:proxy]
|
31
33
|
|
32
34
|
require_field :username, :token, :gateway_server
|
33
35
|
end
|
34
36
|
|
37
|
+
# Set the proxy for RestClient
|
38
|
+
#
|
39
|
+
# @param [String] val the proxy
|
40
|
+
#
|
41
|
+
# @return Nil
|
42
|
+
def proxy=(val)
|
43
|
+
RestClient.proxy = val
|
44
|
+
end
|
45
|
+
|
46
|
+
# Get the proxy set for RestClient
|
47
|
+
#
|
48
|
+
# @return [String] the proxy set for RestClient
|
49
|
+
def proxy
|
50
|
+
RestClient.proxy
|
51
|
+
end
|
52
|
+
|
35
53
|
# Performs a purchase transaction against the gateway
|
36
54
|
#
|
37
55
|
# amount - the amount as an integer e.g. (1.00 * 100).to_i
|
data/lib/fat_zebra/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fat_zebra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Savage
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|