Skip to content

Instantly share code, notes, and snippets.

@hamedrnik
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save hamedrnik/9b67851d2e84ef7055e7 to your computer and use it in GitHub Desktop.

Select an option

Save hamedrnik/9b67851d2e84ef7055e7 to your computer and use it in GitHub Desktop.
# config/application.rb
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
if ["development", "production"].include? Rails.env
CONFIG = YAML.load(File.read(File.expand_path('../app_config.yml', __FILE__)))[Rails.env]
end
module Robin8
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
config.assets.paths << Rails.root.join('vendor', 'assets', 'components')
end
end
# config/app_config.yml
default: &default
:google:
:client_id: CLIENT ID
:client_secret: CLIENT SECRET
:development:
<<: *default
:test:
<<: *default
:production:
<<: *default
# app_config should be git ignored but there should be a file i.e. app_config.yml.example which contains sample keys for config but of course they shouldn't be real keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment