Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
This comparison is big! We’re only showing the most recent 250 commits
Commits on Feb 01, 2016
@rafaelfranca rafaelfranca Merge pull request #23373 from kamipo/remove_duplicated_composite_pri…
…mary_key_tests

Remove duplicated composite primary key tests
f9c57f1
@matthewd matthewd Remove development dependencies from actioncable.gemspec
None of the other components use them, so we should be consistent.
55e3366
@rafaelfranca rafaelfranca Merge pull request #23359 from kamipo/make_to_primary_key
Make to primary key instead of an unique index for internal tables
2f8ba24
@kamipo kamipo Avoid extra `show variables` in migration
`initialize_schema_migrations_table` is called in every migrations.

https://github.com/rails/rails/blob/v5.0.0.beta1/activerecord/lib/active_record/migration.rb#L1080
https://github.com/rails/rails/blob/v5.0.0.beta1/activerecord/lib/active_record/schema.rb#L51

This means that extra `show variables` is called regardless of the
existence of `schema_migrations` table.

This change is to avoid extra `show variables` if `schema_migrations`
table exists.
57604cf
@erullmann erullmann Added references option to join tables
Fixes issue #22960
When creating join tables with the command

    rails g migration CreateJoinTableShowroomUser showroom:references user:references

The migration will use references to create the joins and output:

     class CreateJoinTableShowroomUser < ActiveRecord::Migration
       def change
         create_join_table :showrooms, :users do |t|
           t.references :showroom, index: true, foreign_key: true
           t.references :user, index: true, foreign_key: true
         end
       end
     end

This allows for proper refrences with indexes and foreign keys to be easily used when
adding join tables. Without `:refrences` the normal output is generated:

    class CreateJoinTableShowroomUser < ActiveRecord::Migration[5.0]
      def change
        create_join_table :showrooms, :users do |t|
          # t.index [:showroom_id, :user_id]
          # t.index [:user_id, :showroom_id]
        end
      end
    end
138c1db
@rafaelfranca rafaelfranca Merge pull request #23168 from kamipo/avoid_extra_show_variables_in_m…
…igration

Avoid extra `show variables` in migration
d505ba0
@rafaelfranca rafaelfranca Merge pull request #23391 from erullmann/join_table_indexes
Added references option to join tables
4e42345
@amatsuda amatsuda tabenai (typo) 407baa2
@PareshGupta PareshGupta remove unused constants from activerecord d8ac525
@prathamesh-sonpatki prathamesh-sonpatki Fix documentation related to `config.assets.cache_store` [ci skip]
- sprockets-rails no longer supports customizing cache store after
  rails/sprockets-rails@ecaeb27 using `config.assets.cache_store`.
- Instead we need to configure it using block syntax.
- Fixes #19835.
437fa98
@pschambacher pschambacher Duplicate assert_generates options before modifying it c363945
@rafaelfranca rafaelfranca Merge pull request #23375 from prathamesh-sonpatki/fix-19835
Fix documentation related to `config.assets.cache_store` [ci skip]
8b2c618
@yahonda yahonda Shorten ActiveRecord::InternalMetadata.table_name to ar_internal_meta…
…data

to support Oracle database which only supports 30 byte identifier length
a374af8
@yahonda yahonda Rename `active_record_internal_metadatas` to `ar_internal_metadata`
for those who already migrated to Rails 5.0.0 beta
407e0ab
@matthewd matthewd Merge pull request #23381 from matthewd/uneventful-redis
Redis sans EventMachine
8a51f6f
@matthewd matthewd Merge pull request #23385 from matthewd/default-subscription-adapter
Change default ACa adapter for development & test
9c9202b
@matthewd matthewd Always obtain the lock and do the unload
We mostly care about `reload_classes_only_on_change=true`, because
that's the default... and there, we definitely need to wait for the lock
when necessary.
92203ed
@matthewd matthewd Block new share attempts if there's an exclusive waiter aeb58ab
@matthewd matthewd While new sharers are blocked, an existing sharer remains re-entrant f02bd2a
@matthewd matthewd After completing a load, give other threads a chance too
While we know no user code is running, we should do as much loading as
we can. That way, all the threads will then be able to resume running
user code together.

Otherwise, only the last arriving thread would get to do its load, and
would then return to userspace, leaving the others still blocked.
f836630
@schneems schneems Merge pull request #23057 from schneems/schneems/default-puma-config
Add Default Puma Config
25a4275
@claudiob claudiob [ci skip] Properly indent code in markdown
[ci skip]
949925d
@claudiob claudiob Merge pull request #23401 from claudiob/fix-as-changelog-md
[ci skip] Properly indent code in markdown
9aa425f
@sgrif sgrif Merge pull request #23025 from yahonda/shorten_internal_metadata_tabl…
…e_name_less_than_30_byte

Shorten ActiveRecord::InternalMetadata.table_name to ar_internal_metadata
4f2bce9
@maclover7 maclover7 Add documentation for #17573
Fixes some parts of #23148.

[ci skip]
b3427c6
@hackerkid hackerkid git protocol replaced with https 25cf3f0
@schneems schneems Merge pull request #23402 from hackerkid/master
git protocol replaced with https
2341a8e
@vipulnsward vipulnsward Add options for rake routes task
Add two options: `-c` and `-g`.
`-g` option returns the urls name, verb and path fields that match the pattern.
`-c` option returns the urls for specific controller.

Fixes #18902, and Fixes #20420

[Anton Davydov & Vipul A M]
8a436fd
@rafaelfranca rafaelfranca Merge pull request #23151 from maclover7/fix-23148
Add documentation for #17573
04dea72
@hackerkid hackerkid .git added to https repo urls b818fd3
@vipulnsward vipulnsward Merge pull request #23406 from hackerkid/master
.git added to https repo urls
f3e6e80
@matthewd matthewd Merge pull request #23398 from matthewd/interlock
Address remaining known issues in Interlock
f8167ac
@sgrif sgrif Revert "Merge pull request #16400 from bogdan/last-with-sql"
This reverts commit 9f3730a, reversing
changes made to 2637fb7.

