bigbluebutton 0.0.2 → 0.0.3

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 (5) hide show
  1. data/README +3 -0
  2. data/Rakefile +2 -2
  3. data/lib/bigbluebutton.rb +9 -7
  4. data/test/test.rb +6 -4
  5. metadata +4 -4
data/README CHANGED
@@ -6,6 +6,9 @@ Provide access to the BigBlueButton web conferencing API.
6
6
 
7
7
  == Releases
8
8
 
9
+ === Version 0.0.3
10
+ Fixes module issue preventing proper throwing of exceptions.
11
+
9
12
  === Version 0.0.1
10
13
  This is the first version of this gem. It provides an implementation of the
11
14
  0.64 bbb API, with the following exceptions:
data/Rakefile CHANGED
@@ -12,14 +12,14 @@ require 'rake/testtask'
12
12
 
13
13
  spec = Gem::Specification.new do |s|
14
14
  s.name = 'bigbluebutton'
15
- s.version = '0.0.2'
15
+ s.version = '0.0.3'
16
16
  s.has_rdoc = true
17
17
  s.extra_rdoc_files = ['README', 'LICENSE']
18
18
  s.summary = 'Provides an interface to the BigBlueButton web meeting API (http://code.google.com/p/bigbluebutton/)'
19
19
  s.description = s.summary
20
20
  s.author = 'Joe Kinsella'
21
21
  s.email = 'joe.kinsella@gmail.com'
22
- s.homepage = "http://www.brownbaglunch.com/bigbluebutton"
22
+ s.homepage = "http://code.google.com/p/bigbluebuttongem/"
23
23
  # s.executables = ['your_executable_here']
24
24
  s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,lib,doc,test,spec}/**/*")
25
25
  s.require_path = "lib"
@@ -5,6 +5,10 @@ require 'digest/sha1'
5
5
 
6
6
  module BigBlueButton
7
7
 
8
+ class BigBlueButtonException < Exception
9
+
10
+ end
11
+
8
12
  # This class provides access to the BigBlueButton API. BigBlueButton
9
13
  # is an open source project that provides web conferencing for distance
10
14
  # education (http://code.google.com/p/bigbluebutton/wiki/API). This API
@@ -23,7 +27,7 @@ module BigBlueButton
23
27
  # Initializes an instance
24
28
  # base_url:: URL to a BigBlueButton server (defaults to bbb development server)
25
29
  # salt:: Secret salt for this server (defaults to bbb development server)"http://devbuild.bigbluebu
26
- def initialize(base_url = 'http://devbuild.bigbluebutton.org/bigbluebutton/api', salt = '639259d4-9dd8-4b25-bf01-95f9567eaf4b', debug=false)
30
+ def initialize(base_url, salt, debug=false)
27
31
  @session = {}
28
32
  @base_url = base_url
29
33
  @salt = salt
@@ -46,7 +50,8 @@ module BigBlueButton
46
50
  get_url(:join, {:meetingID=>meeting_id,:password=>attendee_password, :fullName=>user_name})
47
51
  end
48
52
 
49
- # Creates a new meeting. Throws BigBlueButtonException on failure.
53
+ # Creates a new meeting. Returns the meeting token or
54
+ # throws BigBlueButtonException on failure.
50
55
  # meeting_id:: Unique identifier for the meeting
51
56
  # meeting_name:: Name for the meeting
52
57
  # moderator_password:: Moderator password
@@ -57,10 +62,11 @@ module BigBlueButton
57
62
  def create_meeting(meeting_id, meeting_name, moderator_password, attendee_password,
58
63
  welcome_message = nil, dialin_number = nil, logout_url = nil, max_participants = nil)
59
64
 
60
- send_api_request(:create, {:name=>meeting_name, :meetingID=>meeting_id,
65
+ doc = send_api_request(:create, {:name=>meeting_name, :meetingID=>meeting_id,
61
66
  :moderatorPW=>moderator_password, :attendeePW=>attendee_password,
62
67
  :welcome=>welcome_message, :dialNumber=>dialin_number,
63
68
  :logoutURL=>logout_url, :maxParticpants=>max_participants} )
69
+ doc.root.get_text('/response/meetingToken').to_s
64
70
  end
65
71
 
66
72
  # Ends an existing meeting. Throws BigBlueButtonException on failure.
@@ -133,8 +139,4 @@ module BigBlueButton
133
139
 
134
140
  end
135
141
 
136
- class BigBlueButtonsException < Exception
137
-
138
- end
139
-
140
142
  end
@@ -2,6 +2,8 @@ require 'bigbluebutton'
2
2
  require 'thread'
3
3
 
4
4
  begin
5
+ BBB_SECURITY_SALT = '639259d4-9dd8-4b25-bf01-95f9567eaf4b'
6
+ BBB_URL = 'http://devbuild.bigbluebutton.org/bigbluebutton/api'
5
7
  MEETING_ID = 'ruby_gem_test'
6
8
  MEETING_NAME = 'Test Meeting For Ruby Gem'
7
9
  MODERATOR_PASSWORD = '4321'
@@ -9,10 +11,10 @@ begin
9
11
  ATTENDEE_PASSWORD = '1234'
10
12
  ATTENDEE_NAME = 'Eben'
11
13
 
12
- api = BigBlueButton::BigBlueButtonApi.new
13
- api.create_meeting(MEETING_ID, MEETING_NAME, MODERATOR_PASSWORD, ATTENDEE_PASSWORD, 'Welcome to my meeting', '1-800-000-0000x00000#', 'http://www.brownbaglunch.com/bigbluebutton', 10)
14
+ api = BigBlueButton::BigBlueButtonApi.new(BBB_URL, BBB_SECURITY_SALT)
15
+ api.create_meeting(MEETING_ID, MEETING_NAME, MODERATOR_PASSWORD, ATTENDEE_PASSWORD, 'Welcome to my meeting', '1-800-000-0000x00000#', 'http://code.google.com/p/bigbluebuttongem/', 10)
14
16
  puts ""
15
- puts "The meeting has been created. Please open a web browser and enter the meeting using either of the below URLs, then press ENTER to continue."
17
+ puts "The meeting has been created. Please open a web browser and enter the meeting using either of the below URLs."
16
18
 
17
19
  url = api.moderator_url(MEETING_ID, MODERATOR_NAME, MODERATOR_PASSWORD)
18
20
  url = api.attendee_url(MEETING_ID, ATTENDEE_NAME, ATTENDEE_PASSWORD)
@@ -26,7 +28,7 @@ begin
26
28
 
27
29
  unless api.is_meeting_running(MEETING_ID)
28
30
  puts "You have NOT entered the meeting"
29
- return
31
+ Kernel.exit!
30
32
  end
31
33
  puts "You have successfully entered the meeting"
32
34
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Joe Kinsella
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-13 23:00:00 -05:00
17
+ date: 2010-03-16 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
@@ -55,7 +55,7 @@ files:
55
55
  - doc/rdoc-style.css
56
56
  - test/test.rb
57
57
  has_rdoc: true
58
- homepage: http://www.brownbaglunch.com/bigbluebutton
58
+ homepage: http://code.google.com/p/bigbluebuttongem/
59
59
  licenses: []
60
60
 
61
61
  post_install_message: