Advertise filters param in discovery doc.
[arvados.git] / services / api / config / application.rb
1 require File.expand_path('../boot', __FILE__)
2
3 require 'rails/all'
4 require 'digest'
5
6 if defined?(Bundler)
7   # If you precompile assets before deploying to production, use this line
8   Bundler.require(*Rails.groups(:assets => %w(development test)))
9   # If you want your assets lazily compiled in production, use this line
10   # Bundler.require(:default, :assets, Rails.env)
11 end
12
13 module Server
14   class Application < Rails::Application
15     # Settings in config/environments/* take precedence over those specified here.
16     # Application configuration should go into files in config/initializers
17     # -- all .rb files in that directory are automatically loaded.
18
19     # Custom directories with classes and modules you want to be autoloadable.
20     # config.autoload_paths += %W(#{config.root}/extras)
21
22     # Only load the plugins named here, in the order given (default is alphabetical).
23     # :all can be used as a placeholder for all plugins not explicitly named.
24     # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
25
26     # Activate observers that should always be running.
27     # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
28
29     # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
30     # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
31     # config.time_zone = 'Central Time (US & Canada)'
32
33     # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
34     # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
35     # config.i18n.default_locale = :de
36
37     # Configure the default encoding used in templates for Ruby 1.9.
38     config.encoding = "utf-8"
39
40     # Configure sensitive parameters which will be filtered from the log file.
41     config.filter_parameters += [:password]
42
43     # Enable the asset pipeline
44     config.assets.enabled = true
45
46     # Version of your assets, change this if you want to expire all your assets
47     config.assets.version = '1.0'
48
49     config.force_ssl = true
50
51     def config.uuid_prefix(x=nil)
52       if x and @uuid_prefix
53         raise "uuid_prefix was already set to #{@uuid_prefix}"
54       end
55       @uuid_prefix ||= Digest::MD5.hexdigest(x || `hostname`.strip).to_i(16).to_s(36)[-5..-1]
56     end
57     def config.uuid_prefix=(x)
58       @uuid_prefix = x
59     end
60   end
61
62 end