Method: Inspec::InputRegistry#poll_plugins_for_update

Defined in:
lib/inspec/input_registry.rb

#poll_plugins_for_update(profile_name, input_name) ⇒ Object



105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/inspec/input_registry.rb', line 105

def poll_plugins_for_update(profile_name, input_name)
  plugins.each do |plugin|
    response = plugin.fetch(profile_name, input_name)
    evt = Inspec::Input::Event.new(
      action: :fetch,
      provider: plugin.class.plugin_name,
      priority: plugin.default_priority,
      hit: !response.nil?
    )
    evt.value = response unless response.nil?
    inputs_by_profile[profile_name][input_name].events << evt
  end
end