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 +4 -4
- data/README.md +3 -2
- data/lib/wegift/client.rb +7 -2
- data/lib/wegift/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78e0ef24b5481fd31e4bf96d82f486d48bae2d10
|
4
|
+
data.tar.gz: e90efcb5f259200f4e0f52f556b21259d757b5b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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!
|
data/lib/wegift/version.rb
CHANGED