Module: Contrast::Agent::Inventory::Dependencies

Included in:
DependencyAnalysis, DependencyUsageAnalysis
Defined in:
lib/contrast/agent/inventory/dependencies.rb

Overview

this module is included in classes that need access to the applications dependencies

Constant Summary collapse

CONTRAST_AGENT =
'contrast-agent'

Instance Method Summary collapse

Instance Method Details

#loaded_specsObject

the #clone is necessary here, as a require in another thread could potentially result in adding a key to the loaded_specs hash during iteration. (as in RUBY-330) this takes care of filtering out contrast-only dependencies



15
16
17
18
# File 'lib/contrast/agent/inventory/dependencies.rb', line 15

def loaded_specs
  specs = Gem.loaded_specs.clone
  specs.delete_if { |name, _v| contrast?(name) }
end