Commit Graph

57348 Commits

Author SHA1 Message Date
Jeremy Daer
b168eb5819 Cable message encoding
* Introduce a connection coder responsible for encoding Cable messages
  as WebSocket messages, defaulting to `ActiveSupport::JSON` and duck-
  typing to any object responding to `#encode` and `#decode`.
* Consolidate encoding responsibility to the connection. No longer
  explicitly JSON-encode from channels or other sources. Pass Cable
  messages as Hashes to `#transmit` and rely on it to encode.
* Introduce stream encoders responsible for decoding pubsub messages.
  Preserve the currently raw encoding, but make it easy to use JSON.
  Same duck type as the connection encoder.
* Revert recent data normalization/quoting (#23649) which treated
  `identifier` and `data` values as nested JSON objects rather than as
  opaque JSON-encoded strings. That dealt us an awkward hand where we'd
  decode JSON strings… or not, but always encode as JSON. Embedding
  JSON object values directly is preferably, no extra JSON encoding,
  but that should be a purposeful protocol version change rather than
  ambiguously, inadvertently supporting multiple message formats.
2016-03-31 07:08:16 -07:00
Jeremy Daer
903f447e43 Merge pull request #24376 from jeremy/cable/downsize-worker-pool-default-size
Cable: reconcile default worker pool size with low db conn pool size
2016-03-31 06:46:34 -07:00
Jeremy Daer
4c79c59c6e Cable: reconcile default worker pool size with low db conn pool size
Whack it down from 100 to 4.

Large worker pools means large db connection counts. We aren't set up
for that by default and most apps won't need it out of the box.

We're better off tuning the default worker pool for low traffic, low
resource consumption apps. Those who have higher traffic will scale up
to meet demand.
2016-03-30 16:07:19 -07:00
Sean Griffin
a564fecbd0 Merge pull request #24368 from kamipo/make_to_private_the_visibility
Make to private the visibility of `_quote` and `_type_cast`
2016-03-30 13:32:44 -06:00
Jon Moss
e3056bc9f4 Merge pull request #24373 from silatham99/remove-meth-from-rails
Replace _meth with _method to remove ambiguity
2016-03-30 15:02:01 -04:00
Scott Latham
06a19b0166 Replace _meth with _method to remove ambiguity
[ci skip]
2016-03-30 11:33:19 -07:00
Rafael França
ebaf95b276 Merge pull request #24371 from yui-knk/update_gemfile_lock
Update Gemfile.lock
2016-03-30 14:29:12 -03:00
Rafael França
d23687bb7f Merge pull request #24370 from yui-knk/suppress_warnings
Suppress warnings
2016-03-30 14:29:01 -03:00
yui-knk
5115c9ead3 Update Gemfile.lock
'rake' gem is bundled to '>= 11.1' by 30279704646fff33e64c71ee3c4de34bf75232c4
(#23499), but it seems the commit did not fully include Gemfile.lock's.
2016-03-31 01:17:33 +09:00
yui-knk
5aa6c85c3b Suppress warnings
"Using a dynamic :controller (or :action) segment in a route is deprecated"
by 6520ea5f7e2215a763ca74bf6cfa87be2347d5df (#23980).
2016-03-31 01:07:43 +09:00
Ryuta Kamizono
c5131b62b7 Make to private the visibility of _quote and _type_cast 2016-03-30 20:57:14 +09:00
Rafael França
7e976fd84d Merge pull request #24356 from denofevil/fixture_filename
provide file name for fixture ERB
2016-03-30 06:51:52 -03:00
Dennis Ushakov
32045717e6 provide file name for fixture ERB 2016-03-30 12:32:39 +03:00
Rafael França
e98a0a1d7d Merge pull request #23499 from bf4/ci_one_jruby
Run one JRuby worker on CI; allow to fail
2016-03-30 04:27:41 -03:00
Benjamin Fleischer
3027970464 Run latest precompiled JRuby on CI only against ActionPack
Uses latest precompiled JRuby so that
we don't spend time downloading versions Travis has
not already compiled. http://rubies.travis-ci.org/

Uses latest jdk: oraclejdk8
per
https://docs.travis-ci.com/user/build-environment-updates/2015-02-03/#Ruby-VM
and
https://docs.travis-ci.com/user/languages/ruby/#Supported-Ruby-Versions-and-RVM

Follows on work in https://github.com/rails/rails/pull/23927 which was reverted
26fe5fa08d

JRUBY_OPTS minimize GC, disable JIT, for max test speed
  - https://github.com/rails/rails/pull/16613
  - https://github.com/rails/rails/pull/17088

Have Rails use JRuby-compatible Rake 11.1
  - The Rake task was passing --verbose, an invalid option, to contemporary JRuby
  - https://github.com/ruby/rake/pull/120
  - https://github.com/rails-api/active_model_serializers/pull/1585
  - https://github.com/jruby/jruby/issues/3653#issuecomment-195883717

No advantage to directly mounting JRuby over installing from cache; both on S3
  - b2d5b336b5
  - f4fad041b2
2016-03-30 02:11:45 -05:00
Rafael França
2a8c3e53dc Merge pull request #24366 from prathamesh-sonpatki/changelog-pass
Pass over CHANGELOGs [ci skip]
2016-03-30 03:58:46 -03:00
Prathamesh Sonpatki
5ac7bd3ec4 Pass over CHANGELOGs [ci skip] 2016-03-30 12:23:29 +05:30
Rafael França
6065f0ee78 Merge pull request #24331 from prathamesh-sonpatki/fix-puma-restart
Fix rails restart issue with Puma
2016-03-30 03:17:49 -03:00
Prathamesh Sonpatki
9d87ce34f8 Fix rails restart issue with Puma
- We need to pass the restart command to Puma so that it will use it
  while restarting the server.
- Also made sure that all the options passed by user while starting
  the server are used in the generated restart command so that they will
  be used while restarting the server.
- Besides that we need to remove the server.pid file for the previous running
  server because otherwise Rack complains about it's presence.
- We don't care if the server.pid file does not exist. We only want to delete
  it if it exists.
- This also requires some changes on Puma side which are being tracked
  here - https://github.com/puma/puma/pull/936.
- Fixes #23910.
2016-03-30 11:20:15 +05:30
Rafael França
afba03f79c Merge pull request #24365 from prathamesh-sonpatki/fix-deprecation-warning
Fix deprecation warning for ParamsParser instance 😄
2016-03-30 01:49:43 -03:00
Prathamesh Sonpatki
317fbb037f Fix deprecation warning for ParamsParser instance 😄 2016-03-30 10:16:07 +05:30
Rafael Mendonça França
5ed3801481 Deprecate ActionDispatch::ParamsParser instance.
Related with 38d2bf5fd1f3e014f2397898d371c339baa627b1.

cc @tenderlove
2016-03-30 01:17:05 -03:00
Rafael Mendonça França
3be1a75f3f Merge pull request #23895 from glaucocustodio/add_upcase_first_method
Add upcase_first method
2016-03-30 01:08:33 -03:00
Rafael Mendonça França
0df82a6453 Fix CHANGELOG entry [ci skip] 2016-03-30 00:34:37 -03:00
Rafael Mendonça França
6b858fddf0 Merge branch 'actioncable-notifications' 2016-03-30 00:34:04 -03:00
Rafael Mendonça França
edbfd10876 Keep logging in the ActionCable::Channel::Base
To move Action Cable logging to a LoggingSubscriber we need to pass the
log tags in the notification payload since Action Cable logging use the
Channel instance to tag the logs.
2016-03-30 00:03:11 -03:00
Rafael França
5870bc8698 Merge pull request #24362 from kamipo/add_test_create_record_with_pk_as_zero
Add a test case for create a record with primary key as zero
2016-03-29 23:55:06 -03:00
Rafael França
532b163e5e Merge pull request #24363 from kamipo/remove_except_helper_in_test_schema
Remove `except` helper for test schema
2016-03-29 23:49:36 -03:00
Rafael Mendonça França
6786718766 Merge pull request #23723 from mwear/action_cable_notifications
Add ActiveSupport::Notification to Channel::Base#perform_action
2016-03-29 23:42:21 -03:00
Rafael França
8e8c57b412 Merge pull request #24349 from chrisarcand/add-changelog-for-24305
Add changelog for #24305
2016-03-29 23:39:00 -03:00
Rafael França
6f5e18565c Merge pull request #24327 from bogdanvlviv/patch-2
Update compatibility.rb
2016-03-29 23:36:22 -03:00
Vipul A M
1fee849d93 Merge pull request #24350 from y-yagi/update_assert_no_performed_jobs_doc
update `assert_no_performed_jobs` doc to use `assert_no_performed_jobs` method [ci skip]
2016-03-30 05:19:26 +05:30
yuuji.yaginuma
87824ab583 update assert_no_performed_jobs doc to use assert_no_performed_jobs method [ci skip] 2016-03-30 08:12:49 +09:00
Ryuta Kamizono
3b910de771 Remove except helper for test schema 2016-03-30 06:49:04 +09:00
Ryuta Kamizono
6ccbc63849 Add a test case for create a record with primary key as zero 2016-03-30 06:07:57 +09:00
Andrew White
cd736dbfa4 Merge pull request #24315 from kenta-s/add_empty_to_finder_methods
Delegate some additional methods in querying.rb
2016-03-29 17:48:25 +01:00
Kenta
78ea4c5985 Delegate some additional methods in querying.rb 2016-03-30 00:00:26 +09:00
Vipul A M
f734dd1111 Merge pull request #24354 from greysteil/fix-typo
Fix typo in headers comment [ci skip]
2016-03-29 17:32:01 +05:30
Grey Baker
67263020ec Fix typo in headers comment 2016-03-29 12:21:21 +01:00
Chris Arcand
aa3d2d03b3 Add changelog for #24305 [skip ci]
Forgot to add, sigh.

Closes #24273
2016-03-28 16:03:55 -04:00
Vipul A M
3c29836d1d Merge pull request #24344 from codeodor/patch-1
Update how to clear the association cache
2016-03-28 19:36:22 +05:30
Sammy Larbi
53db086e60 Update how to clear the association cache
Passing `true` to the association has been deprecated.
2016-03-28 09:03:02 -05:00
प्रथमेश Sonpatki
475109c517 Merge pull request #24343 from arekf/master
Update `numericality` validation docs
2016-03-28 16:31:41 +05:30
Arkadiusz Fal
ee640a1f75 [skip ci] Update numericality validation docs
Add `:other_than` option documentation.
2016-03-28 12:22:46 +02:00
Kasper Timm Hansen
59bf226890 Merge pull request #24325 from y-yagi/show_correct_command_name_in_help_of_rails_runner
show correct command name in help of rails runner
2016-03-27 18:09:40 +02:00
Vipul A M
306da3e280 Merge pull request #24337 from xw19/realations-properly
[ci skip] relations inside <tt> tag
2016-03-27 19:03:43 +05:30
Sourav Moitra
975efb2c2d [ci skip] relations inside <tt> tag
s removed

objects added
2016-03-27 19:01:27 +05:30
Vipul A M
41d432dd7a Merge pull request #24328 from bogdanvlviv/patch-3
Fix description for method ActiveRecord::ConnectionAdapters::SchemaStatements#add_timestamps [ci skip]
2016-03-27 17:47:44 +05:30
Bogdan
359749ac2b Fix description for method ActiveRecord::ConnectionAdapters::SchemaStatements#add_timestamps [ci skip] 2016-03-27 14:12:32 +03:00
Arun Agrawal
900d490c0a Merge pull request #24334 from mabras/master
remove old-dead link
2016-03-27 14:08:41 +05:30