bigbluebutton-api-ruby 1.3.0 → 1.8.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.
@@ -168,10 +168,28 @@ describe BigBlueButton::BigBlueButtonConfigXml do
168
168
  end
169
169
 
170
170
  context "if the module and attribute are found" do
171
- before(:each) {
172
- target.set_attribute("LayoutModule", "layoutConfig", "value").should eql("value")
173
- }
174
- it { target.get_attribute("LayoutModule", "layoutConfig").should eql("value") }
171
+ context "setting an attribute as string" do
172
+ before(:each) {
173
+ target.set_attribute("LayoutModule", "layoutConfig", "value").should eql("value")
174
+ }
175
+ it { target.get_attribute("LayoutModule", "layoutConfig").should eql("value") }
176
+ end
177
+
178
+ context "sets values always as string" do
179
+ context "boolean" do
180
+ before(:each) {
181
+ target.set_attribute("LayoutModule", "layoutConfig", true).should eql("true")
182
+ }
183
+ it { target.get_attribute("LayoutModule", "layoutConfig").should eql("true") }
184
+ end
185
+
186
+ context "Hash" do
187
+ before(:each) {
188
+ target.set_attribute("LayoutModule", "layoutConfig", {}).should eql("{}")
189
+ }
190
+ it { target.get_attribute("LayoutModule", "layoutConfig").should eql("{}") }
191
+ end
192
+ end
175
193
  end
176
194
 
177
195
  context "if the module is not found" do
@@ -271,6 +289,14 @@ describe BigBlueButton::BigBlueButtonConfigXml do
271
289
  }
272
290
  it { target.is_modified?.should be_false }
273
291
  end
292
+
293
+ context "if an attribute is set to the same value it already had, but with a different type" do
294
+ before(:each) {
295
+ # it's already false in the original XML, but as a string, not boolean
296
+ target.set_attribute("LayoutModule", "enableEdit", false)
297
+ }
298
+ it { target.is_modified?.should be_false }
299
+ end
274
300
  end
275
301
 
276
302
  end
@@ -100,14 +100,43 @@ describe BigBlueButton::BigBlueButtonFormatter do
100
100
  it { hash[:param7].should == nil }
101
101
  it { hash[:param8].should == nil }
102
102
 
103
- context "returns nil if the param doesn't exists" do
104
- subject { BigBlueButton::BigBlueButtonFormatter.new({ :param => 1}) }
105
- it { subject.to_datetime(:inexistent).should == nil }
106
- end
103
+ context "returns nil if" do
104
+ context "the param doesn't exists" do
105
+ subject { BigBlueButton::BigBlueButtonFormatter.new({ :param => 1}) }
106
+ it { subject.to_datetime(:inexistent).should == nil }
107
+ end
107
108
 
108
- context "returns nil if the hash is nil" do
109
- subject { BigBlueButton::BigBlueButtonFormatter.new(nil) }
110
- it { subject.to_datetime(:inexistent).should == nil }
109
+ context "the hash is nil" do
110
+ subject { BigBlueButton::BigBlueButtonFormatter.new(nil) }
111
+ it { subject.to_datetime(:inexistent).should == nil }
112
+ end
113
+
114
+ context "the value is an empty string" do
115
+ subject { BigBlueButton::BigBlueButtonFormatter.new({ param1: '' }) }
116
+ it { subject.to_datetime(:param1).should == nil }
117
+ end
118
+
119
+ context "the value is nil" do
120
+ subject { BigBlueButton::BigBlueButtonFormatter.new({ param1: nil }) }
121
+ it { subject.to_datetime(:param1).should == nil }
122
+ end
123
+
124
+ context "the value is an empty hash" do
125
+ subject { BigBlueButton::BigBlueButtonFormatter.new({ param1: {} }) }
126
+ it { subject.to_datetime(:param1).should == nil }
127
+ end
128
+
129
+ context "the value is an empty array" do
130
+ subject { BigBlueButton::BigBlueButtonFormatter.new({ param1: [] }) }
131
+ it { subject.to_datetime(:param1).should == nil }
132
+ end
133
+
134
+ ['null', 'NULL'].each do |v|
135
+ context "the value is '#{v}'" do
136
+ subject { BigBlueButton::BigBlueButtonFormatter.new({ param1: v }) }
137
+ it { subject.to_datetime(:param1).should == nil }
138
+ end
139
+ end
111
140
  end
112
141
  end
113
142
 
metadata CHANGED
@@ -1,57 +1,141 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigbluebutton-api-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
5
- prerelease:
4
+ version: 1.8.0
6
5
  platform: ruby
