opscode/chef — pull request #1402 by adamedx (2014-05-02 16:42:43+00:00)
Title: WIP: Re-implement ruby-wmi functionality

This is work in progress to see if removing ruby-rdp-wmi resolves segfault issues on newer Ruby versions.

Here's what's in:
* All code relying on ruby-wmi is removed
* Specs known to be affected we verified as passing
* Some scenarios, such as use of the env resource, were verified manually

Here's what's not in:
1. Couldn't remove ruby-rdp-wmi from gemspec -- spec_helper had sadness when running a spec, see below
2. Didn't touch ohai yet -- I'll take a look shortly

More TODO:
* Need to refactor, particularly remove the result[:wmi_object] hack I added at last minute once I realized we were using this not just to read properties, but actually call WMI methods
* Get rid of Mash support -- I couldn't get it to work
* Need to understand resource management issues here -- we create a new WMI automation object at every access basically, are there issues with leaks that we must address?

Here's the error I get from removing ruby-rdp-wmi from the gemspec:

```
2014.05.02 Fri 09:41:58.50-07:00> bundle exec rspec .\spec\functional\win32\versions_spec.rb
C:/src/chef/spec/spec_helper.rb:92:in `dup': can't dup NilClass (TypeError)
from C:/src/chef/spec/spec_helper.rb:92:in `'
from C:/src/chef/spec/functional/win32/versions_spec.rb:19:in `require'
from C:/src/chef/spec/functional/win32/versions_spec.rb:19:in `'
from C:/opscode_live/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `load'
from C:/opscode_live/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
from C:/opscode_live/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `each'
from C:/opscode_live/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `load_spec_files'
from C:/opscode_live/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:22:in `run'
from C:/opscode_live/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'
from C:/opscode_live/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in `block in autorun'
```