Sha256: 5371e44ccdc54db64a9736bc59f2cae738493c1a4cbc7420c1c404f6995a19af

Contents?: true

Size: 1.39 KB

Versions: 1

Compression:

Stored size: 1.39 KB

Contents

#
# Copyright (C) 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 <http://www.gnu.org/licenses/>.
#

module CanvasWebex
  class ConnectionError < StandardError; end

  class Engine < Rails::Engine
    config.autoload_paths << File.expand_path(File.join(__FILE__, ".."))
    config.eager_load_paths << File.expand_path(File.join(__FILE__, ".."))

    config.to_prepare do
      Canvas::Plugins::CiscoWebex.new
    end
  end

  # Public: Find the plugin configuration.
  #
  # Returns a settings hash.
  def self.config
    Canvas::Plugin.find('cisco_webex').settings || {}
  end

  # Return a cached Connect Service object to make requests with.
  #
  # Returns a CiscoWwebex::Service.
  def self.client
    Service.new(*self.config.values_at(:webex_service, :webex_id, :password_dec, :site_id, :site_name, :partner_id, :meeting_password_dec))
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
canvas_webex-0.18.0 lib/canvas_webex.rb