annotate config/application.rb @ 86:5bfc986200db

The caching becomes a bit confusing because of parameters
author nanaya <me@myconan.net>
date Mon, 27 Jun 2016 05:14:10 +0900
parents e9a6019a34ea
children d5a0d66ee457
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
72
257910c60eb3 Rails 5 \o/
nanaya <me@myconan.net>
parents: 47
diff changeset
1 require_relative "boot"
0
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
2
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
3 # Pick the frameworks you want:
33
9defe1ae5814 Remove ActiveModel dependency.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
4 # require "active_model/railtie"
0
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
5 # require "active_record/railtie"
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
6 require "action_controller/railtie"
1
dac0d7297388 Remove ActionMailer.
edogawaconan <me@myconan.net>
parents: 0
diff changeset
7 # require "action_mailer/railtie"
0
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
8 require "action_view/railtie"
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
9 # require "sprockets/railtie"
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
10 require "rails/test_unit/railtie"
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
11
72
257910c60eb3 Rails 5 \o/
nanaya <me@myconan.net>
parents: 47
diff changeset
12 require_relative "config_init"
47
e5082c4c234d Also allow config-file-based configuration.
nanaya <me@myconan.net>
parents: 39
diff changeset
13
0
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
14 # Require the gems listed in Gemfile, including any gems
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
15 # you've limited to :test, :development, or :production.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
16 Bundler.require(*Rails.groups)
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
17
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
18 module Rsstweet
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
19 class Application < Rails::Application
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
20 # Settings in config/environments/* take precedence over those specified here.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
21 # Application configuration should go into files in config/initializers
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
22 # -- all .rb files in that directory are automatically loaded.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
23
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
24 # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
25 # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
26 # config.time_zone = 'Central Time (US & Canada)'
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
27
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
28 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
29 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
30 # config.i18n.default_locale = :de
72
257910c60eb3 Rails 5 \o/
nanaya <me@myconan.net>
parents: 47
diff changeset
31 config.middleware.delete ActionDispatch::Cookies
28
03f904c070f7 Basic caching support.
edogawaconan <me@myconan.net>
parents: 19
diff changeset
32
36
1fdb3fc5ec31 Move setting of secret_key_base to application.rb.
edogawaconan <me@myconan.net>
parents: 33
diff changeset
33 # this isn't actually used but railties checks this variable during boot.
1fdb3fc5ec31 Move setting of secret_key_base to application.rb.
edogawaconan <me@myconan.net>
parents: 33
diff changeset
34 config.secret_key_base = "herp a derp"
39
aa6d58c8653b Remove all initializers.
edogawaconan <me@myconan.net>
parents: 36
diff changeset
35 config.session_store :disabled
36
1fdb3fc5ec31 Move setting of secret_key_base to application.rb.
edogawaconan <me@myconan.net>
parents: 33
diff changeset
36
73
e9a6019a34ea Avoid using constant. Use global instead =D
nanaya <me@myconan.net>
parents: 72
diff changeset
37 if $cfg[:memcached_servers]
e9a6019a34ea Avoid using constant. Use global instead =D
nanaya <me@myconan.net>
parents: 72
diff changeset
38 config.cache_store = :mem_cache_store, $cfg[:memcached_servers], { :namespace => "rsstweet" }
28
03f904c070f7 Basic caching support.
edogawaconan <me@myconan.net>
parents: 19
diff changeset
39 end
0
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
40 end
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
41 end