bigbluebutton_rails 1.2.0 → 1.3.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby-version +1 -0
- data/.travis.yml +2 -2
- data/CHANGELOG.rdoc +15 -1
- data/Gemfile +15 -4
- data/Gemfile.lock +187 -125
- data/LICENSE +24 -0
- data/README.rdoc +96 -19
- data/Rakefile +32 -16
- data/TODO_08 +9 -10
- data/{spec/rails_app/public → app/assets}/stylesheets/bigbluebutton_rails.css +58 -79
- data/app/controllers/bigbluebutton/recordings_controller.rb +142 -0
- data/app/controllers/bigbluebutton/rooms_controller.rb +105 -50
- data/app/controllers/bigbluebutton/servers_controller.rb +78 -2
- data/app/helpers/bigbluebutton_rails_helper.rb +11 -4
- data/app/models/bigbluebutton_metadata.rb +43 -0
- data/app/models/bigbluebutton_playback_format.rb +9 -0
- data/app/models/bigbluebutton_recording.rb +191 -0
- data/app/models/bigbluebutton_room.rb +92 -66
- data/app/models/bigbluebutton_server.rb +49 -3
- data/app/views/bigbluebutton/recordings/_form.html.erb +67 -0
- data/app/views/bigbluebutton/recordings/_recordings.html.erb +56 -0
- data/app/views/bigbluebutton/recordings/edit.html.erb +5 -0
- data/app/views/bigbluebutton/recordings/index.html.erb +2 -0
- data/app/views/bigbluebutton/recordings/show.html.erb +84 -0
- data/app/views/bigbluebutton/rooms/_form.html.erb +28 -7
- data/app/views/bigbluebutton/rooms/_rooms.html.erb +19 -4
- data/app/views/bigbluebutton/rooms/edit.html.erb +0 -1
- data/app/views/bigbluebutton/rooms/invite.html.erb +2 -1
- data/app/views/bigbluebutton/rooms/join.html.erb +0 -2
- data/app/views/bigbluebutton/rooms/recordings.html.erb +2 -0
- data/app/views/bigbluebutton/rooms/show.html.erb +35 -15
- data/app/views/bigbluebutton/servers/_form.html.erb +4 -0
- data/app/views/bigbluebutton/servers/index.html.erb +8 -3
- data/app/views/bigbluebutton/servers/recordings.html.erb +2 -0
- data/app/views/bigbluebutton/servers/rooms.html.erb +1 -1
- data/app/views/bigbluebutton/servers/show.html.erb +54 -6
- data/bigbluebutton_rails.gemspec +1 -1
- data/config/locales/en.yml +105 -55
- data/config/schedule.rb +3 -0
- data/lib/bigbluebutton_rails.rb +52 -2
- data/lib/bigbluebutton_rails/controller_methods.rb +31 -0
- data/lib/bigbluebutton_rails/rails/routes.rb +50 -14
- data/lib/bigbluebutton_rails/version.rb +1 -1
- data/lib/generators/bigbluebutton_rails/install_generator.rb +8 -8
- data/lib/generators/bigbluebutton_rails/templates/migration.rb +37 -1
- data/lib/generators/bigbluebutton_rails/templates/migration_1_3_0.rb +55 -0
- data/lib/generators/bigbluebutton_rails/templates/migration_1_3_0_b.rb +13 -0
- data/lib/generators/bigbluebutton_rails/views_generator.rb +6 -2
- data/lib/tasks/bigbluebutton_rails/recordings.rake +18 -0
- data/spec/bigbluebutton_rails_spec.rb +2 -2
- data/spec/controllers/bigbluebutton/recordings_controller_json_responses_spec.rb +111 -0
- data/spec/controllers/bigbluebutton/recordings_controller_spec.rb +188 -0
- data/spec/controllers/bigbluebutton/rooms_controller_exception_handling_spec.rb +15 -10
- data/spec/controllers/bigbluebutton/rooms_controller_json_responses_spec.rb +14 -7
- data/spec/controllers/bigbluebutton/rooms_controller_spec.rb +327 -103
- data/spec/controllers/bigbluebutton/servers_controller_json_responses_spec.rb +12 -12
- data/spec/controllers/bigbluebutton/servers_controller_spec.rb +166 -28
- data/spec/factories/bigbluebutton_metadata.rb +11 -0
- data/spec/factories/bigbluebutton_playback_format.rb +8 -0
- data/spec/factories/bigbluebutton_recording.rb +13 -0
- data/spec/factories/bigbluebutton_room.rb +2 -1
- data/spec/factories/bigbluebutton_server.rb +1 -1
- data/spec/factories/user.rb +1 -0
- data/spec/generators/install_generator_spec.rb +21 -10
- data/spec/generators/views_generator_spec.rb +14 -4
- data/spec/models/bigbluebutton_metadata_db_spec.rb +13 -0
- data/spec/models/bigbluebutton_metadata_spec.rb +64 -0
- data/spec/models/bigbluebutton_playback_format_db_spec.rb +13 -0
- data/spec/models/bigbluebutton_playback_format_spec.rb +22 -0
- data/spec/models/bigbluebutton_recording_db_spec.rb +24 -0
- data/spec/models/bigbluebutton_recording_spec.rb +450 -0
- data/spec/models/bigbluebutton_room_db_spec.rb +3 -2
- data/spec/models/bigbluebutton_room_spec.rb +194 -166
- data/spec/models/bigbluebutton_server_spec.rb +107 -27
- data/spec/rails_app/.gitignore +2 -0
- data/spec/rails_app/app/assets/javascripts/application.js +2 -0
- data/spec/rails_app/app/controllers/application_controller.rb +2 -0
- data/spec/rails_app/app/controllers/custom_recordings_controller.rb +8 -0
- data/spec/rails_app/app/controllers/frontpage_controller.rb +7 -0
- data/spec/rails_app/app/views/frontpage/show.html.erb +5 -0
- data/spec/rails_app/app/views/layouts/application.html.erb +5 -2
- data/spec/rails_app/config/application.rb +13 -0
- data/spec/rails_app/config/environments/development.rb +7 -2
- data/spec/rails_app/config/environments/production.rb +9 -0
- data/spec/rails_app/config/environments/test.rb +10 -0
- data/spec/rails_app/config/routes.rb +20 -2
- data/spec/rails_app/features/edit_rooms.feature +2 -3
- data/spec/rails_app/features/edit_servers.feature +2 -3
- data/spec/rails_app/features/step_definitions/activity_monitor_servers_step.rb +2 -2
- data/spec/rails_app/features/step_definitions/common_steps.rb +5 -5
- data/spec/rails_app/features/step_definitions/create_rooms_steps.rb +2 -4
- data/spec/rails_app/features/step_definitions/create_servers_steps.rb +2 -2
- data/spec/rails_app/features/step_definitions/edit_rooms_steps.rb +2 -2
- data/spec/rails_app/features/step_definitions/edit_servers_steps.rb +2 -2
- data/spec/rails_app/features/step_definitions/join_rooms_steps.rb +2 -2
- data/spec/rails_app/features/step_definitions/list_and_show_rooms_steps.rb +2 -2
- data/spec/rails_app/features/support/templates.rb +2 -6
- data/spec/rails_app/lib/tasks/db/populate.rake +119 -0
- data/spec/routing/bigbluebutton/custom_controllers_routing_spec.rb +78 -1
- data/spec/routing/bigbluebutton/recordings_only_routing_spec.rb +43 -0
- data/spec/routing/bigbluebutton/recordings_routing_spec.rb +46 -0
- data/spec/routing/bigbluebutton/rooms_only_routing_spec.rb +67 -0
- data/spec/routing/bigbluebutton/rooms_routing_spec.rb +28 -2
- data/spec/routing/bigbluebutton/servers_only_routing_spec.rb +43 -0
- data/spec/routing/bigbluebutton/servers_routing_spec.rb +16 -1
- data/spec/support/matchers/have_same_attributes_as.rb +20 -3
- data/spec/support/matchers/shoulda/{be_boolean.rb → be_boolean_matcher.rb} +0 -0
- data/spec/support/mocked_server.rb +19 -3
- metadata +48 -28
- data/public/images/loading.gif +0 -0
- data/public/javascripts/jquery.min.js +0 -16
- data/public/stylesheets/bigbluebutton_rails.css +0 -148
- data/spec/rails_app/public/images/loading.gif +0 -0
- data/spec/rails_app/public/images/rails.png +0 -0
- data/spec/rails_app/public/index.html +0 -239
- data/spec/rails_app/public/javascripts/application.js +0 -2
- data/spec/rails_app/public/javascripts/controls.js +0 -965
- data/spec/rails_app/public/javascripts/dragdrop.js +0 -974
- data/spec/rails_app/public/javascripts/effects.js +0 -1123
- data/spec/rails_app/public/javascripts/jquery.min.js +0 -16
- data/spec/rails_app/public/javascripts/prototype.js +0 -6001
- data/spec/rails_app/public/javascripts/rails.js +0 -191
- data/spec/support/shared_examples/rooms_controller.rb +0 -37
@@ -6,7 +6,9 @@ describe BigbluebuttonServer do
|
|
6
6
|
BigbluebuttonServer.new.should be_a_kind_of(ActiveRecord::Base)
|
7
7
|
end
|
8
8
|
|
9
|
-
it { should have_many(:rooms) }
|
9
|
+
it { should have_many(:rooms).dependent(:nullify) }
|
10
|
+
|
11
|
+
it { should have_many(:recordings).dependent(:nullify) }
|
10
12
|
|
11
13
|
it { should validate_presence_of(:name) }
|
12
14
|
it { should validate_presence_of(:url) }
|
@@ -14,37 +16,34 @@ describe BigbluebuttonServer do
|
|
14
16
|
it { should validate_presence_of(:version) }
|
15
17
|
it { should validate_presence_of(:param) }
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
it {
|
21
|
-
it { should allow_mass_assignment_of(:param) }
|
19
|
+
[:name, :url, :salt, :version, :param].each do |attribute|
|
20
|
+
it { should allow_mass_assignment_of(attribute) }
|
21
|
+
end
|
22
|
+
it { should_not allow_mass_assignment_of(:id) }
|
22
23
|
|
23
24
|
context "uniqueness of" do
|
24
|
-
before(:each) {
|
25
|
+
before(:each) { FactoryGirl.create(:bigbluebutton_server) }
|
25
26
|
it { should validate_uniqueness_of(:url) }
|
26
27
|
it { should validate_uniqueness_of(:name) }
|
27
28
|
it { should validate_uniqueness_of(:param) }
|
28
29
|
end
|
29
30
|
|
30
31
|
it "has associated rooms" do
|
31
|
-
server =
|
32
|
+
server = FactoryGirl.create(:bigbluebutton_server)
|
32
33
|
server.rooms.should be_empty
|
33
34
|
|
34
|
-
|
35
|
+
r = FactoryGirl.create(:bigbluebutton_room, :server => server)
|
35
36
|
server = BigbluebuttonServer.find(server.id)
|
36
|
-
server.rooms.
|
37
|
+
server.rooms.should == [r]
|
37
38
|
end
|
38
39
|
|
39
|
-
it "
|
40
|
-
server =
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
}.to change{ BigbluebuttonRoom.count }.by(0)
|
47
|
-
BigbluebuttonRoom.find(room.id).server_id.should == nil
|
40
|
+
it "has associated recordings" do
|
41
|
+
server = FactoryGirl.create(:bigbluebutton_server)
|
42
|
+
server.rooms.should be_empty
|
43
|
+
|
44
|
+
r = FactoryGirl.create(:bigbluebutton_recording, :server => server)
|
45
|
+
server = BigbluebuttonServer.find(server.id)
|
46
|
+
server.recordings.should == [r]
|
48
47
|
end
|
49
48
|
|
50
49
|
it { should ensure_length_of(:name).is_at_least(1).is_at_most(500) }
|
@@ -55,7 +54,7 @@ describe BigbluebuttonServer do
|
|
55
54
|
context ".to_param" do
|
56
55
|
it { should respond_to(:to_param) }
|
57
56
|
it {
|
58
|
-
s =
|
57
|
+
s = FactoryGirl.create(:bigbluebutton_server)
|
59
58
|
s.to_param.should be(s.param)
|
60
59
|
}
|
61
60
|
end
|
@@ -99,17 +98,17 @@ describe BigbluebuttonServer do
|
|
99
98
|
@server.param.should == @server.name.downcase.parameterize
|
100
99
|
end
|
101
100
|
it "nil" do
|
102
|
-
@server =
|
101
|
+
@server = FactoryGirl.build(:bigbluebutton_server, :param => nil,
|
103
102
|
:name => "-My Name@ _Is Odd_-")
|
104
103
|
end
|
105
104
|
it "empty" do
|
106
|
-
@server =
|
105
|
+
@server = FactoryGirl.build(:bigbluebutton_server, :param => "",
|
107
106
|
:name => "-My Name@ _Is Odd_-")
|
108
107
|
end
|
109
108
|
end
|
110
109
|
|
111
110
|
context "has an api object" do
|
112
|
-
let(:server) { server =
|
111
|
+
let(:server) { server = FactoryGirl.build(:bigbluebutton_server) }
|
113
112
|
it { should respond_to(:api) }
|
114
113
|
it { server.api.should_not be_nil }
|
115
114
|
it {
|
@@ -144,9 +143,9 @@ describe BigbluebuttonServer do
|
|
144
143
|
it { should respond_to(:meetings) }
|
145
144
|
|
146
145
|
context "fetching info from bbb" do
|
147
|
-
let(:server) {
|
148
|
-
let(:room1) {
|
149
|
-
let(:room2) {
|
146
|
+
let(:server) { FactoryGirl.create(:bigbluebutton_server) }
|
147
|
+
let(:room1) { FactoryGirl.create(:bigbluebutton_room, :server => server, :meetingid => "room1") }
|
148
|
+
let(:room2) { FactoryGirl.create(:bigbluebutton_room, :server => server, :meetingid => "room2") }
|
150
149
|
|
151
150
|
# the hashes should be exactly as returned by bigbluebutton-api-ruby to be sure we are testing it right
|
152
151
|
let(:meetings) {
|
@@ -186,8 +185,89 @@ describe BigbluebuttonServer do
|
|
186
185
|
it { server.meetings[2].running.should == true }
|
187
186
|
it { server.meetings[2].new_record?.should be_true }
|
188
187
|
it { server.meetings[2].external.should be_true }
|
189
|
-
it { server.meetings[2].randomize_meetingid.should be_false }
|
190
188
|
it { server.meetings[2].private.should be_true }
|
191
189
|
end
|
192
190
|
|
191
|
+
describe "#send_publish_recordings" do
|
192
|
+
let(:server) { FactoryGirl.create(:bigbluebutton_server) }
|
193
|
+
|
194
|
+
it { should respond_to(:send_publish_recordings) }
|
195
|
+
|
196
|
+
context "sends publish_recordings" do
|
197
|
+
let(:recording1) { FactoryGirl.create(:bigbluebutton_recording, :published => false) }
|
198
|
+
let(:recording2) { FactoryGirl.create(:bigbluebutton_recording, :published => false) }
|
199
|
+
let(:ids) { "#{recording1.recordid},#{recording2.recordid}" }
|
200
|
+
let(:publish) { true }
|
201
|
+
before do
|
202
|
+
@api_mock = mock(BigBlueButton::BigBlueButtonApi)
|
203
|
+
server.stub(:api).and_return(@api_mock)
|
204
|
+
@api_mock.should_receive(:publish_recordings).with(ids, publish)
|
205
|
+
end
|
206
|
+
before(:each) { server.send_publish_recordings(ids, publish) }
|
207
|
+
it { BigbluebuttonRecording.find(recording1.id).published.should == true }
|
208
|
+
it { BigbluebuttonRecording.find(recording2.id).published.should == true }
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
describe "#send_delete_recordings" do
|
213
|
+
let(:server) { FactoryGirl.create(:bigbluebutton_server) }
|
214
|
+
|
215
|
+
it { should respond_to(:send_delete_recordings) }
|
216
|
+
|
217
|
+
context "sends delete_recordings" do
|
218
|
+
let(:ids) { "id1,id2,id3" }
|
219
|
+
before do
|
220
|
+
@api_mock = mock(BigBlueButton::BigBlueButtonApi)
|
221
|
+
server.stub(:api).and_return(@api_mock)
|
222
|
+
@api_mock.should_receive(:delete_recordings).with(ids)
|
223
|
+
end
|
224
|
+
it { server.send_delete_recordings(ids) }
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
describe "#fetch_recordings" do
|
229
|
+
let(:server) { FactoryGirl.create(:bigbluebutton_server) }
|
230
|
+
let(:params) { { :meetingID => "id1,id2,id3" } }
|
231
|
+
before do
|
232
|
+
@api_mock = mock(BigBlueButton::BigBlueButtonApi)
|
233
|
+
server.stub(:api).and_return(@api_mock)
|
234
|
+
end
|
235
|
+
|
236
|
+
it { should respond_to(:fetch_recordings) }
|
237
|
+
|
238
|
+
context "calls get_recordings" do
|
239
|
+
let(:response) { { :recordings => [1, 2] } }
|
240
|
+
before do
|
241
|
+
@api_mock.should_receive(:get_recordings).with(params).and_return(response)
|
242
|
+
BigbluebuttonRecording.should_receive(:sync).with(server, response[:recordings])
|
243
|
+
end
|
244
|
+
it { server.fetch_recordings(params) }
|
245
|
+
end
|
246
|
+
|
247
|
+
context "when the response is empty" do
|
248
|
+
let(:response) { { :recordings => [1, 2] } }
|
249
|
+
before do
|
250
|
+
@api_mock.should_receive(:get_recordings).with(params).and_return(nil)
|
251
|
+
BigbluebuttonRecording.should_not_receive(:sync)
|
252
|
+
end
|
253
|
+
it { server.fetch_recordings(params) }
|
254
|
+
end
|
255
|
+
|
256
|
+
context "when the response has no :recordings element" do
|
257
|
+
before do
|
258
|
+
@api_mock.should_receive(:get_recordings).with(params).and_return({})
|
259
|
+
BigbluebuttonRecording.should_not_receive(:sync)
|
260
|
+
end
|
261
|
+
it { server.fetch_recordings(params) }
|
262
|
+
end
|
263
|
+
|
264
|
+
context "works without parameters" do
|
265
|
+
before do
|
266
|
+
@api_mock.should_receive(:get_recordings).with({}).and_return(nil)
|
267
|
+
BigbluebuttonRecording.should_not_receive(:sync)
|
268
|
+
end
|
269
|
+
it { server.fetch_recordings }
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
193
273
|
end
|
data/spec/rails_app/.gitignore
CHANGED
@@ -0,0 +1,5 @@
|
|
1
|
+
<h1>Test application:</h1>
|
2
|
+
|
3
|
+
<%= link_to('View server list', bigbluebutton_servers_path) %> (<%= @servers.count %> servers)<br/>
|
4
|
+
<%= link_to('View room list', bigbluebutton_rooms_path) %> (<%= @rooms.count %> rooms)<br/>
|
5
|
+
<%= link_to('View recording list', bigbluebutton_recordings_path) %> (<%= @recordings.count %> recordings)<br/>
|
@@ -2,12 +2,15 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>RailsApp</title>
|
5
|
-
<%= stylesheet_link_tag
|
6
|
-
<%=
|
5
|
+
<%= stylesheet_link_tag "/stylesheets/scaffold" %>
|
6
|
+
<%= stylesheet_link_tag "bigbluebutton_rails" %>
|
7
|
+
<%= javascript_include_tag "application" %>
|
7
8
|
<%= csrf_meta_tag %>
|
8
9
|
</head>
|
9
10
|
<body>
|
10
11
|
|
12
|
+
<%= bbb_rails_error_explanation %>
|
13
|
+
|
11
14
|
<%= yield %>
|
12
15
|
|
13
16
|
</body>
|
@@ -9,6 +9,13 @@ require "action_mailer/railtie"
|
|
9
9
|
Bundler.require
|
10
10
|
require 'bigbluebutton_rails'
|
11
11
|
|
12
|
+
if defined?(Bundler)
|
13
|
+
# If you precompile assets before deploying to production, use this line
|
14
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
15
|
+
# If you want your assets lazily compiled in production, use this line
|
16
|
+
# Bundler.require(:default, :assets, Rails.env)
|
17
|
+
end
|
18
|
+
|
12
19
|
module RailsApp
|
13
20
|
class Application < Rails::Application
|
14
21
|
# Settings in config/environments/* take precedence over those specified here.
|
@@ -41,5 +48,11 @@ module RailsApp
|
|
41
48
|
|
42
49
|
# Configure sensitive parameters which will be filtered from the log file.
|
43
50
|
config.filter_parameters += [:password]
|
51
|
+
|
52
|
+
# Enable the asset pipeline
|
53
|
+
config.assets.enabled = true
|
54
|
+
|
55
|
+
# Version of your assets, change this if you want to expire all your assets
|
56
|
+
config.assets.version = '1.0'
|
44
57
|
end
|
45
58
|
end
|
@@ -11,7 +11,6 @@ RailsApp::Application.configure do
|
|
11
11
|
|
12
12
|
# Show full error reports and disable caching
|
13
13
|
config.consider_all_requests_local = true
|
14
|
-
config.action_view.debug_rjs = true
|
15
14
|
config.action_controller.perform_caching = false
|
16
15
|
|
17
16
|
# Don't care if the mailer can't send
|
@@ -22,5 +21,11 @@ RailsApp::Application.configure do
|
|
22
21
|
|
23
22
|
# Only use best-standards-support built into browsers
|
24
23
|
config.action_dispatch.best_standards_support = :builtin
|
25
|
-
end
|
26
24
|
|
25
|
+
# Raise exception on mass assignment protection for Active Record models
|
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
|
31
|
+
end
|
@@ -46,4 +46,13 @@ RailsApp::Application.configure do
|
|
46
46
|
|
47
47
|
# Send deprecation notices to registered listeners
|
48
48
|
config.active_support.deprecation = :notify
|
49
|
+
|
50
|
+
# Compress JavaScript and CSS
|
51
|
+
config.assets.compress = true
|
52
|
+
|
53
|
+
# Don't fallback to assets pipeline
|
54
|
+
config.assets.compile = false
|
55
|
+
|
56
|
+
# Generate digests for assets URLs
|
57
|
+
config.assets.digest = true
|
49
58
|
end
|
@@ -32,4 +32,14 @@ RailsApp::Application.configure do
|
|
32
32
|
|
33
33
|
# Print deprecation notices to the stderr
|
34
34
|
config.active_support.deprecation = :stderr
|
35
|
+
|
36
|
+
# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
|
37
|
+
config.assets.allow_debugging = true
|
38
|
+
|
39
|
+
# Configure static asset server for tests with Cache-Control for performance
|
40
|
+
config.serve_static_assets = true
|
41
|
+
config.static_cache_control = "public, max-age=3600"
|
42
|
+
|
43
|
+
# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
|
44
|
+
config.assets.allow_debugging = true
|
35
45
|
end
|
@@ -11,7 +11,25 @@ RailsApp::Application.routes.draw do
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
scope "only-servers" do
|
15
|
+
bigbluebutton_routes :default, :only => "servers"
|
16
|
+
end
|
17
|
+
|
18
|
+
scope "only-rooms" do
|
19
|
+
bigbluebutton_routes :default, :only => "rooms"
|
20
|
+
end
|
21
|
+
|
22
|
+
scope "only-recordings" do
|
23
|
+
bigbluebutton_routes :default, :only => "recordings"
|
24
|
+
end
|
25
|
+
|
26
|
+
bigbluebutton_routes :default,
|
27
|
+
:scope => "custom",
|
28
|
+
:controllers => { :servers => "custom_servers",
|
29
|
+
:rooms => "custom_rooms",
|
30
|
+
:recordings => "custom_recordings" },
|
31
|
+
:as => "custom_name"
|
32
|
+
|
33
|
+
root :to => "frontpage#show"
|
16
34
|
|
17
35
|
end
|
@@ -15,7 +15,7 @@ Feature: Edit webconference rooms
|
|
15
15
|
And a room in this server
|
16
16
|
When he goes to the edit room page
|
17
17
|
And change the room name to "Anything different"
|
18
|
-
And
|
18
|
+
And clicks in the button to save the room
|
19
19
|
Then he should be at the show room URL
|
20
20
|
And the room name should be "Anything different"
|
21
21
|
|
@@ -25,9 +25,8 @@ Feature: Edit webconference rooms
|
|
25
25
|
And a room in this server
|
26
26
|
When he goes to the edit room page
|
27
27
|
And change the room name to ""
|
28
|
-
And
|
28
|
+
And clicks in the button to save the room
|
29
29
|
Then he should be at the update room URL
|
30
30
|
And see the edit room page
|
31
31
|
And see 2 errors in the field "bigbluebutton_room[name]"
|
32
32
|
And the room name should NOT be "Anything different"
|
33
|
-
|
@@ -13,7 +13,7 @@ Feature: Edit webconference servers
|
|
13
13
|
And a real server
|
14
14
|
When he goes to the edit server page
|
15
15
|
And change the server URL to "http://test.com/bigbluebutton/api"
|
16
|
-
And
|
16
|
+
And clicks in the button to save the server
|
17
17
|
Then he should be at the show server URL
|
18
18
|
And the server URL should be "http://test.com/bigbluebutton/api"
|
19
19
|
|
@@ -22,9 +22,8 @@ Feature: Edit webconference servers
|
|
22
22
|
And a real server
|
23
23
|
When he goes to the edit server page
|
24
24
|
And change the server URL to "http://test.com/"
|
25
|
-
And
|
25
|
+
And clicks in the button to save the server
|
26
26
|
Then he should be at the update server URL
|
27
27
|
And see the edit server page
|
28
28
|
And see 1 errors in the field "bigbluebutton_server[url]"
|
29
29
|
And the server URL should NOT be "http://test.com/"
|
30
|
-
|
@@ -2,7 +2,7 @@ When /^(\d+) meetings running in this server$/ do |count|
|
|
2
2
|
msalt = FeaturesConfig.server.has_key?('mobile_salt') ? FeaturesConfig.server['mobile_salt'] : ""
|
3
3
|
@rooms = []
|
4
4
|
count.to_i.times do |i|
|
5
|
-
room =
|
5
|
+
room = FactoryGirl.create(:bigbluebutton_room, :server => @server)
|
6
6
|
room.send_create
|
7
7
|
BigBlueButtonBot.new(@server.api, room.meetingid, msalt, 1,
|
8
8
|
FeaturesConfig.root['timeout_bot_start'])
|
@@ -14,7 +14,7 @@ When /^(\d+) meetings recently ended in this server$/ do |count|
|
|
14
14
|
msalt = FeaturesConfig.server.has_key?('mobile_salt') ? FeaturesConfig.server['mobile_salt'] : ""
|
15
15
|
@ended_rooms = []
|
16
16
|
count.to_i.times do |i|
|
17
|
-
room =
|
17
|
+
room = FactoryGirl.create(:bigbluebutton_room, :server => @server)
|
18
18
|
room.send_create
|
19
19
|
BigBlueButtonBot.new(@server.api, room.meetingid, msalt, 1,
|
20
20
|
FeaturesConfig.root['timeout_bot_start'])
|
@@ -1,20 +1,20 @@
|
|
1
1
|
When /^a real server$/i do
|
2
|
-
@server =
|
2
|
+
@server = FactoryGirl.create(:bigbluebutton_server_integration)
|
3
3
|
end
|
4
4
|
|
5
5
|
When /^(\d+) server(s)?$/i do |count, _|
|
6
6
|
# Note: these servers are not real, it will NOT be possible to make api requests
|
7
7
|
# for a real server use :bigbluebutton_server_integration
|
8
8
|
count.to_i.times do
|
9
|
-
|
9
|
+
FactoryGirl.create(:bigbluebutton_server)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
When /^a(n external)? room in this server$/i do |external|
|
14
14
|
if external.nil?
|
15
|
-
@room =
|
15
|
+
@room = FactoryGirl.create(:bigbluebutton_room, :server => @server)
|
16
16
|
else
|
17
|
-
@room =
|
17
|
+
@room = FactoryGirl.build(:bigbluebutton_room, :server => @server, :external => true)
|
18
18
|
end
|
19
19
|
@room.send_create
|
20
20
|
end
|
@@ -54,7 +54,7 @@ When /see the (.+) page$/i do |page_name|
|
|
54
54
|
end
|
55
55
|
|
56
56
|
When /a user named "(.+)"/i do |username|
|
57
|
-
@user =
|
57
|
+
@user = FactoryGirl.build(:user, :name => username)
|
58
58
|
ApplicationController.set_user(@user) # This is now the logged user
|
59
59
|
end
|
60
60
|
|