Class: Inspec::Plugin::V2::Installer::InstalledVendorSet
- Inherits:
-
Gem::Resolver::VendorSet
- Object
- Gem::Resolver::VendorSet
- Inspec::Plugin::V2::Installer::InstalledVendorSet
- Defined in:
- lib/inspec/plugin/v2/installer.rb
Overview
This class alows us to build a Vendor set with the gems that are already included either with Ruby or with the InSpec install
Instance Method Summary collapse
-
#initialize ⇒ InstalledVendorSet
constructor
A new instance of InstalledVendorSet.
Constructor Details
#initialize ⇒ InstalledVendorSet
Returns a new instance of InstalledVendorSet.
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/inspec/plugin/v2/installer.rb', line 396 def initialize super Gem::Specification.find_all do |spec| @specs[spec.name] = spec @directories[spec] = spec.gem_dir end if !defined?(::Bundler) directories = Gem::Specification.dirs.find_all do |path| !path.start_with?(Gem.user_dir) end Gem::Specification.each_spec(directories) do |spec| @specs[spec.name] = spec @directories[spec] = spec.gem_dir end end end |