aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Railties] require => require_relativeAkira Matsuda2017-07-011-3/+3
|
* AEAD encrypted cookies and sessionsMichael Coyne2017-05-221-0/+1
| | | | | | | | | | | | | | | | This commit changes encrypted cookies from AES in CBC HMAC mode to Authenticated Encryption using AES-GCM. It also provides a cookie jar to transparently upgrade encrypted cookies to this new scheme. Some other notable changes include: - There is a new application configuration value: +use_authenticated_cookie_encryption+. When enabled, AEAD encrypted cookies will be used. - +cookies.signed+ does not raise a +TypeError+ now if the name of an encrypted cookie is used. Encrypted cookies using the same key as signed cookies would be verified and serialization would then fail due the message still be encrypted.
* Use the config value directly when call `secrets`yuuji.yaginuma2017-04-161-1/+3
| | | | | | | | | | | 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-12/+2
|
* Revert "Add encrypted secrets" (#28127)David Heinemeier Hansson2017-02-231-2/+12
|
* Add encrypted secrets (#28038)Kasper Timm Hansen2017-02-231-12/+2
|
* Reduce string objects by using \ instead of + or << for concatenating stringsAkira Matsuda2017-01-121-1/+1
| | | | (I personally prefer writing one string in one line no matter how long it is, though)
* Capitalize RakeJon Moss2016-12-191-3/+3
| | | | [ci skip]
* deep symbolize keys on secrets.ymlIsaac Sloan2016-11-211-2/+2
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-2/+2
|
* run `before_configuration` callbacks as soon as application constant ↵yuuji.yaginuma2016-08-191-1/+1
| | | | | | | | | | | | | inherits from Rails::Application Until Rails 4.1, `before_configuration` run as soon as the application constant inherits from `Rails::Application`. However, in d25fe31c40928712b5e08fe0afb567c3bc88eddf, it has been modified to run at instantiation process. This modify to `before_configuration` is run at same timing as to Rails 4.1. Fixes #19880
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-9/+9
|
* applies new string literal convention in railties/libXavier Noria2016-08-061-14/+14
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Added a shared section to config/secrets.yml that will be loaded for all ↵David Heinemeier Hansson2016-05-211-3/+8
| | | | environments
* remove explicit curlies for hash argumentXavier Noria2016-04-111-2/+2
| | | | | Idiomatically trailing hashes in method calls do not use explicit curlies.
* revises fileutils dependencies in railtiesXavier Noria2016-04-111-1/+0
| | | | | | 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.
* [ci skip] correcting sentence in description of application.rbMohit Natoo2016-03-041-2/+1
| | | | Adding period in the end.
* Publish AS::Executor and AS::Reloader APIsMatthew Draper2016-03-021-1/+5
| | | | | | These should allow external code to run blocks of user code to do "work", at a similar unit size to a web request, without needing to get intimate with ActionDipatch.
* Use correct path in documentation.Tom von Schwerdtner2016-02-121-1/+1
| | | | | | s/config\/production/config\/environments\/production/ [ci skip]
* Accept a Pathname in Application#config_forRafael Mendonça França2015-12-151-1/+5
| | | | That would make possible to use it with action cable configuration.
* rails/application: allow passing an env to config_forSimon Eskildsen2015-10-301-2/+2
|
* raise `ArgumentError` when `SECRET_KEY_BASE` is an integerArun Agrawal2015-10-271-0/+3
| | | | | | | If `SECRET_KEY_BASE` or other `secret` gets passed as other then string we need to raise `ArgumentError` to know that it's a wrong argument. Closes #22072
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-10-041-1/+1
|\
| * Renamed ‘Return’ to ‘Returns’ [ci skip]Ronak Jangir2015-09-281-1/+1
| |
* | only construct one request in an engineAaron Patterson2015-09-301-9/+7
| |
* | Engines get different middleware than appsAaron Patterson2015-09-291-0/+6
|/ | | | | We shouldn't merge the app middleware in to the config middleware for engines.
* [ci skip] Remove comments about Rails 3.1claudiob2015-05-111-2/+1
| | | | | | | | | Stems from https://github.com/rails/rails/pull/20105#issuecomment-100900939 where @senny said: > From my point of view, all the docs (guides, API) are version bound. > They should describe that version and continue to be available when newer versions are released. > The cross referencing can be done by the interested user.
* Require yaml before trying to rescue its exception classRafael Mendonça França2015-04-221-1/+1
|
* Error message no longer tells you to set the (deprecated) secret_token.Dan2015-04-121-1/+1
|
* Remove `#build_original_fullpath` methodeileencodes2015-03-201-5/+0
| | | | | | | | | | | Removing `#build_original_fullpath` because it is no longer used by the Rails' source code or called in the `#call` method becasue the previous commit now uses `fullpath` from Rack. The method was nodoc'ed so it's safe to remove. NOTE: I did this as a separate commit so if this does cause a problem with engines etc reverting is easy.
* Use fullpath from Rack request rather than building iteileencodes2015-03-201-11/+5
| | | | | | | | | | | | | | | | | | | | In Rack, `#fullpath` checks if there is a query string and builds the query correctly: ``` def path script_name + path_info end def fullpath query_string.empty? ? path : "#{path}?#{query_string}" end ``` We can utilize this instead of manually building the fullpath because they are the same result. This also reduces allocations in `#call` because we don't need `build_original_fullpath` to create the paths and query strings. We don't need to build `fullpath` twice.
* Some documentation edits [ci skip]Robin Dupret2015-03-051-3/+3
| | | | | | * Fix a few typos * Wrap some lines around 80 chars * Rephrase some statements
* Fix typo in Rails::Application#migration_railtiesRobertZK2015-02-101-2/+2
|
* Remove Psych hack for Ruby 1.9claudiob2015-01-041-10/+1
| | | | | A special `if` statement to support `Psych` for Ruby < 2.0 can be dropped now that Rails requires Ruby >= 2.0.
* Rails::Application#secrets should be documented.Guo Xiang Tan2014-12-241-1/+15
|
* No need to sync config.secret_token and secrets.secret_tokenRafael Mendonça França2014-11-101-7/+2
| | | | Just prefer secrets over config
* Merge pull request #16535 from bf4/patch-1Rafael Mendonça França2014-11-101-4/+16
|\ | | | | | | Allow fallback to LegacyKeyGenerator when secret_key_base is not set but secrets.secret_token is
| * `secret_token` is now saved in `Rails.application.secrets.secret_token`Benjamin Fleischer2014-11-021-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `secrets.secret_token` is now used in all places `config.secret_token` was - `secrets.secret_token`, when not present in `config/secrets.yml`, now falls back to the value of `config.secret_token` - when `secrets.secret_token` is set, it over-writes `config.secret_token` so they are the same (for backwards-compatibility) - Update docs to reference app.secrets in all places - Remove references to `config.secret_token`, `config.secret_key_base` - Warn that missing secret_key_base is deprecated - Add tests for secret_token, key_generator, and message_verifier - the legacy key generator is used with the message verifier when secrets.secret_key_base is blank and secret_token is set - app.key_generator raises when neither secrets.secret_key_base nor secret_token are set - app.env_config raises when neither secrets.secret_key_base nor secret_token are set - Add changelog Run focused tests via ruby -w -Itest test/application/configuration_test.rb -n '/secret_|key_/'
* | add lib to $LOAD_PATH on application inhertence. fixes #17106Aaron Patterson2014-11-041-5/+8
|/
* Standardize on `Rails.application` [ci skip]Tamir Duberstein2014-09-191-1/+1
| | | | This seems to be the style settled on in most of the templates.
* Dont mess with default order engines loadWashington Luiz2014-09-021-8/+9
| | | | | | | When copying migrations some engines might depend on schema from other engine so we can't blindly reverse all railties collection as that would affect the order they were originally loaded. This patch helps to only apply the order from engines specified in `railties_order`
* Add config option for cookies digestŁukasz Strzałkowski2014-08-121-1/+2
| | | | | | You can now configure custom digest for cookies in the same way as `serializer`: config.action_dispatch.cookies_digest = 'SHA256'
* add a new constructor that runs load hooksAaron Patterson2014-08-071-0/+4
|
* defer running after_config hooks until after the object is allocatedAaron Patterson2014-08-071-7/+22
|
* lazily instantiate application subclassesAaron Patterson2014-08-061-3/+1
| | | | this means we can meaningfully override methods in the subclass
* Add Rails::Application#config_forRafael Mendonça França2014-07-151-0/+32
| | | | | This is a convenience for loading configuration for the current Rails environment.
* rake railties:install:migrations respects the order of railtiesArun Agrawal2014-05-271-0/+9
| | | | This PR fixes #8930 and some stuff from #8985
* Make console and generators blocks works at Application instance levelRafael Mendonça França2014-04-141-0/+12
| | | | | | | Like rake tasks and runner blocks these blocks should also being shared between applications since they are stored at the classes. Fixes #14748
* Rails.application should be set inside before_configuration hookRafael Mendonça França2014-04-071-1/+3
| | | | Fixes #14620
* Remove useless begin..endCarlos Antonio da Silva2014-04-071-2/+1
|