2015-11-03 17:02:00 -05:00
|
|
|
* Deprecate `serve_static_files` in favor of `public_file_server.enabled`.
|
|
|
|
|
|
|
|
Unifies the static asset options under `public_file_server`.
|
|
|
|
|
|
|
|
To upgrade, replace occurrences of:
|
|
|
|
|
|
|
|
```
|
|
|
|
config.serve_static_files = # false or true
|
|
|
|
```
|
|
|
|
|
|
|
|
in your environment files, with:
|
|
|
|
|
|
|
|
```
|
|
|
|
config.public_file_server.enabled = # false or true
|
|
|
|
```
|
|
|
|
|
|
|
|
*Kasper Timm Hansen*
|
|
|
|
|
2015-11-04 16:07:45 -05:00
|
|
|
* Deprecate `config.static_cache_control` in favor of
|
|
|
|
`config.public_file_server.headers`.
|
|
|
|
|
|
|
|
To upgrade, replace occurrences of:
|
|
|
|
|
|
|
|
```
|
|
|
|
config.static_cache_control = 'public, max-age=60'
|
|
|
|
```
|
|
|
|
|
|
|
|
in your environment files, with:
|
|
|
|
|
|
|
|
```
|
|
|
|
config.public_file_server.headers = {
|
|
|
|
'Cache-Control' => 'public, max-age=60'
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
`config.public_file_server.headers` can set arbitrary headers, sent along when
|
|
|
|
a response is delivered.
|
|
|
|
|
|
|
|
*Yuki Nishijima*
|
|
|
|
|
2015-10-27 01:34:07 -04:00
|
|
|
* Route generator should be idempotent
|
|
|
|
running generators several times no longer require you to cleanup routes.rb
|
|
|
|
|
|
|
|
*Thiago Pinto*
|
2015-11-03 17:02:00 -05:00
|
|
|
|
2015-10-30 14:46:15 -04:00
|
|
|
* Allow passing an environment to `config_for`.
|
|
|
|
|
|
|
|
*Simon Eskildsen*
|
|
|
|
|
2015-10-19 10:33:21 -04:00
|
|
|
* Allow rake:stats to account for rake tasks in lib/tasks
|
|
|
|
|
|
|
|
*Kevin Deisz*
|
|
|
|
|
2015-07-22 12:15:52 -04:00
|
|
|
* Added javascript to update the URL on mailer previews with the currently
|
|
|
|
selected email format. Reloading the page now keeps you on your selected
|
|
|
|
format rather than going back to the default html version.
|
|
|
|
|
|
|
|
*James Kerr*
|
|
|
|
|
2015-09-28 14:27:30 -04:00
|
|
|
* Add fail fast to `bin/rails test`
|
|
|
|
|
|
|
|
Adding `--fail-fast` or `-f` when running tests will interrupt the run on
|
|
|
|
the first failure:
|
|
|
|
|
|
|
|
```
|
|
|
|
# Running:
|
|
|
|
|
|
|
|
................................................S......E
|
|
|
|
|
|
|
|
ArgumentError: Wups! Bet you didn't expect this!
|
|
|
|
test/models/bunny_test.rb:19:in `block in <class:BunnyTest>'
|
|
|
|
|
|
|
|
bin/rails test test/models/bunny_test.rb:18
|
|
|
|
|
|
|
|
....................................F
|
|
|
|
|
|
|
|
This failed
|
|
|
|
|
|
|
|
bin/rails test test/models/bunny_test.rb:14
|
|
|
|
|
|
|
|
Interrupted. Exiting...
|
|
|
|
|
|
|
|
|
|
|
|
Finished in 0.051427s, 1808.3872 runs/s, 1769.4972 assertions/s.
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
Note that any unexpected errors don't abort the run.
|
|
|
|
|
|
|
|
*Kasper Timm Hansen*
|
|
|
|
|
2015-08-30 06:33:37 -04:00
|
|
|
* Add inline output to `bin/rails test`
|
|
|
|
|
|
|
|
Any failures or errors (and skips if running in verbose mode) are output
|
|
|
|
during a test run:
|
|
|
|
|
|
|
|
```
|
|
|
|
# Running:
|
|
|
|
|
|
|
|
.....S..........................................F
|
|
|
|
|
|
|
|
This failed
|
|
|
|
|
|
|
|
bin/rails test test/models/bunny_test.rb:14
|
|
|
|
|
|
|
|
.................................E
|
|
|
|
|
|
|
|
ArgumentError: Wups! Bet you didn't expect this!
|
|
|
|
test/models/bunny_test.rb:19:in `block in <class:BunnyTest>'
|
|
|
|
|
|
|
|
bin/rails test test/models/bunny_test.rb:18
|
|
|
|
|
|
|
|
....................
|
|
|
|
|
|
|
|
Finished in 0.069708s, 1477.6019 runs/s, 1448.9106 assertions/s.
|
|
|
|
```
|
|
|
|
|
|
|
|
Output can be deferred to after a run with the `--defer-output` option.
|
|
|
|
|
|
|
|
*Kasper Timm Hansen*
|
|
|
|
|
2015-07-15 15:04:21 -04:00
|
|
|
* Fix displaying mailer previews on non local requests when config
|
|
|
|
`action_mailer.show_previews` is set
|
|
|
|
|
|
|
|
*Wojciech Wnętrzak*
|
|
|
|
|
2015-08-17 14:02:35 -04:00
|
|
|
* `rails server` will now honour the `PORT` environment variable
|
|
|
|
|
|
|
|
*David Cornu*
|
|
|
|
|
2015-08-16 18:22:15 -04:00
|
|
|
* Plugins generated using `rails plugin new` are now generated with the
|
|
|
|
version number set to 0.1.0.
|
|
|
|
|
|
|
|
*Daniel Morris*
|
|
|
|
|
2015-08-16 08:40:53 -04:00
|
|
|
* `I18n.load_path` is now reloaded under development so there's no need to
|
|
|
|
restart the server to make new locale files available. Also, I18n will no
|
|
|
|
longer raise for deleted locale files.
|
|
|
|
|
|
|
|
*Kir Shatrov*
|
|
|
|
|
2015-07-21 15:18:13 -04:00
|
|
|
* Add `bin/update` script to update development environment automatically.
|
|
|
|
|
|
|
|
*Mehmet Emin İNAÇ*
|
|
|
|
|
2015-07-24 19:51:10 -04:00
|
|
|
* Fix STATS_DIRECTORIES already defined warning when running rake from within
|
|
|
|
the top level directory of an engine that has a test app.
|
|
|
|
|
|
|
|
Fixes #20510
|
|
|
|
|
|
|
|
*Ersin Akinci*
|
|
|
|
|
|
|
|
* Make enabling or disabling caching in development mode possible with
|
2015-07-20 23:35:20 -04:00
|
|
|
rake dev:cache.
|
|
|
|
|
|
|
|
Running rake dev:cache will create or remove tmp/caching-dev.txt. When this
|
|
|
|
file exists config.action_controller.perform_caching will be set to true in
|
|
|
|
config/environments/development.rb.
|
|
|
|
|
|
|
|
Additionally, a server can be started with either --dev-caching or
|
|
|
|
--no-dev-caching included to toggle caching on startup.
|
|
|
|
|
|
|
|
*Jussi Mertanen*, *Chuck Callebs*
|
|
|
|
|
2015-07-23 11:48:47 -04:00
|
|
|
* Add a `--api` option in order to generate plugins that can be added
|
|
|
|
inside an API application.
|
|
|
|
|
|
|
|
*Robin Dupret*
|
|
|
|
|
2015-06-29 08:17:30 -04:00
|
|
|
* Fix `NoMethodError` when generating a scaffold inside a full engine.
|
2015-06-27 23:42:02 -04:00
|
|
|
|
|
|
|
*Yuji Yaginuma*
|
|
|
|
|
2015-06-25 02:25:49 -04:00
|
|
|
* Adding support for passing a block to the `add_source` action of a custom generator
|
|
|
|
|
|
|
|
*Mike Dalton*, *Hirofumi Wakasugi*
|
|
|
|
|
2015-06-19 05:13:16 -04:00
|
|
|
* `assert_file` understands paths with special characters
|
|
|
|
(eg. `v0.1.4~alpha+nightly`).
|
|
|
|
|
|
|
|
*Diego Carrion*
|
|
|
|
|
2015-06-17 19:18:43 -04:00
|
|
|
* Remove ContentLength middleware from the defaults. If you want it, just
|
|
|
|
add it as a middleware in your config.
|
|
|
|
|
|
|
|
*Egg McMuffin*
|
|
|
|
|
2015-06-13 05:56:32 -04:00
|
|
|
* Make it possible to customize the executable inside rerun snippets.
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2015-05-14 17:46:29 -04:00
|
|
|
* Add support for API only apps.
|
|
|
|
Middleware stack was slimmed down and it has only the needed
|
|
|
|
middleware for API apps & generators generates the right files,
|
|
|
|
folders and configurations.
|
|
|
|
|
|
|
|
*Santiago Pastorino & Jorge Bejar*
|
|
|
|
|
2015-06-02 10:16:36 -04:00
|
|
|
* Make generated scaffold functional tests work inside engines.
|
|
|
|
|
|
|
|
*Yuji Yaginuma*
|
|
|
|
|
2015-05-26 07:52:10 -04:00
|
|
|
* Generator a `.keep` file in the `tmp` folder by default as many scripts
|
|
|
|
assume the existence of this folder and most would fail if it is absent.
|
|
|
|
|
|
|
|
See #20299.
|
|
|
|
|
|
|
|
*Yoong Kang Lim*, *Sunny Juneja*
|
|
|
|
|
2015-05-04 15:55:23 -04:00
|
|
|
* `config.static_index` configures directory `index.html` filename
|
|
|
|
|
|
|
|
Set `config.static_index` to serve a static directory index file not named
|
|
|
|
`index`. E.g. to serve `main.html` instead of `index.html` for directory
|
|
|
|
requests, set `config.static_index` to `"main"`.
|
|
|
|
|
|
|
|
*Eliot Sykes*
|
|
|
|
|
2015-05-06 03:58:25 -04:00
|
|
|
* `bin/setup` uses built-in rake tasks (`log:clear`, `tmp:clear`).
|
|
|
|
|
|
|
|
*Mohnish Thallavajhula*
|
|
|
|
|
2015-05-04 03:02:36 -04:00
|
|
|
* Fix mailer previews with attachments by using the mail gem's own API to
|
|
|
|
locate the first part of the correct mime type.
|
|
|
|
|
|
|
|
Fixes #14435.
|
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
2015-04-22 14:44:04 -04:00
|
|
|
* Remove sqlite support from `rails dbconsole`.
|
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
2015-04-22 08:44:30 -04:00
|
|
|
* Rename `railties/bin` to `railties/exe` to match the new Bundler executables
|
|
|
|
convention.
|
2015-04-12 16:20:34 -04:00
|
|
|
|
2015-04-11 12:44:27 -04:00
|
|
|
*Islam Wazery*
|
2015-04-12 16:20:34 -04:00
|
|
|
|
2015-04-15 02:13:14 -04:00
|
|
|
* Print `bundle install` output in `rails new` as soon as it's available.
|
2015-03-20 14:00:17 -04:00
|
|
|
|
|
|
|
Running `rails new` will now print the output of `bundle install` as
|
|
|
|
it is available, instead of waiting until all gems finish installing.
|
|
|
|
|
|
|
|
*Max Holder*
|
|
|
|
|
2015-03-27 12:42:52 -04:00
|
|
|
* Respect `pluralize_table_names` when generating fixture file.
|
2015-03-26 21:08:04 -04:00
|
|
|
|
|
|
|
Fixes #19519.
|
|
|
|
|
|
|
|
*Yuji Yaginuma*
|
|
|
|
|
2015-03-18 10:27:55 -04:00
|
|
|
* Add a new-line to the end of route method generated code.
|
|
|
|
|
|
|
|
We need to add a `\n`, because we cannot have two routes
|
|
|
|
in the same line.
|
|
|
|
|
|
|
|
*arthurnn*
|
|
|
|
|
2015-04-22 08:44:30 -04:00
|
|
|
* Add `rake initializers`.
|
2015-03-13 12:41:21 -04:00
|
|
|
|
2015-03-20 18:51:01 -04:00
|
|
|
This task prints out all defined initializers in the order they are invoked
|
|
|
|
by Rails. This is helpful for debugging issues related to the initialization
|
|
|
|
process.
|
2015-03-13 12:41:21 -04:00
|
|
|
|
|
|
|
*Naoto Kaneko*
|
|
|
|
|
2015-03-20 18:51:01 -04:00
|
|
|
* Created rake restart task. Restarts your Rails app by touching the
|
2015-02-17 01:11:16 -05:00
|
|
|
`tmp/restart.txt`.
|
|
|
|
|
|
|
|
Fixes #18876.
|
|
|
|
|
|
|
|
*Hyonjee Joo*
|
|
|
|
|
2015-04-22 08:44:30 -04:00
|
|
|
* Add `config/initializers/active_record_belongs_to_required_by_default.rb`.
|
2015-02-13 21:24:54 -05:00
|
|
|
|
|
|
|
Newly generated Rails apps have a new initializer called
|
|
|
|
`active_record_belongs_to_required_by_default.rb` which sets the value of
|
2015-03-22 02:18:18 -04:00
|
|
|
the configuration option `config.active_record.belongs_to_required_by_default`
|
2015-02-13 21:24:54 -05:00
|
|
|
to `true` when ActiveRecord is not skipped.
|
|
|
|
|
|
|
|
As a result, new Rails apps require `belongs_to` association on model
|
|
|
|
to be valid.
|
|
|
|
|
|
|
|
This initializer is *not* added when running `rake rails:update`, so
|
|
|
|
old apps ported to Rails 5 will work without any change.
|
|
|
|
|
|
|
|
*Josef Šimánek*
|
|
|
|
|
2015-02-18 13:35:51 -05:00
|
|
|
* `delete` operations in configurations are run last in order to eliminate
|
|
|
|
'No such middleware' errors when `insert_before` or `insert_after` are added
|
|
|
|
after the `delete` operation for the middleware being deleted.
|
|
|
|
|
2015-04-22 08:44:30 -04:00
|
|
|
Fixes #16433.
|
2015-02-18 13:35:51 -05:00
|
|
|
|
|
|
|
*Guo Xiang Tan*
|
|
|
|
|
2015-02-06 14:41:42 -05:00
|
|
|
* Newly generated applications get a `README.md` in Markdown.
|
|
|
|
|
|
|
|
*Xavier Noria*
|
|
|
|
|
Remove documentation tasks
This patch removes the tasks doc:app, doc:rails, and doc:guides.
In our experience applications do not generate APIs using doc:app.
Methods may be certainly documented for maintainers, annotated
with YARD tags, etc. but that is intended to be read with the
source code, not in a separate website. Then, teams also have
typically selected topics written down in Markdown files, or in
a GitHub wiki... that kind of thing.
If a team absolutely needs to generate application documentation
for internal purposes, they can still easily write their own task.
Regarding doc:rails and doc:guides, we live in 2015. We are used
to go to online docs all the time. If you really want access to the
API offline RubyGems generates it for every Rails component unless
you tell it not to, and you can checkout the Rails source code to
read the guides as Markdown, or download them for a Kindle reader.
All in all, maintaining this code does not seem to be worthwhile
anymore.
As a consequence of this, guides (+3 MB uncompressed) won't be
distributed with the rails gem anymore. Of course, guides and API
are going to be still part of releases, since documentation is
maintained alongside code and tests.
Also, time permitting, this will allow us to experiment with novel
ways to generate documentation in the Rails docs server, since
right now we were constrained by being able to generate them in
the user's environment.
2015-02-06 14:06:29 -05:00
|
|
|
* Remove the documentation tasks `doc:app`, `doc:rails`, and `doc:guides`.
|
|
|
|
|
|
|
|
*Xavier Noria*
|
|
|
|
|
2015-04-22 08:44:30 -04:00
|
|
|
* Force generated routes to be inserted into `config/routes.rb`.
|
2015-02-05 12:47:36 -05:00
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
2015-04-29 03:01:15 -04:00
|
|
|
* Don't remove all line endings from `config/routes.rb` when revoking scaffold.
|
2015-02-03 17:47:59 -05:00
|
|
|
|
|
|
|
Fixes #15913.
|
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
2015-01-27 17:59:48 -05:00
|
|
|
* Rename `--skip-test-unit` option to `--skip-test` in app generator
|
|
|
|
|
|
|
|
*Melanie Gilman*
|
|
|
|
|
2015-04-22 08:44:30 -04:00
|
|
|
* Add the `method_source` gem to the default Gemfile for apps.
|
2015-01-13 12:23:09 -05:00
|
|
|
|
|
|
|
*Sean Griffin*
|
|
|
|
|
2015-04-22 08:44:30 -04:00
|
|
|
* Drop old test locations from `rake stats`:
|
|
|
|
|
2015-01-09 04:54:11 -05:00
|
|
|
- test/functional
|
|
|
|
- test/unit
|
|
|
|
|
|
|
|
*Ravil Bayramgalin*
|
|
|
|
|
2015-01-09 04:52:23 -05:00
|
|
|
* Update `rake stats` to correctly count declarative tests
|
|
|
|
as methods in `_test.rb` files.
|
|
|
|
|
|
|
|
*Ravil Bayramgalin*
|
|
|
|
|
2015-01-04 09:51:07 -05:00
|
|
|
* Remove deprecated `test:all` and `test:all:db` tasks.
|
|
|
|
|
2015-01-04 10:35:05 -05:00
|
|
|
*Rafael Mendonça França*
|
|
|
|
|
2015-01-04 09:45:54 -05:00
|
|
|
* Remove deprecated `Rails::Rack::LogTailer`.
|
|
|
|
|
|
|
|
*Rafael Mendonça França*
|
|
|
|
|
2015-01-04 09:42:30 -05:00
|
|
|
* Remove deprecated `RAILS_CACHE` constant.
|
|
|
|
|
|
|
|
*Rafael Mendonça França*
|
|
|
|
|
2015-01-04 09:39:12 -05:00
|
|
|
* Remove deprecated `serve_static_assets` configuration.
|
|
|
|
|
|
|
|
*Rafael Mendonça França*
|
|
|
|
|
2013-12-21 01:09:52 -05:00
|
|
|
* Use local variables in `_form.html.erb` partial generated by scaffold.
|
|
|
|
|
|
|
|
*Andrew Kozlov*
|
|
|
|
|
2015-04-22 08:44:30 -04:00
|
|
|
* Add `config/initializers/callback_terminator.rb`.
|
2014-12-24 03:58:19 -05:00
|
|
|
|
|
|
|
Newly generated Rails apps have a new initializer called
|
|
|
|
`callback_terminator.rb` which sets the value of the configuration option
|
2015-09-24 21:33:58 -04:00
|
|
|
`ActiveSupport.halt_callback_chains_on_return_false` to `false`.
|
2014-12-24 03:58:19 -05:00
|
|
|
|
2015-09-24 21:33:58 -04:00
|
|
|
As a result, new Rails apps do not halt Active Record and Active Model
|
|
|
|
callback chains when a callback returns `false`; only when they are
|
|
|
|
explicitly halted with `throw(:abort)`.
|
2014-12-24 03:58:19 -05:00
|
|
|
|
|
|
|
The terminator is *not* added when running `rake rails:update`, so returning
|
|
|
|
`false` will still work on old apps ported to Rails 5, displaying a
|
|
|
|
deprecation warning to prompt users to update their code to the new syntax.
|
|
|
|
|
|
|
|
*claudiob*
|
|
|
|
|
2015-01-02 21:01:30 -05:00
|
|
|
* Generated fixtures won't use the id when generated with references attributes.
|
|
|
|
|
|
|
|
*Pablo Olmos de Aguilera Corradini*
|
|
|
|
|
2014-12-31 08:10:26 -05:00
|
|
|
* Add `--skip-action-mailer` option to the app generator.
|
|
|
|
|
|
|
|
*claudiob*
|
|
|
|
|
2014-12-26 12:29:53 -05:00
|
|
|
* Autoload any second level directories called `app/*/concerns`.
|
|
|
|
|
|
|
|
*Alex Robbin*
|
|
|
|
|
2014-11-28 12:00:06 -05:00
|
|
|
Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/railties/CHANGELOG.md) for previous changes.
|