Sha256: fc71abee351ed5ab97dbd4b7518a93a6ba2aaf39d0ff89ccd824a7f7cb1c9e2b

Contents?: true

Size: 974 Bytes

Versions: 8

Compression:

Stored size: 974 Bytes

Contents

# frozen_string_literal: true

require "rubocop"
require "pathname"

require_relative "rubocop/cops/anycable/stream_from"
require_relative "rubocop/cops/anycable/remote_disconnect"
require_relative "rubocop/cops/anycable/periodical_timers"
require_relative "rubocop/cops/anycable/instance_vars"

module RuboCop
  module AnyCable # :nodoc:
    CONFIG_DEFAULT = Pathname.new(__dir__).join("rubocop", "config", "default.yml").freeze

    # Merge anycable config into default configuration
    # See https://github.com/backus/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
    def self.inject!
      path = CONFIG_DEFAULT.to_s
      puts "configuration from #{path}" if ConfigLoader.debug?
      hash = ConfigLoader.send(:load_yaml_configuration, path)
      config = Config.new(hash, path)
      config = ConfigLoader.merge_with_default(config, path)
      ConfigLoader.instance_variable_set(:@default_configuration, config)
    end
  end
end

RuboCop::AnyCable.inject!

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
anycable-rails-1.0.0.preview2 lib/anycable/rails/compatibility/rubocop.rb
anycable-rails-1.0.0.preview1 lib/anycable/rails/compatibility/rubocop.rb
anycable-rails-0.6.5 lib/anycable/rails/compatibility/rubocop.rb
anycable-rails-0.6.4 lib/anycable/rails/compatibility/rubocop.rb
anycable-rails-0.6.3 lib/anycable/rails/compatibility/rubocop.rb
anycable-rails-0.6.2 lib/anycable/rails/compatibility/rubocop.rb
anycable-rails-0.6.1 lib/anycable/rails/compatibility/rubocop.rb
anycable-rails-0.6.0.rc1 lib/anycable/rails/compatibility/rubocop.rb