mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Use plugin name instead of metadata because sometimes Bundler-provided Gem::Specifications have nil metadata.
Fixes #7530
This commit is contained in:
parent
468b8d2257
commit
a355d9f09d
1 changed files with 6 additions and 1 deletions
|
@ -135,7 +135,12 @@ class PluginVersionWorking
|
|||
end
|
||||
|
||||
def extract_versions(definition, dependencies, from)
|
||||
definition.specs.select { |spec| spec.metadata && spec.metadata["logstash_plugin"] == "true" }.each do |spec|
|
||||
#definition.specs.select { |spec| spec.metadata && spec.metadata["logstash_plugin"] == "true" }.each do |spec|
|
||||
#
|
||||
# Bundler doesn't seem to provide us with `spec.metadata` for remotely
|
||||
# discovered plugins (via rubygems.org api), so we have to choose by
|
||||
# a name pattern instead of by checking spec.metadata["logstash_plugin"]
|
||||
definition.specs.select { |spec| spec.name =~ /^logstash-(input|filter|output|codec)-/ }.each do |spec|
|
||||
dependencies[spec.name] ||= []
|
||||
dependencies[spec.name] << VersionDependencies.new(spec.version, from)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue