Skip to content

Commit 8e8109d

Browse files
committed
RuboCop improvements
1 parent f0a6baf commit 8e8109d

6 files changed

Lines changed: 35 additions & 22 deletions

File tree

.hound.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.rubocop.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
inherit_from:
2+
- .rubocop_todo.yml
23
- https://relaxed.ruby.style/rubocop.yml
34

5+
6+
47
require: rubocop-rspec
58

69
AllCops:
7-
TargetRubyVersion: 2.5
10+
NewCops: enable
811
Exclude:
912
- bin/*
1013
- db/schema.rb
1114
- spec/dummy/**/*
1215
- vendor/**/*
16+
TargetRubyVersion: 2.7
1317

1418
Gemspec/RequiredRubyVersion:
1519
Enabled: false
1620

17-
Metrics/LineLength:
21+
Layout/LineLength:
1822
Enabled: true
1923
Max: 120
2024

.rubocop_todo.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2021-04-28 06:26:05 UTC using RuboCop version 1.13.0.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 1
10+
# Configuration parameters: AllowComments, AllowEmptyLambdas.
11+
Lint/EmptyBlock:
12+
Exclude:
13+
- 'spec/tasks/active_storage_db_tasks_spec.rb'
14+
15+
# Offense count: 1
16+
Lint/MissingSuper:
17+
Exclude:
18+
- 'lib/active_storage/service/db_service.rb'
19+
20+
# Offense count: 1
21+
# Cop supports --auto-correct.
22+
Style/KeywordParametersOrder:
23+
Exclude:
24+
- 'spec/requests/file_controller_spec.rb'

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ group :development, :test do
1313
gem 'pg', '~> 1.2'
1414
gem 'rspec_junit_formatter', '~> 0.4'
1515
gem 'rspec-rails', '~> 4.0'
16-
gem 'rubocop', '~> 0.91'
17-
gem 'rubocop-rspec', '~> 1.42'
16+
gem 'rubocop', '1.13'
17+
gem 'rubocop-rspec', '2.2.0'
1818
gem 'selenium-webdriver', '~> 3.142'
1919
gem 'simplecov', '~> 0.18'
2020

spec/support/shared_contexts/rake_context.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
shared_context 'rake context' do
3+
shared_context 'with rake tasks' do
44
Rails.application.load_tasks
55

66
def execute_task(task, args = nil)

spec/tasks/active_storage_db_tasks_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

3-
RSpec.describe 'active_storage_db_tasks' do
4-
include_context 'rake context'
3+
RSpec.describe 'ActiveStorageDB tasks' do # rubocop:disable RSpec/DescribeClass
4+
include_context 'with rake tasks'
55

66
describe 'asdb:ls' do
77
subject(:task) { execute_task('asdb:ls') }

0 commit comments

Comments
 (0)