mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
parent
5e9644b7a5
commit
d805cc76aa
1 changed files with 22 additions and 18 deletions
|
@ -11,27 +11,31 @@ require 'logstash/version'
|
||||||
# see https://github.com/elasticsearch/logstash/issues/2556 and https://github.com/rubygems/rubygems/issues/1070
|
# see https://github.com/elasticsearch/logstash/issues/2556 and https://github.com/rubygems/rubygems/issues/1070
|
||||||
#
|
#
|
||||||
# this code is from Rubygems v2.1.9 in JRuby 1.7.17. Per tickets this issue should be solved at JRuby >= 1.7.20.
|
# this code is from Rubygems v2.1.9 in JRuby 1.7.17. Per tickets this issue should be solved at JRuby >= 1.7.20.
|
||||||
class Gem::Specification
|
|
||||||
def self.reset
|
# this method implementation works for Rubygems version 2.1.0 and up, verified up to 2.4.6
|
||||||
@@dirs = nil
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new("2.1.0") && Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.5.0")
|
||||||
Gem.pre_reset_hooks.each { |hook| hook.call }
|
class Gem::Specification
|
||||||
@@all = nil
|
def self.reset
|
||||||
@@stubs = nil
|
@@dirs = nil
|
||||||
_clear_load_cache
|
Gem.pre_reset_hooks.each { |hook| hook.call }
|
||||||
unresolved = unresolved_deps
|
@@all = nil
|
||||||
unless unresolved.empty?
|
@@stubs = nil
|
||||||
unless (unresolved.size == 1 && unresolved["ffi"])
|
_clear_load_cache
|
||||||
w = "W" + "ARN"
|
unresolved = unresolved_deps
|
||||||
warn "#{w}: Unresolved specs during Gem::Specification.reset:"
|
unless unresolved.empty?
|
||||||
unresolved.values.each do |dep|
|
unless (unresolved.size == 1 && unresolved["ffi"])
|
||||||
warn " #{dep}"
|
w = "W" + "ARN"
|
||||||
|
warn "#{w}: Unresolved specs during Gem::Specification.reset:"
|
||||||
|
unresolved.values.each do |dep|
|
||||||
|
warn " #{dep}"
|
||||||
|
end
|
||||||
|
warn "#{w}: Clearing out unresolved specs."
|
||||||
|
warn "Please report a bug if this causes problems."
|
||||||
end
|
end
|
||||||
warn "#{w}: Clearing out unresolved specs."
|
unresolved.clear
|
||||||
warn "Please report a bug if this causes problems."
|
|
||||||
end
|
end
|
||||||
unresolved.clear
|
Gem.post_reset_hooks.each { |hook| hook.call }
|
||||||
end
|
end
|
||||||
Gem.post_reset_hooks.each { |hook| hook.call }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue