bigbluebutton_rails 1.4.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.ruby-version +1 -1
- data/.travis.yml +10 -1
- data/CHANGELOG.md +259 -0
- data/Gemfile +14 -19
- data/Gemfile.lock +194 -188
- data/README.md +416 -0
- data/Rakefile +12 -12
- data/TODO.md +13 -0
- data/app/controllers/bigbluebutton/playback_types_controller.rb +44 -0
- data/app/controllers/bigbluebutton/recordings_controller.rb +17 -10
- data/app/controllers/bigbluebutton/rooms_controller.rb +65 -36
- data/app/controllers/bigbluebutton/servers_controller.rb +12 -8
- data/app/models/bigbluebutton_metadata.rb +1 -1
- data/app/models/bigbluebutton_playback_format.rb +22 -1
- data/app/models/bigbluebutton_playback_type.rb +29 -0
- data/app/models/bigbluebutton_recording.rb +38 -19
- data/app/models/bigbluebutton_room.rb +150 -73
- data/app/models/bigbluebutton_room_options.rb +10 -7
- data/app/models/bigbluebutton_server.rb +69 -13
- data/app/models/bigbluebutton_server_config.rb +49 -0
- data/app/views/bigbluebutton/recordings/_form.html.erb +4 -0
- data/app/views/bigbluebutton/recordings/_recordings.html.erb +10 -3
- data/app/views/bigbluebutton/rooms/_form.html.erb +18 -6
- data/app/views/bigbluebutton/rooms/_rooms.html.erb +6 -3
- data/app/views/bigbluebutton/rooms/invite.html.erb +5 -5
- data/app/views/bigbluebutton/rooms/show.html.erb +18 -6
- data/app/views/bigbluebutton/servers/_form.html.erb +1 -1
- data/app/views/bigbluebutton/servers/show.html.erb +5 -0
- data/app/workers/bigbluebutton_finish_meetings.rb +11 -0
- data/app/workers/bigbluebutton_update_recordings.rb +11 -0
- data/app/workers/bigbluebutton_update_server_configs.rb +18 -0
- data/bigbluebutton_rails.gemspec +8 -7
- data/config/locales/en.yml +52 -7
- data/config/locales/pt-br.yml +162 -0
- data/config/resque/resque.rake +27 -0
- data/config/resque/workers_schedule.yml +17 -0
- data/lib/bigbluebutton_rails.rb +30 -2
- data/lib/bigbluebutton_rails/background_tasks.rb +31 -0
- data/lib/bigbluebutton_rails/controller_methods.rb +12 -8
- data/lib/bigbluebutton_rails/dial_number.rb +48 -0
- data/lib/bigbluebutton_rails/rails/routes.rb +9 -2
- data/lib/bigbluebutton_rails/utils.rb +9 -2
- data/lib/bigbluebutton_rails/version.rb +1 -1
- data/lib/generators/bigbluebutton_rails/install_generator.rb +0 -8
- data/lib/generators/bigbluebutton_rails/templates/migration.rb +28 -6
- data/lib/generators/bigbluebutton_rails/templates/migration_2_0_0.rb +56 -0
- data/lib/tasks/bigbluebutton_rails/meetings.rake +1 -13
- data/lib/tasks/bigbluebutton_rails/recordings.rake +1 -12
- data/lib/tasks/bigbluebutton_rails/server_configs.rake +10 -0
- data/spec/bigbluebutton_rails_spec.rb +0 -13
- data/spec/controllers/bigbluebutton/playback_types_controller_spec.rb +76 -0
- data/spec/controllers/bigbluebutton/recordings_controller_spec.rb +109 -37
- data/spec/controllers/bigbluebutton/rooms_controller_exception_handling_spec.rb +1 -0
- data/spec/controllers/bigbluebutton/rooms_controller_json_responses_spec.rb +27 -3
- data/spec/controllers/bigbluebutton/rooms_controller_spec.rb +338 -77
- data/spec/controllers/bigbluebutton/servers_controller_json_responses_spec.rb +8 -0
- data/spec/controllers/bigbluebutton/servers_controller_spec.rb +182 -47
- data/spec/factories/bigbluebutton_meeting.rb +2 -2
- data/spec/factories/bigbluebutton_playback_format.rb +2 -2
- data/spec/factories/bigbluebutton_playback_type.rb +7 -0
- data/spec/factories/bigbluebutton_recording.rb +8 -0
- data/spec/factories/bigbluebutton_room.rb +10 -3
- data/spec/factories/bigbluebutton_server.rb +6 -1
- data/spec/factories/bigbluebutton_server_config.rb +6 -0
- data/spec/generators/install_generator_spec.rb +0 -16
- data/spec/lib/bigbluebutton_rails/background_tasks_spec.rb +61 -0
- data/spec/lib/bigbluebutton_rails/dial_number_spec.rb +78 -0
- data/spec/lib/bigbluebutton_rails/utils_spec.rb +56 -0
- data/spec/lib/tasks/meetings_rake_spec.rb +14 -1
- data/spec/lib/tasks/recordings_rake_spec.rb +14 -1
- data/spec/models/bigbluebutton_meeting_db_spec.rb +3 -3
- data/spec/models/bigbluebutton_meeting_spec.rb +4 -4
- data/spec/models/bigbluebutton_playback_format_db_spec.rb +0 -1
- data/spec/models/bigbluebutton_playback_format_spec.rb +75 -4
- data/spec/models/bigbluebutton_playback_type_db_spec.rb +14 -0
- data/spec/models/bigbluebutton_playback_type_spec.rb +76 -0
- data/spec/models/bigbluebutton_recording_db_spec.rb +3 -1
- data/spec/models/bigbluebutton_recording_spec.rb +234 -58
- data/spec/models/bigbluebutton_room_db_spec.rb +8 -6
- data/spec/models/bigbluebutton_room_options_db_spec.rb +1 -0
- data/spec/models/bigbluebutton_room_options_spec.rb +137 -38
- data/spec/models/bigbluebutton_room_spec.rb +540 -153
- data/spec/models/bigbluebutton_server_config_spec.rb +115 -0
- data/spec/models/bigbluebutton_server_spec.rb +180 -23
- data/spec/rails_app/app/controllers/my_playback_types_controller.rb +7 -0
- data/spec/rails_app/app/views/frontpage/show.html.erb +1 -0
- data/spec/rails_app/app/views/my_playback_types/index.html.erb +33 -0
- data/spec/rails_app/config/application.rb +0 -3
- data/spec/rails_app/config/database.yml.travis +10 -0
- data/spec/rails_app/config/environments/development.rb +1 -6
- data/spec/rails_app/config/environments/production.rb +2 -0
- data/spec/rails_app/config/environments/test.rb +2 -0
- data/spec/rails_app/config/routes.rb +5 -2
- data/spec/rails_app/db/seeds.rb +1 -1
- data/spec/rails_app/features/config.yml.example +3 -4
- data/spec/rails_app/features/join_rooms.feature +14 -14
- data/spec/rails_app/features/step_definitions/activity_monitor_servers_step.rb +2 -2
- data/spec/rails_app/features/step_definitions/create_rooms_steps.rb +4 -4
- data/spec/rails_app/features/step_definitions/destroy_rooms_steps.rb +2 -2
- data/spec/rails_app/features/step_definitions/join_rooms_steps.rb +10 -10
- data/spec/rails_app/features/step_definitions/web_steps.rb +2 -2
- data/spec/rails_app/features/support/configurations.rb +1 -1
- data/spec/rails_app/features/support/templates.rb +12 -12
- data/spec/rails_app/lib/tasks/db/populate.rake +19 -6
- data/spec/routing/bigbluebutton/custom_controllers_routing_spec.rb +1 -1
- data/spec/routing/bigbluebutton/recordings_only_routing_spec.rb +2 -2
- data/spec/routing/bigbluebutton/recordings_routing_spec.rb +2 -2
- data/spec/routing/bigbluebutton/rooms_only_routing_spec.rb +1 -1
- data/spec/routing/bigbluebutton/rooms_routing_spec.rb +15 -1
- data/spec/routing/bigbluebutton/servers_only_routing_spec.rb +1 -1
- data/spec/routing/bigbluebutton/servers_routing_spec.rb +1 -1
- data/spec/spec_helper.rb +23 -31
- data/spec/support/matchers/delegate_matcher.rb +8 -1
- data/spec/support/matchers/shoulda/respond_with_json_matcher.rb +2 -2
- data/spec/support/mocked_server.rb +2 -0
- data/spec/support/shared_contexts/rake.rb +23 -0
- data/spec/workers/bigbluebutton_finish_meetings_spec.rb +14 -0
- data/spec/workers/bigbluebutton_update_recordings_spec.rb +14 -0
- data/spec/workers/bigbluebutton_update_server_configs_spec.rb +47 -0
- metadata +70 -59
- data/CHANGELOG.rdoc +0 -111
- data/README.rdoc +0 -319
- data/TODO.rdoc +0 -16
- data/config/schedule.rb +0 -7
@@ -22,10 +22,5 @@ RailsApp::Application.configure do
|
|
22
22
|
# Only use best-standards-support built into browsers
|
23
23
|
config.action_dispatch.best_standards_support = :builtin
|
24
24
|
|
25
|
-
|
26
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
27
|
-
|
28
|
-
# Log the query plan for queries taking more than this (works
|
29
|
-
# with SQLite, MySQL, and PostgreSQL)
|
30
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
25
|
+
config.eager_load = false
|
31
26
|
end
|
@@ -23,11 +23,14 @@ RailsApp::Application.routes.draw do
|
|
23
23
|
bigbluebutton_routes :default, :only => "recordings"
|
24
24
|
end
|
25
25
|
|
26
|
+
get "bigbluebutton/my_playback_types", :to => 'my_playback_types#index', :as => "my_playback_types"
|
27
|
+
|
28
|
+
# TODO: this is needed for the tests, but break the views when running the test app
|
26
29
|
bigbluebutton_routes :default,
|
27
30
|
:scope => "custom",
|
28
31
|
:controllers => { :servers => "custom_servers",
|
29
|
-
|
30
|
-
|
32
|
+
:rooms => "custom_rooms",
|
33
|
+
:recordings => "custom_recordings" },
|
31
34
|
:as => "custom_name"
|
32
35
|
|
33
36
|
root :to => "frontpage#show"
|
data/spec/rails_app/db/seeds.rb
CHANGED
@@ -13,7 +13,7 @@ if File.exists?(file)
|
|
13
13
|
else
|
14
14
|
server = config['servers'][config['servers'].keys.first]
|
15
15
|
end
|
16
|
-
server['version'] = '0.
|
16
|
+
server['version'] = '0.9' unless server.has_key?('version')
|
17
17
|
server['name'] = URI.parse(server['url']).host
|
18
18
|
server.delete('mobile_salt') if server.has_key?('mobile_salt')
|
19
19
|
|
@@ -5,9 +5,8 @@ servers:
|
|
5
5
|
bbb-dev-07:
|
6
6
|
salt: 'your-salt'
|
7
7
|
url: 'http://your-server/bigbluebutton/api'
|
8
|
-
version: '0.
|
9
|
-
test-install-
|
8
|
+
version: '0.9'
|
9
|
+
test-install-09:
|
10
10
|
salt: '8cd8ef52e8e101574e400365b55e11a6'
|
11
11
|
url: 'http://test-install.blindsidenetworks.com/bigbluebutton/api'
|
12
|
-
version: '0.
|
13
|
-
mobile_salt: '03b07' # needed for >= 0.8
|
12
|
+
version: '0.9'
|
@@ -5,7 +5,7 @@ Feature: Join webconference rooms
|
|
5
5
|
# These scenarios are based in the permission defined in the default
|
6
6
|
# bigbluebutton_role method:
|
7
7
|
# if room.private or bigbluebutton_user.nil?
|
8
|
-
# :
|
8
|
+
# :key # ask for a key
|
9
9
|
# else
|
10
10
|
# :moderator
|
11
11
|
# end
|
@@ -21,7 +21,7 @@ Feature: Join webconference rooms
|
|
21
21
|
When the user goes to the join room page
|
22
22
|
Then he should join the conference room
|
23
23
|
|
24
|
-
Scenario: Joining a private room requires a
|
24
|
+
Scenario: Joining a private room requires a key
|
25
25
|
Given a user named "test user"
|
26
26
|
And a real server
|
27
27
|
And a private room in this server
|
@@ -35,7 +35,7 @@ Feature: Join webconference rooms
|
|
35
35
|
And a real server
|
36
36
|
And a private room in this server
|
37
37
|
When the user goes to the join room page
|
38
|
-
And enters his name and the moderator
|
38
|
+
And enters his name and the moderator key
|
39
39
|
And clicks in the button "Submit"
|
40
40
|
Then he should join the conference room
|
41
41
|
|
@@ -44,7 +44,7 @@ Feature: Join webconference rooms
|
|
44
44
|
And a real server
|
45
45
|
And a private room in this server
|
46
46
|
When the user goes to the join room page
|
47
|
-
And enters his name and the attendee
|
47
|
+
And enters his name and the attendee key
|
48
48
|
And clicks in the button "Submit"
|
49
49
|
Then he should NOT join the conference room
|
50
50
|
And should see an error message with the message "The meeting is not running"
|
@@ -56,7 +56,7 @@ Feature: Join webconference rooms
|
|
56
56
|
And a private room in this server
|
57
57
|
And a meeting is running in this room
|
58
58
|
When the user goes to the join room page
|
59
|
-
And enters his name and the attendee
|
59
|
+
And enters his name and the attendee key
|
60
60
|
And clicks in the button "Submit"
|
61
61
|
Then he should join the conference room
|
62
62
|
|
@@ -65,12 +65,12 @@ Feature: Join webconference rooms
|
|
65
65
|
And a real server
|
66
66
|
And a private room in this server
|
67
67
|
When the user goes to the join room page
|
68
|
-
And enters only the moderator
|
68
|
+
And enters only the moderator key
|
69
69
|
And clicks in the button "Submit"
|
70
70
|
Then he should NOT join the conference room
|
71
71
|
And should see an error message with the message "Authentication failure"
|
72
72
|
|
73
|
-
Scenario: Joining a private room without entering a
|
73
|
+
Scenario: Joining a private room without entering a key (wrong key)
|
74
74
|
Given an anonymous user
|
75
75
|
And a real server
|
76
76
|
And a private room in this server
|
@@ -102,7 +102,7 @@ Feature: Join webconference rooms
|
|
102
102
|
|
103
103
|
# Test the invite view with a user logged
|
104
104
|
|
105
|
-
Scenario: The invite page is pre-filled with the user name and moderator
|
105
|
+
Scenario: The invite page is pre-filled with the user name and moderator key
|
106
106
|
Given a user named "test user"
|
107
107
|
And a real server
|
108
108
|
# Public room = user is a moderator
|
@@ -110,16 +110,16 @@ Feature: Join webconference rooms
|
|
110
110
|
When the user goes to the invite room page (no view check)
|
111
111
|
Then he should be at the invite room URL
|
112
112
|
And the read-only name field was pre-filled with "test user"
|
113
|
-
And the read-only
|
113
|
+
And the read-only key field was pre-filled with the moderator key
|
114
114
|
|
115
115
|
Scenario: The invite page is pre-filled with the user name only
|
116
116
|
Given a user named "test user"
|
117
117
|
And a real server
|
118
|
-
# Private room = ask for a
|
118
|
+
# Private room = ask for a key
|
119
119
|
And a private room in this server
|
120
120
|
When the user goes to the invite room page (no view check)
|
121
121
|
Then the read-only name field was pre-filled with "test user"
|
122
|
-
And the
|
122
|
+
And the key field was NOT pre-filled
|
123
123
|
|
124
124
|
# Test the invite view without a user logged
|
125
125
|
|
@@ -129,7 +129,7 @@ Feature: Join webconference rooms
|
|
129
129
|
And a public room in this server
|
130
130
|
When the user goes to the invite room page
|
131
131
|
Then the name field was NOT pre-filled
|
132
|
-
And the
|
132
|
+
And the key field was NOT pre-filled
|
133
133
|
|
134
134
|
# Test if the user can actually join the conference
|
135
135
|
|
@@ -148,7 +148,7 @@ Feature: Join webconference rooms
|
|
148
148
|
And a real server
|
149
149
|
And a public room in this server
|
150
150
|
When the user goes to the invite room page
|
151
|
-
And enters his name and the moderator
|
151
|
+
And enters his name and the moderator key
|
152
152
|
And clicks in the button "Submit"
|
153
153
|
Then he should join the conference room
|
154
154
|
|
@@ -167,7 +167,7 @@ Feature: Join webconference rooms
|
|
167
167
|
And a real server
|
168
168
|
And a public room in this server
|
169
169
|
When the user goes to the invite room with mobile page
|
170
|
-
And enters his name and the moderator
|
170
|
+
And enters his name and the moderator key
|
171
171
|
And clicks in the button to join the conference from a mobile device
|
172
172
|
Then he should be redirected to the conference using the "bigbluebutton://" protocol
|
173
173
|
|
@@ -47,9 +47,9 @@ end
|
|
47
47
|
When /^he should see one meeting running and the other meeting not running$/ do
|
48
48
|
# first was ended, second is running
|
49
49
|
@rooms.first.fetch_is_running?
|
50
|
-
@rooms.first.is_running?.should
|
50
|
+
@rooms.first.is_running?.should be_falsey
|
51
51
|
@rooms.last.fetch_is_running?
|
52
|
-
@rooms.last.is_running?.should
|
52
|
+
@rooms.last.is_running?.should be_truthy
|
53
53
|
|
54
54
|
# the ended meeting won't appear in the list in BBB 0.8
|
55
55
|
@rooms.delete(@rooms.first) if @server.version >= "0.8"
|
@@ -4,8 +4,8 @@ When /^registers a new room$/i do
|
|
4
4
|
fill_in("bigbluebutton_room[name]", :with => attrs[:name])
|
5
5
|
fill_in("bigbluebutton_room[meetingid]", :with => attrs[:meetingid])
|
6
6
|
check("bigbluebutton_room[private]") if attrs[:private]
|
7
|
-
fill_in("bigbluebutton_room[
|
8
|
-
fill_in("bigbluebutton_room[
|
7
|
+
fill_in("bigbluebutton_room[attendee_key]", :with => attrs[:attendee_key])
|
8
|
+
fill_in("bigbluebutton_room[moderator_key]", :with => attrs[:moderator_key])
|
9
9
|
fill_in("bigbluebutton_room[welcome_msg]", :with => attrs[:welcome_msg])
|
10
10
|
fill_in("bigbluebutton_room[logout_url]", :with => attrs[:logout_url])
|
11
11
|
fill_in("bigbluebutton_room[dial_number]", :with => attrs[:dial_number])
|
@@ -21,8 +21,8 @@ When /^registers a new room with wrong parameters$/i do
|
|
21
21
|
fill_in("bigbluebutton_room[name]", :with => nil) # invalid
|
22
22
|
fill_in("bigbluebutton_room[meetingid]", :with => attrs[:meetingid])
|
23
23
|
check("bigbluebutton_room[private]") if attrs[:private]
|
24
|
-
fill_in("bigbluebutton_room[
|
25
|
-
fill_in("bigbluebutton_room[
|
24
|
+
fill_in("bigbluebutton_room[attendee_key]", :with => attrs[:attendee_key])
|
25
|
+
fill_in("bigbluebutton_room[moderator_key]", :with => attrs[:moderator_key])
|
26
26
|
fill_in("bigbluebutton_room[welcome_msg]", :with => attrs[:welcome_msg])
|
27
27
|
fill_in("bigbluebutton_room[logout_url]", :with => attrs[:logout_url])
|
28
28
|
fill_in("bigbluebutton_room[dial_number]", :with => attrs[:dial_number])
|
@@ -9,8 +9,8 @@ When /^the removed room should not be listed$/i do
|
|
9
9
|
# check params that are specific for this server
|
10
10
|
doesnt_have_content(@room.meetingid)
|
11
11
|
doesnt_have_content(@room.name)
|
12
|
-
doesnt_have_content(@room.
|
13
|
-
doesnt_have_content(@room.
|
12
|
+
doesnt_have_content(@room.attendee_key)
|
13
|
+
doesnt_have_content(@room.moderator_key)
|
14
14
|
doesnt_have_content(@room.voice_bridge)
|
15
15
|
doesnt_have_content(@room.param)
|
16
16
|
end
|
@@ -16,16 +16,16 @@ When /^he should( not)? join the conference room$/i do |negate|
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
When /^enters his name and the (.+)
|
19
|
+
When /^enters his name and the (.+) key$/i do |role|
|
20
20
|
name = @user.nil? ? "Anonymous" : @user.name
|
21
|
-
|
21
|
+
key = role.downcase.to_sym == :moderator ? @room.moderator_key : @room.attendee_key
|
22
22
|
fill_in("user[name]", :with => name)
|
23
|
-
fill_in("user[
|
23
|
+
fill_in("user[key]", :with => key)
|
24
24
|
end
|
25
25
|
|
26
|
-
When /^enters only the (.+)
|
27
|
-
|
28
|
-
fill_in("user[
|
26
|
+
When /^enters only the (.+) key$/ do |role|
|
27
|
+
key = role.downcase.to_sym == :moderator ? @room.moderator_key : @room.attendee_key
|
28
|
+
fill_in("user[key]", :with => key)
|
29
29
|
fill_in("user[name]", :with => "")
|
30
30
|
end
|
31
31
|
|
@@ -34,12 +34,12 @@ When /^enters only the user name$/ do
|
|
34
34
|
fill_in("user[name]", :with => name)
|
35
35
|
end
|
36
36
|
|
37
|
-
When /^the read-only
|
38
|
-
has_element("input", { :name => 'user[
|
37
|
+
When /^the read-only key field was pre-filled with the moderator key$/ do
|
38
|
+
has_element("input", { :name => 'user[key]', :type => 'password', :value => @room.moderator_key, :readonly => 'readonly' })
|
39
39
|
end
|
40
40
|
|
41
|
-
When /^the
|
42
|
-
has_element("input", { :name => 'user[
|
41
|
+
When /^the key field was not pre-filled$/i do
|
42
|
+
has_element("input", { :name => 'user[key]', :type => 'password', :value => '' })
|
43
43
|
end
|
44
44
|
|
45
45
|
When /^the read-only name field was pre-filled with "(.+)"$/ do |name|
|
@@ -170,7 +170,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should be checked$/ do |label, pa
|
|
170
170
|
with_scope(parent) do
|
171
171
|
field_checked = find_field(label)['checked']
|
172
172
|
if field_checked.respond_to? :should
|
173
|
-
field_checked.should
|
173
|
+
field_checked.should be_truthy
|
174
174
|
else
|
175
175
|
assert field_checked
|
176
176
|
end
|
@@ -181,7 +181,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label
|
|
181
181
|
with_scope(parent) do
|
182
182
|
field_checked = find_field(label)['checked']
|
183
183
|
if field_checked.respond_to? :should
|
184
|
-
field_checked.should
|
184
|
+
field_checked.should be_falsey
|
185
185
|
else
|
186
186
|
assert !field_checked
|
187
187
|
end
|
@@ -27,7 +27,7 @@ class FeaturesConfig
|
|
27
27
|
else
|
28
28
|
server = self.root['servers'].first[1]
|
29
29
|
end
|
30
|
-
server['version'] = '0.
|
30
|
+
server['version'] = '0.9' unless server.has_key?('version')
|
31
31
|
server['name'] = URI.parse(server['url']).host
|
32
32
|
self.server = server
|
33
33
|
end
|
@@ -137,10 +137,10 @@ module TemplateHelpers
|
|
137
137
|
{ :name => 'bigbluebutton_room[meetingid]', :type => 'text' })
|
138
138
|
has_element("input#bigbluebutton_room_private",
|
139
139
|
{ :name => 'bigbluebutton_room[private]', :type => 'checkbox' })
|
140
|
-
has_element("input#
|
141
|
-
{ :name => 'bigbluebutton_room[
|
142
|
-
has_element("input#
|
143
|
-
{ :name => 'bigbluebutton_room[
|
140
|
+
has_element("input#bigbluebutton_room_attendee_key",
|
141
|
+
{ :name => 'bigbluebutton_room[attendee_key]', :type => 'text' })
|
142
|
+
has_element("input#bigbluebutton_room_moderator_key",
|
143
|
+
{ :name => 'bigbluebutton_room[moderator_key]', :type => 'text' })
|
144
144
|
has_element("input#bigbluebutton_room_welcome_msg",
|
145
145
|
{ :name => 'bigbluebutton_room[welcome_msg]', :type => 'text' })
|
146
146
|
has_element("input#bigbluebutton_room_logout_url",
|
@@ -158,8 +158,8 @@ module TemplateHelpers
|
|
158
158
|
has_element("label", { :for => 'bigbluebutton_room_name' })
|
159
159
|
has_element("label", { :for => 'bigbluebutton_room_meetingid' })
|
160
160
|
has_element("label", { :for => 'bigbluebutton_room_private' })
|
161
|
-
has_element("label", { :for => '
|
162
|
-
has_element("label", { :for => '
|
161
|
+
has_element("label", { :for => 'bigbluebutton_room_attendee_key' })
|
162
|
+
has_element("label", { :for => 'bigbluebutton_room_moderator_key' })
|
163
163
|
has_element("label", { :for => 'bigbluebutton_room_welcome_msg' })
|
164
164
|
has_element("label", { :for => 'bigbluebutton_room_logout_url' })
|
165
165
|
has_element("label", { :for => 'bigbluebutton_room_dial_number' })
|
@@ -178,8 +178,8 @@ module TemplateHelpers
|
|
178
178
|
page_has_content(room.name)
|
179
179
|
page_has_content(room.meetingid)
|
180
180
|
page_has_content(room.private)
|
181
|
-
page_has_content(room.
|
182
|
-
page_has_content(room.
|
181
|
+
page_has_content(room.attendee_key)
|
182
|
+
page_has_content(room.moderator_key)
|
183
183
|
page_has_content(room.welcome_msg)
|
184
184
|
page_has_content(room.logout_url)
|
185
185
|
page_has_content(room.dial_number)
|
@@ -203,9 +203,9 @@ module TemplateHelpers
|
|
203
203
|
|
204
204
|
within(form_selector(join_bigbluebutton_room_path(room), 'post')) do
|
205
205
|
has_element("input#user_name", { :name => 'user[name]', :type => 'text' })
|
206
|
-
has_element("input#
|
206
|
+
has_element("input#user_key", { :name => 'user[key]', :type => 'password' })
|
207
207
|
has_element("label", { :for => 'user_name' })
|
208
|
-
has_element("label", { :for => '
|
208
|
+
has_element("label", { :for => 'user_key' })
|
209
209
|
has_element("input", { :name => 'commit', :type => 'submit' })
|
210
210
|
end
|
211
211
|
end
|
@@ -223,8 +223,8 @@ module TemplateHelpers
|
|
223
223
|
has_content(room.server_id) unless room.server.nil?
|
224
224
|
has_content(room.name)
|
225
225
|
has_content(room.meetingid)
|
226
|
-
has_content(room.
|
227
|
-
has_content(room.
|
226
|
+
has_content(room.attendee_key)
|
227
|
+
has_content(room.moderator_key)
|
228
228
|
has_content(room.logout_url)
|
229
229
|
has_content(room.dial_number)
|
230
230
|
has_content(room.voice_bridge)
|
@@ -12,13 +12,23 @@ namespace :db do
|
|
12
12
|
BigbluebuttonMetadata.destroy_all
|
13
13
|
BigbluebuttonPlaybackFormat.destroy_all
|
14
14
|
|
15
|
+
ids = ["presentation", "presentation_video", "slides"]
|
16
|
+
3.times do |i|
|
17
|
+
params = {
|
18
|
+
:identifier => ids[i],
|
19
|
+
:visible => Forgery(:basic).boolean
|
20
|
+
}
|
21
|
+
puts "- Creating playback type #{params[:identifier]}"
|
22
|
+
BigbluebuttonPlaybackType.create!(params)
|
23
|
+
end
|
24
|
+
|
15
25
|
# Servers
|
16
26
|
2.times do |n1|
|
17
27
|
params = {
|
18
28
|
:name => "Server #{n1}",
|
19
29
|
:url => "http://bigbluebutton#{n1}.test.com/bigbluebutton/api",
|
20
30
|
:salt => Forgery(:basic).password(:at_least => 30, :at_most => 40),
|
21
|
-
:version => '0.
|
31
|
+
:version => '0.9',
|
22
32
|
:param => "server-#{n1}"
|
23
33
|
}
|
24
34
|
puts "- Creating server #{params[:name]}"
|
@@ -30,13 +40,13 @@ namespace :db do
|
|
30
40
|
:meetingid => "meeting-#{n1}-#{n2}-" + SecureRandom.hex(4),
|
31
41
|
:server => server,
|
32
42
|
:name => "Name-#{n1}-#{n2}",
|
33
|
-
:
|
34
|
-
:
|
43
|
+
:attendee_key => Forgery(:basic).password(:at_least => 10, :at_most => 16),
|
44
|
+
:moderator_key => Forgery(:basic).password(:at_least => 10, :at_most => 16),
|
35
45
|
:welcome_msg => Forgery(:lorem_ipsum).sentences(2),
|
36
46
|
:private => false,
|
37
47
|
:param => "meeting-#{n1}-#{n2}",
|
38
48
|
:external => false,
|
39
|
-
:
|
49
|
+
:record_meeting => false,
|
40
50
|
:duration => 0
|
41
51
|
}
|
42
52
|
puts " - Creating room #{params[:name]}"
|
@@ -102,15 +112,18 @@ namespace :db do
|
|
102
112
|
end
|
103
113
|
|
104
114
|
# Recording playback formats
|
105
|
-
|
115
|
+
playback_types = [1,2,3]
|
116
|
+
3.times do |n_format|
|
106
117
|
params = {
|
107
|
-
:format_type => "#{Forgery(:name).first_name.downcase}-#{n_format}",
|
108
118
|
:url => "http://" + Forgery(:internet).domain_name + "/playback",
|
109
119
|
:length => Forgery(:basic).number
|
110
120
|
}
|
111
121
|
puts " - Creating playback format #{params[:format_type]}"
|
112
122
|
format = BigbluebuttonPlaybackFormat.create(params)
|
113
123
|
format.recording = recording
|
124
|
+
id = playback_types[rand(playback_types.length)]
|
125
|
+
playback_types.delete(id)
|
126
|
+
format.playback_type = BigbluebuttonPlaybackType.find(id)
|
114
127
|
format.save!
|
115
128
|
end
|
116
129
|
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe ActionController do
|
4
4
|
include Shoulda::Matchers::ActionController
|
5
5
|
|
6
|
-
describe "routing with :only => 'recordings'" do
|
6
|
+
describe "routing with :only => 'recordings'", :type => :routing do
|
7
7
|
|
8
8
|
it {
|
9
9
|
{:get => "/only-recordings/bigbluebutton/recordings"}.
|
@@ -26,7 +26,7 @@ describe ActionController do
|
|
26
26
|
should route_to(:controller => "bigbluebutton/recordings", :action => "destroy", :id => "rec-1")
|
27
27
|
}
|
28
28
|
it {
|
29
|
-
{:get => "/only-recordings/bigbluebutton/recordings/rec-1/play
|
29
|
+
{:get => "/only-recordings/bigbluebutton/recordings/rec-1/play"}.
|
30
30
|
should route_to(:controller => "bigbluebutton/recordings", :action => "play", :id => "rec-1")
|
31
31
|
}
|
32
32
|
it {
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe Bigbluebutton::RecordingsController do
|
4
4
|
include Shoulda::Matchers::ActionController
|
5
5
|
|
6
|
-
describe "routing" do
|
6
|
+
describe "routing", :type => :routing do
|
7
7
|
|
8
8
|
# default and scoped routes
|
9
9
|
['bigbluebutton', 'webconference'].each do |prefix|
|
@@ -29,7 +29,7 @@ describe Bigbluebutton::RecordingsController do
|
|
29
29
|
}
|
30
30
|
it {
|
31
31
|
{:get => "/#{prefix}/recordings/rec-1/play?type=any"}.
|
32
|
-
should route_to(:controller => "bigbluebutton/recordings", :action => "play", :id => "rec-1")
|
32
|
+
should route_to(:controller => "bigbluebutton/recordings", :action => "play", :id => "rec-1", :type => "any")
|
33
33
|
}
|
34
34
|
it {
|
35
35
|
{:post => "/#{prefix}/recordings/rec-1/publish"}.
|