Skip to content

Commit

Permalink
[rubocop] fix offences
Browse files Browse the repository at this point in the history
  • Loading branch information
flash-gordon committed Aug 27, 2023
1 parent 0f7fa6b commit 077aec1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ gemspec
# Remove verson constraint once latter versions release their -java packages
gem "bootsnap", "= 1.4.9"
gem "dotenv"
gem "dry-types"
gem "dry-events"
gem "dry-monitor"
gem "dry-types"
gem "zeitwerk"

2 changes: 1 addition & 1 deletion lib/dry/system/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ module System
RB_GLOB = "*.rb"
PATH_SEPARATOR = File::SEPARATOR
KEY_SEPARATOR = "."
WORD_REGEX = /\w+/.freeze
WORD_REGEX = /\w+/
end
end
4 changes: 2 additions & 2 deletions lib/dry/system/magic_comments_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
module Dry
module System
class MagicCommentsParser
VALID_LINE_RE = /^(#.*)?$/.freeze
COMMENT_RE = /^#\s+(?<name>[A-Za-z]{1}[A-Za-z0-9_]+):\s+(?<value>.+?)$/.freeze
VALID_LINE_RE = /^(#.*)?$/
COMMENT_RE = /^#\s+(?<name>[A-Za-z]{1}[A-Za-z0-9_]+):\s+(?<value>.+?)$/

COERCIONS = {
"true" => true,
Expand Down
2 changes: 1 addition & 1 deletion lib/dry/system/plugins/monitoring.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def monitor(key, **options, &block)
end
end

decorate(key, with: -> target { proxy.new(target, notifications) })
decorate(key, with: -> tgt { proxy.new(tgt, notifications) })
end
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

# rubocop:disable Style/GlobalVars

RSpec.describe "Zeitwerk plugin / Eager loading" do
include ZeitwerkHelpers

Expand Down Expand Up @@ -60,3 +62,5 @@ class ZeitwerkEager; end
end
end
end

# rubocop:enable Style/GlobalVars
1 change: 1 addition & 0 deletions spec/integration/container/plugins_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def plugin_enabled?
let(:plugin) do
Class.new(Module) do
def initialize(options)
super()
@options = options

define_method(:plugin_test) do
Expand Down

0 comments on commit 077aec1

Please sign in to comment.