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 Jan 29, 2016
@rfmanuel rfmanuel Implemented pull request changes. 92e5658
@sgrif sgrif Don't recommend using `ActiveRecord::Base[]`
These methods are more expensive than the alternatives, and have strange semantics that are likely undesirable.
c8818df
@matthewd matthewd Revert "Revert "Eliminate the EventMachine dependency"" 74497ea
@matthewd matthewd Fix arguments to on_close a928aa3
@matthewd matthewd Synchronize the lazy setters in Server
They're all at risk of races on the first requests.
16a6603
@matthewd matthewd Add a couple of tests that connect with a WS client ce37de4
@matthewd matthewd Handle more IO errors (especially, ECONNRESET)
Also, address the possibility of the listen thread dying and needing to
be respawned. As a bonus, we now defer construction of the thread until
we are first given something to monitor.
786ed1b
@matthewd matthewd Be more patient while gathering the expected responses 0b94afb
@matthewd matthewd Reduce the client count, in hope of a more consistent test 3043601
@matthewd matthewd Keep the socket reference after close
We may still try to send to it.
4d01cd1
@matthewd matthewd Merge pull request #23305 from matthewd/concurrent-take-2
EventMachine -> concurrent-ruby, take two
703ddad
@kesha-antonov kesha-antonov remove require logging 1c893bc
@rafaelfranca rafaelfranca Merge pull request #23336 from kesha-antonov/patch-1
remove require logging
7d28824
@matthewd matthewd Intervene on change_table as well as create_table da63427
@matthewd matthewd Don't bother stopping EM between tests
It's not strictly necessary, and maybe this will help with the current
test failure.
e6d0d4b
@tawan tawan Add additional documentation on Headers#[] [ci skip]
Issue #16519 covers confusion potentially caused by how HTTP
headers, that contain underscores in their names, are retrieved
through `ActionDispatch::Http::Headers#[]`.

This confusion has its origin in how a CGI maps HTTP header names
to variable names. Even though underscores in header names
are rarely encountered, they are valid according to RFC822 [1].
Nonetheless CGI like variable names, as requested by the Rack
specfication, will only contain underscores and therefore the
original header name cannot be recovered after the Rack server passed
on the environemnt hash. Please, see also the disscussion on
StackOverflow [2], which also links to an explaination in the
nginx documentation [3].

[1] http://www.ietf.org/rfc/rfc822.txt
[2] http://stackoverflow.com/questions/22856136/why-underscores-are-forbidden-in-http-header-names
[3] https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#missing-disappearing-http-headers
349f187
@matthewd matthewd Use a gentler disconnect
The detach used by close! seems to be making EM very sad on Travis.
0ae1879
@maclover7 maclover7 Merge pull request #23338 from tawan/update-doc-request-headers-access
Add additional documentation on Headers#[] [ci skip]
513f728
@schneems schneems Add Default Puma Config
When the `puma` command is run without any configuration options it will detect presence of a `config/puma.rb` file and use that. Currently there is discrepancy between `puma` command and `rails server` but Evan said it would be reasonable to add in reading in config from the default location. I am working on that right now as a feature in puma/puma.

Why do we need this? By default Puma uses 16 threads, and by default ActiveRecord only has 5 threads. Due to the architecture of AR it is guaranteed that if you're running with fewer DB connections than your server has threads you will hit `ActiveRecord::ConnectionTimeoutError ` eventually if your app gets modest amounts of traffic. Since we are providing a default webserver, we should provide reasonable configuration for that webserver.

This PR does a few things, first it sets the default Puma thread count to 5 to mach ActiveRecord's default. It sets the default environment to `"development"` and the default port to 300 so that booting the server with `$ puma` will give you the same default port as `rails server`. It is worth mentioning that by reading in from `PORT` environment variable this config can work with containerized deployments, such as on Heroku. 

We are not using worker processes by default, that way JRuby and windows devs can use this configuration without modification. I went ahead and included a default `on_worker_boot`. It won't be used unless a worker count is specified, that means this config will not use it. Even though it's not being used now It will make someone who wants to try modifying their config to run extra workers easier.

cc/ @pixeltrix
5563c32
Commits on Jan 30, 2016
@rafaelfranca rafaelfranca Merge pull request #23317 from rfmanuel/after-bundle-in-rails-plugin-…
…template

