aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application/bootstrap.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Railties] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* [Railties] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Use the config value directly when call `secrets`yuuji.yaginuma2017-04-161-1/+0
| | | | | | | | | | | Currently, `read_encrypted_secrets` is set with initializer. Therefore if refer to `secrets` in config, `read_encrypted_secrets` is false, so can not get the value of `secrets.yml.enc`. In order to be able to refer to secrets in config, modified to refer to `config.read_encrypted_secrets` when calling `secrets`. Fixes #28618.
* Revert "Revert "Add encrypted secrets""Kasper Timm Hansen2017-02-231-0/+6
|
* Revert "Add encrypted secrets" (#28127)David Heinemeier Hansson2017-02-231-6/+0
|
* Add encrypted secrets (#28038)Kasper Timm Hansen2017-02-231-0/+6
|
* Reduce string objects by using \ instead of + or << for concatenating stringsAkira Matsuda2017-01-121-2/+2
| | | | (I personally prefer writing one string in one line no matter how long it is, though)
* applies new string literal convention in railties/libXavier Noria2016-08-061-5/+5
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* revises fileutils dependencies in railtiesXavier Noria2016-04-111-3/+4
| | | | | | With the exception of what is loaded in active_support/rails, each file is responsible for its own dependencies. You cannot rely on runtime order of execution.
* Revert "removing Rack::Runtime from the default stack."Aaron Patterson2015-10-031-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit 37423e4ff883ad5584bab983aceb4b2b759a1fd8. Jeremy is right that we shouldn't remove this. The fact is that many engines are depending on this middleware to be in the default stack. This ties our hands and forces us to keep the middleware in the stack so that engines will work. To be extremely clear, I think this is another smell of "the rack stack" that we have in place. When manipulating middleware, we should have meaningful names for places in the req / res lifecycle **not** have engines depend on a particular constant be in a particular place in the stack. This is a weakness of the API that we have to figure out a way to address before removing the constant. As far as timing attacks are concerned, we can reduce the granularity such that it isn't useful information for hackers, but is still useful for developers.
* removing Rack::Runtime from the default stack.Aaron Patterson2015-10-021-1/+1
| | | | | | | | | | | | The runtime header is a potential target for timing attacks since it returns the amount of time spent on the server (eliminating network speed). Total time is also not accurate for streaming responses. The middleware can be added back via: ```ruby config.middleware.ues ::Rack::Runtime ```
* Fix deprecation warning in testseileencodes2015-08-081-1/+1
| | | | | | | | | | | | | Using the string version of the class reference is now deprecated when referencing middleware. This should be written as a class not as a string. Deprecation warning that this change fixes: ``` DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change them to actual class references. For example: "ActionDispatch::ShowExceptions" => ActionDispatch::ShowExceptions ```
* Remove deprecation warning when log_level is not explicit set on productionRafael Mendonça França2015-01-041-13/+0
|
* Fix typo.Guo Xiang Tan2014-11-171-1/+1
|
* Deprecate different default for `log_level` in productionGodfrey Chan2014-11-171-0/+13
| | | | | | This is a more conservative approach to 2602a49. Also changed the comment to be more inline with everything else in the file (describing what the config value is doing and why). People should just read the docs for alternatives.
* world writable might be a bit too open...Peter Schröder2014-09-051-1/+2
|
* Revert "Only lookup `config.log_level` for stdlib `::Logger`. Closes #11665."Guillermo Iguaran2014-02-211-5/+1
| | | | | | | | | | | | This reverts commit e0a521cfcd13e4d1f0ae8ab96004289e1c020f71. Conflicts: railties/CHANGELOG.md We expect loggers to quack like stdlib logger. If log4r needs different level= assignment, using a Logger-quacking wrapper is the way to do it. Fixes #14114.
* Only lookup `config.log_level` for stdlib `::Logger`. Closes #11665.Yves Senn2014-01-131-1/+5
| | | | | | | | This prevents Rails from assigning meaningless log levels to third party loggers like log4r. If `Rails.logger` is not `kind_of?(::Logger)` we simply assign the `config.log_level` as is. This bug was introduced by #11665.
* Rails.logger should have level specified by config.log_level. Max Shytikov2013-07-301-1/+2
| | | Fix bug when log level of Rails.logger (which was set via config.logger) does not match the config.log_level.
* Revert "make new rails apps log to STDOUT"Steve Klabnik2013-03-151-1/+5
| | | | | | This reverts commit b7d9d6e2cd5082d269dafbc0316e2107febe1451. Per discussion with @jeremy and @rubys on Campfire.
* make new rails apps log to STDOUTTerence Lee2013-03-151-5/+1
|
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-7/+7
|
* Get rid of config.preload_frameworks in favor of config.eager_load_namespacesJosé Valim2012-08-211-8/+1
| | | | | | | The new option allows any Ruby namespace to be registered and set up for eager load. We are effectively exposing the structure existing in Rails since v3.0 for all developers in order to make their applications thread-safe and CoW friendly.
* Allow users to choose when to eager_load the application or not.José Valim2012-08-211-1/+14
| | | | | | | | | | | | | | | | | Previously, the eager load behavior was mostly coupled to config.cache_classes, however this was suboptimal since in some environments a developer may want to cache classes but not necessarily load them all on boot (for example, test env). This pull request also promotes the use of config.eager_load set to true by default in production. In the majority of the cases, this is the behavior you want since it will copy most of your app into memory on boot (which was also the previous behavior). Finally, this fix a long standing Rails bug where it was impossible to access a model in a rake task when Rails was set as thread safe.
* Move AS set configs to AS RaitieSantiago Pastorino2012-05-121-11/+1
|
* Update railties/lib/rails/application/bootstrap.rbEgor Homakov2012-05-111-1/+11
|
* use AS::Logger so we are consistentAaron Patterson2012-03-121-1/+1
|
* allow people to specify custom formatters, use the default formatter in ↵Aaron Patterson2012-03-121-3/+3
| | | | production so that PID and timestamp are logged. fixes #5388
* Make log autoflushing configurableFelix Bünemann2012-02-231-1/+1
|
* always flush all logs. fixes #4277Aaron Patterson2012-02-071-1/+1
|
* Deprecate RAILS_CACHE constant.kennyj2012-01-181-4/+4
|
* do not rewrite log during application bootstrapSergey Nartimov2012-01-031-1/+1
|
* * BufferedLogger is deprecated. Use ActiveSupport::Logger, or the loggerAaron Patterson2011-12-191-4/+4
| | | | from Ruby stdlib.
* Improve docs for Rails::Application and add routes_reloader_hook and ↵José Valim2011-12-121-7/+0
| | | | app_reloader_hooks.
* * ActiveSupport::BufferedLogger#silence is deprecated. If you want to squelchAaron Patterson2011-12-091-3/+11
| | | | | | | | | | | | | | | | | | | | | | | logs for a certain block, change the log level for that block. * ActiveSupport::BufferedLogger#open_log is deprecated. This method should not have been public in the first place. * ActiveSupport::BufferedLogger's behavior of automatically creating the directory for your log file is deprecated. Please make sure to create the directory for your log file before instantiating. * ActiveSupport::BufferedLogger#auto_flushing is deprecated. Either set the sync level on the underlying file handle like this: f = File.open('foo.log', 'w') f.sync = true ActiveSupport::BufferedLogger.new f Or tune your filesystem. The FS cache is now what controls flushing. * ActiveSupport::BufferedLogger#flush is deprecated. Set sync on your filehandle, or tune your filesystem.
* Added X-Request-Id tracking and TaggedLogging to easily log that and other ↵David Heinemeier Hansson2011-10-191-2/+2
| | | | production concerns
* `rake assets:precompile` loads the application but does not initialize it.José Valim2011-09-241-8/+8
| | | | | | | | | | | | | To the app developer, this means configuration add in config/initializers/* will not be executed. Plugins developers need to special case their initializers that are meant to be run in the assets group by adding :group => :assets. Conflicts: railties/CHANGELOG railties/test/application/assets_test.rb
* dealing with some -w warnings on startupAaron Patterson2011-08-241-1/+1
|
* ADdd missing requires (thanks to @arunagw)José Valim2011-05-071-1/+1
|
* Always flush logger at exitJason Rudolph2011-05-061-0/+1
| | | | | | | | | | | | | | Prior to this change, running code via script/runner would demonstrate different logging behavior than running the same code via a rake task. In production mode the script/runner approach would always flush the logger, but the rake-based approach would not automatically flush the logger. This discrepancy violates the principle of least surprise, and it could lead to the loss of important production logging data. This change removes special-case code in the "runner" command, and replaces it with a general solution to ensure that the logger gets flushed at exit. This solution works for "runner", "console", "server", rake tasks, and any other process that loads the Rails environment.
* Use AD::Reloader.to_cleanup for reloading [#2873 state:resolved]John Firebaugh2010-12-201-5/+3
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Provide a cleaner syntax for paths configuration that does not rely on ↵José Valim2010-10-061-1/+1
| | | | method_missing.
* Allow Engines loading its own environment file from config/environmentsPiotr Sarnacki2010-09-031-5/+2
|
* Clear DescendantsTracker on each request.José Valim2010-06-191-0/+2
|
* Remove the laziness from the middleware stack.José Valim2010-05-291-1/+1
|
* Reorganized initializers a bit to enable better hooks for common cases ↵wycats2010-05-151-4/+4
| | | | | | | | | | | | | | | without the need for Railtie. Specifically, the following hooks were added: * before_configuration: this hook is run immediately after the Application class comes into existence, but before the user has added any configuration. This is the appropriate place to set configuration for your plugin * before_initialize: This is run after all of the user's configuration has completed, but before any initializers have begun (in other words, it runs right after config/environments/{development,production,test}.rb) * after_initialize: This is run after all of the initializers have run. It is an appropriate place for forking in a preforking setup Each of these hooks may be used via ActiveSupport.on_load(name) { }. In all these cases, the context inside the block will be the Application object. This means that for simple cases, you can use these hooks without needing to create a Railtie.
* The rake task :environment now loads config/environment.rb instead of ↵José Valim2010-04-291-1/+2
| | | | initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks.
* Moved initializers for ActionMailer and ActionController into their own railtiesCarlhuda2010-03-021-14/+2
|
* Rename Rails::Subscriber to Rails::LogSubscriberPrem Sichanugrist2010-02-161-4/+4
|