bigbluebutton_rails 0.0.6 → 0.1.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/.gitignore +1 -1
- data/CHANGELOG.rdoc +8 -0
- data/Gemfile +13 -7
- data/Gemfile.lock +112 -86
- data/README.rdoc +26 -80
- data/Rakefile +2 -1
- data/TODO_08 +13 -0
- data/app/controllers/bigbluebutton/rooms_controller.rb +9 -9
- data/app/controllers/bigbluebutton/servers_controller.rb +1 -1
- data/app/models/bigbluebutton_room.rb +16 -14
- data/app/models/bigbluebutton_server.rb +1 -1
- data/app/views/bigbluebutton/rooms/_form.html.erb +1 -1
- data/app/views/bigbluebutton/rooms/external.html.erb +3 -3
- data/app/views/bigbluebutton/rooms/invite.html.erb +3 -3
- data/app/views/bigbluebutton/servers/_form.html.erb +1 -1
- data/bigbluebutton_rails.gemspec +2 -2
- data/lib/bigbluebutton_rails/version.rb +1 -1
- data/spec/controllers/bigbluebutton/rooms_controller_spec.rb +42 -37
- data/spec/factories/bigbluebutton_room.rb +3 -1
- data/spec/models/bigbluebutton_room_db_spec.rb +34 -0
- data/spec/models/bigbluebutton_room_spec.rb +452 -457
- data/spec/models/bigbluebutton_server_db_spec.rb +14 -0
- data/spec/models/bigbluebutton_server_spec.rb +162 -176
- data/spec/rails_app/.gitignore +2 -1
- data/spec/rails_app/db/seeds.rb +16 -4
- data/spec/rails_app/features/activity_monitor_servers.feature +53 -0
- data/spec/rails_app/features/config.yml.example +13 -0
- data/spec/rails_app/features/create_rooms.feature +17 -0
- data/spec/rails_app/features/create_servers.feature +17 -0
- data/spec/rails_app/features/destroy_rooms.feature +12 -0
- data/spec/rails_app/features/destroy_servers.feature +11 -0
- data/spec/rails_app/features/edit_rooms.feature +26 -0
- data/spec/rails_app/features/edit_servers.feature +24 -0
- data/spec/rails_app/features/join_external_rooms.feature +61 -0
- data/spec/rails_app/features/join_mobile.feature +10 -0
- data/spec/rails_app/features/join_rooms.feature +117 -0
- data/spec/rails_app/features/list_and_show_rooms.feature +18 -0
- data/spec/rails_app/features/list_and_show_servers.feature +16 -0
- data/spec/rails_app/features/step_definitions/activity_monitor_servers_step.rb +102 -0
- data/spec/rails_app/features/step_definitions/common_steps.rb +99 -3
- data/spec/rails_app/features/step_definitions/create_rooms_steps.rb +38 -0
- data/spec/rails_app/features/step_definitions/{bigbluebutton_server_steps.rb → create_servers_steps.rb} +11 -6
- data/spec/rails_app/features/step_definitions/destroy_rooms_steps.rb +17 -0
- data/spec/rails_app/features/step_definitions/destroy_servers_steps.rb +15 -0
- data/spec/rails_app/features/step_definitions/edit_rooms_steps.rb +15 -0
- data/spec/rails_app/features/step_definitions/edit_servers_steps.rb +15 -0
- data/spec/rails_app/features/step_definitions/join_mobile_steps.rb +5 -0
- data/spec/rails_app/features/step_definitions/join_rooms_steps.rb +49 -0
- data/spec/rails_app/features/step_definitions/list_and_show_rooms_steps.rb +11 -0
- data/spec/rails_app/features/step_definitions/list_and_show_servers_steps.rb +11 -0
- data/spec/rails_app/features/support/configurations.rb +34 -0
- data/spec/rails_app/features/support/content.rb +27 -7
- data/spec/rails_app/features/support/env_custom.rb +21 -0
- data/spec/rails_app/features/support/factories/bigbluebutton_server_integration.rb +5 -0
- data/spec/rails_app/features/support/hooks.rb +14 -0
- data/spec/rails_app/features/support/locales.rb +18 -0
- data/spec/rails_app/features/support/paths.rb +25 -10
- data/spec/rails_app/features/support/selectors.rb +26 -0
- data/spec/rails_app/features/support/templates.rb +241 -0
- metadata +43 -20
- data/spec/factories/integration/bigbluebutton_server_integration.rb +0 -8
- data/spec/integration_conf.yml.example +0 -5
- data/spec/rails_app/features/join_external_bigbluebutton_rooms.feature +0 -19
- data/spec/rails_app/features/manage_bigbluebutton_rooms.feature +0 -9
- data/spec/rails_app/features/manage_bigbluebutton_servers.feature +0 -9
- data/spec/rails_app/features/step_definitions/bigbluebutton_room_steps.rb +0 -64
- data/spec/rails_app/features/support/env_gem.rb +0 -10
- data/spec/rails_app/features/support/forms.rb +0 -12
- data/spec/support/integration/integration_conf.rb +0 -16
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe BigbluebuttonServer do
|
4
|
+
|
5
|
+
# to ensure that the migration is correct
|
6
|
+
context "db" do
|
7
|
+
it { should have_db_column(:name).of_type(:string) }
|
8
|
+
it { should have_db_column(:url).of_type(:string) }
|
9
|
+
it { should have_db_column(:salt).of_type(:string) }
|
10
|
+
it { should have_db_column(:version).of_type(:string) }
|
11
|
+
it { should have_db_column(:param).of_type(:string) }
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
@@ -6,202 +6,188 @@ describe BigbluebuttonServer do
|
|
6
6
|
BigbluebuttonServer.new.should be_a_kind_of(ActiveRecord::Base)
|
7
7
|
end
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
it { should have_many(:rooms) }
|
10
|
+
|
11
|
+
it { should validate_presence_of(:name) }
|
12
|
+
it { should validate_presence_of(:url) }
|
13
|
+
it { should validate_presence_of(:salt) }
|
14
|
+
it { should validate_presence_of(:version) }
|
15
|
+
it { should validate_presence_of(:param) }
|
16
|
+
|
17
|
+
it { should allow_mass_assignment_of(:name) }
|
18
|
+
it { should allow_mass_assignment_of(:url) }
|
19
|
+
it { should allow_mass_assignment_of(:salt) }
|
20
|
+
it { should allow_mass_assignment_of(:version) }
|
21
|
+
it { should allow_mass_assignment_of(:param) }
|
22
|
+
|
23
|
+
context "uniqueness of" do
|
24
|
+
before(:each) { Factory.create(:bigbluebutton_server) }
|
25
|
+
it { should validate_uniqueness_of(:url) }
|
26
|
+
it { should validate_uniqueness_of(:name) }
|
27
|
+
it { should validate_uniqueness_of(:param) }
|
16
28
|
end
|
17
29
|
|
18
|
-
|
30
|
+
it "has associated rooms" do
|
31
|
+
server = Factory.create(:bigbluebutton_server)
|
32
|
+
server.rooms.should be_empty
|
19
33
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
it { should validate_presence_of(:salt) }
|
25
|
-
it { should validate_presence_of(:version) }
|
26
|
-
it { should validate_presence_of(:param) }
|
27
|
-
|
28
|
-
it { should allow_mass_assignment_of(:name) }
|
29
|
-
it { should allow_mass_assignment_of(:url) }
|
30
|
-
it { should allow_mass_assignment_of(:salt) }
|
31
|
-
it { should allow_mass_assignment_of(:version) }
|
32
|
-
it { should allow_mass_assignment_of(:param) }
|
33
|
-
|
34
|
-
context "uniqueness of" do
|
35
|
-
before(:each) { Factory.create(:bigbluebutton_server) }
|
36
|
-
it { should validate_uniqueness_of(:url) }
|
37
|
-
it { should validate_uniqueness_of(:name) }
|
38
|
-
it { should validate_uniqueness_of(:param) }
|
39
|
-
end
|
40
|
-
|
41
|
-
it "has associated rooms" do
|
42
|
-
server = Factory.create(:bigbluebutton_server)
|
43
|
-
server.rooms.should be_empty
|
44
|
-
|
45
|
-
Factory.create(:bigbluebutton_room, :server => server)
|
46
|
-
server = BigbluebuttonServer.find(server.id)
|
47
|
-
server.rooms.should_not be_empty
|
48
|
-
end
|
34
|
+
Factory.create(:bigbluebutton_room, :server => server)
|
35
|
+
server = BigbluebuttonServer.find(server.id)
|
36
|
+
server.rooms.should_not be_empty
|
37
|
+
end
|
49
38
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
39
|
+
it "destroys associated rooms" do
|
40
|
+
server = Factory.create(:bigbluebutton_server)
|
41
|
+
Factory.create(:bigbluebutton_room, :server => server)
|
42
|
+
Factory.create(:bigbluebutton_room, :server => server)
|
43
|
+
expect {
|
54
44
|
expect {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
end
|
45
|
+
server.destroy
|
46
|
+
}.to change{ BigbluebuttonServer.count }.by(-1)
|
47
|
+
}.to change{ BigbluebuttonRoom.count }.by(-2)
|
48
|
+
end
|
60
49
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
50
|
+
it { should ensure_length_of(:name).is_at_least(1).is_at_most(500) }
|
51
|
+
it { should ensure_length_of(:url).is_at_most(500) }
|
52
|
+
it { should ensure_length_of(:salt).is_at_least(1).is_at_most(500) }
|
53
|
+
it { should ensure_length_of(:param).is_at_least(3) }
|
54
|
+
|
55
|
+
context ".to_param" do
|
56
|
+
it { should respond_to(:to_param) }
|
57
|
+
it {
|
58
|
+
s = Factory.create(:bigbluebutton_server)
|
59
|
+
s.to_param.should be(s.param)
|
60
|
+
}
|
61
|
+
end
|
65
62
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
end
|
63
|
+
context "url format" do
|
64
|
+
it { should allow_value('http://demo.bigbluebutton.org/bigbluebutton/api').for(:url) }
|
65
|
+
it { should_not allow_value('').for(:url) }
|
66
|
+
it { should_not allow_value('http://demo.bigbluebutton.org').for(:url) }
|
67
|
+
it { should_not allow_value('demo.bigbluebutton.org/bigbluebutton/api').for(:url) }
|
68
|
+
end
|
73
69
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
70
|
+
context "supported versions" do
|
71
|
+
it { should allow_value('0.7').for(:version) }
|
72
|
+
it { should allow_value('0.8').for(:version) }
|
73
|
+
it { should_not allow_value('').for(:version) }
|
74
|
+
it { should_not allow_value('0.64').for(:version) }
|
75
|
+
it { should_not allow_value('0.6').for(:version) }
|
76
|
+
end
|
80
77
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
78
|
+
context "param format" do
|
79
|
+
let(:msg) { I18n.t('bigbluebutton_rails.servers.errors.param_format') }
|
80
|
+
it { should validate_format_of(:param).not_with("123 321").with_message(msg) }
|
81
|
+
it { should validate_format_of(:param).not_with("").with_message(msg) }
|
82
|
+
it { should validate_format_of(:param).not_with("ab@c").with_message(msg) }
|
83
|
+
it { should validate_format_of(:param).not_with("ab#c").with_message(msg) }
|
84
|
+
it { should validate_format_of(:param).not_with("ab$c").with_message(msg) }
|
85
|
+
it { should validate_format_of(:param).not_with("ab%c").with_message(msg) }
|
86
|
+
it { should validate_format_of(:param).not_with("ábcd").with_message(msg) }
|
87
|
+
it { should validate_format_of(:param).not_with("-abc").with_message(msg) }
|
88
|
+
it { should validate_format_of(:param).not_with("abc-").with_message(msg) }
|
89
|
+
it { should validate_format_of(:param).with("_abc").with_message(msg) }
|
90
|
+
it { should validate_format_of(:param).with("abc_").with_message(msg) }
|
91
|
+
it { should validate_format_of(:param).with("abc") }
|
92
|
+
it { should validate_format_of(:param).with("123") }
|
93
|
+
it { should validate_format_of(:param).with("abc-123_d5") }
|
94
|
+
end
|
88
95
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
it { should validate_format_of(:param).not_with("ab@c").with_message(msg) }
|
94
|
-
it { should validate_format_of(:param).not_with("ab#c").with_message(msg) }
|
95
|
-
it { should validate_format_of(:param).not_with("ab$c").with_message(msg) }
|
96
|
-
it { should validate_format_of(:param).not_with("ab%c").with_message(msg) }
|
97
|
-
it { should validate_format_of(:param).not_with("ábcd").with_message(msg) }
|
98
|
-
it { should validate_format_of(:param).not_with("-abc").with_message(msg) }
|
99
|
-
it { should validate_format_of(:param).not_with("abc-").with_message(msg) }
|
100
|
-
it { should validate_format_of(:param).with("_abc").with_message(msg) }
|
101
|
-
it { should validate_format_of(:param).with("abc_").with_message(msg) }
|
102
|
-
it { should validate_format_of(:param).with("abc") }
|
103
|
-
it { should validate_format_of(:param).with("123") }
|
104
|
-
it { should validate_format_of(:param).with("abc-123_d5") }
|
96
|
+
context "sets param as the downcased parameterized name if param is" do
|
97
|
+
after :each do
|
98
|
+
@server.save.should be_true
|
99
|
+
@server.param.should == @server.name.downcase.parameterize
|
105
100
|
end
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
@server.save.should be_true
|
110
|
-
@server.param.should == @server.name.downcase.parameterize
|
111
|
-
end
|
112
|
-
it "nil" do
|
113
|
-
@server = Factory.build(:bigbluebutton_server, :param => nil,
|
114
|
-
:name => "-My Name@ _Is Odd_-")
|
115
|
-
end
|
116
|
-
it "empty" do
|
117
|
-
@server = Factory.build(:bigbluebutton_server, :param => "",
|
118
|
-
:name => "-My Name@ _Is Odd_-")
|
119
|
-
end
|
101
|
+
it "nil" do
|
102
|
+
@server = Factory.build(:bigbluebutton_server, :param => nil,
|
103
|
+
:name => "-My Name@ _Is Odd_-")
|
120
104
|
end
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
it { should respond_to(:api) }
|
125
|
-
it { server.api.should_not be_nil }
|
126
|
-
it {
|
127
|
-
server.save
|
128
|
-
server.api.should_not be_nil
|
129
|
-
}
|
130
|
-
context "with the correct attributes" do
|
131
|
-
let(:api) { api = BigBlueButton::BigBlueButtonApi.new(server.url, server.salt,
|
132
|
-
server.version, false) }
|
133
|
-
it { server.api.should == api }
|
134
|
-
|
135
|
-
# updating any of these attributes should update the api
|
136
|
-
# FIXME: can't test the version updated bc only 0.7 is supported right now
|
137
|
-
{ :url => 'http://anotherurl.com/bigbluebutton/api',
|
138
|
-
:salt => '12345-abcde-67890-fghijk', :version => '0.7' }.each do |k,v|
|
139
|
-
it {
|
140
|
-
server.send("#{k}=", v)
|
141
|
-
server.api.send(k).should == v
|
142
|
-
}
|
143
|
-
end
|
144
|
-
end
|
105
|
+
it "empty" do
|
106
|
+
@server = Factory.build(:bigbluebutton_server, :param => "",
|
107
|
+
:name => "-My Name@ _Is Odd_-")
|
145
108
|
end
|
109
|
+
end
|
146
110
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
111
|
+
context "has an api object" do
|
112
|
+
let(:server) { server = Factory.build(:bigbluebutton_server) }
|
113
|
+
it { should respond_to(:api) }
|
114
|
+
it { server.api.should_not be_nil }
|
115
|
+
it {
|
116
|
+
server.save
|
117
|
+
server.api.should_not be_nil
|
118
|
+
}
|
119
|
+
context "with the correct attributes" do
|
120
|
+
let(:api) { api = BigBlueButton::BigBlueButtonApi.new(server.url, server.salt,
|
121
|
+
server.version, false) }
|
122
|
+
it { server.api.should == api }
|
123
|
+
|
124
|
+
# updating any of these attributes should update the api
|
125
|
+
{ :url => 'http://anotherurl.com/bigbluebutton/api',
|
126
|
+
:salt => '12345-abcde-67890-fghijk', :version => '0.8' }.each do |k,v|
|
127
|
+
it {
|
128
|
+
server.send("#{k}=", v)
|
129
|
+
server.api.send(k).should == v
|
130
|
+
}
|
152
131
|
end
|
153
132
|
end
|
133
|
+
end
|
154
134
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
context "fetching info from bbb" do
|
159
|
-
let(:server) { Factory.create(:bigbluebutton_server) }
|
160
|
-
let(:room1) { Factory.create(:bigbluebutton_room, :server => server, :meetingid => "room1", :randomize_meetingid => true) }
|
161
|
-
let(:room2) { Factory.create(:bigbluebutton_room, :server => server, :meetingid => "room2", :randomize_meetingid => true) }
|
162
|
-
|
163
|
-
# the hashes should be exactly as returned by bigbluebutton-api-ruby to be sure we are testing it right
|
164
|
-
let(:meetings) {
|
165
|
-
[
|
166
|
-
{ :meetingID => room1.meetingid, :attendeePW => "ap", :moderatorPW => "mp", :hasBeenForciblyEnded => false, :running => true},
|
167
|
-
{ :meetingID => room2.meetingid, :attendeePW => "pass", :moderatorPW => "pass", :hasBeenForciblyEnded => true, :running => false},
|
168
|
-
{ :meetingID => "im not in the db", :attendeePW => "pass", :moderatorPW => "pass", :hasBeenForciblyEnded => true, :running => true}
|
169
|
-
]
|
170
|
-
}
|
171
|
-
let(:hash) {
|
172
|
-
{ :returncode => true,
|
173
|
-
:meetings => meetings
|
174
|
-
}
|
175
|
-
}
|
176
|
-
|
177
|
-
before {
|
178
|
-
@api_mock = mock(BigBlueButton::BigBlueButtonApi)
|
179
|
-
server.stub(:api).and_return(@api_mock)
|
180
|
-
@api_mock.should_receive(:get_meetings).and_return(hash)
|
181
|
-
server.fetch_meetings
|
182
|
-
|
183
|
-
# the passwords are updated during fetch_meetings
|
184
|
-
room1.moderator_password = "mp"
|
185
|
-
room1.attendee_password = "ap"
|
186
|
-
room2.moderator_password = "pass"
|
187
|
-
room2.attendee_password = "pass"
|
188
|
-
}
|
135
|
+
context "initializes" do
|
136
|
+
let(:server) { BigbluebuttonServer.new }
|
189
137
|
|
190
|
-
|
191
|
-
|
192
|
-
it { server.meetings[1].should have_same_attributes_as(room2) }
|
193
|
-
it { server.meetings[2].meetingid.should == "im not in the db" }
|
194
|
-
it { server.meetings[2].name.should == "im not in the db" }
|
195
|
-
it { server.meetings[2].server.should == server }
|
196
|
-
it { server.meetings[2].attendee_password.should == "pass" }
|
197
|
-
it { server.meetings[2].moderator_password.should == "pass" }
|
198
|
-
it { server.meetings[2].running.should == true }
|
199
|
-
it { server.meetings[2].new_record?.should be_true }
|
200
|
-
it { server.meetings[2].external.should be_true }
|
201
|
-
it { server.meetings[2].randomize_meetingid.should be_false }
|
202
|
-
it { server.meetings[2].private.should be_true }
|
138
|
+
it "fetched attributes before they are fetched" do
|
139
|
+
server.meetings.should == []
|
203
140
|
end
|
141
|
+
end
|
204
142
|
|
143
|
+
it { should respond_to(:fetch_meetings) }
|
144
|
+
it { should respond_to(:meetings) }
|
145
|
+
|
146
|
+
context "fetching info from bbb" do
|
147
|
+
let(:server) { Factory.create(:bigbluebutton_server) }
|
148
|
+
let(:room1) { Factory.create(:bigbluebutton_room, :server => server, :meetingid => "room1", :randomize_meetingid => true) }
|
149
|
+
let(:room2) { Factory.create(:bigbluebutton_room, :server => server, :meetingid => "room2", :randomize_meetingid => true) }
|
150
|
+
|
151
|
+
# the hashes should be exactly as returned by bigbluebutton-api-ruby to be sure we are testing it right
|
152
|
+
let(:meetings) {
|
153
|
+
[
|
154
|
+
{ :meetingID => room1.meetingid, :attendeePW => "ap", :moderatorPW => "mp", :hasBeenForciblyEnded => false, :running => true},
|
155
|
+
{ :meetingID => room2.meetingid, :attendeePW => "pass", :moderatorPW => "pass", :hasBeenForciblyEnded => true, :running => false},
|
156
|
+
{ :meetingID => "im not in the db", :attendeePW => "pass", :moderatorPW => "pass", :hasBeenForciblyEnded => true, :running => true}
|
157
|
+
]
|
158
|
+
}
|
159
|
+
let(:hash) {
|
160
|
+
{ :returncode => true,
|
161
|
+
:meetings => meetings
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
before {
|
166
|
+
@api_mock = mock(BigBlueButton::BigBlueButtonApi)
|
167
|
+
server.stub(:api).and_return(@api_mock)
|
168
|
+
@api_mock.should_receive(:get_meetings).and_return(hash)
|
169
|
+
server.fetch_meetings
|
170
|
+
|
171
|
+
# the passwords are updated during fetch_meetings
|
172
|
+
room1.moderator_password = "mp"
|
173
|
+
room1.attendee_password = "ap"
|
174
|
+
room2.moderator_password = "pass"
|
175
|
+
room2.attendee_password = "pass"
|
176
|
+
}
|
177
|
+
|
178
|
+
it { server.meetings.count.should be(3) }
|
179
|
+
it { server.meetings[0].should have_same_attributes_as(room1) }
|
180
|
+
it { server.meetings[1].should have_same_attributes_as(room2) }
|
181
|
+
it { server.meetings[2].meetingid.should == "im not in the db" }
|
182
|
+
it { server.meetings[2].name.should == "im not in the db" }
|
183
|
+
it { server.meetings[2].server.should == server }
|
184
|
+
it { server.meetings[2].attendee_password.should == "pass" }
|
185
|
+
it { server.meetings[2].moderator_password.should == "pass" }
|
186
|
+
it { server.meetings[2].running.should == true }
|
187
|
+
it { server.meetings[2].new_record?.should be_true }
|
188
|
+
it { server.meetings[2].external.should be_true }
|
189
|
+
it { server.meetings[2].randomize_meetingid.should be_false }
|
190
|
+
it { server.meetings[2].private.should be_true }
|
205
191
|
end
|
206
192
|
|
207
193
|
end
|
data/spec/rails_app/.gitignore
CHANGED
data/spec/rails_app/db/seeds.rb
CHANGED
@@ -1,8 +1,20 @@
|
|
1
1
|
# This file should contain all the record creation needed to seed the database with its default values.
|
2
2
|
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
3
|
|
4
|
-
file = File.join(Rails.root, "
|
5
|
-
if File.exists?
|
6
|
-
config = YAML.load_file(file)
|
7
|
-
|
4
|
+
file = File.join(Rails.root, "features", "config.yml")
|
5
|
+
if File.exists?(file)
|
6
|
+
config = YAML.load_file(file)
|
7
|
+
|
8
|
+
if ENV['SERVER']
|
9
|
+
unless config['servers'].has_key?(ENV['SERVER'])
|
10
|
+
throw Exception.new("Server #{ENV['SERVER']} does not exists in your configuration file.")
|
11
|
+
end
|
12
|
+
server = config['servers'][ENV['SERVER']]
|
13
|
+
else
|
14
|
+
server = config['servers'][config['servers'].keys.first]
|
15
|
+
end
|
16
|
+
server['version'] = '0.7' unless server.has_key?('version')
|
17
|
+
server['name'] = URI.parse(server['url']).host
|
18
|
+
|
19
|
+
BigbluebuttonServer.create!(server)
|
8
20
|
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
Feature: Monitor the active in the webconference servers
|
2
|
+
To check the current status of a server
|
3
|
+
One needs a real-time activity monitor
|
4
|
+
|
5
|
+
@need-bot
|
6
|
+
Scenario: View the list of meetings running in a server
|
7
|
+
Given an anonymous user
|
8
|
+
And a real server
|
9
|
+
And 2 meetings running in this server
|
10
|
+
When he goes to the server activity monitor page
|
11
|
+
Then he should see the 2 meetings that are running
|
12
|
+
|
13
|
+
@need-bot
|
14
|
+
Scenario: View the list of meetings in progress and meetings recently finished
|
15
|
+
Given an anonymous user
|
16
|
+
And a real server
|
17
|
+
And 2 meetings running in this server
|
18
|
+
And 2 meetings recently ended in this server
|
19
|
+
When he goes to the server activity monitor page
|
20
|
+
Then he should see the 2 meetings that are running
|
21
|
+
And he should see the 2 recently ended meetings
|
22
|
+
|
23
|
+
@need-bot
|
24
|
+
Scenario: View externally created meetings (in rooms that are not in the database)
|
25
|
+
Given an anonymous user
|
26
|
+
And a real server
|
27
|
+
And an external room in this server
|
28
|
+
When he goes to the server activity monitor page
|
29
|
+
Then he should see the external room in the list
|
30
|
+
|
31
|
+
# Note: This will only work for bbb servers with removeMeetingWhenEnded=false
|
32
|
+
# See: http://code.google.com/p/bigbluebutton/issues/detail?id=980
|
33
|
+
@need-bot
|
34
|
+
Scenario: Contains a link to partially refresh the meeting list
|
35
|
+
Given an anonymous user
|
36
|
+
And a real server
|
37
|
+
And 2 meetings running in this server
|
38
|
+
When he goes to the server activity monitor page
|
39
|
+
And the first meeting is ended
|
40
|
+
And he clicks in the link to update the meeting list
|
41
|
+
Then he should see one meeting running and the other meeting not running
|
42
|
+
|
43
|
+
# Note: This will only work for bbb servers with removeMeetingWhenEnded=false
|
44
|
+
# Also defaultMeetingExpireDuration should be >= 2
|
45
|
+
@need-bot @webkit
|
46
|
+
Scenario: Partially refresh the meeting list periodically
|
47
|
+
Given an anonymous user
|
48
|
+
And a real server
|
49
|
+
And 2 meetings running in this server
|
50
|
+
When he goes to the server activity monitor page
|
51
|
+
And the first meeting is ended
|
52
|
+
Then after 31 seconds
|
53
|
+
And he should see one meeting running and the other meeting not running
|