Add an after_bundle callback in Rails plugin templates
6162c49
@y-yagi y-yagi remove unused variable from render test
This removes the following warning.

```
rails/actionpack/test/controller/render_test.rb:278: warning: assigned but unused variable - response
```
647a04c
@y-yagi y-yagi remove unused require
`with_indifferent_access` had been used in `assigns` method, but has been removed in ca83436.
a027a75
@yui-knk yui-knk Warn if `AR.primary_key` is called for a table who has composite prim…
…ary key

If `AR.primary_key` is called for a table who has composite primary key,
the method returns `nil`. This behavior sometimes generates invalid SQL.
The first time developers notice to invalid SQL is when they execute
SQL. This commit enables developers to know they are doing something
dangerous as soon as possible.
444c4d0
@y-yagi y-yagi remove backward compatibility code for Minitest 4
The master branch is required Ruby 2.2.2+, for the Ruby 2.2 is bundled Minitest 5.4.3,
I think backward compatibility code for Minitest 4 is unnecessary.
92cca41
@kamipo kamipo Refactor `OID::Money.precision` 1a071ba
@yui-knk yui-knk Explicitly define `columns` method as an interface
`ActiveRecord::ConnectionAdapters::SchemaStatements#columns` is defined
here as an interface method here. So changes to raise `NotImplementedError`
same as `tables`, `views` ...etc.
8b9d217
@kamipo kamipo Refactor `column_exists?` in `SchemaStatements` 617a693
@kamipo kamipo Make `SchemaMigration.drop_table` to one SQL
`SchemaMigration.drop_table` is only used in tests.
Simply we can use `drop_table if_exists: true`.
4e551d0
@y-yagi y-yagi remove unnecessary gsub for `action_cable_meta_tag`
If the specified `skip_action_cable` option, so as not to output the
`action_cable_meta_tag` in template, gsub is unnecessary.

ref: https://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt#L6..L8
284f8d4
@eileencodes eileencodes Handle response_body= when body is nil
There are some cases when the `body` in `response_body=` can be set to
nil. One of those cases is in `actionpack-action_caching` which I found
while upgrading it for Rails 5.

It's not possible to run `body.each` on a `nil` body so we have to
return after we run `response.reset_body!`.
c4d85df
@yui-knk yui-knk There is no need to define test if a connection does not support prim…
…ary_key
e05d828
@kamipo kamipo Remove unused `LOST_CONNECTION_ERROR_MESSAGES`
`LOST_CONNECTION_ERROR_MESSAGES` was added by f384582.
But currently unused from anywhere.
a3eba8f
@kamipo kamipo Fix `bigint?` for Enum columns in MySQL
Follow up to #22896.
d0054b4
@rafaelfranca rafaelfranca Merge pull request #23346 from kamipo/refactor_oid_money_precision
Refactor `OID::Money.precision`
ff835f9
@rafaelfranca rafaelfranca Merge pull request #23351 from y-yagi/remove_gsub_for_action_cable_me…
…ta_tag

remove unnecessary gsub for `action_cable_meta_tag`
4de264d
@rafaelfranca rafaelfranca Allow failures for Action Cable tests bb6f36e
@rafaelfranca rafaelfranca Merge pull request #23343 from y-yagi/remove_unused_require
remove unused require
dfde688
@rafaelfranca rafaelfranca Merge pull request #23342 from y-yagi/remove_unused_variable
remove unused variable from render test
8d30ef7
@rafaelfranca rafaelfranca Merge pull request #23347 from yui-knk/explicitly_define_columns_as_i…
…nterface

Explicitly define `columns` method as an interface
4187699
@rafaelfranca rafaelfranca Merge pull request #23353 from kamipo/remove_unused_lost_connection_e…
…rror_messages

Remove unused `LOST_CONNECTION_ERROR_MESSAGES`
2cf1284
@rafaelfranca rafaelfranca Merge pull request #23352 from yui-knk/move_test_conditions
There is no need to define test if a connection does not support prim…
92dcda5
@rafaelfranca rafaelfranca Merge pull request #23350 from kamipo/refactor_schema_migration_drop_…
…table

