comparison config/application.rb @ 47:e5082c4c234d

Also allow config-file-based configuration.
author nanaya <me@myconan.net>
date Thu, 23 Apr 2015 16:05:08 +0900
parents aa6d58c8653b
children 257910c60eb3
comparison
equal deleted inserted replaced
46:92b22027d0ae 47:e5082c4c234d
6 require "action_controller/railtie" 6 require "action_controller/railtie"
7 # require "action_mailer/railtie" 7 # require "action_mailer/railtie"
8 require "action_view/railtie" 8 require "action_view/railtie"
9 # require "sprockets/railtie" 9 # require "sprockets/railtie"
10 require "rails/test_unit/railtie" 10 require "rails/test_unit/railtie"
11
12 require File.expand_path("../config_init", __FILE__)
11 13
12 # Require the gems listed in Gemfile, including any gems 14 # Require the gems listed in Gemfile, including any gems
13 # you've limited to :test, :development, or :production. 15 # you've limited to :test, :development, or :production.
14 Bundler.require(*Rails.groups) 16 Bundler.require(*Rails.groups)
15 17
30 32
31 # this isn't actually used but railties checks this variable during boot. 33 # this isn't actually used but railties checks this variable during boot.
32 config.secret_key_base = "herp a derp" 34 config.secret_key_base = "herp a derp"
33 config.session_store :disabled 35 config.session_store :disabled
34 36
35 if ENV["RT_MEMCACHED_SERVERS"] 37 if CFG[:memcached_servers]
36 config.cache_store = :mem_cache_store, ENV["RT_MEMCACHED_SERVERS"].split(","), { :namespace => "rsstweet" } 38 config.cache_store = :mem_cache_store, CFG[:memcached_servers], { :namespace => "rsstweet" }
37 end 39 end
38 end 40 end
39 end 41 end