bigbluebutton_rails 1.4.0 → 2.0.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.
- 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
data/CHANGELOG.rdoc
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
== 1.4.0
|
|
2
|
-
|
|
3
|
-
To learn how to migrate to 1.4.0 see: https://github.com/mconf/bigbluebutton_rails/wiki/Migrate-to-1.4.0
|
|
4
|
-
|
|
5
|
-
* New dependencies:
|
|
6
|
-
* resque: To keep track of meetings that happened.
|
|
7
|
-
* strong_parameters: To allow controllers to decide which parameters can be modified and which can't. Default in Rails 4, should also be used in Rails 3.
|
|
8
|
-
* With strong_parameters in all controllers now the application can decide which parameters can be accessed and which can't. You can have different logics for different types of users.
|
|
9
|
-
* Use <tt>params[:redir_url]</tt> (if present) to redirect the user to a custom URL in all actions where possible. This can be set by the application to redirect the user to a custom location after updating a model, for instance.
|
|
10
|
-
* Register meetings that happened: new model <tt>BigbluebuttonMeeting</tt> that stores instances of meetings that happened in a room. Uses resque to monitor when meetings started. They are also associated with recordings, so the application can show a registry of meetings that happened and their respective recording.
|
|
11
|
-
* MySQL as a default database (was sqlite).
|
|
12
|
-
* First logic layout to set a custom config.xml when joining a room:
|
|
13
|
-
* Every room has an associated BigbluebuttonRoomOptions model;
|
|
14
|
-
* This model contains custom options that will be set in the config.xml when a user joins the associated room;
|
|
15
|
-
* When the user joins, the library will get the default config.xml from the server, modify it according to the BigbluebuttonRoomOptions, and set it on the server to use it in the <tt>join</tt> API call;
|
|
16
|
-
* Currently the only parameters that can be customized are: <tt>default layout</tt>, <tt>presenter_share_only</tt>, <tt>auto_start_audio</tt>, and <tt>auto_start_video</tt>.
|
|
17
|
-
* Fixed the mobile urls generated in <tt>join_mobile</tt>.
|
|
18
|
-
* Updated ruby to 1.9.3-p484.
|
|
19
|
-
* New controller method <tt>bigbluebutton_create_options</tt>. Can return a hash of parameters that will override the parameters in the database when sending a create call. Can be used to force some options when creating a meeting without needing to save it to the database.
|
|
20
|
-
* Removed the routes to join external rooms. This feature was never really used, so was just consuming space and time. Removed the actions <tt>RoomsController#external</tt> and <tt>RoomsController#external_auth</tt>. The flag <tt>external</tt> in <tt>BigbluebuttonRoom</tt> is still there, since it is used to identify external meetings when fetching the meetings from a server.
|
|
21
|
-
* New logic to join meetings from mobile devices: now there's no specific page to join from a mobile. Once /join is called, if the user is in a mobile device (detected using the user's "user-agent") then a page will be rendered and the user will be automatically redirected to the conference using the mobile client. This page has also more information just in case the user is not properly redirected (if the mobile client is not installed, for example).
|
|
22
|
-
* Removed the login via QR Code.
|
|
23
|
-
|
|
24
|
-
== 1.3.0
|
|
25
|
-
|
|
26
|
-
To learn how to migrate to 1.3.0 see: https://github.com/mconf/bigbluebutton_rails/wiki/Migrate-to-1.3.0
|
|
27
|
-
|
|
28
|
-
* New dependency:
|
|
29
|
-
* whenever: To configure cron to trigger resque.
|
|
30
|
-
* Support for recordings. Details at https://github.com/mconf/bigbluebutton_rails/wiki/How-Recordings-Work. #459.
|
|
31
|
-
* Updated most of the dependencies to their latest version.
|
|
32
|
-
* Tested against Rails 3.2 (was Rails 3.0).
|
|
33
|
-
* New option <tt>:as</tt> in router helpers (more at https://github.com/mconf/bigbluebutton_rails/wiki/How-to%3A-Routes)
|
|
34
|
-
* New option <tt>:only</tt> in router helpers (more at https://github.com/mconf/bigbluebutton_rails/wiki/How-to%3A-Routes)
|
|
35
|
-
* Set the HTTP header <tt>x-forwarded-for</tt> with the IP of the client so servers can know who is creating/joining a meeting, for example.
|
|
36
|
-
* Removed assets (jquery, image) from the generator and from the gem.
|
|
37
|
-
* Removed the option to randomize meeting IDs, now they are fixed and generated as a globally unique meeting ID (<tt>"#{SecureRandom.uuid}-#{Time.now.to_i}"</tt>). #734, #735.
|
|
38
|
-
* Added logic to control who can create meetings (method called <tt>bigbluebutton_can_create?</tt>).
|
|
39
|
-
|
|
40
|
-
== 1.2.0
|
|
41
|
-
|
|
42
|
-
* Updated ruby to 1.9.3-194.
|
|
43
|
-
* Support to BigBlueButton 0.8 rc1.
|
|
44
|
-
* Updated bigbluebutton-api-ruby to 1.1.0.
|
|
45
|
-
|
|
46
|
-
== 1.1.0
|
|
47
|
-
|
|
48
|
-
* Rooms are now decoupled from servers:
|
|
49
|
-
* A room can exist without a server;
|
|
50
|
-
* Everytime a 'send_create' is called in a room, the method 'select_server' is called to select a server where the meeting will be held. The room is saved if the server changed;
|
|
51
|
-
* The method 'select_server' by default selects the server with less rooms;
|
|
52
|
-
* The routes for rooms are not nested with servers anymore ('/bigbluebutton/rooms' instead of '/bigbluebutton/server/:id/rooms').
|
|
53
|
-
* Because of this change all path helpers for rooms <b>must be updated!</b>
|
|
54
|
-
* rooms/external now receives a parameter "server_id" to indicate the server in which the external rooms is running. The views were updated.
|
|
55
|
-
* "bigbluebutton_routes :room_matchers" now generates all routes available for rooms, not only a selected set as before.
|
|
56
|
-
|
|
57
|
-
== 1.0.0
|
|
58
|
-
|
|
59
|
-
* First version with support to BigBlueButton 0.8:
|
|
60
|
-
* The support is still very basic: you can use the gem with BBB 0.8 but not all features are supported yet, such as pre-upload of slides and anything related to recordings.
|
|
61
|
-
* Updated bigbluebutton-api-ruby to 0.1.0 to support BBB 0.8.
|
|
62
|
-
* Added several integration tests.
|
|
63
|
-
* Several small bug fixes
|
|
64
|
-
|
|
65
|
-
== 0.0.6
|
|
66
|
-
|
|
67
|
-
* After fetch_meetings, the rooms that are not found in the DB are *not* saved by default anymore.
|
|
68
|
-
* New action to join external rooms (rooms that are not in the DB but exist in the BBB server).
|
|
69
|
-
* Fixed some errors and warnings for Ruby 1.8.
|
|
70
|
-
* Some changes in the logic of RoomsController#auth to enable a user to join a room that has a blank password.
|
|
71
|
-
* Improvements in the mobile_join view to show a link that includes user authentication. But the QR code is still a bare link to the BBB server.
|
|
72
|
-
* Made some improvements based on tips by rails_best_practices and increased the test coverage to 100% for almost all classes.
|
|
73
|
-
|
|
74
|
-
== 0.0.5
|
|
75
|
-
|
|
76
|
-
* URLs for both servers and rooms are now defined with a string attribute (called "param") instead of the model ID.
|
|
77
|
-
* New return values for bigbluebutton_role: :password and nil.
|
|
78
|
-
* Private rooms now require a password to be valid.
|
|
79
|
-
* New action "join_mobile" for rooms that renders a QR code to join the conference using the protocol "bigbluebutton://".
|
|
80
|
-
* New action "activity" for servers that shows a view to monitors a BBB server.
|
|
81
|
-
* Added json responses for most of the actions.
|
|
82
|
-
* logout_url can be an incomplete url and it will be completed with the current domain/protocol when a room is created in the BBB server.
|
|
83
|
-
* The generator bigbluebutton_rails:public was removed. It's features are now inside bigbluebutton_rails:install.
|
|
84
|
-
* After fetch_meetings all rooms are automatically stored in the DB if they are not there yet.
|
|
85
|
-
|
|
86
|
-
== 0.0.4
|
|
87
|
-
|
|
88
|
-
* A random voice_bridge with 5 digits (recommended) is set when a room is created.
|
|
89
|
-
* Routes generators now allow specifying custom controllers instead of the defaults Bigbluebutton::ServersController and Bigbluebutton::RoomsController.
|
|
90
|
-
* Some bug fixes (including fixes for ruby 1.8).
|
|
91
|
-
|
|
92
|
-
== 0.0.3
|
|
93
|
-
|
|
94
|
-
* Rooms can be public or private
|
|
95
|
-
* New route RoomsController#invite used to request a password to join a room or to allow anonymous users to join.
|
|
96
|
-
* Room's "meeting_id" attribute renamed to "meetingid".
|
|
97
|
-
* A room can have it's meetingid randomly generated for each "send_create" call if randomize_meetingid is set.
|
|
98
|
-
* New attributes for rooms: logout_url, dial_number, voice_bridge and max_participant.
|
|
99
|
-
|
|
100
|
-
== 0.0.2
|
|
101
|
-
|
|
102
|
-
* New "fetch" and "send" methods in BigbluebuttonRooms to fetch info about meetings from BBB and store in the model.
|
|
103
|
-
* New class BigbluebuttonAttendee to store attendee information returned by BBB in get_meeting_info.
|
|
104
|
-
* New class BigbluebuttonMeeting to store meeting information returned by BBB in get_meetings.
|
|
105
|
-
|
|
106
|
-
== 0.0.1
|
|
107
|
-
|
|
108
|
-
* First version
|
|
109
|
-
* DB models for BigBlueButton servers and rooms
|
|
110
|
-
* Controller to access servers and rooms
|
|
111
|
-
* rooms_controller interacts with a BBB server using bigbluebutton-api-ruby
|
data/README.rdoc
DELETED
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
= BigBlueButton on Rails
|
|
2
|
-
|
|
3
|
-
{BigBlueButton}[http://bigbluebutton.org] integration for Ruby on Rails 3.
|
|
4
|
-
|
|
5
|
-
Features:
|
|
6
|
-
* Allows multiple servers and multiple conference rooms.
|
|
7
|
-
* Full API access using {bigbluebutton-api-ruby}[https://github.com/mconf/bigbluebutton-api-ruby].
|
|
8
|
-
* Easy way to join conferences: simply create a room and call the <tt>join</tt> action.
|
|
9
|
-
* Easy integration with authentication and authorization mechanisms, such as {Devise}[https://github.com/plataformatec/devise] and {CanCan}[https://github.com/ryanb/cancan].
|
|
10
|
-
* Support for recordings: meetings can be recorded, the list of recordings retrieved and recordings can be played.
|
|
11
|
-
* Possibility to create private rooms, that require a password to join.
|
|
12
|
-
* Deals with visitors (users that are not logged), allowing (or forbidding) them to join rooms.
|
|
13
|
-
* Uses static meeting IDs generated as a globally unique identifier (e.g. "36mskja87-029i-lsk9-b96e-98278407e145-1365703324").
|
|
14
|
-
* Server activity monitor that shows what's happening in the server.
|
|
15
|
-
* Stores a registry of meetings that happened and associates them with the recording that was generated for it (if any).
|
|
16
|
-
* Allows rooms to be configured dynamically using the <tt>{config.xml}[https://code.google.com/p/bigbluebutton/wiki/ClientConfiguration]</tt> feature.
|
|
17
|
-
|
|
18
|
-
Possible future features:
|
|
19
|
-
* Limit the number of users per room and rooms per server.
|
|
20
|
-
* Server administration (use bbb-conf, etc.).
|
|
21
|
-
* Pre-upload of slides.
|
|
22
|
-
* See {TODO.rdoc}[https://github.com/mconf/bigbluebutton_rails/blob/master/TODO.rdoc].
|
|
23
|
-
|
|
24
|
-
== Supported versions
|
|
25
|
-
|
|
26
|
-
=== BigBlueButton
|
|
27
|
-
|
|
28
|
-
The current version of this gem supports <tt>all</tt> the following versions of BigBlueButton:
|
|
29
|
-
|
|
30
|
-
* 0.81: Altough not all features are supported yet. (See {TODO.rdoc}[https://github.com/mconf/bigbluebutton_rails/blob/master/TODO.rdoc].)
|
|
31
|
-
* 0.8: Altough not all features are supported yet, such as pre-upload of slides. (See {TODO.rdoc}[https://github.com/mconf/bigbluebutton_rails/blob/master/TODO.rdoc].)
|
|
32
|
-
* 0.7: Including 0.7, 0.71 and 0.71a.
|
|
33
|
-
|
|
34
|
-
=== Ruby
|
|
35
|
-
|
|
36
|
-
Tested in rubies:
|
|
37
|
-
|
|
38
|
-
* ruby-1.9.3 (p484) *recommended*
|
|
39
|
-
* ruby-1.9.2 (p290)
|
|
40
|
-
|
|
41
|
-
Use these versions to be sure it will work. Other patches of 1.9.2 and 1.9.3 should work as well.
|
|
42
|
-
|
|
43
|
-
=== Rails
|
|
44
|
-
|
|
45
|
-
To be used with <b>Rails 3</b> only (should work on 3.0, 3.1 and 3.2).
|
|
46
|
-
Tested mainly with Rails 3.2.
|
|
47
|
-
|
|
48
|
-
=== Database
|
|
49
|
-
|
|
50
|
-
We recommend the use of MySQL in your application, since this gem is developed and tested using it.
|
|
51
|
-
|
|
52
|
-
== Installation
|
|
53
|
-
|
|
54
|
-
You can install the latest version of BigbluebuttonRails using RubyGems:
|
|
55
|
-
|
|
56
|
-
gem install bigbluebutton_rails
|
|
57
|
-
|
|
58
|
-
Or simply add the following line in your Gemfile:
|
|
59
|
-
|
|
60
|
-
gem "bigbluebutton_rails"
|
|
61
|
-
|
|
62
|
-
After installing, you need to run the generator:
|
|
63
|
-
|
|
64
|
-
rails generate bigbluebutton_rails:install
|
|
65
|
-
|
|
66
|
-
This generator will create the files needed to setup the gem in your application.
|
|
67
|
-
You should take some time to open all the files generated and analyze them.
|
|
68
|
-
|
|
69
|
-
By default the gem will use the views it provides, <b>but it is strongly recommended that you adapt them for your needs!</b>
|
|
70
|
-
The views provided are just an example of how they can be implemented in your application and
|
|
71
|
-
they depend on jQuery (use the gem <tt>jquery-rails</tt>) and on a css file provided by this gem.
|
|
72
|
-
You can easily generate the views and the css file in your application to later customize them with:
|
|
73
|
-
|
|
74
|
-
rails generate bigbluebutton_rails:views
|
|
75
|
-
|
|
76
|
-
To now more about the generators see {How to: Generators}[https://github.com/mconf/bigbluebutton_rails/wiki/How-to:-Generators]
|
|
77
|
-
|
|
78
|
-
==== Dependencies
|
|
79
|
-
|
|
80
|
-
Notice: Since version 1.4.0, new dependencies were added to applications that use this gem.
|
|
81
|
-
|
|
82
|
-
Include the following gems in your Gemfile:
|
|
83
|
-
|
|
84
|
-
gem 'whenever'
|
|
85
|
-
gem 'strong_parameters'
|
|
86
|
-
gem 'resque'
|
|
87
|
-
|
|
88
|
-
{whenever}[https://github.com/javan/whenever] is used to schedule cron jobs from the application. Cron jobs are used in BigbluebuttonRails
|
|
89
|
-
to update the list of recordings periodically.
|
|
90
|
-
|
|
91
|
-
{strong_parameters}[https://github.com/rails/strong_parameters] is used to validate which parameters can be updated in a model. With
|
|
92
|
-
it you can, for example, allow admins to update anything on a web conference rooms while normal users can only update the rooms name.
|
|
93
|
-
This gem is used by default in Rails 4.
|
|
94
|
-
|
|
95
|
-
{resque}[https://github.com/defunkt/resque] is used to schedule workers that will control the list of meetings. A meeting is a model that is
|
|
96
|
-
created whenever a meeting is held in a room. We need workers to run these tasks in background and check when meetings start and stop.
|
|
97
|
-
|
|
98
|
-
Read more about some of these dependencies below.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
=== Routes
|
|
102
|
-
|
|
103
|
-
The routes to BigbluebuttonRails can be generated with the helper <tt>bigbluebutton_routes</tt>. See the example below:
|
|
104
|
-
|
|
105
|
-
bigbluebutton_routes :default
|
|
106
|
-
|
|
107
|
-
It will generate the default routes. You need to call it at least once and the routes will be scoped with 'bigbluebutton'. They will look like:
|
|
108
|
-
|
|
109
|
-
/bigbluebutton/servers
|
|
110
|
-
/bigbluebutton/servers/my-server/new
|
|
111
|
-
/bigbluebutton/servers/my-server/rooms
|
|
112
|
-
/bigbluebutton/rooms
|
|
113
|
-
/bigbluebutton/rooms/my-room/join
|
|
114
|
-
|
|
115
|
-
You can also make the routes use custom controllers:
|
|
116
|
-
|
|
117
|
-
bigbluebutton_routes :default, :controllers => {
|
|
118
|
-
:servers => 'custom_servers',
|
|
119
|
-
:rooms => 'custom_rooms',
|
|
120
|
-
:recordings => 'custom_recordings'
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
To generate routes for a single controller:
|
|
124
|
-
|
|
125
|
-
bigbluebutton_routes :default, :only => 'servers'
|
|
126
|
-
|
|
127
|
-
You may also want shorter routes to access conference rooms. For that, use the option <tt>room_matchers</tt>:
|
|
128
|
-
|
|
129
|
-
resources :users do
|
|
130
|
-
bigbluebutton_routes :room_matchers
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
It creates routes to the actions used to access a conference room, so you can allow access to webconference rooms using URLs such as:
|
|
134
|
-
|
|
135
|
-
http://myserver.com/my-community/room-name/join
|
|
136
|
-
http://myserver.com/user-name/room-name/join
|
|
137
|
-
|
|
138
|
-
For more information see:
|
|
139
|
-
|
|
140
|
-
* {How to: Routes}[https://github.com/mconf/bigbluebutton_rails/wiki/How-to:-Routes]
|
|
141
|
-
|
|
142
|
-
=== Basic configuration
|
|
143
|
-
|
|
144
|
-
There are some basic assumptions made by BigbluebuttonRails:
|
|
145
|
-
|
|
146
|
-
* You have a method called <tt>current_user</tt> that returns the current user;
|
|
147
|
-
* The <tt>current_user</tt> has an attribute or method called "name" that returns
|
|
148
|
-
his/her fullname and an attribute or method "id" that returns the ID.
|
|
149
|
-
|
|
150
|
-
If you don't, you can change this behaviour easily, keep reading.
|
|
151
|
-
|
|
152
|
-
BigbluebuttonRails uses the methods <tt>bigbluebutton_user</tt> and <tt>bigbluebutton_role(room)</tt> to get the current user and to get the permission that the current
|
|
153
|
-
user has in the <tt>room</tt>, respectively. These methods are defined in {lib/bigbluebutton_rails/controller_methods.rb}[https://github.com/mconf/bigbluebutton_rails/blob/master/lib/bigbluebutton_rails/controller_methods.rb]
|
|
154
|
-
and you can reimplement them in your application controller to change their behaviour as shown below.
|
|
155
|
-
|
|
156
|
-
class ApplicationController < ActionController::Base
|
|
157
|
-
|
|
158
|
-
# overriding bigbluebutton_rails function
|
|
159
|
-
def bigbluebutton_user
|
|
160
|
-
current_user && current_user.is_a?(User) ? current_user : nil
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
def bigbluebutton_role(room)
|
|
164
|
-
...
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
=== Updating the recordings
|
|
171
|
-
|
|
172
|
-
Since this task can consume quite some time if your server has a lot of recordings,
|
|
173
|
-
it is recommended to run it periodically in the background. To do that, you can use the
|
|
174
|
-
gem {whenever}[https://github.com/javan/whenever] (that uses {cron}[http://en.wikipedia.org/wiki/Cron]
|
|
175
|
-
underneath).
|
|
176
|
-
|
|
177
|
-
This gem provides a rake task to fetch the recordings from the webconference servers and
|
|
178
|
-
update the application database. This task can be triggered from whenever/cron to update the entire
|
|
179
|
-
recordings database.
|
|
180
|
-
|
|
181
|
-
The command below will fetch recordings for <b>all servers</b> and update the database
|
|
182
|
-
with all recordings found:
|
|
183
|
-
|
|
184
|
-
rake bigbluebutton_rails:recordings:update
|
|
185
|
-
|
|
186
|
-
To set up whenever, first add it to your application Gemfile:
|
|
187
|
-
|
|
188
|
-
gem 'whenever', :require => false
|
|
189
|
-
|
|
190
|
-
When you ran the generator <tt>:install</tt> previously, it created a file at
|
|
191
|
-
<tt>config/schedule.rb</tt> inside your application. This file is used to configure whenever.
|
|
192
|
-
Once this file is in place, running the following command will update your cron tab
|
|
193
|
-
to update the recordings periodically.
|
|
194
|
-
|
|
195
|
-
whenever --update-crontab
|
|
196
|
-
|
|
197
|
-
Check {whenever}[https://github.com/javan/whenever] page to learn more about it.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
For more information see:
|
|
201
|
-
|
|
202
|
-
* {How recordings work}[https://github.com/mconf/bigbluebutton_rails/wiki/How-Recordings-Work]
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
=== Updating the list of meetings
|
|
206
|
-
|
|
207
|
-
Meetings (<tt>BigbluebuttonMeeting</tt> models) in BigbluebuttonRails are instances of meetings that were held in web conference rooms. A meeting is created whenever
|
|
208
|
-
the application detects that a user joined a room and that he's the first user. Meetings are never removed, they are kept as a registry of
|
|
209
|
-
what happened in the web conference servers connected to BigbluebuttonRails.
|
|
210
|
-
|
|
211
|
-
The creating of these objects is done in background using a gem called {resque}[https://github.com/defunkt/resque]. Whenever a user
|
|
212
|
-
clicks in the button to join a meeting, a resque worker is scheduled. This worker will wait for a while until the meeting is created and
|
|
213
|
-
running in the web conference server, and will then create the correponding <tt>BigbluebuttonMeeting</tt> object.
|
|
214
|
-
|
|
215
|
-
To keep track of meetings, you have to run the resque workers (this is needed both in development and in production):
|
|
216
|
-
|
|
217
|
-
rake resque:work QUEUE='bigbluebutton_rails'
|
|
218
|
-
|
|
219
|
-
The list of meetings is also periodically synchronized using cron tasks, as is done for the list of recordings (see the section above).
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
=== Example application
|
|
223
|
-
|
|
224
|
-
If you need more help to set up the gem or just want to see an example of it working,
|
|
225
|
-
check out the test application at <tt>spec/rails_app/</tt>!
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
==== See also
|
|
229
|
-
|
|
230
|
-
* {How to: Integrate with Devise}[https://github.com/mconf/bigbluebutton_rails/wiki/How-to:-Integrate-with-Devise]
|
|
231
|
-
* {How to: Integrate with CanCan}[https://github.com/mconf/bigbluebutton_rails/wiki/How-to:-Integrate-with-CanCan]
|
|
232
|
-
|
|
233
|
-
== Contributing/Development
|
|
234
|
-
|
|
235
|
-
Fork this repository, clone your fork and start by installing the dependencies:
|
|
236
|
-
|
|
237
|
-
bundle install
|
|
238
|
-
|
|
239
|
-
Note: if you're getting an error installing <tt>capybara-webkit</tt>, most likely you need to install QT, see: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit
|
|
240
|
-
|
|
241
|
-
First copy <tt>spec/rails_app/config/database.yml.example</tt> to <tt>spec/rails_app/config/database.yml</tt>. It uses MySQL since this is the database recommended for the applications that use this gem. You have to set the appropriate password for your MySQL user.
|
|
242
|
-
|
|
243
|
-
Save <tt>spec/rails_app/features/config.yml.example</tt> as <tt>spec/rails_app/features/config.yml</tt> and edit it to set values for an existent BigBlueButton server. You will need it to run the integration tests. For more information see the page {Testing}[https://github.com/mconf/bigbluebutton_rails/wiki/Testing] in our wiki.
|
|
244
|
-
|
|
245
|
-
Prepare the <tt>rails_app</tt> used for tests:
|
|
246
|
-
|
|
247
|
-
rake rails_app:install
|
|
248
|
-
rake rails_app:db SERVER=my-server # select a server you defined in 'config.yml'
|
|
249
|
-
rake rails_app:populate # to create fake data, optional
|
|
250
|
-
|
|
251
|
-
Run the tests:
|
|
252
|
-
|
|
253
|
-
rake spec
|
|
254
|
-
rake cucumber SERVER=my-server
|
|
255
|
-
|
|
256
|
-
Or simply:
|
|
257
|
-
|
|
258
|
-
rake SERVER=my-server
|
|
259
|
-
|
|
260
|
-
If you're adding migrations to the gem, test them with:
|
|
261
|
-
|
|
262
|
-
rake spec:migrations
|
|
263
|
-
|
|
264
|
-
Note: If you don't set the SERVER variable, the first server in <tt>config.yml</tt> will be used.
|
|
265
|
-
|
|
266
|
-
You can also start the test application and navigate to <tt>localhost:3000</tt> to check it:
|
|
267
|
-
|
|
268
|
-
cd spec/rails_app/
|
|
269
|
-
rails server
|
|
270
|
-
|
|
271
|
-
If you need to keep track of meetings, run the resque workers with:
|
|
272
|
-
|
|
273
|
-
rake resque:work QUEUE='bigbluebutton_rails'
|
|
274
|
-
|
|
275
|
-
Develop. :)
|
|
276
|
-
|
|
277
|
-
If you want your code to be integrated in this repository, please fork it, create a branch with your modifications and submit a pull request.
|
|
278
|
-
|
|
279
|
-
* See more about testing {in our wiki page}[https://github.com/mconf/bigbluebutton_rails/wiki/Testing].
|
|
280
|
-
|
|
281
|
-
=== Spork
|
|
282
|
-
|
|
283
|
-
{Spork}[https://github.com/sporkrb/spork-rails] allows you to run tests faster. Run this in a terminal to start spork:
|
|
284
|
-
|
|
285
|
-
bundle exec spork
|
|
286
|
-
|
|
287
|
-
Then run the tests with:
|
|
288
|
-
|
|
289
|
-
bundle exec rspec -X spec/
|
|
290
|
-
|
|
291
|
-
=== Test Coverage
|
|
292
|
-
|
|
293
|
-
Coverage is analyzed by default when you run:
|
|
294
|
-
|
|
295
|
-
rake spec
|
|
296
|
-
|
|
297
|
-
Run it and look at the file <tt>coverage/index.html</tt>.
|
|
298
|
-
|
|
299
|
-
=== Best Practices
|
|
300
|
-
|
|
301
|
-
We use the gem <tt>rails_best_practices</tt> to get some nice tips on how to improve the code.
|
|
302
|
-
|
|
303
|
-
Run:
|
|
304
|
-
|
|
305
|
-
rake best_practices
|
|
306
|
-
|
|
307
|
-
And look at the file <tt>rails_best_practices_output.html</tt> to see the tips.
|
|
308
|
-
|
|
309
|
-
== License
|
|
310
|
-
|
|
311
|
-
Distributed under The MIT License (MIT). See {LICENSE}[https://github.com/mconf/bigbluebutton_rails/blob/master/LICENSE].
|
|
312
|
-
|
|
313
|
-
== Contact
|
|
314
|
-
|
|
315
|
-
This project is developed as part of Mconf (http://mconf.org). Contact:
|
|
316
|
-
|
|
317
|
-
* Mconf: A scalable opensource multiconference system for web and mobile devices
|
|
318
|
-
* PRAV Labs - UFRGS - Porto Alegre - Brazil
|
|
319
|
-
* http://www.inf.ufrgs.br/prav/gtmconf
|
data/TODO.rdoc
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
TODO:
|
|
2
|
-
* Pre-upload of slides
|
|
3
|
-
* 'userID' argument in 'join' and in the respone of 'getMeetingInfo'.
|
|
4
|
-
* 'createTime' argument in 'join' and in the response of 'create'.
|
|
5
|
-
* New return values (e.g). 'createTime'.
|
|
6
|
-
* We don't need to randomize the meeting_id anymore (to confirm)
|
|
7
|
-
* Options 'redirectClient' and 'clientURL' on 'create'
|
|
8
|
-
* Options 'configToken' and 'avatarURL' on 'join'
|
|
9
|
-
* 'getDefaultConfigXML' and 'setConfigXML'. They are already used when a user joins a meeting,
|
|
10
|
-
to set the custom options configured in the target room. But these API methods cannot be called
|
|
11
|
-
individually yet.
|
|
12
|
-
|
|
13
|
-
See:
|
|
14
|
-
* https://code.google.com/p/bigbluebutton/wiki/API#Updates_to_API_in_BigBlueButton_0.81
|
|
15
|
-
* http://code.google.com/p/bigbluebutton/wiki/API#Version_0.80
|
|
16
|
-
* http://groups.google.com/group/bigbluebutton-dev/browse_thread/thread/c214cbe9bdb2268a?pli=1
|