Make `SchemaMigration.drop_table` to one SQL
7d18de3
@rafaelfranca rafaelfranca Merge pull request #23355 from kamipo/fix_bigint_for_enum_columns
Fix `bigint?` for Enum columns in MySQL
b789f6d
@rafaelfranca rafaelfranca Merge pull request #23349 from kamipo/refactor_column_exists
Refactor `column_exists?` in `SchemaStatements`
3384838
@rafaelfranca rafaelfranca Merge pull request #23345 from yui-knk/warning_when_composite_primary…
…_key_is_detected

Warn if `AR.primary_key` is called for a table who has composite prim…
a592127
@rafaelfranca rafaelfranca Revert "Merge pull request #23346 from kamipo/refactor_oid_money_prec…
…ision"

This reverts commit ff835f9, reversing
changes made to c4d85df.

Reason: This broke the tests. We will add back after investigated.
a398cd0
@kamipo kamipo Make to primary key instead of an unique index for internal tables ff16a39
@kamipo kamipo `OID::Money.precision` is unused since #15239
    p PostgreSQLAdapter::OID::Money.precision
    # => 19

    p PostgreSQLAdapter::OID::Money.new.precision
    # => nil
bee8bb5
@vipulnsward vipulnsward - Updated persistence documentation to make it clear that save and sa…
…ve! won't update a record if validation fails.

- Also fixed `update` method's documention to be uniform about this statement.
Fixes #20821

[ci skip]

[Vipul A M & pseidemann ]
6c54f6c
@maclover7 maclover7 Merge pull request #23362 from vipulnsward/20821-save-doc-update
- Updated persistence documentation to make it clear that save and sa…
2e465e1
@pra85 pra85 typo fix [ci skip]
Spelling mistake - direcotry > directory
4663cab
@vipulnsward vipulnsward Merge pull request #23363 from pra85/patch-1
typo fix [ci skip]
b212bef
@vipulnsward vipulnsward Pass 3 over testing guide
- Various grammar fixes
- Added assertions for update controller action tests
- Added user helper tests
- Fix typos

[ci skip]
c01948c
@vipulnsward vipulnsward Merge pull request #23358 from vipulnsward/testing-guide-pass-3
Pass 3 over testing guide
153438f
@maclover7 maclover7 Small cleanup to Testing Guide
- inbuilt --> built-in
- Remove random spaces from code examples

[ci skip]
d2bd7bb
@maclover7 maclover7 Merge pull request #23364 from maclover7/fix-23358
Small cleanup to Testing Guide
a00c36f
Commits on Jan 31, 2016
@maclover7 maclover7 Add configuration section to "Active Record Basics" guide
This is to fill in some missing information as apart of #22931.

It's on purpose that the sample `Message` model inherits from
`ActiveRecord::Base` -- Active Record is not meant to be coupled to
Rails, and we can't guarantee that users outside of the Rails world will
have an `ApplicationRecord` class that inherits from
`ActiveRecord::Base`.

[ci skip]
3ded07e
@maclover7 maclover7 Merge pull request #23366 from maclover7/add-configuation-ar-docs
Add configuration section to "Active Record Basics" guide
96355e8
@y-yagi y-yagi make rake proxy work in rails engines 3ffa5a1
@javan javan Add task to create precompiled action_cable.js and reorganize to acco…
…mmodate
896950a
@maclover7 maclover7 Improvements and reorganization of assets 09a7060
@maclover7 maclover7 Add Action Cable asset building as release step cb040aa
@maclover7 maclover7 Move Action Cable back to the main build 9d426d3
@kamipo kamipo Remove odd ` [ci skip] 7d67c31
@kamipo kamipo Use `t.index` in `create_table` instead of `add_index` in test schema
For reduce bootstrap queries in tests.
8e083e1
@vipulnsward vipulnsward Merge pull request #23371 from kamipo/remove_odd_backtick
Remove odd ` [ci skip]
8dfb876
@prathamesh-sonpatki prathamesh-sonpatki Added test for backward compatibility of null constraints on timestam…
…p columns
6e2302e
@yui-knk yui-knk Each concrete classes have responsibility to return `association_class` 7e4b2ab
@matthewd matthewd Switch the default redis adapter to a single-stream model
This new adapter does get a little more intimate with the redis-rb gem's
implementation than I would like, but it's the least bad of the
approaches I've come up with.
e773686
@matthewd matthewd Wait for EventMachine to finish starting 4c38319
@spastorino spastorino Merge pull request #23368 from y-yagi/remove_backward_compatibility_c…
…ode_for_minitest_4