7
6
  authors:
7
+ - Mconf
8
8
  - Leonardo Crauss Daronco
9
- - Joe Kinsella
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2014-05-11 00:00:00.000000000 Z
12
+ date: 2021-12-06 00:00:00.000000000 Z
14
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: childprocess
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: 1.0.1
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: 1.0.1
28
+ - !ruby/object:Gem::Dependency
29
+ name: ffi
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: 1.9.24
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 1.9.24
42
+ - !ruby/object:Gem::Dependency
43
+ name: json
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 1.8.6
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 1.8.6
56
+ - !ruby/object:Gem::Dependency
57
+ name: nokogiri
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 1.10.4
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 1.10.4
70
+ - !ruby/object:Gem::Dependency
71
+ name: rack
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 1.6.11
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 1.6.11
84
+ - !ruby/object:Gem::Dependency
85
+ name: rubyzip
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 1.3.0
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: 1.3.0
15
98
  - !ruby/object:Gem::Dependency
16
99
  name: xml-simple
17
100
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
101
  requirements:
20
- - - ! '>='
102
+ - - "~>"
21
103
  - !ruby/object:Gem::Version
22
- version: 1.1.1
104
+ version: '1.1'
23
105
  type: :runtime
24
106
  prerelease: false
25
107
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
108
  requirements:
28
- - - ! '>='
109
+ - - "~>"
29
110
  - !ruby/object:Gem::Version
