aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/initializers
Commit message (Collapse)AuthorAgeFilesLines
* Use assert_predicate and assert_not_predicateDaniel Colson2018-01-251-1/+1
|
* Log call site for all queriesOlivier Lacan2017-12-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new ActiveRecord configuration option allows you to easily pinpoint what line of application code is triggering SQL queries in the development log by appending below each SQL statement log the line of Ruby code that triggered it. It’s useful with N+1 issues, and to locate stray queries. By default this new option ignores Rails and Ruby code in order to surface only callers from your application Ruby code or your gems. It is enabled on newly generated Rails 5.2 applications and can be enabled on existing Rails applications: ```ruby Rails.application.configure do # ... config.active_record.verbose_query_logs = true end ``` The `rails app:upgrade` task will also add it to `config/development.rb`. This feature purposely avoids coupling with ActiveSupport::BacktraceCleaner since ActiveRecord can be used without ActiveRecord. This decision can be reverted in the future to allow more configurable backtraces (the exclusion of gem callers for example).
* Run in-app rails commands via fork+load where possibleMatthew Draper2017-09-041-8/+4
| | | | | While this avoids shell argument parsing, we still pass through everything in our stack.
* Preload Rails component gems in railties testsMatthew Draper2017-09-041-1/+1
|
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-145-0/+10
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-025-5/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-015-0/+5
|
* Make i18n test match the description of the testGuillermo Iguaran2017-06-091-1/+1
|
* Clear active connections after initializationEugene Kenny2017-02-171-0/+8
| | | | | | | | | | | | | Any connections that were checked out during initialization should be checked back in before the first request is processed, for two reasons: - Returning the connection to the pool allows it to be health checked before it's used again. If the connection dies before the first request arrives, the health check will replace it with a new one. - If the thread that initialized Rails is not the same thread that will be performing work, checking in the connection will allow it to be reused instead of being stuck to the initialization thread forever.
* `#tables` and `#table_exists?` and returns only tables and not viewsRafael Mendonça França2016-12-291-5/+3
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-292-3/+3
|
* improve error message when include assertions failMichael Grosser2016-09-162-7/+7
| | | | | | assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
* modernizes hash syntax in railtiesXavier Noria2016-08-061-3/+3
|
* applies new string literal convention in railties/testXavier Noria2016-08-064-21/+21
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Remove unused boot_rails method and it's usagePrathamesh Sonpatki2016-07-045-5/+0
| | | | | - The `boot_rails` method from abstract_unit.rb is empty after 2abcdfd978fdcd491576a237e8c6b. - So let's remove it and its usage.
* - Added i18n test to verify assigning hash directly to fallbacks instead of ↵Vipul A M2016-03-061-1/+7
| | | | | | using map - Fixed test name for setting fallbacks to config.i18n.fallbacks = [{ :ca => :'es-ES' }]
* remove args from assert_nothing_raised in testsTara Scherner de la Fuente2016-02-221-1/+1
|
* Be consistent in testing outputs from railties test and use /bin/rails ↵Vipul A M2016-01-241-2/+2
| | | | | | everywhere(the default behaviour now) instead of mix of /bin/rake /bin/rails everywhere [Ryo Hashimoto & Vipul A M]
* Merge pull request #17388 from akampjes/masterArthur Nogueira Neves2015-10-121-0/+11
|\ | | | | ActionMailer https on URL with force_ssl = true
| * ActionMailer https on URL with force_ssl = trueAndrew Kampjes2015-08-141-0/+11
| | | | | | | | | | | | | | | | | | | | `config.force_ssl = true` will set config.action_mailer.default_url_options = { protocol: 'https' } If you have turned on force_ssl, and then gone to the effort of setting config.action_mailer.default_url_options = {host: 'example.com'} then you are probably pointing people back to your current app and want https on that too.
* | remove unused require ‘set’NehaGautam2015-08-251-1/+0
|/
* Reload I18n locales in developmentKir Shatrov2015-08-101-0/+73
|
* tests, railties tests should use `bin/` executables when possible.Yves Senn2015-06-301-2/+2
| | | | | We recommend using the `bin/` executables in our docs and guides. Let's make sure that our tests execute the same code path.
* Use new hash syntaxSantiago Pastorino2015-06-111-1/+1
|
* Add AC::API + its middleware stack integration testSantiago Pastorino2015-06-111-0/+29
|
* Remove deprecate `*_path` helpers in email viewsRafael Mendonça França2015-01-041-1/+0
|
* Expectations firstAkira Matsuda2014-08-281-2/+2
|
* Deprecate `*_path` methods in mailers@schneems and @sgrif2014-07-301-2/+2
| | | | | | | | | | | Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead. Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR. Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead. The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`. Paired @sgrif & @schneems
* Do not set enforce_available_locales to i18n 0.7Rafael Mendonça França2014-07-231-18/+2
| | | | | | Now the default is always true. Users still can set it using config.i18n.enforce_available_locales.
* Revise 'sqlite3:' URL handling for smoother upgradesMatthew Draper2014-04-031-2/+2
| | | | | | | | | | | | | | | | Restore the 4.0 behaviour for 'sqlite3:///', but deprecate it. We'll change to the absolute-path interpretation in 4.2. The current "correct" spellings for in-memory, relative, and absolute URLs, respectively, are: sqlite3::memory: sqlite3:relative/path sqlite3:/full/path Substantially reverses/defers fbb79b517f3127ba620fedd01849f9628b78d6ce. Uncovered by @guilleiguaran while investigating #14495, though that sounds like a different issue.
* Use Full path to sqlite database in testsschneems2013-12-221-1/+1
|
* 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.
* set `i18n.enforce_available_locales` before `i18n.default_locale`.Yves Senn2013-12-051-0/+11
|
* Build fix for ruby 1.9.3 syntaxArun Agrawal2013-11-161-1/+1
|
* Instrument each load config initializerPaul Nikitochkin2013-11-161-0/+13
| | | | | | In order to simplify profiling loading of initializers, added instument for tracking load config initializer event from `config/initializers`
* Allow Pathnames to be added to eager load pathsMike Pack2013-11-111-0/+14
|
* build fix: railties tests used deprecated `SchemaCache` methods.Yves Senn2013-07-041-2/+2
|
* Calls to the application constant have been refactored to usewangjohn2013-06-103-8/+8
| | | | | Rails.application when drawing routes and creating other configurations on the application.
* initialize instead of assert to fix warningVipul A M2013-04-111-0/+1
|
* Fixed typo in railties/testPrathamesh Sonpatki2013-03-251-1/+1
|
* Fix some typosVipul A M2013-03-241-1/+1
|
* remove uncommented railties boot_test.rbYves Senn2013-02-211-20/+0
|
* Revert "Deprecate the `eager_load_paths` configuration"Andrew White2013-02-191-1/+1
| | | | | | | | | | | Because of the possibility of lib being unintentionally eager loaded it's been agreed that we'll leave autoload paths and eager load paths separate for Rails 4.0. This reverts commit 0757b3388ffe4f44b60de950d40e18ef05055931. Conflicts: railties/CHANGELOG.md
* Deprecate the `eager_load_paths` configurationAndrew White2013-01-241-1/+1
| | | | | | | | | | Since the default in Rails 4.0 is to run in 'threadsafe' mode we need to eager load all of the paths in `autoload_paths` so we alias `eager_load_paths` to it. This may have unintended consequences if you have added 'lib' to `autoload_paths` such as loading unneeded code or code intended only for development and/or test environments. If this applies to your application you should thoroughly check what is being eager loaded.
* Move background jobs to the 'jobs' branch until fully baked. Not shipping ↵Jeremy Kemper2012-12-211-16/+0
| | | | with Rails 4.0.
* Removing warning : ambiguous first argumentArun Agrawal2012-11-111-2/+2
|
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-142-8/+8
|
* Remove the queue container. Premature consolidation. Set up and maintain ↵Jeremy Kemper2012-10-121-3/+2
| | | | queues in the classes that use them instead.
* Use String#exclude? to make sure that Active Support is not loaded whenRafael Mendonça França2012-10-041-1/+1
| | | | | | | bare is true. We need to change this since coffee-rails loads ActionView that loads core_ext/array/access.
* Move queue classes to ActiveSupportSantiago Pastorino2012-09-141-3/+3
|