Skip to content

Commit

Permalink
🚨 Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
pboling committed Nov 18, 2024
1 parent a239bcf commit f76b688
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .rubocop_gradual.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"README.md:1323834265": [
[232, 3, 100, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3592044714]
],
"bin/bundle:247448467": [
[64, 5, 20, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2485198147]
],
"lib/omniauth/identity/model.rb:1162570792": [
[53, 11, 9, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 4045031525],
[54, 11, 9, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 4045031525],
Expand Down
10 changes: 5 additions & 5 deletions bin/bundle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ m = Module.new do
if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN)
bundler_version = a
end
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o
bundler_version = $1
update_index = i
end
Expand All @@ -56,7 +56,7 @@ m = Module.new do
def lockfile_version
return unless File.file?(lockfile)
lockfile_contents = File.read(lockfile)
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o
Regexp.last_match(1)
end

Expand All @@ -83,15 +83,15 @@ m = Module.new do

def activate_bundler
gem_error = activation_error_handling do
gem "bundler", bundler_requirement
gem("bundler", bundler_requirement)
end
return if gem_error.nil?
require_error = activation_error_handling do
require "bundler/version"
end
return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
exit 42
warn("Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`")
exit(42)
end

def activation_error_handling
Expand Down

0 comments on commit f76b688

Please sign in to comment.