marte-ruby 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/marte/token.rb +7 -5
- data/lib/marte/version.rb +1 -1
- metadata +8 -8
data/lib/marte/token.rb
CHANGED
@@ -4,14 +4,15 @@ require 'hmac-sha1'
|
|
4
4
|
module Marte
|
5
5
|
class Token < ActiveResource::Base
|
6
6
|
|
7
|
-
self.site = "http://
|
7
|
+
self.site = "http://marte4.dit.upm.es:5080/vaas/service"
|
8
8
|
self.element_name = "token"
|
9
9
|
|
10
10
|
KEY="secret"
|
11
11
|
SERVICE_NAME="marteRed5"
|
12
12
|
MAUTH_VERSION="3.1"
|
13
13
|
MARTE_URL="marte.dit.upm.es"
|
14
|
-
|
14
|
+
ROOM_SWF_FILE = "http://marte.dit.upm.es/system/MartEClient.swf"
|
15
|
+
CHAT_SWF_FILE = "http://marte.dit.upm.es/system/MartEClient.swf"
|
15
16
|
|
16
17
|
#define the headers to add Authentication
|
17
18
|
def self.headers(user, attributes = {})
|
@@ -66,18 +67,19 @@ module Marte
|
|
66
67
|
def embed_for(user, room, options = {})
|
67
68
|
options[:width] ||= 750
|
68
69
|
options[:height] ||= 600
|
70
|
+
swf_file = ( options[:partner].present? ? ROOM_SWF_FILE : CHAT_SWF_FILE )
|
69
71
|
|
70
72
|
token = createToken(user, room).body
|
71
73
|
|
72
74
|
<<-EMBED
|
73
75
|
<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" id=\"MartEClient\" width=\"#{ options[:width] }\" height=\"#{ options[:height] }\" codebase=\"http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab\">
|
74
|
-
<param name=\"movie\" value=\" #{
|
76
|
+
<param name=\"movie\" value=\" #{ swf_file }\" />
|
75
77
|
<param name=\"quality\" value=\"high\" />
|
76
78
|
<param name=\"allowScriptAccess\" value=\"sameDomain\" />
|
77
79
|
<param name=\"allowFullscreen\" value=\"true\" />
|
78
80
|
<param name=\"flashVars\" value=\"token=#{token}&room=#{room}&bgcolor=#FFFFFF\" />
|
79
|
-
<embed src=\"#{
|
80
|
-
width=\"#{
|
81
|
+
<embed src=\"#{ swf_file }\" quality=\"high\" \"
|
82
|
+
width=\"#{options[:width]}\" height=\"#{options[:height]}\" name=\"MartEClient\" align=\"top\" padding=\"0px 0px 0px 0px\"
|
81
83
|
flashVars=\"token=#{token}&room=#{room}&bgcolor=#FFFFFF#{ "&partner=#{ options[:partner].slug }" if options[:partner] }\"
|
82
84
|
play=\"true\"
|
83
85
|
loop=\"false\"
|
data/lib/marte/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marte-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-12-
|
12
|
+
date: 2011-12-19 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activeresource
|
16
|
-
requirement: &
|
16
|
+
requirement: &86746460 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>'
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 3.0.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *86746460
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: ruby-hmac
|
27
|
-
requirement: &
|
27
|
+
requirement: &86746250 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *86746250
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &86745930 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>'
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 2.1.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *86745930
|
47
47
|
description: Gem description
|
48
48
|
email:
|
49
49
|
- social-stream@dit.upm.es
|