1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

20 commits

Author SHA1 Message Date
Daniel Colson
94333a4c31 Use assert_predicate and assert_not_predicate 2018-01-25 23:32:59 -05:00
Kir Shatrov
385825fb70 Use frozen string literal in actioncable/ 2017-07-23 23:30:29 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
palkan
3e68d8b872 Add Channel#ensure_confirmation_sent; call #subscribe_to_channel after initializing 2016-09-22 20:25:09 +03:00
palkan
03a209e92a [Fix #25381] Avoid race condition on subscription confirmation 2016-09-20 19:42:24 +03:00
Rafael Mendonça França
55f9b8129a
Add three new rubocop rules
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces

Fix all violations in the repository.
2016-08-16 04:30:11 -03:00
Xavier Noria
411ccbdab2 remove redundant curlies from hash arguments 2016-08-06 19:44:11 +02:00
Xavier Noria
f8477f13bf applies new string literal convention in actioncable/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:15:15 +02:00
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
Matthew Wear
09a1321d5b Add AS::Notifications and LogSubscriber to ActionCable::Channel
This commit adds ActiveSupport::Notifications instrumentation hooks
and a LogSuscriber to ActionCable::Channel::Base.
2016-03-04 14:47:54 -08:00
Akshay Vishnoi
0e5b6d5958 [ActionCable] declare asset_logged private 2015-12-19 04:14:58 +05:30
Kasper Timm Hansen
1c47f7d184 Merge pull request #22668 from ryohashimoto/151219_receive
Fix `receive` spelling
2015-12-18 17:28:31 +01:00
Ryo Hashimoto
161dc68599 Fix receive spelling 2015-12-19 01:09:16 +09:00
Rafael França
905a2a176b Merge pull request #22667 from akshay-vishnoi/base_test_case
[ActionCable] Test invalid action on channel
2015-12-18 14:07:55 -02:00
Kasper Timm Hansen
6a2c3c4c83 Fix receive spelling and add whitespace
Found `recieve` next to the correctly spelled method name, fixed it.

Also we prefer a one space padding within hashes, add that.
2015-12-18 16:53:04 +01:00
Akshay Vishnoi
46adddbfb5 [ActionCable] Test invalid action on channel 2015-12-18 21:10:06 +05:30
Akshay Vishnoi
fef41f40b6 [ActionCable] test perform action with default action 2015-12-18 20:45:43 +05:30
Akshay Vishnoi
db36507644 [ActionCable] Test available actions on Channel 2015-12-18 20:02:45 +05:30
David Heinemeier Hansson
bf40bddfce Get ready to merge into Rails 2015-12-14 15:48:54 +01:00
Renamed from test/channel/base_test.rb (Browse further)