There are additional issues with this commit that need to be addressed
before this change is ready (see #23377). This is a temporary revert in
order for us to have more time to address the issues with that PR,
without blocking the release of beta2.
0cbcae5
@kaspth kaspth Merge pull request #23225 from vipulnsward/20420-rake-routes-options
Add options for rake routes task
baae952
@kaspth kaspth Simplify filter normalization.
Assume the filter is a string, if it wasn't a hash and isn't nil. Remove needless else
and rely on Ruby's default nil return.

Add spaces within hash braces.
5966b80
@jeremy jeremy Fix corrupt transaction state caused by `before_commit` exceptions
When a `before_commit` callback raises, the database is rolled back but
AR's record of the current transaction is not, leaving the connection in
a perpetually broken state that affects all future users of the
connection: subsequent requests, jobs, etc. They'll think a transaction
is active when none is, so they won't BEGIN on their own. This manifests
as missing `after_commit` callbacks and broken ROLLBACKs.

This happens because `before_commit` callbacks fire before the current
transaction is popped from the stack, but the exception-handling path
they hit assumes that the current transaction was already popped. So the
database ROLLBACK is issued, but the transaction stack is left intact.

Common cause: deadlocked `#touch`, which is now implemented with
`before_commit` callbacks.

What's next:
* We shouldn't allow active transaction state when checking in or out
  from the connection pool. Verify that conns are clean.
* Closer review of txn manager sad paths. Are we missing other spots
  where we'd end up with incorrect txn state? What's the worst that can
  happen if txn state drifts? How can we guarantee it doesn't and
  contain the fallout if it does?

Thanks for @tomafro for expert diagnosis!
8fd123f
@kaspth kaspth Converge on filter.
Some places were saying filter, while others said filter_options, spare the ambiguity
and use filter throughout.

This inlines a needless local variable and clarifies a route filter consists of defaults
and values to match against.
84c3738
@kaspth kaspth Add spaces in the braces.
Solves personal insanity, since I was down in these files.

(Please don't submit PRs like this.)
b801566
@jeremy jeremy Merge pull request #23407 from jeremy/corrupt-before-commit
Fix corrupt transaction state caused by `before_commit` exceptions
633969f
@sgrif sgrif Preparing for Rails 5.0.0.beta2 49f6ce6
@rafaelfranca rafaelfranca Add some Action Cable CHANGELOG entries
And improve changelongs.

[ci skip]
60b040e
@kangkyu kangkyu Update CHANGELOG.md
fix indentation to show it as code
c4ac23b
@claudiob claudiob Merge pull request #23408 from kangkyu/patch-1
Update CHANGELOG.md
0b0042c
Commits on Feb 02, 2016
@amatsuda amatsuda :warning: assigned but unused variable - err 96b9609
@tenderlove tenderlove Generated engines should protect from forgery
Generated engines should call `protect_from_forgery`.  If this method
isn't called, then the Engine could be susceptible to XSS attacks.
Thanks @tomekr for reporting this to us!
538bce1
@maclover7 maclover7 Fix regression in `Hash#dig` for HashWithIndifferentAccess. c918a3a
@rafaelfranca rafaelfranca Merge pull request #23414 from maclover7/23411
Fix regression in `Hash#dig` for HashWithIndifferentAccess.
49fc19d
@rafaelfranca rafaelfranca Merge pull request #23396 from pschambacher/pschambacher/fix_assert_g…
…enerates

Duplicate assert_generates options before modifying it
dd04193
@PareshGupta PareshGupta Remove unused class AttributeMethodCache e944e67
@y-yagi y-yagi move `test_generator_if_skip_action_cable_is_given_for_an_api_app` to…
… the appropriate file

Test of Rails API should be in `api_app_generator_test.rb`.
b700d48
@rafaelfranca rafaelfranca Merge pull request #23420 from y-yagi/move_api_test_to_appropriate_file
move `test_generator_if_skip_action_cable_is_given_for_an_api_app` to the appropriate file
2c7bc92
@rafaelfranca rafaelfranca Merge pull request #23331 from amatsuda/valid_scope_name
Warn if a named scope is overwriting an existing scope or method
7710d7f
@yui-knk yui-knk Remove unnecessary overriding of `#initialize`
`#initialize` of `HasManyReflection`, `HasOneReflection` and
`BelongsToReflection` only pass all arguments to `super` by passed order.
These overriding can be removed.
daf0f23
@RyanNielson RyanNielson Change command_task.rb to commands_task.rb in docs
The initialization documentation references `rails/commands/command_task.rb`. This appears to be a typo as the file is actually `rails/commands/commands_task.rb`.
ac1427d
@kaspth kaspth Merge pull request #23426 from RyanNielson/patch-1
Change command_task.rb to commands_task.rb in docs
85298f5
@sgrif sgrif Merge pull request #23423 from yui-knk/remove_unnecessary_override
Remove unnecessary overriding of `#initialize`
f7775c7
@sgrif sgrif Avoid infinite recursion when bad values are passed to tz aware fields
We had previously updated this to attempt to map over whatever was
passed in, so that additional types like range and array could benefit
from this behavior without the time zone converter having to deal with
every known type.

However, the default behavior of a type is to just yield the given value
to `map`, which means that if we don't actually know how to handle a
value, we'll just recurse infinitely. Since both uses of `map` in this
case occur in cases where we know receiving the same object will
recurse, we can just break on reference equality.

Fixes #23241.
5bb2600
@sgrif sgrif Ensure tz aware attributes continue to work with arrays
There was a typo in the variable name leading to infinite recursion
473f637
@qrush qrush [ci skip] Several ActionCable documentation updates:
* Properly indent code sample in ActionCable::Channel::Streams
* Add a doc comment for #stop_all_streams
* Reformat + add <tt> blocks around code references in ActionCable::Base docs
* Clarify and a little better grammar on ActionCable::RemoteConnections
* Correct indentation and clean up ActionCable::Server::Broadcasting code sample
8305437
@eileencodes eileencodes Merge pull request #23429 from qrush/actioncable-doc-update
Several ActionCable doc fixes
d34db3d
@BillyZac BillyZac Fix typo. 789fabf
@arthurnn arthurnn Merge pull request #23433 from BillyZac/master
Fix typo.
6704a9b
@remomueller remomueller The minimum supported version of PostgreSQL is now >= 9.1 85a3e0f
@rafaelfranca rafaelfranca Merge pull request #23434 from remomueller/bump-minimum-pg-version
The minimum supported version of PostgreSQL is now >= 9.1
49e0c4e
@y-yagi y-yagi use rails command in routes task
For other task has become to use the rails command at doc and test,
I think that routes task also it is better to use the rails command.
fae1724
Commits on Feb 03, 2016
@ryohashimoto ryohashimoto use rails secret in rails guides c8ac079
@maclover7 maclover7 Merge pull request #23437 from ryohashimoto/160203_guide_rails_secret
Use rails secret command in guides
4ffdc87
@sgrif sgrif Sleep well, sweet prince
Prototype, you have served us well. But you are no longer how we make an
XMLHttpRequest. RIP
522099a
@himesh-r himesh-r Changed id-writer to save join table records based on association pri…
…mary key #20995

Changed id-writer to save join table records based on association primary key
9c9fb19
@arthurnn arthurnn Merge pull request #20997 from himesh-r/issue-20995
Changed id-writer to save join table records based on association
primary key #20995.
bcd0c8c
@prathamesh-sonpatki prathamesh-sonpatki Mention supported PG version in the error message. 7ec5f9f
@prathamesh-sonpatki prathamesh-sonpatki Mention PostgreSQL version support in release notes [ci skip] 52b3226
@kaspth kaspth Merge pull request #23436 from y-yagi/use_bin_command_in_routes_task
use rails command in routes task
3fed7dd
@prathamesh-sonpatki prathamesh-sonpatki Put some space for non-assets requests in development mode
- Fixes #23428.
7ca7c0e
@amatsuda amatsuda Typos in AR tests 887eaa8
@y-yagi y-yagi update supported version of PostgreSQL in docs [ci skip]
Follow up to  #23434
33681d0
@senny senny Merge pull request #23447 from y-yagi/update_pg_supported_version_in_…
…docs

update supported version of PostgreSQL in docs [ci skip]
2144c75
@matthewd matthewd Merge pull request #23443 from prathamesh-sonpatki/fix-logging-in-dev…
…elopment

Put some space for non-assets requests in development mode
8a84f1c
@FooBarWidget FooBarWidget Document the fact that Action Cable does not require a multi-threaded…
… app server

[ci skip]
3366a3a
@mperham mperham Remove json gem dependency
All modern Rubies ship JSON as part of stdlib.  Using the gem actually hurts multi-platform support due to build difficulties on Windows.
f3433f7
@rafaelfranca rafaelfranca Merge pull request #23453 from mperham/remove_json
Remove json gem dependency
12bdda7
@rafaelfranca rafaelfranca Merge pull request #23442 from prathamesh-sonpatki/improve-pg-version…
…-old-error-message

Improve pg version old error message and mention this change in release notes.
6ece7df
@alexeyzab alexeyzab Add dummy apple icon files
Previously Safari would try to load these files when you visit
localhost:3000. That created two exceptions in the log. It also caused
the exception notifier to send them out.

In response to #23427
deae52a
@rafaelfranca rafaelfranca Merge pull request #23455 from alexeyzab/add_apple_dummy_icon_files
Add dummy apple icon files
a14cd32
@kaspth kaspth Fix line filters running tests from multiple runnables.
`derive_regexp` was written with the assumption that we were run from a
blank slate — that if the filter didn't match we might as well return it
because it was nil.

This isn't the case because minitest calls `run` on every runnable. Which
is any subclass of Minitest::Runnable, such as ActiveSupport::TestCase,
ActionDispatch::IntegrationTest as well as any inheriting from those.

Thus after the first `run` we'd have put in a composite filter in
`options[:filter]` making the next `run` create a linked list when it
failed to match the regexp and put the composite filter as the head.

Every runnable would accumulate more and more of the same filters,
which effectively acted like an expanding whitelist and we ran tests
from other runnables.

Clog the accumulation by returning nil if there's no filter to derive
a regexp from.

Note: we pass a seed in the tests because Minitest shuffles the runnables
to ensure the whitelist is expanded enough that the failure is triggered.
e4f0608
@kaspth kaspth Fix model test path typo uncovered in previous commit.
Because of the expanding whitelist for test filters, this test ended up
running the tests on lines 4 and 9 in the post test even though the path
wasn't right.

Happened incidentally because the same line numbers were used in both
account and post test.

Add the .rb line so the file is required correctly and the filters are
applied.
d10b48d
@matthewd matthewd Defer Arel attribute lookup to the model class
This still isn't as separated as I'd like, but it at least moves most of
the burden of alias mapping in one place.
cdc112e
@kaspth kaspth Merge pull request #23456 from kaspth/line-filter-triggers-one-runnable
Fix line filters running tests from multiple runnables.
13b918d
@kamipo kamipo Active Record supports MySQL >= 5.0
Currently some features uses `information_schema` (e.g. foreign key
support). `information_schema` introduced since MySQL 5.0.
c7f8019
@mperham mperham Remove unused dependency
railties uses method_source, activesupport does not.  I assume code was refactored and the dependency wasn't removed.
cf18c34
@kamipo kamipo InnoDB supports FULLTEXT and Spatial Indexes [ci skip] 8b8ee65
@matthewd matthewd Extract a Relation#arel_attribute 5952861
@matthewd matthewd Merge pull request #23457 from matthewd/arel-attribute
Defer Arel attribute lookup to the model class
eeaf6ee
@arthurnn arthurnn Merge pull request #23459 from mperham/master
Remove unused dependency
c85a4f1
Commits on Feb 04, 2016
@kamipo kamipo Remove commented out code in `ci/travis.rb` [ci skip] 210c814
@kamipo kamipo SQLite 2 support has been dropped [ci skip] c9feea6
@sgrif sgrif Merge pull request #23465 from kamipo/sqlite2_support_has_been_dropped
SQLite 2 support has been dropped [ci skip]
089d98e
@maclover7 maclover7 Merge pull request #23452 from phusion/action_cable
Document the fact that Action Cable does not require a multi-threaded app server
8ee91d4
@sgrif sgrif Merge pull request #23458 from kamipo/activerecord_supports_mysql_5.0…
…_and_up

Active Record supports MySQL >= 5.0
9df3083
@sgrif sgrif Merge pull request #23460 from kamipo/innodb_supports_fulltext_and_sp…
…atial_indexes

InnoDB supports FULLTEXT and Spatial Indexes [ci skip]
5671951
@sgrif sgrif Merge pull request #23464 from kamipo/remove_commented_out_code_in_tr…
…avis_rb

Remove commented out code in `ci/travis.rb` [ci skip]
e22404a
@amatsuda amatsuda Typos in AR tests 250c0d0
@amatsuda amatsuda Revert "Lines of code can be 100,000+ in a Rails app"
This reverts commit 293bd95.

This broke the header :<
2cd405f
@amatsuda amatsuda rake stats dynamically scales now
So it can properly show stats for an app with 1,000,000+ LOC
dfa48f2
@jhubert jhubert Remove the assumption of schema in DATABASE_URL
If you set the DATABASE_URL environment variable to `mydatabase` by accident, you end up getting a series of errors that are hard to trace. For example: 

```
warning: already initialized constant ActiveRecord::Base::OrmAdapter
```

Turns out the cascade of errors is due to the error raised by `.tr` being called on `nil`.

This commit makes sure that `scheme` is set before calling `.tr` on it. My previous iteration used `@uri.scheme.try(:tr, '-', '_')` but using the `&&` logical operator is a fair bit faster: http://stackoverflow.com/questions/26655032/try-vs-performance

With this change, the error message becomes much more understandable:

```
FATAL:  database "mydatabase" does not exist (ActiveRecord::NoDatabaseError)
```
7429bc5
@gsamokovarov gsamokovarov Don't publicize Kernel core extensions
This is a reaction to a [bug] we hit in web-console. The cause of it was
a `Kernel` extension called `#console` that was public and was fighting
over Railties with console block to be run on `rails console`. We solved
it by making the method private. We did that through `module_function`
so `::Kernel.console` can be invoked even in `BasicObject`.

I'm proposing to make most of the core Active Support `Kernel`
extensions `module_function` as well. Those are currently public and we
are polluting every `Object` public interface with them.

```ruby
>> Object.new.respond_to? :silence_warnings
=> true

>> Object.new.respond_to? :with_warnings
=> true

>> Object.new.respond_to? :enable_warnings
=> true

>> Object.new.respond_to? :suppress
=> true
``

Some extensions like `Kernel#class_eval` should be public, but most of
them don't really need to be.

[bug]: rails/web-console#184
5a4e878
@dhh dhh Allow for non-standard redis connectors 5e5fd24
@dhh dhh Redis is now only needed if you want to use Action Cable in production
So no need to have it on by default in the Gemfile.
9186443
@dhh dhh Turbolinks has moved out
All grown up and shit!
f2306d0
@vipulnsward vipulnsward Pass api only option to rails rails:update task to update only based …
…on API.

Fixes #23470
e0e872f
@rafaelfranca rafaelfranca Merge pull request #23478 from vipulnsward/23470-pass-api-in-update-g…
…enerator

Pass api only option to rails rails:update task to update only based on api Apps
83147f1
@sikachu sikachu Update assertion on redis in generated Gemfile
Redis now included in Gemfile but commented out. This change was made in
9186443 and is causing the test
failure.

See https://travis-ci.org/rails/rails/jobs/106994913#L1025
b1ae3a3
@dhh dhh Merge pull request #23480 from sikachu/redis-commented-out
Update assertion on redis in generated Gemfile
ec1b249
@vipulnsward vipulnsward - app generate option --skip-sprockets leaves jquery-rails gem, which…
… relies on sprockets environment

- Remove jquery-rails if --skip-sprockets is true

Fixes #23431
c074343
@rafaelfranca rafaelfranca Merge pull request #23479 from vipulnsward/23431-remove-jquery-on-spr…
…ockets-skip

Remove jquery-rails gem from generator if --skip-sprockets is true
d3fd7b9
@rafaelfranca rafaelfranca Test with Turbolinks 5 dd67df6
@rubys rubys hotlink to the source and results for AWDwR tests d601f4b
@rafaelfranca rafaelfranca Merge pull request #23484 from rubys/patch-1
hotlink to the source and results for AWDwR tests
2e46ccb
@meinac meinac Add documentation about method to describe how it works [ci skip] e38ced3
@sgrif sgrif Merge pull request #23481 from meinac/activemodel_errors_doc_for_beha…
…viour

Add documentation about `ActiveModel::Errors#[]` method to describe how it works [ci skip]
ea59b68
@jhubert jhubert Add a resolver test for the missing scheme d871696
@jhubert jhubert Remove accidental additional test 96fdbd3
@rafaelfranca rafaelfranca Merge pull request #23473 from gsamokovarov/kernel-module-function
Don't publicize Kernel core extensions
3be9a34
Commits on Feb 05, 2016
@rafaelfranca rafaelfranca Merge pull request #23472 from jhubert/patch-2
Remove the assumption of schema in DATABASE_URL
22af619
@y-yagi y-yagi add missing include to engine test example [ci skip]
Using url helper method of engine in example code,
include `Engine.routes.url_helpers` is required to use helper method of engine.
924f33a
@vipulnsward vipulnsward Merge pull request #23489 from y-yagi/add_missing_include_to_engine_t…
…est_example

add missing include to engine test example [ci skip]
3bf13b0
@y-yagi y-yagi move CHANGELOG entry to the appropriate position [ci skip]
Dummy apple icon files has been added after the 5.0.0.beta2 release.
ref: #23455
c9768b8
@senny senny docs, link Rails specific assertions to the API. [ci skip] 507a952
@senny senny docs, remove trailing whitespace from testing guide. [ci skip] f503266
@kaspth kaspth Merge pull request #23491 from y-yagi/move_changelog_entry_2
move CHANGELOG entry to the appropriate position [ci skip]
822e3c0
@zzak zzak Check off some todos for the Testing guide with @senny [ci skip] be45d2f
@zzak zzak Merge branch 'master' of github.com:rails/rails 2e1a4bd
@prathamesh-sonpatki prathamesh-sonpatki Update turbolinks-rails for passing railties test 2669f37
@y-yagi y-yagi don’t explicitly mention EventMachine [ci skip]
Follow up to 6accef4
cdb6f2e
@prathamesh-sonpatki prathamesh-sonpatki Merge pull request #23496 from y-yagi/donot_explicitly_mention_eventm…
…achine_in_template

don’t explicitly mention EventMachine [ci skip]
120c0f1
@rafaelfranca rafaelfranca Merge pull request #23494 from prathamesh-sonpatki/update-turbolinks
Update turbolinks-rails for passing railties test
fbab5c7
@dhh dhh Cant run on an out-of-the-box OSX installation without running out of…
… TOO MANY FILES OPEN
7fe32d2
@dhh dhh Change the default adapter from inline to async 625baa6
@dhh dhh Missed a few spots in inline -> async switch 439fadf
@akaspick akaspick When generating a mailer, you must specify Mailer in the class name in
order to generate the proper files. Some of the docs/comments are
missing this important detail.
8417d96
@rafaelfranca rafaelfranca Merge pull request #23500 from akaspick/mailer_doc_fix
When generating a mailer, you must specify Mailer in the class name
f4f998d
@tenderlove tenderlove disable controller / view thread spawning in tests
Tests can (and do) access the database from the main thread.  In this
case they were starting a transaction, then making a request.  The
request would create a new thread, which would allocate a new database
connection.  Since the main thread started a transaction that contains
data that the new thread wants to see, the new thread would not see it
due to data visibility from transactions.  Spawning the new thread in
production is fine because middleware should not be doing database
manipulation similar to the test harness.  Before 603fe20 it was
possible to set the database connection id based on a thread local, but
603fe20 changes the connection lookup code to never look at the
"connection id" but only at the thread object itself.  Without that
indirection, we can't force threads to use the same connection pool as
another thread.

Fixes #23483
a640da4
@sikachu sikachu No need to specify Ruby patch version on Travis CI
Travis CI now select the latest patch version of Ruby automatically when
given MAJOR.MINOR version string.
4dd0cdd
@rafaelfranca rafaelfranca Merge pull request #23502 from sikachu/update-travis-master
No need to specify Ruby patch version on Travis CI
7ea174e
@sgrif sgrif Revert "Dump indexes in `create_table` instead of `add_index`"
This reverts commit 99801c6.

Ultimately it doesn't matter whether `add_index` or `t.index` are used
in the schema dumper in any meaningful way. There are gems out there
which hook into the old behavior for things like indexing materialized
views. Since the reverted commit doesn't seem to add much benefit,
there's no reason for us to break these gems.
d666a5a
@kaspth kaspth Fix mixing line filters with Minitest's -n filter.
Previous commit accidentally broke mixing line filters with string -n filter.

Fix by checking if it is a string and returning it.

We also need to ensure the -n filter carry forward into any other composite filters.

Fix by letting the named filter be extractable, so we'll keep this for the next runnable's
run.
84b72a8
@tenderlove tenderlove add missing require 38b5af6
Commits on Feb 06, 2016
@yui-knk yui-knk [ci skip] Good bye SQLite2
Follow up of c9feea6
3ee7bc8
@y-yagi y-yagi Revert "When generating a mailer, you must specify Mailer in the clas…
…s name in"

This reverts commit 8417d96.

In 5697bdb and af3eb59,
add mailer suffix to generated files and classes.
Therefore, no longer need to specify `Mailer` to class name. [ci skip]
ea785e5
@kamipo kamipo Revert "No need to specify Ruby patch version on Travis CI" ecd8f8f
@gsamokovarov gsamokovarov Replace old Rails greeting references
A couple of the READMEs were still referring the old welcome page. This
is a small change that goes over it.

[ci skip]
91678fe
@kaspth kaspth Merge pull request #23514 from y-yagi/revert_mailer_doc_fix
Revert "When generating a mailer, you must specify Mailer in the class name in"
c2b4791
@kaspth kaspth Merge pull request #23513 from kamipo/revert-23502-update-travis-master
Revert "No need to specify Ruby patch version on Travis CI"
c909a00
@kamipo kamipo Remove duplicated `require 'arel'`
It appears first in `lib/active_record.rb`.
4ca3f99
@y-yagi y-yagi set association name to generated fixtures if attribute is reference
It has been changed to require `belongs_to` by default in Rails 5.
Therefore in order to pass the controller test, have association of set to fixtures.

Fixes #23384
00c64e8
@eileencodes eileencodes Merge pull request #23517 from gsamokovarov/yay-youre-on-rails
Replace old Rails greeting references
b9a9545
@kamipo kamipo MariaDB does not support JSON type
Fixes #22980.
d9bdc2f
@sgrif sgrif Merge pull request #23520 from kamipo/remove_duplicated_require_arel
Remove duplicated `require 'arel'`
f611e59
@syamilmj syamilmj Remove unused private method 04021c4
@rafaelfranca rafaelfranca Merge pull request #23529 from syamilmj/remove_unused_method
Remove unused private method
495ec33
@kaspth kaspth Avoid coupling Action Pack to Railties.
Referencing Rails.env without checking if it's defined couples
us to Railties.

Fix by avoiding the line breaks if we don't have an env check
to rely on.
4e4bcae
@sgrif sgrif Merge pull request #23519 from kamipo/mariadb_does_not_support_json_type
MariaDB does not support JSON type
8526e9b
@matthewd matthewd Hand off the interlock to the new thread in AC::Live
Most importantly, the original request thread must yield its share lock
while waiting for the live thread to commit -- otherwise a request's
base and live threads can deadlock against each other.
3e4a69e
Commits on Feb 07, 2016
@thedarkone thedarkone AS::Conc::ShareLock#yield_shares tests. 9f2df78
@y-yagi y-yagi fix typo in `assert_enqueued_jobs` example [ci skip] 6809758
@maclover7 maclover7 Merge pull request #23533 from y-yagi/fix_typo_in_assert_enqueued_job…
…s_example

fix typo in `assert_enqueued_jobs` example [ci skip]
5b1f3e5
@meinac meinac Added numeric helper into migrations.
With this addition, you can add a column into the table like:

```
  create_table(:numeric_types) do |t|
    t.numeric :foo, precision: 10, scale: 2, default: 2.0
  end
```

The result of the migration above is same with:

```
  create_table(:numeric_types) do |t|
    t.decimal :foo, precision: 10, scale: 2, default: 2.0
  end
```
aa38f7d
@bronson bronson fix 'method redefined' warnings 73d1975
@vijaydev vijaydev fix indentation 87f060a
@vijaydev vijaydev Merge branch 'master' of github.com:rails/docrails bef1652
@vijaydev vijaydev Separate for new and existing applications clearly
[ci skip]
9a9587f
@vipulnsward vipulnsward Publish guide on "Using Rails for API-only Applications"
Fixes #23322
[ci skip]
38f6d4e
@vijaydev vijaydev Merge pull request #23540 from vipulnsward/publish-api-apps-doc
Publish guide on "Using Rails for API-only Applications"
e2bc819
@matthewd matthewd Eagerly reacquire when start_sharing is nested inside yield_shares
A full write-preferring wait can lead to deadlock.
d2c671e
@dhh dhh Add SVG as a default mime type 7e35cb2
@thedarkone thedarkone Fix a nonsensical ShareLock test. 5d9e591
@matthewd matthewd Test the happy path for recursive yields too fe7d77c
@matthewd matthewd Manual yield doesn't block new shares 11579b8
@kamipo kamipo `schema_type` returns symbol rather than string
A return value of `schema_type` is used by:

1. primary key type: using as `symbol.inspect`
2. normal column type: using as `symbol.to_s`

It is better to return symbol.
bf25ab9
@matthewd matthewd Merge pull request #23532 from matthewd/live-interlock
Hand off the interlock to the new thread in AC::Live
15f6ad3
@coldnebo coldnebo doc changes
for rails/rails#23431

       modified:   guides/source/asset_pipeline.md
* description of asset combination from apps and gems, e.g. jquery-rails
* after @vipulnsward's related change rails/rails#23479
  correction: --skip-sprockets will prevent all of these gems, not just sass-rails and uglifier

       modified:   guides/source/working_with_javascript_in_rails.md
* noted that rails.js requires the asset pipeline

[ci skip]
5015215
@maclover7 maclover7 Merge pull request #23531 from coldnebo/docfix
doc changes to clarify asset pipeline
76c4238
@sgrif sgrif Merge pull request #23508 from meinac/add_numeric_type_into_migrations
Added numeric helper into `SchemaStatements` for MySQL and PostgreSQL
5ccf8a9
@bronson bronson revert dev:cache to rake task, fixes #23410 ba2aea9
@romaimperator romaimperator config examples for ActionCable now use Rails.application.config.acti…
…on_cable

Some existing examples used ActionCable.server.config but for
configuring allowed_request_origins that is overridden in development
mode. The correct place to set that is
Rails.application.config.action_cable which the ActionCable initializer
loads from. I thought the other two examples should be changed as well
just in case a default value that would override a configured value is
introduced for either log_tags or disable_request_forgery_protection in
the future.
0ec48ab
@sgrif sgrif Merge pull request #23547 from kamipo/schema_type_returns_symbol
`schema_type` returns symbol rather than string
a29a41f
Commits on Feb 08, 2016
@mabras mabras update turbolinks url [ci skip] f83d57d
@schneems schneems Merge pull request #23559 from mabras/patch-1
update turbolinks url [ci skip]
8af52c0
@maclover7 maclover7 Merge pull request #23554 from romaimperator/update_action_cable_conf…
…ig_example

config examples for ActionCable now use Rails.application.config.action_cable
2b18bd5
@y-yagi y-yagi remove `faye-websocket` dependency from README [ci skip]
`faye-websocket` gem is no longer used from 322dca2.
3546b3f
@prathamesh-sonpatki prathamesh-sonpatki Merge pull request #23556 from y-yagi/remove_faye-websocket_from_readme
remove `faye-websocket` dependency from README [ci skip]
e8580c6
@prathamesh-sonpatki prathamesh-sonpatki Remove references to Rails 4 from assets guide [ci skip] abef3c2
@kamipo kamipo Add numeric type in the doc [ci skip]
Follow up to #23508.
40fd560
@vipulnsward vipulnsward Merge pull request #23558 from kamipo/add_numeric_type_in_doc
Add numeric type in the doc [ci skip]
d3150c8
@kaspth kaspth Merge pull request #23552 from bronson/revert-dev-cache
revert dev:cache to rake task, fixes #23410
3b693df
@prathamesh-sonpatki prathamesh-sonpatki Merge pull request #23560 from prathamesh-sonpatki/rm-rails-4-from-as…
…sets-guide

Remove references to Rails 4 from assets guide [ci skip]
9dcf67c
@Azzurrio Azzurrio Update rails-html-sanitizer version to v1.0.3 ec82c13
@kaspth kaspth Merge pull request #23562 from Azzurrio/patch-1
Update rails-html-sanitizer version to  v1.0.3
8c3cca5
@rafaelfranca rafaelfranca Revert "Merge pull request #23562 from Azzurrio/patch-1"
This reverts commit 8c3cca5, reversing
changes made to 9dcf67c.

Reason: #23562 (comment)
9b5ae71
@pra85 pra85 Fix a typo
Replace `a` with `an`
581c2a6
@maclover7 maclover7 Merge pull request #23563 from pra85/patch-2
Fix a typo
6c785f0
@arthurnn arthurnn Merge pull request #23534 from bronson/fix-redefined-warning
fix 'method redefined' warnings
98ed722
@abhishekjain16 abhishekjain16 [ci skip] Fix grammar c2b9a5d
@maclover7 maclover7 Merge pull request #23565 from abhishekjain16/fix_grammar
[ci skip] Fix grammar
e6fc78b
@tenderlove tenderlove speed up string xor operation and reduce object allocations
```
[aaron@TC rails (master)]$ cat xor.rb
a = "\x14b\"\xB4P8\x05\x8D\xC74\xC3\xEC}\xFDf\x8E!h\xCF^\xBF\xA5%\xC6\xF0\xA9\xF9x\x04\xFA\xF1\x82"
b = "O.\xF7\x01\xA9D\xA3\xE1D\x7FU\x85\xFC\x8Ak\e\x04\x8A\x97\x91\xD01\x02\xA4G\x1EIf:Y\x0F@"

def xor_byte_strings(s1, s2)
  s1.bytes.zip(s2.bytes).map { |(c1,c2)| c1 ^ c2 }.pack('c*')
end

def xor_byte_strings2(s1, s2)
  s2_bytes = s2.bytes
  s1.bytes.map.with_index { |c1, i| c1 ^ s2_bytes[i] }.pack('c*')
end

require 'benchmark/ips'
require 'allocation_tracer'

Benchmark.ips do |x|
  x.report 'xor_byte_strings' do
    xor_byte_strings a, b
  end

  x.report 'xor_byte_strings2' do
    xor_byte_strings2 a, b
  end
end

ObjectSpace::AllocationTracer.setup(%i{type})
result = ObjectSpace::AllocationTracer.trace do
  xor_byte_strings a, b
end
p :xor_byte_strings => result
ObjectSpace::AllocationTracer.clear
result = ObjectSpace::AllocationTracer.trace do
  xor_byte_strings2 a, b
end
p :xor_byte_strings2 => result
[aaron@TC rails (master)]$ ruby -I~/git/allocation_tracer/lib xor.rb
Calculating -------------------------------------
    xor_byte_strings    10.087k i/100ms
   xor_byte_strings2    11.339k i/100ms
-------------------------------------------------
    xor_byte_strings    108.386k (± 5.8%) i/s -    544.698k
   xor_byte_strings2    122.239k (± 3.0%) i/s -    612.306k
{:xor_byte_strings=>{[:T_ARRAY]=>[38, 0, 0, 0, 0, 0], [:T_STRING]=>[2, 0, 0, 0, 0, 0]}}
{:xor_byte_strings2=>{[:T_ARRAY]=>[3, 0, 0, 0, 0, 0], [:T_DATA]=>[1, 0, 0, 0, 0, 0], [:T_IMEMO]=>[2, 0, 0, 0, 0, 0], [:T_STRING]=>[2, 0, 0, 0, 0, 0]}}
```
02c3867
@tenderlove tenderlove drop array allocations on `html_safe`
For better or worse, anonymous `*` args will allocate arrays.  Ideally,
the interpreter would optimize away this allocation.  However, given the
number of times we call `html_safe` it seems worth the shedding idealism
and going for performance.  This line was the top allocation spot for a
scaffold (and presumably worse on real applications).
783858c
Commits on Feb 09, 2016
@kamipo kamipo Fix typo [ci skip] 3f184ca
@maclover7 maclover7 Merge pull request #23567 from kamipo/fix_typo
Fix typo [ci skip]
43e902a
@y-yagi y-yagi remove description of `render :nothing` from guide [ci skip]
`:nothing` option was deprecated in 44781b6
9e70daa
@vipulnsward vipulnsward Merge pull request #23571 from y-yagi/remove_deprecated_render_nothin…
…g_from_guide

remove description of `render :nothing` from guide [ci skip]
0e70595
@dgynn dgynn Update documentation regarding initializers [ci skip]
- Remove ActionController `logger` and `initialize_framework_caches`
  which were merged into `set_configs` in fbc9d0f
- Rename ActiveRecord `set_reloader_hooks` changed in 283a087
- Add missing initializers for ActionController and ActiveRecord
836f6f1
@rafaelfranca rafaelfranca Merge pull request #23577 from dgynn/docs_initializers
Update documentation regarding initializers
6454ee2
@tenderlove tenderlove AC::Request#format always returns a value, so we do not need to try d5c6bab
@tenderlove tenderlove Request#fullpath should not raise an exception, so remove the rescue b2a9047
@tenderlove tenderlove `log_process_action` will return an array, so use `empty?`
We don't need to use active support in this case because we know the
type that will be returned.
b5eb242
@fxn fxn enables the evented monitor in new applications de6ad56
@fxn fxn include spring-watcher-listen in the Gemfile of new applications 00a5eb6
Commits on Feb 10, 2016
@brchristian brchristian allow Array.penultimate and Array.antepenultiate access methods c74045c
@fxn fxn prevent apps in the railties test suite from running the evented monitor bd69718
@mgm702 mgm702 Fixed grammatical errors in rails docs [ci skip]
Fixed errors in rails migrations docs [ci skip]

Fixed errors in rails security docs [ci skip]
767f168
@maclover7 maclover7 Merge pull request #23584 from mgm702/fix_grammar_errors_in_security_…
…and_migrations_docs_master

Fix grammar errors in security and migrations docs master [ci skip]
ce33443
@jhcole jhcole Fix typo 344ddcb
@prathamesh-sonpatki prathamesh-sonpatki Merge pull request #23586 from jhcole/master
Fix typo
21547fc
@wallclockbuilder wallclockbuilder Fix tiny grammar. f2fcd3a
@vipulnsward vipulnsward Merge pull request #23587 from wallclockbuilder/patch-1
Fix tiny grammar.
31778a3
@dhh dhh Merge pull request #23512 from y-yagi/set_association_name_to_fixture
set association name to generated fixtures if attribute is reference
437a7a4
@dhh dhh Merge pull request #22772 from gsamokovarov/nack-template-error
Fix edge case with ActionView::Template::Error reraise
b079708
@dhh dhh Merge pull request #21671 from kaspth/integration-request-encoding-he…
…lpers

Add `as` to encode a request as a specific mime type.
688996d
@KeithP KeithP Logs successful and invalid connections separately 8641de9
@KeithP KeithP Merge remote-tracking branch 'origin/master' into actioncable_logging ec4ae30
@afn afn Converting backtrace to strings before calling set_backtrace
Fixes #23058
03980b2
@brchristian brchristian rename to 'second_to_last' and 'third_to_last' e8aeda2
@brchristian brchristian include activerecord and activesupport CHANGELOG entries eaa1efe
@bensheldon bensheldon Set postgresql poolsize via RAILS_MAX_THREADS 1273fc9
@dhh dhh Merge pull request #23583 from brchristian/penultimate
Array.second_to_last and Array.third_to_last access methods
074ff5c
@dhh dhh Merge pull request #23274 from KeithP/actioncable_logging
adds debug logging to actioncable connect
daa4779
@schneems schneems Merge pull request #23528 from bensheldon/patch-1
Set database poolsize via rails_max_threads
391061a
@kaspth kaspth Add `parsed_body` to spare writing out parsing routines.
When testing:

```ruby
post articles_path, params: { article: { title: 'Ahoy!' } }, as: :json
```

It's common to want to make assertions on the response body. Perhaps the
server responded with JSON, so you write `JSON.parse(response.body)`.
But that gets tedious real quick.

Instead add `parsed_body` which will automatically parse the reponse
body as what the last request was encoded `as`.
eee3534
@kaspth kaspth Add request encoding and response parsing to changelog.
Forgot to add this in the original pull request. No biggie, just show
some examples.
c85b177
@kaspth kaspth Merge pull request #23597 from kaspth/integration-response-parsing
Add `response.parsed_body` to Integration Tests
33257d1
@tenderlove tenderlove build scope chain functionally and remove caching
This commit walks the reflection tree and builds the scope chain
functionally.  It also removes the chain cache since the cache doesn't
seem to have any impact on performance (I'd prefer to only cache at
proven bottlenecks)
3553fe0
@tenderlove tenderlove check `supports_view_paths?` at registration time
If we check the conditional at registration time, then we can avoid the
conditional at runtime.  This commit checks for view path support when
the handler is registered so that runtime calls to `find_dependencies`
won't need to check the conditional.  The idea is that
`register_tracker` is called only once where `find_dependencies` may be
called many times.
81f75f5
@spastorino spastorino Merge pull request #23395 from PareshGupta/remove-unused-constant
Remove unused ReaderMethodCache and  WriterMethodCache  constants from ActiveRecord
2db347b
@tenderlove tenderlove sort templates after looking them up in the from the paths cache
The view paths cache will eventually query the filesystem when looking
up templates:

  https://github.com/rails/rails/blob/2db347bebc9d3f39b3c5e274b7c9beecfce73913/actionview/lib/action_view/template/resolver.rb#L224-L230

The order in which files are returned is file system dependent.  Since
the template digest [depends on its children](https://github.com/rails/rails/blob/2db347bebc9d3f39b3c5e274b7c9beecfce73913/actionview/lib/action_view/digestor.rb#L109-L115), the order of the dependencies will impact the fingerprint.
This commit sorts the wildcard dependencies so that we get a consistent
hash.

Fixes #23592
dfa0ab5
@y-yagi y-yagi remove warnings from FinderMethods
This removes the following warnings.

```
activerecord/lib/active_record/relation/finder_methods.rb:252: warning: ambiguous first argument; put parentheses or a space even after `-' operator
activerecord/lib/active_record/relation/finder_methods.rb:258: warning: ambiguous first argument; put parentheses or a space even after `-' operator
activerecord/lib/active_record/relation/finder_methods.rb:268: warning: ambiguous first argument; put parentheses or a space even after `-' operator
activerecord/lib/active_record/relation/finder_methods.rb:274: warning: ambiguous first argument; put parentheses or a space even after `-' operator
```
424b201
Commits on Feb 11, 2016
@supremebeing7 supremebeing7 Update active_record_querying.md
Added important distinction between scopes and class methods.
0e69632
@tenderlove tenderlove Merge pull request #23596 from afn/issue-23058
Converting backtrace to strings before calling set_backtrace
ab4708c
@maclover7 maclover7 Merge pull request #23606 from supremebeing7/patch-1
Update active_record_querying.md
270e25c
@tenderlove tenderlove Merge pull request #23604 from tenderlove/sort-templates
sort templates after looking them up in the from the paths cache
0912579
@kaspth kaspth Merge pull request #23605 from y-yagi/remove_warnings_in_finder_methods
remove warnings from FinderMethods
3a7a021