ey_api_hmac 0.0.8 → 0.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.
- data/lib/ey_api_hmac/base_connection.rb +6 -1
- data/lib/ey_api_hmac/version.rb +1 -1
- metadata +4 -4
@@ -7,7 +7,7 @@ module EY
|
|
7
7
|
class BaseConnection
|
8
8
|
attr_reader :auth_id, :auth_key
|
9
9
|
|
10
|
-
def initialize(auth_id, auth_key, user_agent = nil)
|
10
|
+
def initialize(auth_id, auth_key, user_agent = nil, &rack_builder_block)
|
11
11
|
@auth_id = auth_id
|
12
12
|
@auth_key = auth_key
|
13
13
|
@standard_headers = {
|
@@ -16,6 +16,7 @@ module EY
|
|
16
16
|
'HTTP_DATE' => Time.now.httpdate,
|
17
17
|
'USER_AGENT' => user_agent || default_user_agent
|
18
18
|
}
|
19
|
+
@rack_builder_block = rack_builder_block
|
19
20
|
end
|
20
21
|
|
21
22
|
class NotFound < StandardError
|
@@ -71,8 +72,12 @@ module EY
|
|
71
72
|
#damn you scope!
|
72
73
|
auth_id_arg = auth_id
|
73
74
|
auth_key_arg = auth_key
|
75
|
+
rack_builder_block = @rack_builder_block
|
74
76
|
@client ||= Rack::Client.new do
|
75
77
|
use EY::ApiHMAC::ApiAuth::Client, auth_id_arg, auth_key_arg
|
78
|
+
if rack_builder_block
|
79
|
+
instance_eval(&rack_builder_block)
|
80
|
+
end
|
76
81
|
run bak
|
77
82
|
end
|
78
83
|
end
|
data/lib/ey_api_hmac/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ey_api_hmac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Jacob Burkhart & Thorben Schr\xC3\xB6der & David Calavera & others"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-09-07 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rack-client
|