From 213e7bebabbbeefd88563b0ffa975bc568767d7a Mon Sep 17 00:00:00 2001 From: rhymes Date: Mon, 25 Nov 2019 20:13:22 +0100 Subject: [PATCH] Routine rubocop fixes (#4924) Ran rubocop -a and rubocop --auto-gen-config --- .rubocop_todo.yml | 15 ++++++++++----- spec/factories/activesupport_events.rb | 2 +- spec/factories/webhook_endpoints.rb | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f13b05e88..83c63a332 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,12 +1,12 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2019-11-19 11:07:38 +0100 using RuboCop version 0.76.0. +# on 2019-11-25 17:24:08 +0100 using RuboCop version 0.76.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 232 +# Offense count: 230 Metrics/AbcSize: Max: 75 @@ -31,11 +31,16 @@ RSpec/ExampleLength: - 'spec/requests/api/v0/articles_spec.rb' - 'spec/requests/display_ad_events_spec.rb' -# Offense count: 452 +# Offense count: 455 # Configuration parameters: AggregateFailuresByDefault. RSpec/MultipleExpectations: Max: 8 +# Offense count: 1 +RSpec/SubjectStub: + Exclude: + - 'spec/models/article_spec.rb' + # Offense count: 1 # Configuration parameters: Include. # Include: app/helpers/**/*.rb @@ -56,7 +61,7 @@ Rails/OutputSafety: - 'app/models/message.rb' - 'app/views/articles/feed.rss.builder' -# Offense count: 24 +# Offense count: 25 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, EnforcedStyle. # SupportedStyles: nested, compact @@ -69,7 +74,7 @@ Style/GuardClause: Exclude: - 'app/models/article.rb' -# Offense count: 3185 +# Offense count: 3216 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https diff --git a/spec/factories/activesupport_events.rb b/spec/factories/activesupport_events.rb index 955db904a..f01acc961 100644 --- a/spec/factories/activesupport_events.rb +++ b/spec/factories/activesupport_events.rb @@ -1,5 +1,5 @@ FactoryBot.define do - factory :activesupport_event, class: ActiveSupport::Notifications::Event do + factory :activesupport_event, class: "ActiveSupport::Notifications::Event" do name { "audit.log" } time { Timecop.freeze(Time.zone.now) } ending { time + 10.seconds } diff --git a/spec/factories/webhook_endpoints.rb b/spec/factories/webhook_endpoints.rb index 3e278e03c..06ce91bc2 100644 --- a/spec/factories/webhook_endpoints.rb +++ b/spec/factories/webhook_endpoints.rb @@ -1,5 +1,5 @@ FactoryBot.define do - factory :webhook_endpoint, class: Webhook::Endpoint do + factory :webhook_endpoint, class: "Webhook::Endpoint" do target_url { Faker::Internet.url(scheme: "https") } events { Webhook::Event::EVENT_TYPES } user