Skip to content

Commit

Permalink
Update rubocop → 1.55.1 (unknown) (#199)
Browse files Browse the repository at this point in the history
* Update rubocop to version 1.55.1

* rubocop autofixes

---------

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Konstantin Munteanu <[email protected]>
  • Loading branch information
depfu[bot] and mkon authored Aug 7, 2023
1 parent bba93bf commit 2f87332
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
matrix:
activesupport: ['6.1', '7.0']
rack: ['2.2', '3.0']
ruby: ['2.7', '3.1', '3.2']
ruby: ['3.0', '3.1', '3.2']
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AllCops:
NewCops: enable
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0

Gemspec/DevelopmentDependencies:
Enabled: false
Expand Down
4 changes: 2 additions & 2 deletions api_valve.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.homepage = 'https://github.com/mkon/api_valve'
s.summary = 'Lightweight ruby/rack API reverse proxy or gateway'
s.license = 'MIT'
s.required_ruby_version = '>= 2.7', '< 4'
s.required_ruby_version = '>= 3.0', '< 4'

s.files = Dir['lib/**/*', 'README.md']

Expand All @@ -22,7 +22,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rack-test', '~> 2.0'
s.add_development_dependency 'rackup'
s.add_development_dependency 'rspec', '~> 3.7'
s.add_development_dependency 'rubocop', '1.50.2'
s.add_development_dependency 'rubocop', '1.55.1'
s.add_development_dependency 'rubocop-rspec', '2.19.0'
s.add_development_dependency 'simplecov', '~> 0.16'
s.add_development_dependency 'timecop', '~> 0.9'
Expand Down
16 changes: 8 additions & 8 deletions lib/api_valve/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ def initialize
@registry = []
end

def insert_after(other, middleware, *args, &block)
@registry.insert position(other) + 1, to_item(middleware, *args, &block)
def insert_after(other, ...)
@registry.insert position(other) + 1, to_item(...)
end

def insert_before(other, middleware, *args, &block)
@registry.insert position(other), to_item(middleware, *args, &block)
def insert_before(other, ...)
@registry.insert position(other), to_item(...)
end

def to_app(root_app)
Expand All @@ -27,8 +27,8 @@ def to_s
@registry.map(&:klass).join("\n")
end

def use(middleware, *args, &block)
@registry << to_item(middleware, *args, &block)
def use(...)
@registry << to_item(...)
end

private
Expand All @@ -37,8 +37,8 @@ def position(klass)
@registry.index { |item| item.klass == klass }
end

def to_item(middleware, *args, &block)
Item.new(middleware, proc { |app| middleware.new(app, *args, &block) })
def to_item(middleware, ...)
Item.new(middleware, proc { |app| middleware.new(app, ...) })
end
end
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module RSpecMixin
include Rack::Test::Methods
end

require_relative './support/helper'
require_relative 'support/helper'

ApiValve.logger = ActiveSupport::TaggedLogging.new(Logger.new('/dev/null'))

Expand Down

0 comments on commit 2f87332

Please sign in to comment.