Skip to content

Commit de31059

Browse files
committed
🚨 Linting
1 parent 1eb8624 commit de31059

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

‎bin/bundle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ m = Module.new do
3030
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
3131
bundler_version = a
3232
end
33-
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o
33+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
3434
bundler_version = $1
3535
update_index = i
3636
end
@@ -56,7 +56,7 @@ m = Module.new do
5656
def lockfile_version
5757
return unless File.file?(lockfile)
5858
lockfile_contents = File.read(lockfile)
59-
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o
59+
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
6060
Regexp.last_match(1)
6161
end
6262

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

8484
def activate_bundler
8585
gem_error = activation_error_handling do
86-
gem("bundler", bundler_requirement)
86+
gem "bundler", bundler_requirement
8787
end
8888
return if gem_error.nil?
8989
require_error = activation_error_handling do
9090
require "bundler/version"
9191
end
9292
return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
93-
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}'`")
94-
exit(42)
93+
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}'`"
94+
exit 42
9595
end
9696

9797
def activation_error_handling

‎lib/openid/fetchers.rb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,23 @@ module OpenID
5050
class HTTPResponse
5151
attr_accessor :final_url, :_response
5252

53-
def self._from_net_response(response, final_url, _headers = nil)
54-
me = new
55-
me._response = response
56-
me.final_url = final_url
57-
me
53+
class << self
54+
def _from_net_response(response, final_url, _headers = nil)
55+
instance = new
56+
instance._response = response
57+
instance.final_url = final_url
58+
instance
59+
end
5860
end
5961

6062
def method_missing(method, *args)
6163
@_response.send(method, *args)
6264
end
6365

66+
def respond_to_missing?(method_name, include_private = false)
67+
super
68+
end
69+
6470
def body=(s)
6571
@_response.instance_variable_set(:@body, s)
6672
# XXX Hack to work around ruby's HTTP library behavior. @body

0 commit comments

Comments
 (0)