forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevelopment.rb
More file actions
71 lines (59 loc) · 2.85 KB
/
Copy pathdevelopment.rb
File metadata and controls
71 lines (59 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# Copyright (C) 2011 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
environment_configuration(defined?(config) && config) do |config|
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes.
config.cache_classes = false
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# run rake js:build to build the optimized JS if set to true
# ENV['USE_OPTIMIZED_JS'] = 'true'
# Really do care if the message wasn't sent.
config.action_mailer.raise_delivery_errors = true
# initialize cache store. has to eval, not just require, so that it has
# access to config.
cache_store_rb = File.dirname(__FILE__) + "/cache_store.rb"
eval(File.new(cache_store_rb).read, nil, cache_store_rb, 1)
# allow debugging only in development environment by default
#
# Option to DISABLE_RUBY_DEBUGGING is helpful IDE-based debugging.
# The ruby debug gems conflict with the IDE-based debugger gem.
# Set this option in your dev environment to disable.
unless ENV['DISABLE_RUBY_DEBUGGING']
require 'byebug'
if ENV['REMOTE_DEBUGGING_ENABLED']
require 'byebug/core'
Byebug.start_server('0.0.0.0', 0)
puts "Byebug listening on 0.0.0.0:#{Byebug.actual_port}" # rubocop:disable Rails/Output
byebug_port_file = File.join(Dir.tmpdir, 'byebug.port')
File.write(byebug_port_file, Byebug.actual_port)
end
end
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
# we use lots of db specific stuff - don't bother trying to dump to ruby
# (it also takes forever)
config.active_record.schema_format = :sql
config.eager_load = false
# eval <env>-local.rb if it exists
Dir[File.dirname(__FILE__) + "/" + File.basename(__FILE__, ".rb") + "-*.rb"].each { |localfile| eval(File.new(localfile).read, nil, localfile, 1) }
end