Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CvX committed Jun 19, 2024
1 parent a2520a6 commit 0ba15c8
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
inherit_gem:
rubocop-discourse: .rubocop.yml
rubocop-discourse: stree-compat.yml
inherit_mode:
merge:
- Exclude
Expand Down
3 changes: 1 addition & 2 deletions lib/message_bus.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require "monitor"
require "set"

require_relative "message_bus/version"
require_relative "message_bus/message"
Expand Down Expand Up @@ -772,7 +771,7 @@ def global_subscribe_thread
globals, locals, local_globals, global_globals = nil

@mutex.synchronize do
return if @destroyed
return if @destroyed # rubocop:disable Lint/NonLocalExitFromIterator
next unless @subscriptions

globals = @subscriptions[nil]
Expand Down
1 change: 0 additions & 1 deletion lib/message_bus/backends/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ module Backends
#
# @abstract
class Base
# rubocop:disable Lint/UnusedMethodArgument

# Raised to indicate that the concrete backend implementation does not implement part of the API
ConcreteClassMustImplementError = Class.new(StandardError)
Expand Down
2 changes: 1 addition & 1 deletion lib/message_bus/backends/postgres.rb
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def global_subscribe(last_id = nil)
on.message do |_c, m|
if m == UNSUB_MESSAGE
@subscribed = false
return
return # rubocop:disable Lint/NonLocalExitFromIterator
end
m = MessageBus::Message.decode m

Expand Down
2 changes: 1 addition & 1 deletion lib/message_bus/backends/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def global_subscribe(last_id = nil, &blk)
if m == UNSUB_MESSAGE
@subscribed = false
global_redis.unsubscribe
return
return # rubocop:disable Lint/NonLocalExitFromIterator
end
m = MessageBus::Message.decode m

Expand Down
2 changes: 1 addition & 1 deletion message_bus.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'byebug'
gem.add_development_dependency 'oj'
gem.add_development_dependency 'yard'
gem.add_development_dependency 'rubocop-discourse'
gem.add_development_dependency 'rubocop-discourse', '3.8.1'
gem.add_development_dependency 'rubocop-rspec'
end
2 changes: 1 addition & 1 deletion spec/lib/message_bus/multi_process_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def work_it
if msg.data == "done"
bus.global_unsubscribe
else
bus.publish("/response", "#{msg.data}-#{Process.pid.to_s}")
bus.publish("/response", "#{msg.data}-#{Process.pid}")
end
end
ensure
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
puts "Running with backend: #{CURRENT_BACKEND}"

def test_only(*backends)
skip "Test doesn't apply to #{CURRENT_BACKEND}" unless backends.include?(CURRENT_BACKEND)
skip "Test doesn't apply to #{CURRENT_BACKEND}" if backends.exclude?(CURRENT_BACKEND)
end

def test_never(*backends)
Expand Down

0 comments on commit 0ba15c8

Please sign in to comment.