30
- version: 1.1.1
31
- description: Provides an interface to the BigBlueButton web meeting API (https://github.com/mconf/bigbluebutton-api-ruby)
111
+ version: '1.1'
112
+ description: Provides methods to access BigBlueButton in a ruby application through
113
+ its API
32
114
  email:
115
+ - contact@mconf.org
33
116
  - leonardodaronco@gmail.com
34
- - joe.kinsella@gmail.com
35
117
  executables: []
36
118
  extensions: []
37
119
  extra_rdoc_files:
38
- - README.rdoc
120
+ - README.md
39
121
  - LICENSE
40
122
  - LICENSE_003
41
- - CHANGELOG.rdoc
123
+ - CHANGELOG.md
42
124
  files:
43
- - .gitignore
44
- - .rspec
45
- - .ruby-version
46
- - .travis.yml
47
- - CHANGELOG.rdoc
125
+ - ".gitignore"
126
+ - ".rspec"
127
+ - ".ruby-version"
128
+ - ".travis.yml"
129
+ - CHANGELOG.md
130
+ - Dockerfile
48
131
  - Gemfile
49
132
  - Gemfile.lock
50
133
  - LICENSE
51
134
  - LICENSE_003
52
- - README.rdoc
135
+ - README.md
53
136
  - Rakefile
54
137
  - bigbluebutton-api-ruby.gemspec
138
+ - docker-compose.yml
55
139
  - examples/config_xml.rb
56
140
  - examples/create.rb
57
141
  - examples/get_version_example.rb
@@ -84,6 +168,7 @@ files:
84
168
  - lib/bigbluebutton_hash_to_xml.rb
85
169
  - lib/bigbluebutton_modules.rb
86
170
  - spec/bigbluebutton_api_0.81_spec.rb
171
+ - spec/bigbluebutton_api_0.9_spec.rb
87
172
  - spec/bigbluebutton_api_spec.rb
88
173
  - spec/bigbluebutton_config_layout_spec.rb
89
174
  - spec/bigbluebutton_config_xml_spec.rb
@@ -96,33 +181,26 @@ files:
96
181
  - spec/support/forgery/forgeries/random_name.rb
97
182
  - spec/support/forgery/forgeries/url.rb
98
183
  homepage: https://github.com/mconf/bigbluebutton-api-ruby/
99
- licenses: []
184
+ licenses:
185
+ - MIT
186
+ metadata: {}
100
187
  post_install_message:
101
188
  rdoc_options: []
102
189
  require_paths:
103
190
  - lib
104
191
  required_ruby_version: !ruby/object:Gem::Requirement
105
- none: false
106
192
  requirements:
107
- - - ! '>='
193
+ - - ">="
108
194
  - !ruby/object:Gem::Version
109
195
  version: '0'
110
- segments:
111
- - 0
112
- hash: -1402282552445394412
113
196
  required_rubygems_version: !ruby/object:Gem::Requirement
114
- none: false
115
197
  requirements:
116
- - - ! '>='
198
+ - - ">="
117
199
  - !ruby/object:Gem::Version
118
200
  version: '0'
119
- segments:
120
- - 0
121
- hash: -1402282552445394412
122
201
  requirements: []
123
- rubyforge_project:
124
- rubygems_version: 1.8.23
202
+ rubygems_version: 3.0.3
125
203
  signing_key:
126
- specification_version: 3
127
- summary: Provides an interface to the BigBlueButton web meeting API (https://github.com/mconf/bigbluebutton-api-ruby)
204
+ specification_version: 4
205
+ summary: BigBlueButton integration for ruby
128
206
  test_files: []
data/CHANGELOG.rdoc DELETED
@@ -1,90 +0,0 @@
1
- === 1.3.0
2
-
3
- * Drop support to BigBlueButton 0.7 and add BigBlueButton to 0.81. Includes support to the new API calls <tt>getDefaultConfigXML</tt> and <tt>setConfigXML</tt>.
4
- * Reviewed all methods responses (some changed a bit) and documentation.
5
- * Allow non standard options to be passed to *all* API calls.
6
- * Removed method <tt>join_meeting</tt> that was usually not used. Should always use <tt>join_meeting_url</tt>.
7
- * Moved the hash extension method <tt>from_xml</tt> to its own class to prevent conflicts with Rails. See https://github.com/mconf/bigbluebutton-api-ruby/pull/6.
8
-
9
- === 1.2.0
10
-
11
- * Allow non standard options to be passed to some API calls. These API calls are: create_meeting, join_meeting_url,
12
- join_meeting, get_recordings. Useful for development of for custom versions of BigBlueButton.
13
- * Accept :record as boolean in create_meeting
14
- * Better formatting of data returned by get_recordings
15
-
16
- === 1.1.1
17
-
18
- * BigBlueButtonApi can now receive http headers to be sent in all get/post requests
19
-
20
- === 1.1.0
21
-
22
- * Updated ruby to 1.9.3-194.
23
- * Support to BigBlueButton 0.4 rc1.
24
-
25
- === 1.0.0
26
-
27
- * Version 0.1.0 renamed to 1.0.0.
28
-
29
- === 0.1.0
30
-
31
- * Support to BigBlueButton 0.8:
32
- * New methods for recordings: get_recordings, publish_recordings, delete_recordings
33
- * Pre-upload of slides in create_meeting
34
- * New parameters added in the already existent methods
35
- * For more information see BigBlueButton docs at http://code.google.com/p/bigbluebutton/wiki/API#Version_0.8
36
- * Method signature changes: create_meeting, join_meeting_url and join_meeting. Optional parameters are now passed using a hash.
37
- * Integration tests for the entire library using cucumber.
38
- * Changed the XML parser to xml-simple (especially to solve issues with CDATA values).
39
-
40
- === 0.0.11
41
-
42
- * The file "bigbluebutton-api" was renamed to "bigbluebutton_api". All "require" calls must be updated.
43
- * Splitted the library in more files (more modular) and created rspec tests for it.
44
- * Added a BigBlueButtonApi.timeout attribute to timeout get requests and avoid blocks when the server is down. Defaults to 2 secs.
45
- * New method last_http_response to access the last HTTP response object.
46
- * Automatically detects the BBB server version if not informed by the user.
47
-
48
- === 0.0.10
49
-
50
- * Returning hash now will *always* have these 3 values: :returncode (boolean), :messageKey (string) and :message (string).
51
- * Some values in the hash are now converted to a fixed variable type to avoid inconsistencies:
52
- * :meetingID (string)
53
- * :attendeePW (string)
54
- * :moderatorPW (string)
55
- * :running (boolean)
56
- * :hasBeenForciblyEnded (boolean)
57
- * :endTime and :startTime (DateTime or nil)
58
-
59
- === 0.0.9
60
-
61
- * Simplied "attendees" part of the hash returned in get_meeting_info. Same thing done for get_meetings.
62
-
63
- === 0.0.8
64
-
65
- * New method get_api_version that returns the version of the server API (>= 0.7).
66
- * New simplified hash syntax for get_meetings. See docs for details.
67
-
68
- === 0.0.6
69
-
70
- * New method test_connection.
71
- * Added comparison method for APIs.
72
- * Methods attendee_url and moderator_url deprecated. Use join_meeting_url.
73
- * Better exception throwing when the user is unreachable or the response is incorrect.
74
- * BigBlueButtonException has now a "key" attribute to store the "messageKey" returned by BBB in failures.
75
-
76
- === 0.0.4
77
-
78
- * Added support for BigBlueButton 0.7.
79
- * Gem renamed from 'bigbluebutton' to 'bigbluebutton-api-ruby'.
80
- * API functions now return a hash and instead of the XML returned by BBB. The XML is converted to a hash that uses symbols as keys and groups keys with the same name.
81
-
82
- === 0.0.3
83
-
84
- * Fixes module issue preventing proper throwing of exceptions.
85
-
86
- === 0.0.1
87
-
88
- * This is the first version of this gem. It provides an implementation of the 0.64 bbb API, with the following exceptions:
89
- * Does not implement meeting token, and instead relies on meeting id as the unique identifier for a meeting.
90
- * Documentation suggests there is way to call join_meeting as API call (instead of browser URL). This call currently does not work as documented.
data/README.rdoc DELETED
@@ -1,62 +0,0 @@
1
- = bigbluebutton-api-ruby {<img src="http://travis-ci.org/mconf/bigbluebutton-api-ruby.png"/>}[http://travis-ci.org/mconf/bigbluebutton-api-ruby]
2
-
3
- This is a ruby gem that provides access to the API of {BigBlueButton}[http://bigbluebutton.org].
4
- See the documentation of the API {here}[http://code.google.com/p/bigbluebutton/wiki/API].
5
-
6
- It enables a ruby application to interact with BigBlueButton by calling ruby methods instead of
7
- HTTP requests, making it a lot easier to interact with BigBlueButton. It also formats the responses
8
- to a ruby-friendly format and includes helper classes to deal with more complicated API calls, such
9
- as the pre-upload of slides.
10
-
11
- A few features it has:
12
-
13
- * Provides methods to perform all API calls and get the responses;
14
- * Converts the XML responses to ruby hashes, that are easier to work with;
15
- * Converts the string values returned to native ruby types. For instance:
16
- * Dates are converted DateTime objects (e.g. "Thu Sep 01 17:51:42 UTC 2011");
17
- * Response codes are converted to boolean (e.g. "SUCCESS" becomes <tt>true</tt>);
18
- * Deals with errors (e.g. timeouts) throwing <tt>BigBlueButtonException</tt> exceptions;
19
- * Support to multiple BigBlueButton API versions (see below).
20
-
21
- == Supported BigBlueButton versions
22
-
23
- The current version of this gem supports <em>all</em> the following versions of BigBlueButton:
24
-
25
- * 0.8
26
- * 0.81
27
-
28
- Older versions:
29
-
30
- * 0.7 (including 0.7, 0.71 and 0.71a): The last version with support to 0.7* is {version 1.2.0}[https://github.com/mconf/bigbluebutton-api-ruby/tree/v1.2.0]. It supports versions 0.7 and 0.8.
31
- * 0.64: see the branch <tt>api-0.64</tt>. The last version with support to 0.64 is {version 0.0.10}[https://github.com/mconf/bigbluebutton-api-ruby/tree/v0.0.10]. It supports versions 0.64 and 0.7.
32
-
33
- == Supported ruby versions
34
-
35
- Tested in rubies:
36
-
37
- * ruby-2.0.0 (p353)
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 these rubies (e.g. ruby 1.9.3-p194) should work as well.
42
-
43
- == Releases
44
-
45
- For a list of releases and release notes see {CHANGELOG.rdoc}[https://github.com/mconf/bigbluebutton-api-ruby/blob/master/CHANGELOG.rdoc].
46
-
47
- == Development
48
-
49
- Information for developers of <tt>bigbluebutton-api-ruby</tt> can be found in {our wiki}[https://github.com/mconf/bigbluebutton-api-ruby/wiki].
50
-
51
- The development of this gem is guided by the requirements of the project Mconf. To know more about it visit the {project's wiki}[https://github.com/mconf/wiki/wiki].
52
-
53
- == License
54
-
55
- Distributed under The MIT License (MIT).
56
- See {LICENSE}[https://github.com/mconf/bigbluebutton-api-ruby/blob/master/LICENSE] for the latest license, valid for all versions after 0.0.4 (including it), and {LICENSE_003}[https://github.com/mconf/bigbluebutton-api-ruby/blob/master/LICENSE_003] for version 0.0.3 and all the previous versions.
57
-
58
- == Contact
59
-
60
- <b>Version 0.0.4+</b>: This project is developed as part of Mconf (http://mconf.org). Contact: Leonardo Crauss Daronco (leonardodaronco@gmail.com), Mconf: A scalable opensource multiconference system for web and mobile devices @ PRAV Labs - UFRGS. Home page: http://www.inf.ufrgs.br/prav/gtmconf
61
-
62
- <b>Version 0.0.3 and below</b>: Joe Kinsella (joe.kinsella@gmail.com), Home page: http://www.brownbaglunch.com/bigbluebutton