opscode/ohai — pull request #208 by mcquin (2013-10-08 20:47:29+00:00)
Title: Add platform option to collect_data

Creating a PR for feedback on work so far for adding platform options to collect_data:
-- added plugin names to plugins, allowing users to write platform-specific code for a plugin across multiple files (https://github.com/opscode/ohai/blob/OC-9409/lib/ohai/dsl/plugin.rb#L29-L70)
-- storing and running platform-specific data blocks: (https://github.com/opscode/ohai/blob/OC-9409/lib/ohai/dsl/plugin.rb#L170-L195)

Work in progress: automatically cleaning up the Ohai::NamedPlugin namespace between spec tests

To-do:
-- figure out what to do about plugins with multiple source files (currently, plugins are initialized with the Ohai::System controller and their source file)
-- what happens when a plugin running on platform P depends on an attribute defined in a plugin that doesn't collect data when running on P (just thought about this runner.rb might not throw an error here...)

@sersut @danielsdeleo