set require 'mocha' to 'mocha/api' to get fix deprecated messages
no need for double quotes around powershell.exe
adding a PS_ARGS value
Adding the startup args for powershell.

Surrounding the powershell command with quotes
(Maint) Remove whitespace

Removed whitespace.
Merge branch 'powershell_suggestions'

* powershell_suggestions:
  (Maint) Remove whitespace
  Adding the startup args for powershell.
  adding a PS_ARGS value
  no need for double quotes around powershell.exe
  set require 'mocha' to 'mocha/api' to get fix deprecated messages
(Maint) Add missing provider parameter in examples

The examples did not specify the `powershell` provider, as a result puppet
would use the default `exec` provider on windows instead of `powershell`.
Write script content to a tempfile

Previously, we were passing the powershell script to execute on the command
line. This is undesirable because the script contents are available for any
other process to see. Also, CreateProcess has a maximum command line length
of 32K characters.

I would have liked to create a tempfile and execute powershell with the
-File <path> option. However, powershell requires that puppet close the
file handle (or resort to native Win32 APIs to open the file with full
sharing). The former would expose puppet to TOCTOU race conditions. The
latter is hard, since ruby is the one creating the tempfile.

This commit executes powershell with redirected stdin. This solves the
original issues with passing the script on the commandline. And since
puppet never closes the tempfile handle until after powershell exits, the
file can't be modified after puppet writes the tempfile, and before
powershell writes it.

Note current versions of Windows use per-user temp directories with strong
permissions to minimize the likelihood of TOCTOU attacks on tempfiles, but
I'd rather not make (poor) assumptions, especially on Windows 2003.
Eliminate top-level constants

Previously, the provider was defining top-level constants POWERSHELL and
PS_ARGS, which resulted in the following warning each time the agent
pluginsynced:

    warning: already initialized constant POWERSHELL
Remove obsolete limitation

Earlier versions of the powershell module could not execute 64-bit powershell.
This was resolved in commit 9c95b1103.
Fixup rake lint errors

The module tool generates a test/init.pp file with lines longer than 80
characters, which the puppet-lint tool warns about.
Require rspec expectations

When using newer rspec, need to explicitly require rspec expectations, which
is what monkey-patches the `Object#should` method. As a result, running
rspec spec would fail with newer rspec versions.
Merge branch 'redirect_stdin'

* redirect_stdin:
  Require rspec expectations
  Fixup rake lint errors
  Remove obsolete limitation
  Eliminate top-level constants
  Write script content to a tempfile
  (Maint) Add missing provider parameter in examples
Bump version

Increment version in preparation for release.
Fix module version

I forgot to update the Modulefile's version earlier, so the forge has a newer
version (0.0.4) than is specified in the Modulefile.

Updating the Modulefile to be one greater.
Maint: Add Gemfile and update .gitignore

Support the bundle workflow.
(#22578) Return powershell's output and status

The powershell module overrides the Puppet::Provider::Exec#run method,
but did not return the executed command's output and status on ruby
1.8.7. The exact behavior actually relied on the internals of the
Tempfile class, so it surprisingly worked on ruby 1.9, but failed on
ruby 1.8.7.

This commit adds an explicit return to ensure we return whatever the
super method returns, and adds tests for `unless` and `onlyif`, which was
where the problem showed up.

Paired-with: Ethan Brown <ethan@puppetlabs.com>
Merge pull request #10 from joshcooper/powershell-187

(#22578) Return powershell's output and status
(Maint) Prepare for 0.0.6 release

Update README.md to conform to guidelines:

http://docs.puppetlabs.com/puppet/3/reference/modules_documentation.html
(Maint) Don't assume powershell.exe command is available

Previously, the specs would fail on systems where powershell is not installed
like 2003 non-R2.

Restrict the tests that actually try to execute powershell to systems where
powershell.exe is in the PATH.