Description:
default config
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r878:6a10ef0d24b7 - - 1 file changed: 10 inserted, 17 deleted

@@ -1,73 +1,66
1 - require File.expand_path('../boot', __FILE__)
1 + require_relative "boot"
2
2
3 - require 'rails/all'
3 + require "rails/all"
4
4
5 - if defined?(Bundler)
5 + # Require the gems listed in Gemfile, including any gems
6 - # If you precompile assets before deploying to production, use this line
6 + # you've limited to :test, :development, or :production.
7 - Bundler.require(*Rails.groups(:assets => %w(development test)))
7 + Bundler.require(*Rails.groups)
8 - # If you want your assets lazily compiled in production, use this line
9 - # Bundler.require(:default, :assets, Rails.env)
10 - end
11
8
12 module CafeGrader
9 module CafeGrader
13 class Application < Rails::Application
10 class Application < Rails::Application
14 # Settings in config/environments/* take precedence over those specified here.
11 # Settings in config/environments/* take precedence over those specified here.
15 # Application configuration should go into files in config/initializers
12 # Application configuration should go into files in config/initializers
16 # -- all .rb files in that directory are automatically loaded.
13 # -- all .rb files in that directory are automatically loaded.
17
14
18 # Custom directories with classes and modules you want to be autoloadable.
15 # Custom directories with classes and modules you want to be autoloadable.
19 config.autoload_paths += %W(#{config.root}/lib)
16 config.autoload_paths += %W(#{config.root}/lib)
20 config.eager_load_paths << Rails.root.join('lib')
17 config.eager_load_paths << Rails.root.join('lib')
21
18
22 # Only load the plugins named here, in the order given (default is alphabetical).
19 # 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.
20 # :all can be used as a placeholder for all plugins not explicitly named.
24 # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
21 # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
25
22
26 # Activate observers that should always be running.
23 # Activate observers that should always be running.
27 # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
24 # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
28
25
29 # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
26 # 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.
27 # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
31 config.time_zone = 'UTC'
28 config.time_zone = 'UTC'
32
29
33 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
30 # 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]
31 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
35 config.i18n.default_locale = :en
32 config.i18n.default_locale = :en
36
33
37 # Configure the default encoding used in templates for Ruby 1.9.
34 # Configure the default encoding used in templates for Ruby 1.9.
38 config.encoding = "utf-8"
35 config.encoding = "utf-8"
39
36
40 - # Configure sensitive parameters which will be filtered from the log file.
41 - config.filter_parameters += [:password]
42 -
43 # Enable escaping HTML in JSON.
37 # Enable escaping HTML in JSON.
44 config.active_support.escape_html_entities_in_json = true
38 config.active_support.escape_html_entities_in_json = true
45
39
40 + config.load_defaults 7.0
41 +
42 + #disable active storage default routes, so the file won't be publicly available
43 + #config.active_storage.draw_routes = false
44 +
46 # Use SQL instead of Active Record's schema dumper when creating the database.
45 # Use SQL instead of Active Record's schema dumper when creating the database.
47 # This is necessary if your schema can't be completely dumped by the schema dumper,
46 # This is necessary if your schema can't be completely dumped by the schema dumper,
48 # like if you have constraints or database-specific column types
47 # like if you have constraints or database-specific column types
49 # config.active_record.schema_format = :sql
48 # config.active_record.schema_format = :sql
50
49
51 - # Enable the asset pipeline
52 - config.assets.enabled = true
53 -
54 - # Version of your assets, change this if you want to expire all your assets
55 - config.assets.version = '1.0'
56 -
57 # ---------------- IMPORTANT ----------------------
50 # ---------------- IMPORTANT ----------------------
58 # If we deploy the app into a subdir name "grader", be sure to do "rake assets:precompile RAILS_RELATIVE_URL_ROOT=/grader"
51 # If we deploy the app into a subdir name "grader", be sure to do "rake assets:precompile RAILS_RELATIVE_URL_ROOT=/grader"
59 # moreover, using the following line instead also known to works
52 # moreover, using the following line instead also known to works
60 #config.action_controller.relative_url_root = '/grader'
53 #config.action_controller.relative_url_root = '/grader'
61
54
62 #font path
55 #font path
63 config.assets.paths << "#{Rails}/vendor/assets/fonts"
56 config.assets.paths << "#{Rails}/vendor/assets/fonts"
64
57
65 config.assets.precompile += ['announcement_refresh.js','effects.js','site_update.js']
58 config.assets.precompile += ['announcement_refresh.js','effects.js','site_update.js']
66 config.assets.precompile += ['local_jquery.js','tablesorter-theme.cafe.css']
59 config.assets.precompile += ['local_jquery.js','tablesorter-theme.cafe.css']
67 %w( announcements submissions configurations contests contest_management graders heartbeat
60 %w( announcements submissions configurations contests contest_management graders heartbeat
68 login main messages problems report site sites sources tasks
61 login main messages problems report site sites sources tasks
69 test user_admin users testcases).each do |controller|
62 test user_admin users testcases).each do |controller|
70 config.assets.precompile += ["#{controller}.js", "#{controller}.css"]
63 config.assets.precompile += ["#{controller}.js", "#{controller}.css"]
71 end
64 end
72 end
65 end
73 end
66 end
You need to be logged in to leave comments. Login now