Sha256: 914991cc50828bc2af8ffb256c384adc7338f7379fcc1059cc3bca8cdec90f9e

Contents?: true

Size: 595 Bytes

Versions: 19

Compression:

Stored size: 595 Bytes

Contents

module LtiProvider
  module LtiXmlConfig
    def self.load_config
      YAML::load(File.open(config_file))[Rails.env]
    end

    def self.config_file
      LtiProvider.app_root.join('config/lti_xml.yml')
    end

    def self.setup!
      config = LtiProvider::XmlConfig
      if File.exists?(config_file)
        Rails.logger.info "Initializing LTI XML config using configuration in #{config_file}"
        load_config.each do |k,v|
          config.send("#{k}=", v)
        end
      else
        raise "Warning: LTI XML config not configured for #{Rails.env})."
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
lti_provider_engine-1.2.0 lib/lti_provider/lti_xml_config.rb
qalam_lti_provider_engine-2.0.9 lib/lti_provider/lti_xml_config.rb
qalam_lti_provider_engine-2.0.8 lib/lti_provider/lti_xml_config.rb
qalam_lti_provider_engine-2.0.7 lib/lti_provider/lti_xml_config.rb
qalam_lti_provider_engine-2.0.6 lib/lti_provider/lti_xml_config.rb
qalam_lti_provider_engine-2.0.5 lib/lti_provider/lti_xml_config.rb
qalam_lti_provider_engine-2.0.4 lib/lti_provider/lti_xml_config.rb
qalam_lti_provider_engine-2.0.3 lib/lti_provider/lti_xml_config.rb
qalam_lti_provider_engine-2.0.2 lib/lti_provider/lti_xml_config.rb
qalam_lti_provider_engine-2.0.1 lib/lti_provider/lti_xml_config.rb
qalam_lti_provider_engine-1.1.6 lib/lti_provider/lti_xml_config.rb
lti_provider_engine-1.1.0 lib/lti_provider/lti_xml_config.rb
lti_provider_engine-1.0.0 lib/lti_provider/lti_xml_config.rb
lti_provider_engine-0.0.6 lib/lti_provider/lti_xml_config.rb
lti_provider_engine-0.0.5 lib/lti_provider/lti_xml_config.rb
lti_provider_engine-0.0.4 lib/lti_provider/lti_xml_config.rb
lti_provider_engine-0.0.3 lib/lti_provider/lti_xml_config.rb
lti_provider_engine-0.0.2 lib/lti_provider/lti_xml_config.rb
lti_provider_engine-0.0.1 lib/lti_provider/lti_xml_config.rb