From 4bdb0972c20768a53afc7a1398ad0ba68ffcb06c Mon Sep 17 00:00:00 2001 From: Justin Hart Date: Wed, 16 Oct 2024 12:56:39 -0700 Subject: [PATCH] rubocop corrections --- .github/workflows/rubocop.yml | 19 +++++++++++++------ .rubocop.yml | 2 ++ Gemfile | 1 - Rakefile | 1 - exe/resque-scheduler | 1 - resque-scheduler.gemspec | 13 ++++++------- 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 4836bf71..ace1b08e 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -6,22 +6,29 @@ on: pull_request: branches: [master] +# This allows a subsequently queued workflow run to interrupt previous runs +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true + jobs: rubocop: name: Rubocop - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - os: [ubuntu-latest] - ruby: [ - 2.7 - ] + ruby-version: + # - "3.0" + # - "3.1" + # - "3.2" + - "3.3" steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby }} + ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - name: Ruby linter run: bundle exec rubocop diff --git a/.rubocop.yml b/.rubocop.yml index 26a0a3d0..d01a218f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -19,3 +19,5 @@ Metrics/PerceivedComplexity: Enabled: false Metrics/ClassLength: Max: 110 +Style/FrozenStringLiteralComment: + Enabled: false diff --git a/Gemfile b/Gemfile index e11c648f..8e980e49 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,3 @@ -# vim:fileencoding=utf-8 source 'https://rubygems.org' case resque_version = ENV.fetch('RESQUE', 'latest') diff --git a/Rakefile b/Rakefile index 763604e0..cd3a078b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,3 @@ -# vim:fileencoding=utf-8 require 'bundler/gem_tasks' require 'rake/testtask' require 'yard' diff --git a/exe/resque-scheduler b/exe/resque-scheduler index f26121d1..2c34d5e8 100755 --- a/exe/resque-scheduler +++ b/exe/resque-scheduler @@ -1,5 +1,4 @@ #!/usr/bin/env ruby -# vim:fileencoding=utf-8 require 'resque-scheduler' Resque::Scheduler::Cli.run! diff --git a/resque-scheduler.gemspec b/resque-scheduler.gemspec index 27f8eb34..e9e7b1cc 100644 --- a/resque-scheduler.gemspec +++ b/resque-scheduler.gemspec @@ -1,5 +1,4 @@ -# vim:fileencoding=utf-8 -lib = File.expand_path('../lib', __FILE__) +lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'resque/scheduler/version' @@ -13,15 +12,15 @@ Gem::Specification.new do |spec| Dan Buch Michael Bianco Patrick Tulskie - EOF - spec.email = %w( + AUTHORS + spec.email = %w[ bvandenbos@gmail.com sirup@sirupsen.com ryan@yaauie.com dan@meatballhat.com mike@mikebian.co patricktulskie@gmail.com - ) + ] spec.summary = 'Light weight job scheduling on top of Resque' spec.description = <<-DESCRIPTION Light weight job scheduling on top of Resque. @@ -32,7 +31,7 @@ Gem::Specification.new do |spec| spec.license = 'MIT' spec.metadata['rubygems_mfa_required'] = 'true' - spec.required_ruby_version = '>= 2.3.0' + spec.required_ruby_version = '>= 3.0.0' spec.files = `git ls-files -z`.split("\0").reject do |f| f.match(%r{^(test|spec|features|examples|bin|tasks)/}) || @@ -41,7 +40,7 @@ Gem::Specification.new do |spec| end spec.bindir = 'exe' spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } - spec.require_paths = %w(lib) + spec.require_paths = %w[lib] spec.add_dependency 'mono_logger', '~> 1.0' spec.add_dependency 'redis', '>= 3.3'