OSDN Git Service

comic test ok
[pettanr/pettanr.git] / config / environments / production.rb
1 #require 'RMagick'
2 require 'DMagick'
3 Pettanr::Application.configure do
4   # Settings specified here will take precedence over those in config/application.rb
5
6   # Code is not reloaded between requests
7   config.cache_classes = true
8
9   # Full error reports are disabled and caching is turned on
10   config.consider_all_requests_local       = false
11   config.action_controller.perform_caching = true
12
13   # Disable Rails's static asset server (Apache or nginx will already do this)
14   config.serve_static_assets = false
15
16   # Compress JavaScripts and CSS
17   config.assets.compress = true
18
19   # Don't fallback to assets pipeline if a precompiled asset is missed
20   config.assets.compile = false
21
22   # Generate digests for assets URLs
23   config.assets.digest = true
24
25   # Defaults to Rails.root.join("public/assets")
26   # config.assets.manifest = YOUR_PATH
27
28   # Specifies the header that your server uses for sending files
29   # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
30   # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
31
32   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
33   # config.force_ssl = true
34
35   # See everything in the log (default is :info)
36   # config.log_level = :debug
37
38   # Use a different logger for distributed setups
39   # config.logger = SyslogLogger.new
40
41   # Use a different cache store in production
42   # config.cache_store = :mem_cache_store
43
44   # Enable serving of images, stylesheets, and JavaScripts from an asset server
45   # config.action_controller.asset_host = "http://assets.example.com"
46
47   # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
48   # config.assets.precompile += %w( search.js )
49
50   # Disable delivery errors, bad email addresses will be ignored
51   # config.action_mailer.raise_delivery_errors = false
52
53   # Enable threaded mode
54   # config.threadsafe!
55
56   # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
57   # the I18n.default_locale when a translation can not be found)
58   config.i18n.fallbacks = true
59
60   # Send deprecation notices to registered listeners
61   config.active_support.deprecation = :notify
62 end
63 require 'aws/s3'
64 require 'yaml'
65
66 y = YAML.load(open(Rails.root + 'config/aws.yaml').read)
67 AWS::S3::Base.establish_connection!(
68   :access_key_id => y["access_key_id"], 
69   :secret_access_key => y["secret_access_key"]
70 )
71 require 's3_picture'
72 PictureIO.setup do |config|
73   config.original_picture_io = PictureIO::S3Picture.new 'pettanr-original'
74   config.resource_picture_io = PictureIO::S3Picture.new 'pettanr-stable'
75   config.system_picture_io = PictureIO::S3Picture.new  'pettanr-system'
76 end