eotb 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/eotb.gemspec +1 -1
- data/lib/eotb.rb +2 -3
- data/spec/eotb_spec.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.6
|
data/eotb.gemspec
CHANGED
data/lib/eotb.rb
CHANGED
@@ -12,14 +12,13 @@ class Eotb
|
|
12
12
|
METHODS = [:to_actor, :to_subject, :to_json, :to_hash, :inspect]
|
13
13
|
|
14
14
|
def self.configure(api_key, host = '127.0.0.1', port = '3000')
|
15
|
-
@@uri = URI.parse('http://' + host + ':' + port + '/
|
15
|
+
@@uri = URI.parse('http://' + host + ':' + port + '/events/' + api_key)
|
16
16
|
@@post = Net::HTTP::Post.new(@@uri.path)
|
17
|
-
@@api_key = { "event[app_id]" => api_key }
|
18
17
|
end
|
19
18
|
|
20
19
|
def self.register_event(actor, action, subject = {})
|
21
20
|
action = { "event[action]" => action.to_s }
|
22
|
-
event =
|
21
|
+
event = (hash_format(actor, :actor)).merge(action).merge(hash_format(subject, :subject))
|
23
22
|
@@post.set_form_data(event)
|
24
23
|
begin
|
25
24
|
Timeout::timeout(2) {
|
data/spec/eotb_spec.rb
CHANGED
metadata
CHANGED