fat_zebra 2.0.8 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWI2ZTY5ZGU2ZDYzODgzMDA0YzcwMGRhZGRjNjhmYTEyN2ZjN2YzNg==
4
+ MDcxZDYzZmQwODgxNjYyZjAzZmVkMzkyY2RhMTZhYWZkN2NjZWFmNw==
5
5
  data.tar.gz: !binary |-
6
- YTUwZjJkMGFmOWE5ZjE2NGMyODlmYWYwYzIxNGUzOTNlZjFlOTBkMg==
6
+ ZmRjNDI0ZGQxMGQ1NmRkNWE1NDFkNTkwMDIwYTdiMmUxMTM2NTFjMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MGYxZGVlMWMzOTU2NTllZmQ3ODFlNDdhYjIyOGJjOTFmNzg3YTkzZjY1MDhj
10
- YWFjMDQxZWFhMjkzMTM2YWNhNmE2NGZiNjMzMmJmODY0YmZkY2MzYTNmZWE2
11
- ZWEyOGQ5OWJjNzliNTlkN2FiNWI3Yzc4ZDAzNGFhNzlmMDYxOWQ=
9
+ OWNmZTg1N2Y3MmE0NmY5ZmExOGIwMGRlZmMzZjgwMjUwMjE1NmQzNTAzNjcx
10
+ MTY4MjRkZWE3MjhiZjRkYjE0ZWUxODI3NTkyODEwOTJmNjkzNjk0NWFjNTVm
11
+ ZmE2NGVmMTc2ZWFjZmM4NjBlNzFhODY5NGYwMzE4MjIxMGZhMDI=
12
12
  data.tar.gz: !binary |-
13
- N2Q0MzUyZTAzZTFjODVhNGMyZjI5ZWY3MzJmMWZhZGM3MTM1YTZlZmJkMDBl
14
- M2RiNTg2ZDgyZWZjNzBhNWZkMGYwZDliNmU2MjQ5ZDVlZTM0ZDA4OWVhNjE2
15
- ZjJkYjBmNzhkYzVlY2UzOTcwMDBiYzJlOGQ3OWJkNDc2ZWNmMTY=
13
+ ZGEzMDBmODNlY2YyNWJkN2U5YzIzYjdhY2Q3ZDI5MWZmYzJkZDk3N2EwNDJi
14
+ OTQwNzQwZmQxOWNkODUwNDU0NWQ5ZmFkN2U1MTM4ZTJiMmIyMTY4ZTg2MDAz
15
+ YTQ2MzYwNGMzZTc1NjkyMDQ4OGYwOTE1NzM5YWYzMTAzNGRiZjM=
@@ -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]
@@ -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
@@ -1,3 +1,3 @@
1
1
  module FatZebra
2
- VERSION = "2.0.8"
2
+ VERSION = "2.0.9"
3
3
  end
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.8
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-01-07 00:00:00.000000000 Z
11
+ date: 2016-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec