From eeb9fda8e27be6c5c0ff988e0cde2b3a489a2dca Mon Sep 17 00:00:00 2001 From: Jan Habermann Date: Fri, 25 Dec 2015 14:08:50 +0100 Subject: [ActionCable] remove not needed protected call and newlines --- actioncable/lib/action_cable/connection/base.rb | 9 +-------- actioncable/lib/action_cable/connection/subscriptions.rb | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'actioncable') diff --git a/actioncable/lib/action_cable/connection/base.rb b/actioncable/lib/action_cable/connection/base.rb index f7b18a85ae..977856d656 100644 --- a/actioncable/lib/action_cable/connection/base.rb +++ b/actioncable/lib/action_cable/connection/base.rb @@ -48,11 +48,9 @@ module ActionCable include InternalChannel include Authorization - attr_reader :server, :env, :subscriptions + attr_reader :server, :env, :subscriptions, :logger delegate :worker_pool, :pubsub, to: :server - attr_reader :logger - def initialize(server, env) @server, @env = server, env @@ -123,7 +121,6 @@ module ActionCable transmit ActiveSupport::JSON.encode(identifier: ActionCable::INTERNAL[:identifiers][:ping], message: Time.now.to_i) end - protected # The request that initiated the WebSocket connection is available here. This gives access to the environment, cookies, etc. def request @@ -138,8 +135,6 @@ module ActionCable request.cookie_jar end - - protected attr_reader :websocket attr_reader :message_buffer @@ -170,7 +165,6 @@ module ActionCable disconnect if respond_to?(:disconnect) end - def allow_request_origin? return true if server.config.disable_request_forgery_protection @@ -193,7 +187,6 @@ module ActionCable [ 404, { 'Content-Type' => 'text/plain' }, [ 'Page not found' ] ] end - # Tags are declared in the server but computed in the connection. This allows us per-connection tailored tags. def new_tagged_logger TaggedLoggerProxy.new server.logger, diff --git a/actioncable/lib/action_cable/connection/subscriptions.rb b/actioncable/lib/action_cable/connection/subscriptions.rb index 65d6634bb0..d7f95e6a62 100644 --- a/actioncable/lib/action_cable/connection/subscriptions.rb +++ b/actioncable/lib/action_cable/connection/subscriptions.rb @@ -49,7 +49,6 @@ module ActionCable find(data).perform_action ActiveSupport::JSON.decode(data['data']) end - def identifiers subscriptions.keys end -- cgit v1.2.3