Skip to content

Instantly share code, notes, and snippets.

@BJClark
Created March 20, 2009 00:33
Show Gist options
  • Save BJClark/82147 to your computer and use it in GitHub Desktop.
Save BJClark/82147 to your computer and use it in GitHub Desktop.
def load_configuration(config_file)
if File.exist?(config_file)
if defined? RAILS_ENV
vidoopcaptcha = YAML.load_file(config_file)[RAILS_ENV]
else
vidoopcaptcha = YAML.load_file(config_file)
end
ENV['VIDOOP_SERVER'] = vidoopcaptcha['server']
ENV['VIDOOP_CUSTOMER_ID'] = vidoopcaptcha['customer_id']
ENV['VIDOOP_SITE_ID'] = vidoopcaptcha['site_id']
ENV['VIDOOP_USERNAME'] = vidoopcaptcha['username']
ENV['VIDOOP_PASSWORD'] = vidoopcaptcha['password']
@vidoop_config = vidoopcaptcha
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment