Explicit route test class

shows the class that the test must extend in order to have the assert_routing method available
FileHandler should not be called for files outside the root

FileHandler#matches? should return false for files that are outside the
"root" path.
If Rails is not defined, check ENV["RAILS_ENV"] and ENV["RACK_ENV"].

This fixes a regression introduced by 6cc03675d30b58e28f585720dad14e947a57ff5b.

ActiveRecord, if used without Rails, always checks the "default_env" environment. This would be OK, except that Sinatra also supports environments,
and it runs with {RACK|RAILS}_ENV=production. This patch adds a fallback to RAILS_ENV and RACK_ENV (and ultimately default_env) if Rails.env doesn't exist.
Raises ArgumentError when try to define a scope without a callable

This changes the actual exception `NoMethodError: undefined method `call'
for #<ActiveRecord::Relation []>` to a `ArgumentError` when try to define
a scope without a callable.
Use type column first in multi-column indexes

`add_reference` can very helpfully add a multi-column index when you use
it to add a polymorphic reference. However, the first column in the
index is the `id` column, which is less than ideal.

The [PostgreSQL docs][1] say:
> A multicolumn B-tree index can be used with query conditions that
> involve any subset of the index's columns, but the index is most
> efficient when there are constraints on the leading (leftmost)
> columns.

The [MySQL docs][2] say:
> MySQL can use multiple-column indexes for queries that test all the
> columns in the index, or queries that test just the first column, the
> first two columns, the first three columns, and so on. If you specify
> the columns in the right order in the index definition, a single
> composite index can speed up several kinds of queries on the same
> table.

In a polymorphic relationship, the type column is much more likely to be
useful as the first column in an index than the id column. That is, I'm
more likely to query on type without an id than I am to query on id
without a type.

[1]: http://www.postgresql.org/docs/9.3/static/indexes-multicolumn.html
[2]: http://dev.mysql.com/doc/refman/5.0/en/multiple-column-indexes.html
Added queue_name_delimiter attribute.

- Added ActiveJob::Base#queue_name_delimiter to allow for
  developers using ActiveJob to change the delimiter from the default
  ('_') to whatever else they may be using (e.g., '.', '-', ...).

- Updated source guide to include a blurb about the delimiter.
Merge pull request #14143 from derekprior/dp-compound-index-ordering

Use type column first in multi-column indexes

Conflicts:
	activerecord/CHANGELOG.md
Merge pull request #17374 from maurogeorge/scope-exception

Raises ArgumentError when try to define a scope without a callable
Allow Relation#rewhere to work with infinite range values
UrlGenerationError are not catched as 404 anymore
Fix rbx generated Gemfile regex

https://travis-ci.org/rails/rails/jobs/39190983#L460

 1) Failure:
 AppGeneratorTest#test_psych_gem
 [test/generators/app_generator_test.rb:495]:
 Expected /gem 'psych',\s+'~> 2.0', \s+platforms: :rbx/ to match <snip>
 http://git.io/uuLVag)\ngem 'psych', '~> 2.0', platforms: :rbx\n\n
Merge pull request #17405 from DanOlson/rewhere

Allow Relation#rewhere to work with infinite range values
Merge pull request #16229 from byroot/stop-swallowing-url-generation-errors

UrlGenerationError are not catched as 404 anymore
Optimize TimeWithZoneTest#strftime
Merge pull request #17310 from pabloh/optimize_strftime

Optimize TimeWithZoneTest#strftime
Merge pull request #17408 from bf4/fix_rbx_test

Fix rbx generated Gemfile regex
Fix doc markup for `NumberHelper` [ci skip]

The character "*" is unnecessary in option candidates.
This incorrect markup was injected in e8c9aeca .
Merge pull request #17416 from tricknotes/fix-doc-markup

Fix doc markup for `NumberHelper`
Deprecate the `only_path` option on `*_path` helpers.

In cases where this option is set to `true`, the option is redundant and can
be safely removed; otherwise, the corresponding `*_url` helper should be
used instead.

Fixes #17294.

See also #17363.

[Dan Olson, Godfrey Chan]
Mention only_path deprecation in release notes [ci skip]