remove backward compatibility code for Minitest 4
b7a6dc9
@matthewd matthewd Merge pull request #23369 from maclover7/actioncable-assets-redux
Action Cable Assets Compilation redux
ca9603f
@matthewd matthewd Wrangle the asset build into something that sounds more general d6f2000
@matthewd matthewd Drop the runtime dependency on coffee-rails 93abf58
@matthewd matthewd Use the in-process subscription adapter for development & test 082a0b5
@kaspth kaspth Merge pull request #23379 from yui-knk/define_association_class_on_ea…
…ch_concrete_class

Each concrete classes have responsibility to return `association_class`
662889c
@kaspth kaspth Merge pull request #23169 from y-yagi/rake_proxy_in_engine
make rake proxy work in rails engines
81052c8
@bdewater bdewater Update middleware docs regarding ActionDispatch::LoadInterlock [ci skip] 6cdc36a
@vipulnsward vipulnsward Merge pull request #22857 from bdewater/interlock-doc
Update middleware docs regarding ActionDispatch::LoadInterlock [ci skip]
acddd03
@maclover7 maclover7 Remove unused method ddd84f6
@mcfiredrill mcfiredrill clarify the touch true option does not trigger after_save/update [ci …
…skip]

I've gotten tripped up more than a few times on this, thinking that
using `belongs_to` with `touch: true` would trigger my after_save or
after_update callbacks. The same text is in the documentation for the
touch method itself, but I think its helpful to repeat it again here.
It might save people some time.
8d25a8a
@guilleiguaran guilleiguaran Merge pull request #23370 from maclover7/actioncable-main-travis-build
Move Action Cable back to the main build
d6e0eeb
@kaspth kaspth Merge pull request #23387 from mcfiredrill/clarify-touching-callbacks
clarify the touch true option does not trigger after_save/update [ci skip]
5c9ccca
@yui-knk yui-knk Remove `case macro` from `calculate_constructable`
Rails has abstract Reflection classes (`MacroReflection`,
`AssociationReflection` etc.) and concrete Reflection classes
(e.g. `HasManyReflection`, `HasOneReflection` etc.).
In many case `calculate_constructable` returns `true`, so
change `calculate_constructable` to always return `true` and
override this method if necessary.
615dcad
@arthurnn arthurnn Merge pull request #23380 from yui-knk/override_calculate_constructab…
…les_at_each_concrete_class

Remove `case macro` from `calculate_constructable`
b98ca65
Commits on Feb 01, 2016
@prathamesh-sonpatki prathamesh-sonpatki Update Gemfile.lock
- Leftover from 93abf58.
ad9ed7e
@rafaelfranca rafaelfranca Merge pull request #23388 from prathamesh-sonpatki/update-gemfile-lock
Update Gemfile.lock
dedc687
@rafaelfranca rafaelfranca Merge pull request #23360 from kamipo/oid_money_precision_is_unused
`OID::Money.precision` is unused since #15239
75fcb52
@amatsuda amatsuda :speak_no_evil: :warning: 87e2f7e
@rafaelfranca rafaelfranca Merge pull request #23374 from prathamesh-sonpatki/migration-compatib…
…lity-tests

Added test for backward compatibility of null constraints on timestamp columns
c9daa26
@rafaelfranca rafaelfranca Merge pull request #23372 from kamipo/use_index_in_create_in_test_schema
Use `t.index` in `create_table` instead of `add_index` in test schema
43dff0a
@kamipo kamipo Extract `ExplainPrettyPrinter` to appropriate files 351e39c
@kamipo kamipo Remove duplicated composite primary key tests f3eccd9
@rafaelfranca rafaelfranca Revert "Merge pull request #23366 from maclover7/add-configuation-ar-…
…docs"

This reverts commit 96355e8, reversing
changes made to a00c36f.

See #23366 (comment)
c2079f8
@rafaelfranca rafaelfranca Merge pull request #23389 from kamipo/extract_explain_pretty_printer
Extract `ExplainPrettyPrinter` to appropriate files
cea8122
@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
@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
@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
@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
@eileencodes eileencodes Merge pull request #23517 from gsamokovarov/yay-youre-on-rails
Replace old Rails greeting references
b9a9545
@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