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



18
19
20
# File 'lib/logstash/plugins/registry.rb', line 18

def installed_gems
  ::Gem::Specification
end

.logstash_pluginsObject



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

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