diff --git a/.rubocop.yml b/.rubocop.yml index 7b1dee2..e459f68 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,6 +10,8 @@ AllCops: - 'spec/dummy/**/*' - 'tmp/**/*' - 'bench/**/*' + - 'vendor/**/*' + - 'gemfiles/**/*' - 'lib/anycable/rpc/**/*' - 'Rakefile' - 'Gemfile' @@ -27,6 +29,9 @@ Style/Documentation: Exclude: - 'spec/**/*.rb' +Style/FormatString: + Enabled: false + Style/StringLiterals: Enabled: false diff --git a/Rakefile b/Rakefile index c92b11e..c749b00 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,8 @@ require "bundler/gem_tasks" require "rspec/core/rake_task" +require "rubocop/rake_task" RSpec::Core::RakeTask.new(:spec) +RuboCop::RakeTask.new -task default: :spec +task default: [:rubocop, :spec] diff --git a/anycable-rails.gemspec b/anycable-rails.gemspec index e24cfad..bdb6e7c 100644 --- a/anycable-rails.gemspec +++ b/anycable-rails.gemspec @@ -25,5 +25,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rake", "~> 10.0" spec.add_development_dependency "rspec", ">= 3.4" spec.add_development_dependency "simplecov", ">= 0.3.8" + spec.add_development_dependency "rubocop", ">= 0.50" spec.add_development_dependency "pry-byebug" end diff --git a/lib/anycable/rails/actioncable/connection.rb b/lib/anycable/rails/actioncable/connection.rb index 0a7a46e..5def42e 100644 --- a/lib/anycable/rails/actioncable/connection.rb +++ b/lib/anycable/rails/actioncable/connection.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "action_cable/connection" require "anycable/rails/refinements/subscriptions" require "anycable/rails/actioncable/channel"