Skip to content

Commit

Permalink
Fix rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
asatwal committed Jul 11, 2023
1 parent c2b31a9 commit 29a98c2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ Style/EachWithObject:

AllCops:
TargetRubyVersion: 2.7
StyleGuide:
Enabled: true
EnforcedStyle: gemspec
NewCops: enable
Exclude:
- 'spec/dummy/db/schema.rb'
Expand Down
10 changes: 9 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2022-06-24 12:31:36 UTC using RuboCop version 1.26.1.
# on 2023-07-11 11:46:02 UTC using RuboCop version 1.54.1.
# 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: 14
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
# SupportedStyles: Gemfile, gems.rb, gemspec
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
Gemspec/DevelopmentDependencies:
Exclude:
- 'dfe-analytics.gemspec'

# Offense count: 1
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require_relative './helpers'
require_relative 'helpers'

RSpec::Matchers.define :have_been_enqueued_as_analytics_events do
include DfE::Analytics::RSpec::Matchers::Helpers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require_relative './helpers'
require_relative 'helpers'

RSpec::Matchers.define :have_sent_analytics_event_types do |*event_types|
include DfE::Analytics::RSpec::Matchers::Helpers
Expand Down
1 change: 0 additions & 1 deletion spec/dfe/analytics/requests_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def index
end

ex.run

ensure
Rails.application.routes_reloader.reload!
end
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
config.active_support.report_deprecations = false

# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
config.log_formatter = Logger::Formatter.new

# Use a different logger for distributed setups.
# require "syslog/logger"
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

require_relative '../spec/support/json_schema_validator'

if ::Rails::VERSION::MAJOR >= 7
if Rails::VERSION::MAJOR >= 7
require 'active_support/testing/tagged_logging'

RSpec::Core::ExampleGroup.module_eval do
Expand Down

0 comments on commit 29a98c2

Please sign in to comment.