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.
Files changed (125) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +10 -1
  4. data/CHANGELOG.md +259 -0
  5. data/Gemfile +14 -19
  6. data/Gemfile.lock +194 -188
  7. data/README.md +416 -0
  8. data/Rakefile +12 -12
  9. data/TODO.md +13 -0
  10. data/app/controllers/bigbluebutton/playback_types_controller.rb +44 -0
  11. data/app/controllers/bigbluebutton/recordings_controller.rb +17 -10
  12. data/app/controllers/bigbluebutton/rooms_controller.rb +65 -36
  13. data/app/controllers/bigbluebutton/servers_controller.rb +12 -8
  14. data/app/models/bigbluebutton_metadata.rb +1 -1
  15. data/app/models/bigbluebutton_playback_format.rb +22 -1
  16. data/app/models/bigbluebutton_playback_type.rb +29 -0
  17. data/app/models/bigbluebutton_recording.rb +38 -19
  18. data/app/models/bigbluebutton_room.rb +150 -73
  19. data/app/models/bigbluebutton_room_options.rb +10 -7
  20. data/app/models/bigbluebutton_server.rb +69 -13
  21. data/app/models/bigbluebutton_server_config.rb +49 -0
  22. data/app/views/bigbluebutton/recordings/_form.html.erb +4 -0
  23. data/app/views/bigbluebutton/recordings/_recordings.html.erb +10 -3
  24. data/app/views/bigbluebutton/rooms/_form.html.erb +18 -6
  25. data/app/views/bigbluebutton/rooms/_rooms.html.erb +6 -3
  26. data/app/views/bigbluebutton/rooms/invite.html.erb +5 -5
  27. data/app/views/bigbluebutton/rooms/show.html.erb +18 -6
  28. data/app/views/bigbluebutton/servers/_form.html.erb +1 -1
  29. data/app/views/bigbluebutton/servers/show.html.erb +5 -0
  30. data/app/workers/bigbluebutton_finish_meetings.rb +11 -0
  31. data/app/workers/bigbluebutton_update_recordings.rb +11 -0
  32. data/app/workers/bigbluebutton_update_server_configs.rb +18 -0
  33. data/bigbluebutton_rails.gemspec +8 -7
  34. data/config/locales/en.yml +52 -7
  35. data/config/locales/pt-br.yml +162 -0
  36. data/config/resque/resque.rake +27 -0
  37. data/config/resque/workers_schedule.yml +17 -0
  38. data/lib/bigbluebutton_rails.rb +30 -2
  39. data/lib/bigbluebutton_rails/background_tasks.rb +31 -0
  40. data/lib/bigbluebutton_rails/controller_methods.rb +12 -8
  41. data/lib/bigbluebutton_rails/dial_number.rb +48 -0
  42. data/lib/bigbluebutton_rails/rails/routes.rb +9 -2
  43. data/lib/bigbluebutton_rails/utils.rb +9 -2
  44. data/lib/bigbluebutton_rails/version.rb +1 -1
  45. data/lib/generators/bigbluebutton_rails/install_generator.rb +0 -8
  46. data/lib/generators/bigbluebutton_rails/templates/migration.rb +28 -6
  47. data/lib/generators/bigbluebutton_rails/templates/migration_2_0_0.rb +56 -0
  48. data/lib/tasks/bigbluebutton_rails/meetings.rake +1 -13
  49. data/lib/tasks/bigbluebutton_rails/recordings.rake +1 -12
  50. data/lib/tasks/bigbluebutton_rails/server_configs.rake +10 -0
  51. data/spec/bigbluebutton_rails_spec.rb +0 -13
  52. data/spec/controllers/bigbluebutton/playback_types_controller_spec.rb +76 -0
  53. data/spec/controllers/bigbluebutton/recordings_controller_spec.rb +109 -37
  54. data/spec/controllers/bigbluebutton/rooms_controller_exception_handling_spec.rb +1 -0
  55. data/spec/controllers/bigbluebutton/rooms_controller_json_responses_spec.rb +27 -3
  56. data/spec/controllers/bigbluebutton/rooms_controller_spec.rb +338 -77
  57. data/spec/controllers/bigbluebutton/servers_controller_json_responses_spec.rb +8 -0
  58. data/spec/controllers/bigbluebutton/servers_controller_spec.rb +182 -47
  59. data/spec/factories/bigbluebutton_meeting.rb +2 -2
  60. data/spec/factories/bigbluebutton_playback_format.rb +2 -2
  61. data/spec/factories/bigbluebutton_playback_type.rb +7 -0
  62. data/spec/factories/bigbluebutton_recording.rb +8 -0
  63. data/spec/factories/bigbluebutton_room.rb +10 -3
  64. data/spec/factories/bigbluebutton_server.rb +6 -1
  65. data/spec/factories/bigbluebutton_server_config.rb +6 -0
  66. data/spec/generators/install_generator_spec.rb +0 -16
  67. data/spec/lib/bigbluebutton_rails/background_tasks_spec.rb +61 -0
  68. data/spec/lib/bigbluebutton_rails/dial_number_spec.rb +78 -0
  69. data/spec/lib/bigbluebutton_rails/utils_spec.rb +56 -0
  70. data/spec/lib/tasks/meetings_rake_spec.rb +14 -1
  71. data/spec/lib/tasks/recordings_rake_spec.rb +14 -1
  72. data/spec/models/bigbluebutton_meeting_db_spec.rb +3 -3
  73. data/spec/models/bigbluebutton_meeting_spec.rb +4 -4
  74. data/spec/models/bigbluebutton_playback_format_db_spec.rb +0 -1
  75. data/spec/models/bigbluebutton_playback_format_spec.rb +75 -4
  76. data/spec/models/bigbluebutton_playback_type_db_spec.rb +14 -0
  77. data/spec/models/bigbluebutton_playback_type_spec.rb +76 -0
  78. data/spec/models/bigbluebutton_recording_db_spec.rb +3 -1
  79. data/spec/models/bigbluebutton_recording_spec.rb +234 -58
  80. data/spec/models/bigbluebutton_room_db_spec.rb +8 -6
  81. data/spec/models/bigbluebutton_room_options_db_spec.rb +1 -0
  82. data/spec/models/bigbluebutton_room_options_spec.rb +137 -38
  83. data/spec/models/bigbluebutton_room_spec.rb +540 -153
  84. data/spec/models/bigbluebutton_server_config_spec.rb +115 -0
  85. data/spec/models/bigbluebutton_server_spec.rb +180 -23
  86. data/spec/rails_app/app/controllers/my_playback_types_controller.rb +7 -0
  87. data/spec/rails_app/app/views/frontpage/show.html.erb +1 -0
  88. data/spec/rails_app/app/views/my_playback_types/index.html.erb +33 -0
  89. data/spec/rails_app/config/application.rb +0 -3
  90. data/spec/rails_app/config/database.yml.travis +10 -0
  91. data/spec/rails_app/config/environments/development.rb +1 -6
  92. data/spec/rails_app/config/environments/production.rb +2 -0
  93. data/spec/rails_app/config/environments/test.rb +2 -0
  94. data/spec/rails_app/config/routes.rb +5 -2
  95. data/spec/rails_app/db/seeds.rb +1 -1
  96. data/spec/rails_app/features/config.yml.example +3 -4
  97. data/spec/rails_app/features/join_rooms.feature +14 -14
  98. data/spec/rails_app/features/step_definitions/activity_monitor_servers_step.rb +2 -2
  99. data/spec/rails_app/features/step_definitions/create_rooms_steps.rb +4 -4
  100. data/spec/rails_app/features/step_definitions/destroy_rooms_steps.rb +2 -2
  101. data/spec/rails_app/features/step_definitions/join_rooms_steps.rb +10 -10
  102. data/spec/rails_app/features/step_definitions/web_steps.rb +2 -2
  103. data/spec/rails_app/features/support/configurations.rb +1 -1
  104. data/spec/rails_app/features/support/templates.rb +12 -12
  105. data/spec/rails_app/lib/tasks/db/populate.rake +19 -6
  106. data/spec/routing/bigbluebutton/custom_controllers_routing_spec.rb +1 -1
  107. data/spec/routing/bigbluebutton/recordings_only_routing_spec.rb +2 -2
  108. data/spec/routing/bigbluebutton/recordings_routing_spec.rb +2 -2
  109. data/spec/routing/bigbluebutton/rooms_only_routing_spec.rb +1 -1
  110. data/spec/routing/bigbluebutton/rooms_routing_spec.rb +15 -1
  111. data/spec/routing/bigbluebutton/servers_only_routing_spec.rb +1 -1
  112. data/spec/routing/bigbluebutton/servers_routing_spec.rb +1 -1
  113. data/spec/spec_helper.rb +23 -31
  114. data/spec/support/matchers/delegate_matcher.rb +8 -1
  115. data/spec/support/matchers/shoulda/respond_with_json_matcher.rb +2 -2
  116. data/spec/support/mocked_server.rb +2 -0
  117. data/spec/support/shared_contexts/rake.rb +23 -0
  118. data/spec/workers/bigbluebutton_finish_meetings_spec.rb +14 -0
  119. data/spec/workers/bigbluebutton_update_recordings_spec.rb +14 -0
  120. data/spec/workers/bigbluebutton_update_server_configs_spec.rb +47 -0
  121. metadata +70 -59
  122. data/CHANGELOG.rdoc +0 -111
  123. data/README.rdoc +0 -319
  124. data/TODO.rdoc +0 -16
  125. data/config/schedule.rb +0 -7
