eotb 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/eotb.gemspec +1 -1
  3. data/lib/eotb.rb +2 -3
  4. data/spec/eotb_spec.rb +1 -1
  5. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.5
1
+ 0.4.6
data/eotb.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{eotb}
8
- s.version = "0.4.5"
8
+ s.version = "0.4.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ragnarson"]
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 + '/apps/' + api_key + '/events')
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 = @@api_key.merge(hash_format(actor, :actor)).merge(action).merge(hash_format(subject, :subject))
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
@@ -4,7 +4,7 @@ describe Eotb do
4
4
 
5
5
  before(:all) do
6
6
  @response = "200"
7
- Eotb.configure("0"*24)
7
+ Eotb.configure("0"*40)
8
8
  end
9
9
 
10
10
  it "should format actor in string" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eotb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 5
10
- version: 0.4.5
9
+ - 6
10
+ version: 0.4.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ragnarson