Skip to content

Commit

Permalink
Rubocop defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
errm committed May 29, 2024
1 parent 484d77b commit d17e46b
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@

# rspec failure tracking
.rspec_status

.rubocop-*
27 changes: 16 additions & 11 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
AllCops:
TargetRubyVersion: 2.6

Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
inherit_from:
- https://raw.githubusercontent.com/cookpad/guides/master/.rubocop.yml

Style/StringLiteralsInInterpolation:
Enabled: true
EnforcedStyle: double_quotes
AllCops:
TargetRubyVersion: 3.0
NewCops: enable
Exclude:
- vendor/**/*
- vendor/**/.*

Layout/LineLength:
Max: 120
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
RSpec/DescribedClass:
Enabled: false
Gemspec/DevelopmentDependencies:
Enabled: false
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ source "https://rubygems.org"
gemspec

gem "rake", "~> 13.0"

gem "rspec", "~> 3.0"

gem "rubocop", "~> 1.21"
gem "rubocop-performance"
gem "rubocop-rails"
gem "rubocop-rspec"
44 changes: 44 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,35 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.8)
concurrent-ruby (1.3.1)
connection_pool (2.4.1)
diff-lcs (1.5.1)
drb (2.2.1)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
minitest (5.23.1)
mutex_m (0.2.0)
parallel (1.24.0)
parser (3.3.1.0)
ast (~> 2.4.1)
racc
racc (1.7.3)
rack (3.0.11)
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.0)
Expand Down Expand Up @@ -46,8 +66,29 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-performance (1.21.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.25.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.29.2)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.28.3)
rubocop (~> 1.40)
ruby-progressbar (1.13.0)
strscan (3.1.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)

PLATFORMS
Expand All @@ -59,6 +100,9 @@ DEPENDENCIES
rake (~> 13.0)
rspec (~> 3.0)
rubocop (~> 1.21)
rubocop-performance
rubocop-rails
rubocop-rspec

BUNDLED WITH
2.5.7
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ require "rubocop/rake_task"

RuboCop::RakeTask.new

task default: %i[spec rubocop]
task default: %i(spec rubocop)
5 changes: 3 additions & 2 deletions millrace.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.description = "Leaky bucket rate limiting for Action Controller before filters"
spec.homepage = "https://github.com/errm/millrace"
spec.license = "MIT"
spec.required_ruby_version = ">= 2.6.0"
spec.required_ruby_version = ">= 3.0.0"

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

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

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

0 comments on commit d17e46b

Please sign in to comment.