Sha256: e6105c2f25bb1154cdd7ace3a765b48bd5589885a82602af2d54b5cde8d2aa5e
Contents?: true
Size: 556 Bytes
Versions: 2
Compression:
Stored size: 556 Bytes
Contents
module TwitterLti module TwitterLtiConfig def self.load_config YAML::load(File.open(config_file))[Rails.env] end def self.config_file TwitterLti.app_root.join('config/twitter_lti_config.yml') end def self.setup! if File.exists?(config_file) Rails.logger.info "Loading environment variables in #{config_file}" config = load_config config.map { |k, v| ENV[k.upcase] = v } else raise "Warning: File does not exist: #{config_file} for #{Rails.env})." end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
twitter_lti-0.0.3 | lib/twitter_lti/twitter_lti_config.rb |
twitter_lti-0.0.2 | lib/twitter_lti/twitter_lti_config.rb |