Sha256: 54d085ae5b18ccf9a0a1d2e287dbb7705e86bf993093e50eb291737c69a72b48

Contents?: true

Size: 954 Bytes

Versions: 15

Compression:

Stored size: 954 Bytes

Contents

require 'yaml'

begin
  configuration = YAML.load_file("#{Rails.root}/config/headstart.yml")[Rails.env]
  configuration = HashWithIndifferentAccess.new(configuration)
  
  Headstart.configure do |config|
    config.mailer_sender        = configuration[:mailer_sender]
    config.impersonation_hash   = configuration[:impersonation_hash]
    config.use_facebook_connect = configuration[:use_facebook_connect]
    config.use_delayed_job      = configuration[:use_delayed_job]
    config.facebook_api_key     = configuration[:facebook_api_key]
    config.facebook_secret_key  = configuration[:facebook_secret_key]
  end

  if configuration[:madmimi_username].present? && configuration[:madmimi_api_key].present?
    MadMimiMailer.api_settings = {
       :username  => configuration[:madmimi_username],
       :api_key   => configuration[:madmimi_api_key]
    }
  else
  end
rescue LoadError
  puts "The /config/headstart.yml file is missing or broken."
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
headstart-0.7.0 generators/headstart/templates/headstart.rb
headstart-0.6.2 generators/headstart/templates/headstart.rb
headstart-0.6.1 generators/headstart/templates/headstart.rb
headstart-0.6.0 generators/headstart/templates/headstart.rb
headstart-0.5.5 generators/headstart/templates/headstart.rb
headstart-0.5.4 generators/headstart/templates/headstart.rb
headstart-0.5.3 generators/headstart/templates/headstart.rb
headstart-0.5.2 generators/headstart/templates/headstart.rb
headstart-0.5.1 generators/headstart/templates/headstart.rb
headstart-0.5.0 generators/headstart/templates/headstart.rb
headstart-0.4.2 generators/headstart/templates/headstart.rb
headstart-0.4.1 generators/headstart/templates/headstart.rb
headstart-0.4.0 generators/headstart/templates/headstart.rb
headstart-0.3.0 generators/headstart/templates/headstart.rb
headstart-0.1.0 generators/headstart/templates/headstart.rb