* stable: (MODULES-3443) Emit better user code exceptions
* stable: (MODULES-3875) PowerShellManager heals on failure (MODULES-3875) Add PowerShellManager.instance test (MODULES-3875) Refactor stream error handling (MODULES-3875) Defensively exit PowerShellManager (MODULES-3875) Introduce new 64k pipe test (maint) Create Write-SystemDebugMessage function (maint) Don't stdin bootstrap powershell_manager (maint) Refactor PS event code to Signal-Event (maint) Fix Invoke-PowerShellUserCode output (MODULES-3839) Emit better user code parsing exceptions (MODULES-3588) Update documentation for change in MODULES-3399
Merge pull request #146 from puppetlabs/stable
(maint) Merge master down to stable
DOC-2960: new limitation and a bit of editing
DOC-2960: edits to new limitation
Merge pull request #153 from jbondpdx/master
DOC-2960: new limitation and a bit of editing
Merge pull request #159 from puppetlabs/fix_json
(MODULES-3632) Update modulesync
Merge pull request #160 from puppetlabs/fix_1.9
Workaround frozen strings on ruby 1.9
Merge pull request #164 from eputnam/specopts
(FM-5939) removes spec.opts
Merge pull request #165 from puppetlabs/modulesync
(FM-5972) Update to next modulesync_configs [dedaf10]
new CI changes require that windows modules have access to blacksmith tasks
Merge pull request #168 from eputnam/blacksmith_tasks
(MODULES-4263) add blacksmith rake tasks
Merge pull request #167 from puppetlabs/hunner_msync
(MODULES-4097) Sync travis.yml
Merge pull request #170 from puppetlabs/hunner_msync
(MODULES-4098) Sync the rest of the files
Merge branch 'master' into stable
* master: (MODULES-4098) Sync the rest of the files (MODULES-4097) Sync travis.yml add blacksmith rake tasks new CI changes require that windows modules have access to blacksmith tasks (FM-5972) Update to next modulesync_configs [dedaf10] (FM-5939) removes spec.opts Workaround frozen strings, json, and devtools (MODULES-3632) Update modulesync DOC-2960: edits to new limitation DOC-2960: new limitation and a bit of editing
Merge pull request #171 from puppetlabs/stable
(maint) stable mergeback
[MODULES-4556] Remove PE requirement from metadata.json
Merge pull request #172 from puppetlabs/MODULES-4556
[MODULES-4556] Remove PE requirement from metadata.json
[MODULES-4528] Replace Puppet.version.to_f version comparison from sp…
…ec_helper.rb
Merge pull request #173 from puppetlabs/modules-4528
[MODULES-4528] Replace Puppet.version.to_f version comparison from spec_helper.rb
(MODULES-3945) Add Non Windows PowerShell platform support
Previously, the PowerShell module would only function on Windows hosts. This commit adds support for running PowerShell on non-Windows hosts with the following: - Use the older PowerShell module style functionality with a temporary script file - Use default file locations for PowerShell at /usr/bin and /usr/local/bin - Guard the use of cmd.exe on Windows only platforms - Update the spec tests to use Unix fixtures for testing e.g. uname - Remove the use of -ExecutionPolicy setting due to PowerShell/PowerShell#2742 - Add Known Issue that the HOME directory environment variable must be set explicitly due to: PowerShell/PowerShell#1794 - Update Metadata with support for Ubuntu 14.04, 16.04 and CentOS 7. The list of non-Windows may increase in the future e.g. Mac OSX
(MODULES-3945) Update Travis CI testing for Ubuntu PowerShell
Previously the Travis CI testing would not install PowerShell. Now that non Windows platforms are supported, this commit modifies the Travis configuration to use the Trusty dsitribution and allow sudo, so that the latest version of PowerShell for Ubuntu can be installed for spec tests.
[msync] 786266 Implement puppet-module-gems, a45803 Remove metadata.j…
…son from locales config
(MODULES-3945) Add acceptance tests for Non Windows platforms
Previously the acceptance tests for the PowerShell module assumed that the systems under test were always on a Windows platform. This commit extends the acceptance tests to Non-Windows platforms by: - Adding a provisioning step to install PowerShell depending on the platform type. This is required as the tests assume PowerShell is already installed. - Attempting to test on an unsupported platform e.g. AIX will now error during provisioning instead of just failing tests - Modified Acceptance tests to flip which string to use based on the host platform e.g. Whether to use cmd.exe or sh -c - Added Non-Windows (POSIX) test fixtures for use in acceptance tests as the Windows fixtures are not valid in POSIX platforms e.g. Get-Service is not available on PowerShell POSIX yet - Moved the cleaning of the test files to the `before suite` as tests should ensure their state before they are tested instead of depending on a previous test run to clean up after itself
Merge pull request #176 from puppetlabs/modules-4506
[msync] 786266 Implement puppet-module-gems, a45803 Remove metadata.json from locales config
(MODULES-4754) Dispose runspace on pipe close
- In the finally block of the Start-PipeServer listener, explicitly Dispose of the current loaded PowerShell runspace.
Merge pull request #175 from glennsarti/xplat-powershell
(MODULES-3945) Add Non Windows PowerShell platform support
Merge pull request #179 from Iristyle/ticket/master/MODULES-4754-disp…
…ose-custom-PS-host (MODULES-4754) Dispose runspace on pipe close
(MODULES-4822) Update puppet compatibility with 4.7 as lower bound
The Puppet Agent support is deprecated on many of the versions suggested in the metadata. This commit updates the lower bound of the dependency to puppet agent 4.7.0.
Merge pull request #180 from marsmensch/master
MODULES-4822 puppetlabs-powershell: Update the version compatibility to >= 4.7.0 < 5.0.0
(MODULES-4976) Remove rspec configuration for win32_console
Previously the spec_helper would configure rspec to output all to STDOUT due to issues with the win32_console gem. However as that gem was removed in Puppet 4, it is no longer required. Also by redirecting to stdout, when using the junit formatter, the output is sent to STDOUT instead of the specificed text file. This commit removes the redundant rspec configuration.
Merge pull request #182 from glennsarti/ticket/master/modules-4976-fi…
…x-rspec Previously the spec_helper would configure rspec to output all to STDOUT due to issues with the win32_console gem. However as that gem was removed in Puppet 4, it is no longer required. Also by redirecting to stdout, when using the junit formatter, the output is sent to STDOUT instead of the specificed text file. This commit removes the redundant rspec configuration.
(MODULES-4138) Provider will respect the environment parameter
Previously the PowerShell 2.x provider did not use the environment parameter from the exec Puppet Type. This commit updates the PowerShell manager to include custom environment variables passed from the Puppet Resource and integration tests for this behaviour.
Merge pull request #184 from hunner/bump_metadata
(MODULES-5144) Prep for puppet 5
(MODULES-5145) Return available UI Output on error
- Previously the custom PSHost implementation (PuppetPSHost) was not inspected for Output in the face of an error. This is problematic as completely valid information may have been written to stdout / stderr via the Write-Output / Write-Debug / Write-Error cmdlets (or other mechanisms). This output can be helpful for end users to determine where executing PowerShell code may have failed. Add tests demonstrating such a trivial case, where the timeout for the script is set to 1.5 seconds, but the script has a `sleep 10` preventing it from completing successfully. Previously, none of the output would be collected in this error situation - but now the result object has more information populated. This should be very helpful for debugging. - Though not strictly necessary, ask the PowerShell instance to Stop execution by calling its Stop method, when the timeout has exceeded. Rather than throwing an exception and implicitly calling Stop via Dispose on the PowerShell instance - this more explicitly documents the module behavior when the timeout is exceeded.
Merge pull request #185 from Iristyle/ticket/master/MODULES-5145-emit…
…-host-output-on-error-if-available (MODULES-5145) Return available UI Output on error
Merge pull request #183 from glennsarti/modules-4138-env-support
(MODULES-4138) Provider will respect the environment parameter
(MODULES-5163) Prep for 2.1.1 release.
This commit prepares the module for a v 2.1.1 release.
Merge pull request #187 from glennsarti/modules-5163-prep-2.1.1
(MODULES-5163) Release prep 2.1.1
fix broken link, tidy up punctuation
Merge pull request #188 from jbondpdx/release
fix broken link, tidy up punctuation