marte-ruby 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/marte/token.rb +8 -18
  2. data/lib/marte/version.rb +1 -1
  3. metadata +43 -76
data/lib/marte/token.rb CHANGED
@@ -13,13 +13,6 @@ module Marte
13
13
  MARTE_URL="marte.dit.upm.es"
14
14
  SWF_FILE = "http://marte.dit.upm.es/system/MartEClient.swf"
15
15
 
16
-
17
- #new is called MarteToken.new(:user=>'pepe', :role=>'admin', {:room_id=>'room_name'
18
- #save is called MarteToken.save
19
- #create is called MarteToken.create(:user=>'pepe', :role=>'admin', {:room_id=>'room
20
- #delete is called MarteToken.delete(id)
21
- #show is called MarteToken.find(:all)
22
-
23
16
  #define the headers to add Authentication
24
17
  def self.headers(user, attributes = {})
25
18
  #get the params to fill in the headers
@@ -70,16 +63,14 @@ module Marte
70
63
  end
71
64
  end
72
65
 
73
- def embed_for(user, room, mobile = false, width_value=750, height_value=600)
66
+ def embed_for(user, room, options = {})
67
+ options[:width] ||= 750
68
+ options[:height] ||= 600
69
+
74
70
  token = createToken(user, room).body
75
71
 
76
- if mobile
77
- <<-EMBED
78
- marte://params/#{token}/#{room}/#FFFFFF
79
- EMBED
80
- else
81
- <<-EMBED
82
- <object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" id=\"MartEClient\" width=\"#{width_value}\" height=\"#{height_value}\" codebase=\"http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab\">
72
+ <<-EMBED
73
+ <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\">
83
74
  <param name=\"movie\" value=\" #{ SWF_FILE }\" />
84
75
  <param name=\"quality\" value=\"high\" />
85
76
  <param name=\"allowScriptAccess\" value=\"sameDomain\" />
@@ -87,7 +78,7 @@ module Marte
87
78
  <param name=\"flashVars\" value=\"token=#{token}&room=#{room}&bgcolor=#FFFFFF\" />
88
79
  <embed src=\"#{ SWF_FILE }\" quality=\"high\" \"
89
80
  width=\"#{width_value}\" height=\"#{height_value}\" name=\"MartEClient\" align=\"top\" padding=\"0px 0px 0px 0px\"
90
- flashVars=\"token=#{token}&room=#{room}&bgcolor=#FFFFFF\"
81
+ flashVars=\"token=#{token}&room=#{room}&bgcolor=#FFFFFF#{ "&partner=#{ options[:partner].slug }" if options[:partner] }\"
91
82
  play=\"true\"
92
83
  loop=\"false\"
93
84
  quality=\"high\"
@@ -97,8 +88,7 @@ module Marte
97
88
  pluginspage=\"http://www.adobe.com/go/getflashplayer\">
98
89
  </embed>
99
90
  </object>
100
- EMBED
101
- end
91
+ EMBED
102
92
  end
103
93
  end
104
94
  end
data/lib/marte/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Marte
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,79 +1,56 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: marte-ruby
3
- version: !ruby/object:Gem::Version
4
- hash: 25
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 3
10
- version: 0.0.3
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - GING - UPM
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-09-21 00:00:00 +02:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2011-12-16 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: activeresource
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &75132650 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">"
28
- - !ruby/object:Gem::Version
29
- hash: 5
30
- segments:
31
- - 3
32
- - 0
33
- - 1
18
+ requirements:
19
+ - - ! '>'
20
+ - !ruby/object:Gem::Version
34
21
  version: 3.0.1
35
22
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: ruby-hmac
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *75132650
25
+ - !ruby/object:Gem::Dependency
26
+ name: ruby-hmac
27
+ requirement: &75132440 !ruby/object:Gem::Requirement
41
28
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 0
48
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
49
33
  type: :runtime
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: rspec
53
34
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *75132440
36
+ - !ruby/object:Gem::Dependency
37
+ name: rspec
38
+ requirement: &75132170 !ruby/object:Gem::Requirement
55
39
  none: false
56
- requirements:
57
- - - ">"
58
- - !ruby/object:Gem::Version
59
- hash: 11
60
- segments:
61
- - 2
62
- - 1
63
- - 0
40
+ requirements:
41
+ - - ! '>'
42
+ - !ruby/object:Gem::Version
64
43
  version: 2.1.0
65
44
  type: :development
66
- version_requirements: *id003
45
+ prerelease: false
46
+ version_requirements: *75132170
67
47
  description: Gem description
68
- email:
48
+ email:
69
49
  - social-stream@dit.upm.es
70
50
  executables: []
71
-
72
51
  extensions: []
73
-
74
52
  extra_rdoc_files: []
75
-
76
- files:
53
+ files:
77
54
  - .gitignore
78
55
  - .project
79
56
  - Gemfile
@@ -134,39 +111,29 @@ files:
134
111
  - spec/demo/vendor/plugins/.gitkeep
135
112
  - spec/discover.rb
136
113
  - spec/spec_helper.rb
137
- has_rdoc: true
138
114
  homepage: https://github.com/ging/marte-ruby
139
115
  licenses: []
140
-
141
116
  post_install_message:
142
117
  rdoc_options: []
143
-
144
- require_paths:
118
+ require_paths:
145
119
  - lib
146
- required_ruby_version: !ruby/object:Gem::Requirement
120
+ required_ruby_version: !ruby/object:Gem::Requirement
147
121
  none: false
148
- requirements:
149
- - - ">="
150
- - !ruby/object:Gem::Version
151
- hash: 3
152
- segments:
153
- - 0
154
- version: "0"
155
- required_rubygems_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ required_rubygems_version: !ruby/object:Gem::Requirement
156
127
  none: false
157
- requirements:
158
- - - ">="
159
- - !ruby/object:Gem::Version
160
- hash: 3
161
- segments:
162
- - 0
163
- version: "0"
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
164
132
  requirements: []
165
-
166
133
  rubyforge_project: marte-ruby
167
- rubygems_version: 1.6.2
134
+ rubygems_version: 1.8.12
168
135
  signing_key:
169
136
  specification_version: 3
170
137
  summary: Gem summary
171
138
  test_files: []
172
-
139
+ has_rdoc: