提交 934327e1 编写于 作者: S Sean Griffin 提交者: GitHub

Merge pull request #29820 from kirs/frozen-actioncable

Use frozen string literal in actioncable/
......@@ -89,6 +89,7 @@ Style/FrozenStringLiteralComment:
Include:
- 'activesupport/**/*'
- 'activemodel/**/*'
- 'actioncable/**/*'
- 'activejob/**/*'
- 'activerecord/**/*'
- 'actionmailer/**/*'
......
# frozen_string_literal: true
require "rake/testtask"
require "pathname"
require "open3"
......
# frozen_string_literal: true
version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip
Gem::Specification.new do |s|
......
#!/usr/bin/env ruby
# frozen_string_literal: true
COMPONENT_ROOT = File.expand_path("..", __dir__)
require_relative "../../tools/test"
# frozen_string_literal: true
#--
# Copyright (c) 2015-2017 Basecamp, LLC
#
......
# frozen_string_literal: true
module ActionCable
module Channel
extend ActiveSupport::Autoload
......
......@@ -270,7 +270,7 @@ def dispatch_action(action, data)
end
def action_signature(action, data)
"#{self.class.name}##{action}".tap do |signature|
"#{self.class.name}##{action}".dup.tap do |signature|
if (arguments = data.except("action")).any?
signature << "(#{arguments.inspect})"
end
......
# frozen_string_literal: true
require "active_support/core_ext/object/to_param"
module ActionCable
......
# frozen_string_literal: true
require "active_support/callbacks"
module ActionCable
......
# frozen_string_literal: true
module ActionCable
module Channel
module Naming
......
# frozen_string_literal: true
module ActionCable
module Channel
module PeriodicTimers
......
# frozen_string_literal: true
module ActionCable
module Channel
# Streams allow channels to route broadcastings to the subscriber. A broadcasting is, as discussed elsewhere, a pubsub queue where any data
......
# frozen_string_literal: true
module ActionCable
module Connection
extend ActiveSupport::Autoload
......
# frozen_string_literal: true
module ActionCable
module Connection
module Authorization
......
# frozen_string_literal: true
require "action_dispatch"
module ActionCable
......
# frozen_string_literal: true
require "websocket/driver"
module ActionCable
......
# frozen_string_literal: true
require "set"
module ActionCable
......
# frozen_string_literal: true
module ActionCable
module Connection
# Makes it possible for the RemoteConnection to disconnect a specific connection.
......
# frozen_string_literal: true
module ActionCable
module Connection
# Allows us to buffer messages received from the WebSocket before the Connection has been fully initialized, and is ready to receive them.
......
# frozen_string_literal: true
require "thread"
module ActionCable
......
# frozen_string_literal: true
require "nio"
require "thread"
......
# frozen_string_literal: true
require "active_support/core_ext/hash/indifferent_access"
module ActionCable
......
# frozen_string_literal: true
module ActionCable
module Connection
# Allows the use of per-connection tags against the server logger. This wouldn't work using the traditional
......
# frozen_string_literal: true
require "websocket/driver"
module ActionCable
......
# frozen_string_literal: true
require "rails"
require "action_cable"
require_relative "helpers/action_cable_helper"
......
# frozen_string_literal: true
module ActionCable
# Returns the version of the currently loaded Action Cable as a <tt>Gem::Version</tt>.
def self.gem_version
......
# frozen_string_literal: true
module ActionCable
module Helpers
module ActionCableHelper
......
# frozen_string_literal: true
module ActionCable
# If you need to disconnect a given connection, you can go through the
# RemoteConnections. You can find the connections you're looking for by
......
# frozen_string_literal: true
module ActionCable
module Server
extend ActiveSupport::Autoload
......
# frozen_string_literal: true
require "monitor"
module ActionCable
......
# frozen_string_literal: true
module ActionCable
module Server
# Broadcasting is how other parts of your application can send messages to a channel's subscribers. As explained in Channel, most of the time, these
......
# frozen_string_literal: true
module ActionCable
module Server
# An instance of this configuration object is available via ActionCable.server.config, which allows you to tweak Action Cable configuration
......
# frozen_string_literal: true
module ActionCable
module Server
# Collection class for all the connections that have been established on this specific server. Remember, usually you'll run many Action Cable servers, so
......
# frozen_string_literal: true
require "active_support/callbacks"
require "active_support/core_ext/module/attribute_accessors_per_thread"
require "concurrent"
......
# frozen_string_literal: true
module ActionCable
module Server
class Worker
......
# frozen_string_literal: true
module ActionCable
module SubscriptionAdapter
extend ActiveSupport::Autoload
......
# frozen_string_literal: true
require_relative "inline"
module ActionCable
......
# frozen_string_literal: true
module ActionCable
module SubscriptionAdapter
class Base
......
# frozen_string_literal: true
module ActionCable
module SubscriptionAdapter
module ChannelPrefix # :nodoc:
......
# frozen_string_literal: true
require "thread"
gem "em-hiredis", "~> 0.3.0"
......
# frozen_string_literal: true
module ActionCable
module SubscriptionAdapter
class Inline < Base # :nodoc:
......
# frozen_string_literal: true
gem "pg", "~> 0.18"
require "pg"
require "thread"
......
# frozen_string_literal: true
require "thread"
gem "redis", "~> 3.0"
......
# frozen_string_literal: true
module ActionCable
module SubscriptionAdapter
class SubscriberMap
......
# frozen_string_literal: true
require_relative "gem_version"
module ActionCable
......
# frozen_string_literal: true
module Rails
module Generators
class ChannelGenerator < NamedBase
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_connection"
require "stubs/room"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_connection"
require "stubs/room"
......
# frozen_string_literal: true
require "test_helper"
class ActionCable::Channel::NamingTest < ActiveSupport::TestCase
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_connection"
require "stubs/room"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_connection"
require "stubs/room"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_connection"
require "stubs/room"
......
# frozen_string_literal: true
require "test_helper"
require "concurrent"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
require "active_support/core_ext/object/json"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
require "stubs/user"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
require "stubs/user"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
......
# frozen_string_literal: true
require "test_helper"
class ActionCable::Connection::SubscriptionsTest < ActionCable::TestCase
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
require "active_support/core_ext/hash/indifferent_access"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
......
# frozen_string_literal: true
class GlobalID
attr_reader :uri
delegate :to_param, :to_s, to: :uri
......
# frozen_string_literal: true
class Room
attr_reader :id, :name
......
# frozen_string_literal: true
class SuccessAdapter < ActionCable::SubscriptionAdapter::Base
def broadcast(channel, payload)
end
......
# frozen_string_literal: true
require "stubs/user"
class TestConnection
......
# frozen_string_literal: true
require "ostruct"
class TestServer
......
# frozen_string_literal: true
class User
attr_reader :name
......
# frozen_string_literal: true
require "test_helper"
require_relative "common"
......
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
......
# frozen_string_literal: true
require "test_helper"
class ActionCable::Server::WithIndependentConfig < ActionCable::Server::Base
......
# frozen_string_literal: true
require "test_helper"
require "concurrent"
......
# frozen_string_literal: true
require "test_helper"
require_relative "common"
require_relative "channel_prefix"
......
# frozen_string_literal: true
require "test_helper"
require_relative "common"
......
# frozen_string_literal: true
require "test_helper"
require_relative "common"
......
# frozen_string_literal: true
require "test_helper"
require_relative "common"
require_relative "channel_prefix"
......
# frozen_string_literal: true
require "test_helper"
class SubscriberMapTest < ActionCable::TestCase
......
# frozen_string_literal: true
require "action_cable"
require "active_support/testing/autorun"
......
# frozen_string_literal: true
require "test_helper"
class WorkerTest < ActiveSupport::TestCase
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册