From f2891c2d6a6e7199f67966bad2346f05cfe3b79a Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Wed, 23 May 2018 15:56:43 +0200 Subject: [PATCH] Better rubocop configuration --- .rubocop.yml | 6 +++--- Gemfile | 2 +- Gemfile.lock | 2 +- app/mailers/application_mailer.rb | 4 ++-- test/controllers/pages_controller_test.rb | 2 +- test/test_helper.rb | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index e432d92..561fa69 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,9 +1,9 @@ AllCops: TargetRubyVersion: 2.5 - Include: - - '**/Rakefile' - - '**/config.ru' Exclude: + - 'node_modules/**/*' + - 'vendor/**/*' + - '.git/**/*' - 'lib/tasks/auto_annotate_models.rake' - 'db/**/*' - 'config/**/*' diff --git a/Gemfile b/Gemfile index e9bddfc..93e6ce1 100644 --- a/Gemfile +++ b/Gemfile @@ -47,7 +47,7 @@ group :development do gem 'spring-watcher-listen', '~> 2.0.0' gem 'capistrano-rails' - gem 'rubocop', '~> 0.56' + gem 'rubocop', '~> 0.56.0', require: false end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index f154bd0..21a4492 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -241,7 +241,7 @@ DEPENDENCIES puma (~> 3.11) rails (~> 5.2.0) rails-i18n (~> 5.1) - rubocop (~> 0.56) + rubocop (~> 0.56.0) sass-rails (~> 5.0) selenium-webdriver spring diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 286b223..3c34c81 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,4 +1,4 @@ class ApplicationMailer < ActionMailer::Base - default from: 'from@example.com' - layout 'mailer' + default from: "from@example.com" + layout "mailer" end diff --git a/test/controllers/pages_controller_test.rb b/test/controllers/pages_controller_test.rb index 077e275..1e37156 100644 --- a/test/controllers/pages_controller_test.rb +++ b/test/controllers/pages_controller_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require "test_helper" class PagesControllerTest < ActionDispatch::IntegrationTest test "home loads without error" do diff --git a/test/test_helper.rb b/test/test_helper.rb index 3ab84e3..e92cf16 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,6 +1,6 @@ -ENV['RAILS_ENV'] ||= 'test' -require_relative '../config/environment' -require 'rails/test_help' +ENV["RAILS_ENV"] ||= "test" +require_relative "../config/environment" +require "rails/test_help" class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.