Module: CanvasConnect
- Defined in:
- lib/canvas_connect/meeting_archive.rb,
lib/canvas_connect.rb,
lib/canvas_connect/version.rb
Overview
Copyright © 2013 Instructure, Inc.
This file is part of Canvas.
Canvas is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.
Canvas is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <www.gnu.org/licenses/>.
Defined Under Namespace
Classes: ConnectionError, MeetingArchive, MeetingFolderError, MeetingNotFound
Constant Summary collapse
- VERSION =
'0.2'
Class Method Summary collapse
-
.client ⇒ Object
Return a cached Connect Service object to make requests with.
-
.config ⇒ Object
Public: Find the plugin configuration.
-
.register ⇒ Object
Public: Configure as a Canvas plugin.
Class Method Details
.client ⇒ Object
Return a cached Connect Service object to make requests with.
Returns a AdobeConnect::Service.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/canvas_connect.rb', line 64 def self.client unless @client settings = self.config connect_settings = { :username => settings[:login], :password => settings[:password_dec], :domain => settings[:domain] } @client = AdobeConnect::Service.new(connect_settings) @client.log_in end @client end |
.config ⇒ Object
Public: Find the plugin configuration.
Returns a settings hash.
51 52 53 54 55 56 57 58 59 |
# File 'lib/canvas_connect.rb', line 51 def self.config settings = Canvas::Plugin.find('adobe_connect').settings || {} AdobeConnect::Config.declare do username settings[:login] password settings[:password_dec] domain settings[:domain] end settings end |
.register ⇒ Object
Public: Configure as a Canvas plugin.
Returns nothing.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/canvas_connect.rb', line 30 def self.register Rails.configuration.to_prepare do view_path = File.('../app/views', File.dirname(__FILE__)) unless ApplicationController.view_paths.include?(view_path) ApplicationController.view_paths.unshift(view_path) end ActiveSupport::Dependencies.autoload_paths << File.('../app/models', File.dirname(__FILE__)) require_dependency File.('../app/models/adobe_connect_conference.rb', File.dirname(__FILE__)) require_dependency "canvas/plugins/validators/adobe_connect_validator" require_dependency "canvas/plugins/adobe_connect" require_dependency "canvas_connect/meeting_archive" Canvas::Plugins::AdobeConnect.new end end |