Class: LogStash::Plugins::Registry::GemRegistry

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/plugins/registry.rb

Overview

Add a bit more sanity with when interacting with the rubygems’ specifications database, most of out code interact directly with really low level components of bundler/rubygems we need to encapsulate that and this is a start.

Constant Summary collapse

LOGSTASH_METADATA_KEY =
"logstash_plugin"

Class Method Summary collapse

Class Method Details

.installed_gemsObject



22
23
24
# File 'lib/logstash/plugins/registry.rb', line 22

def installed_gems
  ::Gem::Specification
end

.logstash_pluginsObject



26
27
28
29
30
# File 'lib/logstash/plugins/registry.rb', line 26

def logstash_plugins
  installed_gems
    .select { |spec| spec. && spec.[LOGSTASH_METADATA_KEY] }
    .collect { |spec| PluginRawContext.new(spec) }
end