aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
Commit message (Collapse)AuthorAgeFilesLines
* Move booting/loading tasks setup to the rake notes helper methodCarlos Antonio da Silva2014-03-191-15/+3
|
* Extract rake notes command and lines scan boilerplateCarlos Antonio da Silva2014-03-191-19/+14
| | | | Refactor to a reusable method.
* Remove extra space assertionCarlos Antonio da Silva2014-03-191-3/+2
| | | | | No need to check that each line contains an extra space, just matching the space in the regexp is enough to ensure that.
* Extract common setup for loading tasks in rake notes testsCarlos Antonio da Silva2014-03-191-29/+14
|
* Merge pull request #14379 from robertomiranda/rake-notes.configGuillermo Iguaran2014-03-172-14/+40
|\ | | | | Add Public Api for Register New Extensions for Rake Notes
| * Rake notes should picked up new Extensions registered in the ↵robertomiranda2014-03-171-3/+19
| | | | | | | | config/application.rb file
| * Add config.annotations, in order to register new extensions for Rake notes ↵robertomiranda2014-03-161-0/+10
| | | | | | | | at config level
| * Fix Shadowing extensions variable in Register Annotation Exentsionsrobertomiranda2014-03-161-5/+5
| |
| * Supporting .ruby, .yml and .yaml Extension in Rake Notesrobertomiranda2014-03-141-1/+6
| |
| * Remove .scss, .sass, .less, .haml, .slim, coffee from Rake Notes. Now we ↵robertomiranda2014-03-141-13/+3
| | | | | | | | have an API for register it in the corresponding gems
| * Add Public Api for register new extensions for Rake Notesrobertomiranda2014-03-141-0/+5
| |
* | Fix assertionsCarlos Antonio da Silva2014-03-161-2/+2
|/
* Make the rails:template rake task load initializersRobin Dupret2014-03-081-0/+11
| | | | | | | | | | | Templates could rely on irregular inflections or external libraries for instance so we should load the application's initializers when running the rails:template task. The introducing commit of this feature is f7f11361 ; the initializers have never been loaded invoking this task. Fixes #12133.
* Revert "Only lookup `config.log_level` for stdlib `::Logger`. Closes #11665."Guillermo Iguaran2014-02-211-14/+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.
* remove railties changes. fixes #14054Aaron Patterson2014-02-141-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 96991e8e919edfb20cc4120bca4e36ed51175d57 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri Feb 14 11:29:24 2014 -0800 Revert "gems can be added or skipped from the template" This reverts commit 8beb42cfbc41753ae4dbb91e16abcd1fb7d00356. Conflicts: railties/lib/rails/generators/rails/app/app_generator.rb railties/test/generators/app_generator_test.rb commit 35599c0e657245ef14ac0f28c9189ad16acf40e6 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri Feb 14 11:26:53 2014 -0800 Revert "oops, template replay needs to happen after bundle. :orz:" This reverts commit 9104702be61253f9448ca070a22fc86bb4299555. Conflicts: railties/lib/rails/generators/rails/app/app_generator.rb commit f519c3902c313db8e906a49251c91643b8e6499e Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri Feb 14 11:25:51 2014 -0800 Revert "only ask for these ivars if the target responds to them" This reverts commit 656d412546cd97d5660c634c2a41c799d3f9e211. commit aa524a9428e3e4c45fe221f10a66a08efb827ab5 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri Feb 14 11:25:39 2014 -0800 Revert "refactor generator tests to use block form of Tempfile" This reverts commit 65251820ef0ab7f3cffb38130de3dd41af8d72be. commit 7d3740549fa4dfa62e3761f8d4bc6d6d441256e7 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri Feb 14 11:25:25 2014 -0800 Revert "add a more restricted codepath for templates fixes #13390" This reverts commit 2875b4a66e38e4333da887a4afbed33358999298. commit 525df0af1001918986cdfce59539fd2d52c4f32c Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri Feb 14 11:25:11 2014 -0800 Revert "add a send so `apply` can be called. Fixes #13510" This reverts commit c5034d60dba0cd31a6a8c612ee35d63b8127793a.
* do not crash when `config/secrets.yml` is blank.Yves Senn2014-02-121-0/+8
|
* add a send so `apply` can be called. Fixes #13510Aaron Patterson2014-02-111-0/+32
| | | | | | | THIS IS A HUGE HACK. Thor does not allow us to define public methods without turning them in to "thor tasks". That means we cannot subclass the `apply` method and make it public, so we have to make the method private and call `send` on it.
* Add config to disable schema dump after migrationEmil Soman2014-02-062-0/+48
| | | | | | | | | * Add a config on Active Record named `dump_schema_after_migration` * Schema dump doesn't happen if the config is set to false * Set default value of the config to true * Set config in generated production environment file to false * Update configuration guide * Update CHANGELOG
* Only lookup `config.log_level` for stdlib `::Logger`. Closes #11665.Yves Senn2014-01-131-1/+14
| | | | | | | | 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.
* Add preview_path to autoload_paths in after_initializeAndrew White2014-01-041-1/+41
| | | | | | | | | | Only config.autoload_paths is frozen, so add the preview_path to ActiveSupport::Dependencies.autoload_paths directly in an after_initialize block. Also protect against a blank preview_path being added to autoload_paths which can cause a serious slowdown as Dir[] tries to load all *_preview.rb files under / Fixes #13372
* Use DATABASE_URL by defaultschneems2014-01-021-8/+1
| | | See https://github.com/rails/rails/pull/13463#issuecomment-31480799 for full conversation.
* Automatically maintain test database schemaJon Leighton2014-01-023-3/+57
| | | | | | | | | | | | | | * Move check from generated helper to test_help.rb, so that all applications can benefit * Rather than just raising when the test schema has pending migrations, try to load in the schema and only raise if there are pending migrations afterwards * Opt out of the check by setting config.active_record.maintain_test_schema = false * Deprecate db:test:* tasks. The test helper is now fully responsible for maintaining the test schema, so we don't need rake tasks for this. This is also a speed improvement since we're no longer reloading the test database on every call to "rake test".
* Adding missing requireRafael Mendonça França2014-01-021-0/+1
|
* Move default production database to URL sub keyschneems2014-01-011-1/+5
| | | | By using the URL sub key in the `database.yml` by default we are exposing the ability to set other attributes such as `pool` or `reap_frequency` without need of modifying the URL to contain non-connection specific information.
* fix 2.1.0 bug :(schneems2013-12-251-1/+1
|
* ensure environment is run before db:structure:loadschneems2013-12-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now `db:drop` depends on `load_config` since so when `db:drop` gets executed `load_config` gets run. `db:structure:load` depends on `[:environment, :load_config]`. So before it runs, it executes `environment` but because `load_config` has already executed it is skipped. Note `db:load_config` is "invoke"-d twice, but only "execute"-d once: ``` ** Invoke db:drop (first_time) ** Invoke db:load_config (first_time) ** Execute db:load_config ** Execute db:drop ** Invoke db:structure:load (first_time) ** Invoke environment (first_time) ** Execute environment ** Invoke db:load_config ** Execute db:structure:load ``` The fix for this is making sure that the environment is run before any `load_config`: ``` ** Invoke environment (first_time) ** Execute environment ** Invoke db:drop (first_time) ** Invoke db:load_config (first_time) ** Execute db:load_config ** Execute db:drop ** Invoke db:structure:load (first_time) ** Invoke environment ** Invoke db:load_config ** Execute db:structure:load ```
* Partial fix of database url testsschneems2013-12-251-1/+4
| | | | | | | | Prior to #13463 when `DATABASE_URL` was set, Rails automagically used that value instead of the database.yml. There are tests in dbs_test that expect this to still be true. After that PR, `RAILS_DATABASE_URL` is expected to be read into the YAML file via ERB, this PR fixes that behavior. Note: this does not entirely fix the tests. It seems that `ActiveRecord::Tasks::DatabaseTasks.current_config` does not process the url string correctly (convert it into a hash), and ` ActiveRecord::Tasks::DatabaseTasks.structure_load(current_config, filename)` as well as other methods in `DatabaseTasks` expect a hash. It seems like we should involve the resolver somewhere in this process to correctly convert the database url, I do not know the best place for that /cc @josevalim
* Fix tests names: tokens.yml => secrets.ymlGuillermo Iguaran2013-12-251-2/+2
|
* using symbol instead of string in establish_connectionKuldeep Aggarwal2013-12-251-1/+1
|
* Use Full path to sqlite database in testsschneems2013-12-222-4/+4
|
* Make possible to use symbol as the verifier nameRafael Mendonça França2013-12-191-6/+6
|
* Default I18n.enforce_available_locales to trueCarlos Antonio da Silva2013-12-171-4/+38
| | | | | | | | | | | | We will default this option to true from now on to ensure users properly handle their list of available locales whenever necessary. This option was added as a security measure and thus Rails will follow it defaulting to secure option. Also improve the handling of I18n config options in its railtie, taking the new enforce_available_locales option into account, by setting it as the last one in the process. This ensures no other configuration will trigger a deprecation warning due to that setting.
* Add mailer previews feature based on mail_view gemAndrew White2013-12-171-0/+388
|
* Regression test for load_structure and clone_structureArthur Neves2013-12-141-2/+4
|
* Rename tokens.yml to secrets.ymlGuillermo Iguaran2013-12-121-3/+3
|
* Add test for custom tokens stored in config/tokens.ymlGuillermo Iguaran2013-12-121-0/+13
|
* Replace config.secret_key_base with secrets.secret_key_base in testGuillermo Iguaran2013-12-121-1/+1
|
* Load secret_key_base from tokens.yml, fallback to config.secret_key_baseGuillermo Iguaran2013-12-121-3/+23
|
* Assert the singleton instead of to truthy/falsyRafael Mendonça França2013-12-051-4/+4
| | | | | This will avoid false positives where caching? is nil and should be false
* Add tests to cache_template_loading when an engine loaded Action ViewRafael Mendonça França2013-12-051-0/+14
| | | | | | | | before the application This test is a regression test to b068e20b35797aa6deaa377a48c990759734f515 that changed the load order of Action View initializers.
* set `i18n.enforce_available_locales` before `i18n.default_locale`.Yves Senn2013-12-051-0/+11
|
* Make salt argument required for message verifierRafael Mendonça França2013-12-041-5/+5
|
* Test if two different verifiers don't share the same secretRafael Mendonça França2013-12-041-2/+12
|
* Don't need to use a controller to test the verifierRafael Mendonça França2013-12-041-9/+3
|
* No need to configure saltsRafael Mendonça França2013-12-041-21/+1
|
* Make possibile to get different message verifiersRafael Mendonça França2013-12-041-0/+10
|
* Rename verifier to message_verifierRafael Mendonça França2013-12-041-3/+3
|
* Add application verifierRafael Mendonça França2013-12-041-0/+41
| | | | | | | | It is an application global verifier that can be used to generate and verify signed messages. See the documentation of ActiveSupport::MessageVerifier for more information.
* Merge pull request #12365 from jbaudanza/reorderGuillermo Iguaran2013-12-011-1/+1
|\ | | | | Move Rack::Cache after ActionDispatch::Static in the middleware stack
| * Move Rack::Cache after AD::Static in the stackJonathan Baudanza2013-09-251-1/+1
| |