ucengine 0.2.1 → 0.3.0
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/VERSION +1 -1
- data/lib/ucengine.rb +3 -3
- data/spec/ucengine_mock.rb +3 -3
- data/ucengine.gemspec +1 -1
- metadata +5 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/lib/ucengine.rb
CHANGED
@@ -41,7 +41,7 @@ class UCEngine
|
|
41
41
|
|
42
42
|
API_ROOT = "/api"
|
43
43
|
|
44
|
-
API_VERSION = "0.
|
44
|
+
API_VERSION = "0.3"
|
45
45
|
|
46
46
|
attr_reader :sid, :uid, :connected
|
47
47
|
|
@@ -95,7 +95,7 @@ class UCEngine
|
|
95
95
|
def connect(uid, params)
|
96
96
|
@uid = uid
|
97
97
|
begin
|
98
|
-
response =
|
98
|
+
response = post("/presence/", {:uid => @uid, :credential => params[:credential]})
|
99
99
|
@connected = true
|
100
100
|
@sid = response['result']
|
101
101
|
debug(UCEngine::DEBUG, "Authentification complete for #{@uid}/#{@sid}.")
|
@@ -181,7 +181,7 @@ class UCEngine
|
|
181
181
|
params["metadata[#{key}]"] = event[:metadata][key]
|
182
182
|
end
|
183
183
|
end
|
184
|
-
|
184
|
+
post("/event/#{event[:location].join("/")}", params)
|
185
185
|
end
|
186
186
|
|
187
187
|
# Return the current timestamp from the server. The timestamp is expressed in milliseconds
|
data/spec/ucengine_mock.rb
CHANGED
@@ -6,9 +6,9 @@ require 'spec_helper'
|
|
6
6
|
class UCEngineMock < Sinatra::Base
|
7
7
|
use Rack::MethodOverride
|
8
8
|
|
9
|
-
VERSION = '0.
|
9
|
+
VERSION = '0.3'
|
10
10
|
|
11
|
-
|
11
|
+
post "/api/#{VERSION}/presence/" do
|
12
12
|
if params[:uid] == USER && params[:credential] == PASSWORD
|
13
13
|
status 200
|
14
14
|
{:result => "test_sid"}.to_json
|
@@ -23,7 +23,7 @@ class UCEngineMock < Sinatra::Base
|
|
23
23
|
{:result => 1234}.to_json
|
24
24
|
end
|
25
25
|
|
26
|
-
|
26
|
+
post "/api/#{VERSION}/event/:meeting" do
|
27
27
|
if params[:meeting] == UCE_MEETING
|
28
28
|
if params[:type] == "test_type" &&
|
29
29
|
params[:parent] == "test_parent" &&
|
data/ucengine.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ucengine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- AF83
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-16 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|