@@ -0,0 +1,416 @@
1
+ # BigBlueButton on Rails [<img src="http://travis-ci.org/mconf/bigbluebutton_rails.png"/>](http://travis-ci.org/mconf/bigbluebutton_rails)
2
+
3
+ [BigBlueButton](http://bigbluebutton.org) integration for Ruby on Rails 4.
4
+
5
+ Features:
6
+
7
+ * Allows multiple servers and multiple conference rooms.
8
+ * Full API access using
9
+ [bigbluebutton-api-ruby](https://github.com/mconf/bigbluebutton-api-ruby).
10
+ * Easy way to join conferences: simply create a room and call the `join`
11
+ action.
12
+ * Easy integration with authentication and authorization mechanisms, such as
13
+ [Devise](https://github.com/plataformatec/devise) and
14
+ [CanCan](https://github.com/ryanb/cancan).
15
+ * Support for recordings: meetings can be recorded, the list of recordings
16
+ retrieved and recordings can be played.
17
+ * Possibility to create private rooms, that require a password to join.
18
+ * Deals with visitors (users that are not logged), allowing (or forbidding)
19
+ them to join rooms.
20
+ * Uses static meeting IDs generated as a globally unique identifier (e.g.
21
+ `36mskja87-029i-lsk9-b96e-98278407e145-1365703324`).
22
+ * Stores a registry of meetings that happened and associates them with the
23
+ recording that was generated for it (if any).
24
+ * Allows rooms to be configured dynamically using the
25
+ `{config.xml}[https://code.google.com/p/bigbluebutton/wiki/ClientConfigura
26
+ tion]` feature.
27
+ * Automatic detection of the user-agent to automatically trigger the [mobile
28
+ client](https://github.com/bigbluebutton/bbb-air-client) when joining a
29
+ conference from a mobile device.
30
+
31
+
32
+ Possible future features:
33
+
34
+ * Limit the number of users per room and rooms per server.
35
+ * Server administration (use `bbb-conf`, etc).
36
+ * Pre-upload of slides.
37
+ * See
38
+ [TODO.md](https://github.com/mconf/bigbluebutton_rails/blob/master/TODO.md).
39
+
40
+
41
+ ## Supported versions
42
+
43
+ This gem is mainly used with [Mconf-Web](https://github.com/mconf/mconf-web).
44
+ You can always use it as a reference for verions of dependencies and examples of how to use the gem.
45
+
46
+
47
+ ### BigBlueButton
48
+
49
+ The current version of this gem supports `all` the following versions of
50
+ BigBlueButton:
51
+
52
+ * 1.0
53
+ * 0.9
54
+ * 0.81
55
+ * 0.8
56
+
57
+
58
+ ### Ruby
59
+
60
+ Tested in rubies:
61
+
62
+ Requires ruby >= 1.9.3.
63
+
64
+ * ruby-2.2 **recommended**
65
+ * ruby-2.1
66
+ * ruby-1.9.3 (last tested with p484)
67
+
68
+
69
+ Use these versions to be sure it will work. Other patches of these versions
70
+ should work as well.
71
+
72
+ ### Rails
73
+
74
+ To be used with **Rails 4** only. Currently tested with Rails 4.1.
75
+
76
+ Version 1.4.0 was the last one to support Rails 3.2. To use it, use the tag
77
+ [`v1.4.0`](https://github.com/mconf/bigbluebutton_rails/tree/v1.4.0).
78
+
79
+ ### Database
80
+
81
+ We recommend the use of MySQL in your application, since this gem is developed
82
+ and tested using it.
83
+
84
+
85
+ ## Upgrade
86
+
87
+ When updating the gem to a newer version, there are usually extra steps you'll have to take in order to have the database migrated, the dependencies updated, and others. These steps are described in [our wiki](https://github.com/mconf/bigbluebutton_rails/wiki). See:
88
+
89
+ * [Migrate to 1.4.0](https://github.com/mconf/bigbluebutton_rails/wiki/Migrate-to-1.4.0)
90
+ * [Migrate to 1.3.0](https://github.com/mconf/bigbluebutton_rails/wiki/Migrate-to-1.3.0)
91
+
92
+
93
+ ## Installation
94
+
95
+ You can install the latest version of BigbluebuttonRails using RubyGems:
96
+
97
+ gem install bigbluebutton_rails
98
+
99
+ Or simply add the following line in your Gemfile:
100
+
101
+ gem "bigbluebutton_rails"
102
+
103
+ After installing, you need to run the generator:
104
+
105
+ rails generate bigbluebutton_rails:install
106
+
107
+ This generator will create the files needed to setup the gem in your
108
+ application. You should take some time to open all the files generated and
109
+ analyze them.
110
+
111
+ By default the gem will use the views it provides, **but it is strongly
112
+ recommended that you adapt them for your needs!** The views provided are just
113
+ an example of how they can be implemented in your application and they depend
114
+ on jQuery (use the gem `jquery-rails`) and on a css file provided by this gem.
115
+ You can easily generate the views and the css file in your application to
116
+ later customize them with:
117
+
118
+ rails generate bigbluebutton_rails:views
119
+
120
+ To now more about the generators see [How to:
121
+ Generators](https://github.com/mconf/bigbluebutton_rails/wiki/How-to:-Generators)
122
+
123
+ #### Dependencies
124
+
125
+ Since version 1.4.0, this gem depends on
126
+ [Resque](https://github.com/defunkt/resque), and since 2.0.0 it also uses
127
+ [Resque-scheduler](https://github.com/resque/resque-scheduler).
128
+
129
+ These gems are used to run background jobs. The ones we have right now are:
130
+ update the list of recordings, check for meetings that started or ended to
131
+ update the database.
132
+
133
+ The gem already requires all dependencies, so you don't have to include them
134
+ in your Gemfile. But you need to configure your application to use Resque and
135
+ Resque-scheduler.
136
+
137
+ To do so, copy the following files to your application:
138
+
139
+ * `config/resque/resque.rake` to your application's `lib/tasks/`;
140
+ * `config/resque/workers_schedule.yml` to your application's `config/`.
141
+
142
+
143
+ The first is a rake task to trigger Resque and Resque-scheduler. The second is
144
+ the scheduling of tasks used by Resque-scheduler. If you already use these
145
+ gems in your application, you probably already have these files. So you can
146
+ just merge them together.
147
+
148
+ To run Resque and Resque-scheduler you will need to run the take tasks:
149
+
150
+ QUEUE="bigbluebutton_rails" rake resque:work
151
+ rake resque:scheduler
152
+
153
+ These gems use [redis](http://redis.io/) to store their data, so you will need
154
+ it in your server. If you're on Ubuntu, you can install it with:
155
+
156
+ apt-get install redis-server
157
+
158
+ Please refer to the documentation of
159
+ [Resque](https://github.com/defunkt/resque) and
160
+ [Resque-scheduler](https://github.com/resque/resque-scheduler) to learn more
161
+ about them and how to use them in development or production.
162
+
163
+ ### Routes
164
+
165
+ The routes to BigbluebuttonRails can be generated with the helper
166
+ `bigbluebutton_routes`. See the example below:
167
+
168
+ bigbluebutton_routes :default
169
+
170
+ It will generate the default routes. You need to call it at least once and the
171
+ routes will be scoped with 'bigbluebutton'. They will look like:
172
+
173
+ /bigbluebutton/servers
174
+ /bigbluebutton/servers/my-server/new
175
+ /bigbluebutton/servers/my-server/rooms
176
+ /bigbluebutton/rooms
177
+ /bigbluebutton/rooms/my-room/join
178
+
179
+ You can also make the routes use custom controllers:
180
+
181
+ bigbluebutton_routes :default, :controllers => {
182
+ :servers => 'custom_servers',
183
+ :rooms => 'custom_rooms',
184
+ :recordings => 'custom_recordings'
185
+ }
186
+
187
+ To generate routes for a single controller:
188
+
189
+ bigbluebutton_routes :default, :only => 'servers'
190
+
191
+ You may also want shorter routes to access conference rooms. For that, use the
192
+ option `room_matchers`:
193
+
194
+ resources :users do
195
+ bigbluebutton_routes :room_matchers
196
+ end
197
+
198
+ It creates routes to the actions used to access a conference room, so you can
199
+ allow access to webconference rooms using URLs such as:
200
+
201
+ http://myserver.com/my-community/room-name/join
202
+ http://myserver.com/user-name/room-name/join
203
+
204
+ For more information see:
205
+
206
+ * [How to: Routes](https://github.com/mconf/bigbluebutton_rails/wiki/How-to:-Routes)
207
+
208
+
209
+ ### Basic configuration
210
+
211
+ There are some basic assumptions made by BigbluebuttonRails:
212
+
213
+ * You have a method called `current_user` that returns the current user;
214
+ * The `current_user` has an attribute or method called "name" that returns
215
+ his/her fullname and an attribute or method "id" that returns the ID.
216
+
217
+
218
+ If you don't, you can change this behaviour easily, keep reading.
219
+
220
+ BigbluebuttonRails uses the methods `bigbluebutton_user` and
221
+ `bigbluebutton_role(room)` to get the current user and to get the permission
222
+ that the current user has in the `room`, respectively. These methods are
223
+ defined in
224
+ `{lib/bigbluebutton_rails/controller_methods.rb}[https://github.com/mconf/bigb
225
+ luebutton_rails/blob/master/lib/bigbluebutton_rails/controller_methods.rb]`
226
+ and you can reimplement them in your application controller to change their
227
+ behaviour as shown below.
228
+
229
+ class ApplicationController < ActionController::Base
230
+
231
+ # overriding bigbluebutton_rails function
232
+ def bigbluebutton_user
233
+ current_user && current_user.is_a?(User) ? current_user : nil
234
+ end
235
+
236
+ def bigbluebutton_role(room)
237
+ ...
238
+ end
239
+
240
+ end
241
+
242
+ ### Updating the recordings
243
+
244
+ Since this task can consume quite some time if your server has a lot of
245
+ recordings, it is recommended to run it periodically in the background. It is
246
+ already done by the application if you are running Resque and Resque-scheduler
247
+ properly. But this gem also provides a rake task to fetch the recordings from
248
+ the web conference servers and update the application database.
249
+
250
+ The command below will fetch recordings for **all servers** and update the
251
+ database with all recordings found:
252
+
253
+ rake bigbluebutton_rails:recordings:update
254
+
255
+ * [How recordings work](https://github.com/mconf/bigbluebutton_rails/wiki/How-Recordings-Work)
256
+
257
+
258
+ ### Updating the list of meetings
259
+
260
+ Meetings (`BigbluebuttonMeeting` models) in BigbluebuttonRails are instances
261
+ of meetings that were held in web conference rooms. A meeting is created
262
+ whenever the application detects that a user joined a room and that he's the
263
+ first user. Meetings are never removed, they are kept as a registry of what
264
+ happened in the web conference servers connected to BigbluebuttonRails.
265
+
266
+ The creating of these objects is done in background using a gem called
267
+ [resque](https://github.com/defunkt/resque). Whenever a user clicks in the
268
+ button to join a meeting, a resque worker is scheduled. This worker will wait
269
+ for a while until the meeting is created and running in the web conference
270
+ server, and will then create the corresponding `BigbluebuttonMeeting` object.
271
+
272
+ To keep track of meetings, you have to run the resque workers (this is needed
273
+ both in development and in production):
274
+
275
+ rake resque:work QUEUE='bigbluebutton_rails'
276
+
277
+ The list of meetings is also periodically synchronized using Resque-scheduler
278
+ (see the sections above).
279
+
280
+ ### Associating rooms and servers
281
+
282
+ Rooms must be associated with a server to function. When a meeting is created,
283
+ it is created in the server that's associated with the room. The association
284
+ is done using the `server_id` attribute in `BigbluebuttonRoom`. So
285
+ applications that use this gem can manage all the associations by simply
286
+ setting this attribute.
287
+
288
+ By default, this gem automatically selects a server **if one is needed and the
289
+ room has no server yet**. If a room already has a server, the gem will never
290
+ change it.
291
+
292
+ To change this behavior, applications can override the method
293
+ `{BigbluebuttonRoom#select_server}[https://github.com/mconf/bigbluebutton_rail
294
+ s/blob/5decf3fa7767002303cf8bda524dcbeca0a9146c/app/models/bigbluebutton_room.
295
+ rb#L413]`. This method is called by all methods that trigger API calls,
296
+ methods that need a server to work properly. It receives a parameter that
297
+ indicates which API call will be sent to the server.
298
+
299
+ If the method returns a server, the server will be associated with the room.
300
+ If the method returns `nil`, the room will maintain the server it had
301
+ previously (if any).
302
+
303
+ One common use would be to override this method to always select a new server
304
+ when a meeting is created (when the argument received is `:create`). This
305
+ would allow the implementation of a simple load balancing mechanism.
306
+
307
+ ### Example application
308
+
309
+ If you need more help to set up the gem or just want to see an example of it
310
+ working, check out the test application at `spec/rails_app/`!
311
+
312
+ #### See also
313
+
314
+ * [How to: Integrate with Devise](https://github.com/mconf/bigbluebutton_rails/wiki/How-to:-Integrate-with-Devise)
315
+ * [How to: Integrate with CanCan](https://github.com/mconf/bigbluebutton_rails/wiki/How-to:-Integrate-with-CanCan)
316
+
317
+
318
+ ## Contributing/Development
319
+
320
+ Fork this repository, clone your fork and start by installing the
321
+ dependencies:
322
+
323
+ bundle install
324
+
325
+ Note: if you're getting an error installing `capybara-webkit`, most likely you
326
+ need to install QT, see:
327
+ https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling
328
+ -capybara-webkit
329
+
330
+ First copy `spec/rails_app/config/database.yml.example` to
331
+ `spec/rails_app/config/database.yml`. It uses MySQL since this is the database
332
+ recommended for the applications that use this gem. You have to set the
333
+ appropriate password for your MySQL user.
334
+
335
+ Save `spec/rails_app/features/config.yml.example` as
336
+ `spec/rails_app/features/config.yml` and edit it to set values for an existent
337
+ BigBlueButton server. You will need it to run the integration tests. For more
338
+ information see the page
339
+ [Testing](https://github.com/mconf/bigbluebutton_rails/wiki/Testing) in our
340
+ wiki.
341
+
342
+ Prepare the `rails_app` used for tests:
343
+
344
+ rake rails_app:install
345
+ rake rails_app:db SERVER=my-server # select a server you defined in 'config.yml'
346
+ rake rails_app:populate # to create fake data, optional
347
+
348
+ Run the tests:
349
+
350
+ rake spec
351
+ rake cucumber SERVER=my-server
352
+
353
+ Or simply:
354
+
355
+ rake SERVER=my-server
356
+
357
+ If you're adding migrations to the gem, test them with:
358
+
359
+ rake spec:migrations
360
+
361
+ Note: If you don't set the SERVER variable, the first server in `config.yml`
362
+ will be used.
363
+
364
+ You can also start the test application and navigate to `localhost:3000` to
365
+ check it:
366
+
367
+ cd spec/rails_app/
368
+ rails server
369
+
370
+ If you need to keep track of meetings, run the resque workers with:
371
+
372
+ rake resque:work QUEUE='bigbluebutton_rails'
373
+
374
+ Develop. :)
375
+
376
+ If you want your code to be integrated in this repository, please fork it,
377
+ create a branch with your modifications and submit a pull request.
378
+
379
+ * See more about testing [in our wiki page](https://github.com/mconf/bigbluebutton_rails/wiki/Testing).
380
+
381
+
382
+ ### Test Coverage
383
+
384
+ Coverage is analyzed by default when you run:
385
+
386
+ rake spec
387
+
388
+ Run it and look at the file `coverage/index.html`.
389
+
390
+ ### Best Practices
391
+
392
+ We use the gem `rails_best_practices` to get some nice tips on how to improve
393
+ the code.
394
+
395
+ Run:
396
+
397
+ rake best_practices
398
+
399
+ And look at the file `rails_best_practices_output.html` to see the tips.
400
+
401
+ ## License
402
+
403
+ Distributed under The MIT License (MIT). See
404
+ [LICENSE](https://github.com/mconf/bigbluebutton_rails/blob/master/LICENSE).
405
+
406
+ ## Contact
407
+
408
+ This project is developed as part of Mconf (http://mconf.org).
409
+
410
+ Mailing list:
411
+ * mconf-dev@googlegroups.com
412
+
413
+ Contact:
414
+ * Mconf: A scalable opensource multiconference system for web and mobile devices
415
+ * PRAV Labs - UFRGS - Porto Alegre - Brazil
416
+ * http://www.inf.ufrgs.br/prav/gtmconf
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ require 'cucumber'
7
7
  require 'cucumber/rake/task'
8
8
 
9
9
  desc 'Default: run specs and features.'
10
- task :default => [:spec, :cucumber]
10
+ task :default => [:spec]
11
11
 
12
12
  RSpec::Core::RakeTask.new(:spec)
13
13
 
@@ -15,8 +15,8 @@ desc 'Generate documentation.'
15
15
  RDoc::Task.new do |rdoc|
16
16
  rdoc.rdoc_dir = 'rdoc'
17
17
  rdoc.title = 'BigBlueButton on Rails'
18
- rdoc.rdoc_files.include('README.rdoc')
19
- rdoc.rdoc_files.include('CHANGELOG.rdoc')
18
+ rdoc.rdoc_files.include('README.md')
19
+ rdoc.rdoc_files.include('CHANGELOG.md')
20
20
  rdoc.rdoc_files.include('lib/**/*.rb')
21
21
  rdoc.rdoc_files.include('app/**/*.rb')
22
22
  end
@@ -62,14 +62,12 @@ namespace :rails_app do
62
62
  end
63
63
 
64
64
  task :cucumber do
65
- if File.exists? "features/"
66
- puts "* Gem features"
67
- sh "bundle exec cucumber features/"
68
- end
65
+ # Disable all features that need the bot. It isn't working since BigBlueButton 0.81.
66
+ tags = "~@need-bot"
69
67
 
70
68
  puts "* Dummy app features"
71
69
  cd File.join(File.dirname(__FILE__), "spec", "rails_app")
72
- sh "bundle exec cucumber features/"
70
+ sh "bundle exec cucumber features/ --tags #{tags}"
73
71
  cd File.dirname(__FILE__)
74
72
  end
75
73
 
@@ -84,9 +82,10 @@ namespace :spec do
84
82
  cd "spec/rails_app/"
85
83
  sh "bundle exec rails destroy bigbluebutton_rails:install"
86
84
  sh "bundle exec rails generate bigbluebutton_rails:install 0.0.4"
87
- sh "bundle exec rails generate bigbluebutton_rails:install 0.0.5 --migration-only"
88
- sh "bundle exec rails generate bigbluebutton_rails:install 1.3.0 --migration-only"
89
- sh "bundle exec rails generate bigbluebutton_rails:install 1.4.0 --migration-only"
85
+ sh "bundle exec rails generate bigbluebutton_rails:install 0.0.5 --migration-only --force"
86
+ sh "bundle exec rails generate bigbluebutton_rails:install 1.3.0 --migration-only --force"
87
+ sh "bundle exec rails generate bigbluebutton_rails:install 1.4.0 --migration-only --force"
88
+ sh "bundle exec rails generate bigbluebutton_rails:install 2.0.0 --migration-only --force"
90
89
 
91
90
  sh "bundle exec rake db:drop RAILS_ENV=test"
92
91
  sh "bundle exec rake db:create RAILS_ENV=test"
@@ -95,9 +94,10 @@ namespace :spec do
95
94
 
96
95
  cd "../.."
97
96
  Rake::Task["spec"].invoke
98
- Rake::Task["cucumber"].invoke
97
+ # Rake::Task["cucumber"].invoke
99
98
 
100
99
  cd "spec/rails_app/"
100
+ sh "bundle exec rails destroy bigbluebutton_rails:install 2.0.0 --migration-only"
101
101
  sh "bundle exec rails destroy bigbluebutton_rails:install 1.4.0 --migration-only"
102
102
  sh "bundle exec rails destroy bigbluebutton_rails:install 1.3.0 --migration-only"
103
103
  sh "bundle exec rails destroy bigbluebutton_rails:install 0.0.5 --migration-only"