Skip to content

Commit d17e46b

Browse files
committed
Rubocop defaults
1 parent 484d77b commit d17e46b

File tree

6 files changed

+69
-16
lines changed

6 files changed

+69
-16
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@
99

1010
# rspec failure tracking
1111
.rspec_status
12+
13+
.rubocop-*

.rubocop.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
AllCops:
2-
TargetRubyVersion: 2.6
3-
4-
Style/StringLiterals:
5-
Enabled: true
6-
EnforcedStyle: double_quotes
1+
inherit_from:
2+
- https://raw.githubusercontent.com/cookpad/guides/master/.rubocop.yml
73

8-
Style/StringLiteralsInInterpolation:
9-
Enabled: true
10-
EnforcedStyle: double_quotes
4+
AllCops:
5+
TargetRubyVersion: 3.0
6+
NewCops: enable
7+
Exclude:
8+
- vendor/**/*
9+
- vendor/**/.*
1110

12-
Layout/LineLength:
13-
Max: 120
11+
Style/TrailingCommaInHashLiteral:
12+
EnforcedStyleForMultiline: comma
13+
Style/TrailingCommaInArguments:
14+
EnforcedStyleForMultiline: comma
15+
RSpec/DescribedClass:
16+
Enabled: false
17+
Gemspec/DevelopmentDependencies:
18+
Enabled: false

Gemfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ source "https://rubygems.org"
66
gemspec
77

88
gem "rake", "~> 13.0"
9-
109
gem "rspec", "~> 3.0"
11-
1210
gem "rubocop", "~> 1.21"
11+
gem "rubocop-performance"
12+
gem "rubocop-rails"
13+
gem "rubocop-rspec"

Gemfile.lock

+44
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,35 @@ PATH
66
GEM
77
remote: https://rubygems.org/
88
specs:
9+
activesupport (7.1.3.3)
10+
base64
11+
bigdecimal
12+
concurrent-ruby (~> 1.0, >= 1.0.2)
13+
connection_pool (>= 2.2.5)
14+
drb
15+
i18n (>= 1.6, < 2)
16+
minitest (>= 5.1)
17+
mutex_m
18+
tzinfo (~> 2.0)
919
ast (2.4.2)
20+
base64 (0.2.0)
21+
bigdecimal (3.1.8)
22+
concurrent-ruby (1.3.1)
23+
connection_pool (2.4.1)
1024
diff-lcs (1.5.1)
25+
drb (2.2.1)
26+
i18n (1.14.5)
27+
concurrent-ruby (~> 1.0)
1128
json (2.7.2)
1229
language_server-protocol (3.17.0.3)
30+
minitest (5.23.1)
31+
mutex_m (0.2.0)
1332
parallel (1.24.0)
1433
parser (3.3.1.0)
1534
ast (~> 2.4.1)
1635
racc
1736
racc (1.7.3)
37+
rack (3.0.11)
1838
rainbow (3.1.1)
1939
rake (13.2.1)
2040
regexp_parser (2.9.0)
@@ -46,8 +66,29 @@ GEM
4666
unicode-display_width (>= 2.4.0, < 3.0)
4767
rubocop-ast (1.31.3)
4868
parser (>= 3.3.1.0)
69+
rubocop-capybara (2.20.0)
70+
rubocop (~> 1.41)
71+
rubocop-factory_bot (2.25.1)
72+
rubocop (~> 1.41)
73+
rubocop-performance (1.21.0)
74+
rubocop (>= 1.48.1, < 2.0)
75+
rubocop-ast (>= 1.31.1, < 2.0)
76+
rubocop-rails (2.25.0)
77+
activesupport (>= 4.2.0)
78+
rack (>= 1.1)
79+
rubocop (>= 1.33.0, < 2.0)
80+
rubocop-ast (>= 1.31.1, < 2.0)
81+
rubocop-rspec (2.29.2)
82+
rubocop (~> 1.40)
83+
rubocop-capybara (~> 2.17)
84+
rubocop-factory_bot (~> 2.22)
85+
rubocop-rspec_rails (~> 2.28)
86+
rubocop-rspec_rails (2.28.3)
87+
rubocop (~> 1.40)
4988
ruby-progressbar (1.13.0)
5089
strscan (3.1.0)
90+
tzinfo (2.0.6)
91+
concurrent-ruby (~> 1.0)
5192
unicode-display_width (2.5.0)
5293

5394
PLATFORMS
@@ -59,6 +100,9 @@ DEPENDENCIES
59100
rake (~> 13.0)
60101
rspec (~> 3.0)
61102
rubocop (~> 1.21)
103+
rubocop-performance
104+
rubocop-rails
105+
rubocop-rspec
62106

63107
BUNDLED WITH
64108
2.5.7

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ require "rubocop/rake_task"
99

1010
RuboCop::RakeTask.new
1111

12-
task default: %i[spec rubocop]
12+
task default: %i(spec rubocop)

millrace.gemspec

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
1212
spec.description = "Leaky bucket rate limiting for Action Controller before filters"
1313
spec.homepage = "https://github.com/errm/millrace"
1414
spec.license = "MIT"
15-
spec.required_ruby_version = ">= 2.6.0"
15+
spec.required_ruby_version = ">= 3.0.0"
1616

1717
spec.metadata["allowed_push_host"] = "https://rubygems.org"
1818

@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
2525
spec.files = Dir.chdir(__dir__) do
2626
`git ls-files -z`.split("\x0").reject do |f|
2727
(File.expand_path(f) == __FILE__) ||
28-
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github Gemfile])
28+
f.start_with?(*%w(bin/ test/ spec/ features/ .git .github Gemfile))
2929
end
3030
end
3131
spec.bindir = "exe"
@@ -37,4 +37,5 @@ Gem::Specification.new do |spec|
3737

3838
# For more information and examples about making a new gem, check out our
3939
# guide at: https://bundler.io/guides/creating_gem.html
40+
spec.metadata["rubygems_mfa_required"] = "true"
4041
end

0 commit comments

Comments
 (0)