mirror of https://github.com/rails/rails
Enforce frozen string in Rubocop
This commit is contained in:
parent
5fe2a4f929
commit
cfade1ec7e
|
@ -97,6 +97,10 @@ Style/StringLiterals:
|
|||
Enabled: true
|
||||
EnforcedStyle: double_quotes
|
||||
|
||||
Style/FrozenStringLiteralComment:
|
||||
Enabled: true
|
||||
EnforcedStyle: always
|
||||
|
||||
# Detect hard tabs, no hard tabs.
|
||||
Layout/Tab:
|
||||
Enabled: true
|
||||
|
|
1
Gemfile
1
Gemfile
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
source "https://rubygems.org"
|
||||
|
||||
git_source(:github) do |repo_name|
|
||||
|
|
1
Rakefile
1
Rakefile
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "net/http"
|
||||
|
||||
$:.unshift __dir__
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "rake/testtask"
|
||||
require "pathname"
|
||||
require "open3"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
COMPONENT_ROOT = File.expand_path("..", __dir__)
|
||||
require_relative "../../tools/test"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
#--
|
||||
# Copyright (c) 2015-2017 Basecamp, LLC
|
||||
#
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module Channel
|
||||
extend ActiveSupport::Autoload
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "set"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "active_support/core_ext/object/to_param"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "active_support/callbacks"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module Channel
|
||||
module Naming
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module Channel
|
||||
module PeriodicTimers
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# 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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module Connection
|
||||
extend ActiveSupport::Autoload
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module Connection
|
||||
module Authorization
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "action_dispatch"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "websocket/driver"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "set"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module Connection
|
||||
# Makes it possible for the RemoteConnection to disconnect a specific connection.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# 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.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "thread"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "nio"
|
||||
require "thread"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "active_support/core_ext/hash/indifferent_access"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# 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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "websocket/driver"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "rails"
|
||||
require "action_cable"
|
||||
require "action_cable/helpers/action_cable_helper"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# 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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module Helpers
|
||||
module ActionCableHelper
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# 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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module Server
|
||||
extend ActiveSupport::Autoload
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "monitor"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# 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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# 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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# 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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "active_support/callbacks"
|
||||
require "active_support/core_ext/module/attribute_accessors_per_thread"
|
||||
require "concurrent"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module Server
|
||||
class Worker
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module SubscriptionAdapter
|
||||
extend ActiveSupport::Autoload
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "action_cable/subscription_adapter/inline"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module SubscriptionAdapter
|
||||
class Base
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module SubscriptionAdapter
|
||||
module ChannelPrefix # :nodoc:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "thread"
|
||||
|
||||
gem "em-hiredis", "~> 0.3.0"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module SubscriptionAdapter
|
||||
class Inline < Base # :nodoc:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
gem "pg", "~> 0.18"
|
||||
require "pg"
|
||||
require "thread"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "thread"
|
||||
|
||||
gem "redis", "~> 3.0"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionCable
|
||||
module SubscriptionAdapter
|
||||
class SubscriberMap
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require_relative "gem_version"
|
||||
|
||||
module ActionCable
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Rails
|
||||
module Generators
|
||||
class ChannelGenerator < NamedBase
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_connection"
|
||||
require "stubs/room"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_connection"
|
||||
require "stubs/room"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
|
||||
class ActionCable::Channel::NamingTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_connection"
|
||||
require "stubs/room"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_connection"
|
||||
require "stubs/room"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_connection"
|
||||
require "stubs/room"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "concurrent"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_server"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_server"
|
||||
require "active_support/core_ext/object/json"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_server"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_server"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_server"
|
||||
require "stubs/user"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_server"
|
||||
require "stubs/user"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_server"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_server"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
|
||||
class ActionCable::Connection::SubscriptionsTest < ActionCable::TestCase
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_server"
|
||||
require "active_support/core_ext/hash/indifferent_access"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_server"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
class GlobalID
|
||||
attr_reader :uri
|
||||
delegate :to_param, :to_s, to: :uri
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
class Room
|
||||
attr_reader :id, :name
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
class SuccessAdapter < ActionCable::SubscriptionAdapter::Base
|
||||
def broadcast(channel, payload)
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "stubs/user"
|
||||
|
||||
class TestConnection
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "ostruct"
|
||||
|
||||
class TestServer
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
class User
|
||||
attr_reader :name
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require_relative "common"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "stubs/test_server"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
|
||||
class ActionCable::Server::WithIndependentConfig < ActionCable::Server::Base
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require "concurrent"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require_relative "common"
|
||||
require_relative "channel_prefix"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require_relative "common"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require_relative "common"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
require_relative "common"
|
||||
require_relative "channel_prefix"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
|
||||
class SubscriberMapTest < ActionCable::TestCase
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "action_cable"
|
||||
require "active_support/testing/autorun"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "test_helper"
|
||||
|
||||
class WorkerTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "rake/testtask"
|
||||
|
||||
desc "Default Task"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
COMPONENT_ROOT = File.expand_path("..", __dir__)
|
||||
require_relative "../../tools/test"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
#--
|
||||
# Copyright (c) 2004-2017 David Heinemeier Hansson
|
||||
#
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "mail"
|
||||
require "action_mailer/collector"
|
||||
require "active_support/core_ext/string/inflections"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "abstract_controller/collector"
|
||||
require "active_support/core_ext/hash/reverse_merge"
|
||||
require "active_support/core_ext/array/extract_options"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "active_job"
|
||||
|
||||
module ActionMailer
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "tmpdir"
|
||||
|
||||
module ActionMailer
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionMailer
|
||||
# Returns the version of the currently loaded Action Mailer as a <tt>Gem::Version</tt>.
|
||||
def self.gem_version
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "base64"
|
||||
|
||||
module ActionMailer
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "active_support/log_subscriber"
|
||||
|
||||
module ActionMailer
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionMailer
|
||||
# Provides helper methods for ActionMailer::Base that can be used for easily
|
||||
# formatting messages, accessing mailer or message instances, and the
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "delegate"
|
||||
|
||||
module ActionMailer
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionMailer
|
||||
# Provides the option to parameterize mailers in order to share instance variable
|
||||
# setup, processing, and common headers.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "active_support/descendants_tracker"
|
||||
|
||||
module ActionMailer
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "active_job/railtie"
|
||||
require "action_mailer"
|
||||
require "rails"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module ActionMailer #:nodoc:
|
||||
# Provides `rescue_from` for mailers. Wraps mailer action processing,
|
||||
# mail job processing, and mail delivery.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue