wegift-ruby-client 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9ed8ed0dd39f8c1b812686edf99c071547e738c
4
- data.tar.gz: 5c970c86606039b4e4e255be7bb7f153e3911566
3
+ metadata.gz: 78e0ef24b5481fd31e4bf96d82f486d48bae2d10
4
+ data.tar.gz: e90efcb5f259200f4e0f52f556b21259d757b5b4
5
5
  SHA512:
6
- metadata.gz: 8fdbdee8879546c26f7b9c5d1ccc57910dd9671e6336d86d890dcf6b028f7e0b460e251cc50e777dc6dff303d4e1490170ed5e0b9c8beb29bd46c88076d8fe81
7
- data.tar.gz: 86e22394fa22a046466c32783ec539496dccbec1ca5fea0adde914fd592588588fdce10f90bd137ba3dfdc0626205fd466cd5354c871457023edd6306f0c0c72
6
+ metadata.gz: 8031c492f87e7bbd660abd16111064c3494680cfdf74a4c1c0988a6a0c67807d94f11f3e21148c2be9f9f449ecadbe4378204f219de1e8806520bed96067e9eb
7
+ data.tar.gz: 56e5eaf9f1fdbd766783f86af2953178217816d455af2a86fcf36045403834f70b43ec028510b0f9e88feab0095f2f586a6d2602154c4127710e5546a9e1ad3c
data/README.md CHANGED
@@ -27,9 +27,10 @@ Simple example for ordering a Digital Card
27
27
  # a simple client
28
28
  client = Wegift::Client.new(
29
29
  :api_host => 'http://sandbox.wegift.io',
30
- :api_path => '/api/b2b-sync/v1/auth'
30
+ :api_path => '/api/b2b-sync/v1/auth',
31
31
  :api_key => ENV['AUTH_NAME'],
32
- :api_secret => ENV['AUTH_PASS']
32
+ :api_secret => ENV['AUTH_PASS'],
33
+ :proxy => ENV['PROXY']
33
34
  )
34
35
 
35
36
  # and a simple request
data/lib/wegift/client.rb CHANGED
@@ -14,8 +14,13 @@ module Wegift
14
14
  @api_key = options[:api_key].to_s
15
15
  @api_secret = options[:api_secret]
16
16
 
17
- @connection = Faraday.new(:url => @api_host)
18
- @connection.basic_auth(@api_key, @api_secret)
17
+ @connection = Faraday.new(:url => @api_host) do |c|
18
+ c.basic_auth(@api_key, @api_secret)
19
+ c.adapter Faraday.default_adapter
20
+ c.options[:proxy] = {
21
+ :uri => URI(options[:proxy])
22
+ } unless options[:proxy].blank?
23
+ end
19
24
  end
20
25
 
21
26
  # KISS since we have only one call!
@@ -1,3 +1,3 @@
1
1
  module Wegift
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wegift-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Klaas Endrikat