train-3.2.20/ 0000755 0001750 0001750 00000000000 13630530357 013132 5 ustar terceiro terceiro train-3.2.20/.codeclimate.yml 0000644 0001750 0001750 00000000367 13630530357 016212 0 ustar terceiro terceiro version: "2"
checks:
file-lines:
enabled: false
plugins:
fixme:
enabled: true
config:
strings:
- TODO
- rubocop:disable
flog:
enabled: true
markdownlint:
enabled: true
rubocop:
enabled: true
train-3.2.20/CHANGELOG.md 0000644 0001750 0001750 00000206564 13630530357 014760 0 ustar terceiro terceiro
## [v3.2.20](https://github.com/inspec/train/tree/v3.2.20) (2020-02-06)
#### Merged Pull Requests
- Added a blank line to the readme where we needed one. [#567](https://github.com/inspec/train/pull/567) ([zenspider](https://github.com/zenspider))
### Changes not yet released to rubygems.org
#### Merged Pull Requests
- Added a blank line to the readme where we needed one. [#567](https://github.com/inspec/train/pull/567) ([zenspider](https://github.com/zenspider))
- Improve debugging experience by making platform and connection less noisy. [#565](https://github.com/inspec/train/pull/565) ([zenspider](https://github.com/zenspider))
- Rebase #339 [#566](https://github.com/inspec/train/pull/566) ([zenspider](https://github.com/zenspider))
- Unified gemspec and fixed dependencies across train and train-core. [#563](https://github.com/inspec/train/pull/563) ([zenspider](https://github.com/zenspider))
- Refactor OS detection. [#561](https://github.com/inspec/train/pull/561) ([zenspider](https://github.com/zenspider))
- Kali Linux platform detection support [#556](https://github.com/inspec/train/pull/556) ([mattray](https://github.com/mattray))
## [v3.2.14](https://github.com/inspec/train/tree/v3.2.14) (2020-01-23)
#### Merged Pull Requests
- Substitute require for require_relative [#549](https://github.com/inspec/train/pull/549) ([tas50](https://github.com/tas50))
- allow overriding follow_symlink on Train::File [#550](https://github.com/inspec/train/pull/550) ([miah](https://github.com/miah))
- Fix README typo [#551](https://github.com/inspec/train/pull/551) ([multani](https://github.com/multani))
- LinuxCommand#verify cleaned up [#530](https://github.com/inspec/train/pull/530) ([vsingh-msys](https://github.com/vsingh-msys))
- Add azure_mgmt_storage to train.gemspec [#552](https://github.com/inspec/train/pull/552) ([rmoles](https://github.com/rmoles))
- Refactor with_sudo_pty to BaseConnection (no-op) and SshConnection. [#554](https://github.com/inspec/train/pull/554) ([zenspider](https://github.com/zenspider))
- Yocto Project family and Yocto Linux and balenaOS platform detection [#558](https://github.com/inspec/train/pull/558) ([mattray](https://github.com/mattray))
- Make stat command use '-c' for Yocto OS [#559](https://github.com/inspec/train/pull/559) ([michaellihs](https://github.com/michaellihs))
- Fix verify step for sudo [#557](https://github.com/inspec/train/pull/557) ([zenspider](https://github.com/zenspider))
## [v3.2.5](https://github.com/inspec/train/tree/v3.2.5) (2019-12-12)
#### Merged Pull Requests
- Add extended metadata [#546](https://github.com/inspec/train/pull/546) ([tas50](https://github.com/tas50))
- Move built_in:create_github_release to a workload? [#547](https://github.com/inspec/train/pull/547) ([zenspider](https://github.com/zenspider))
## [v3.2.3](https://github.com/inspec/train/tree/v3.2.3) (2019-12-12)
#### Merged Pull Requests
- Correctly verify ssh w/ sudo [#544](https://github.com/inspec/train/pull/544) ([zenspider](https://github.com/zenspider))
- Adding bundle artifact caching to BK. [#545](https://github.com/inspec/train/pull/545) ([zenspider](https://github.com/zenspider))
- Return exit code for local Windows command [#533](https://github.com/inspec/train/pull/533) ([james-stocks](https://github.com/james-stocks))
## [v3.2.0](https://github.com/inspec/train/tree/v3.2.0) (2019-12-02)
#### Merged Pull Requests
- Fix inspec detect on SLES [#515](https://github.com/inspec/train/pull/515) ([christian-wtd](https://github.com/christian-wtd))
- Added create_github_release action to stable promotion. [#536](https://github.com/inspec/train/pull/536) ([zenspider](https://github.com/zenspider))
- Minor cleanup [#537](https://github.com/inspec/train/pull/537) ([zenspider](https://github.com/zenspider))
- Rolling back #515. [#539](https://github.com/inspec/train/pull/539) ([zenspider](https://github.com/zenspider))
- Add azure_mgmt_security to train.gemspec [#541](https://github.com/inspec/train/pull/541) ([rmoles](https://github.com/rmoles))
- Bump minor version [#543](https://github.com/inspec/train/pull/543) ([clintoncwolfe](https://github.com/clintoncwolfe))
## [v3.1.8](https://github.com/inspec/train/tree/v3.1.8) (2019-11-18)
#### Merged Pull Requests
- Stop using global expectation methods and switch to using _. [#524](https://github.com/inspec/train/pull/524) ([zenspider](https://github.com/zenspider))
- Adds activesupport gem to allow XML>JSON parsing from Azure APIs [#534](https://github.com/inspec/train/pull/534) ([r-fennell](https://github.com/r-fennell))
- Update google-api-client version. [#531](https://github.com/inspec/train/pull/531) ([skpaterson](https://github.com/skpaterson))
- Fix contributor url pointing to 404 [#532](https://github.com/inspec/train/pull/532) ([vsingh-msys](https://github.com/vsingh-msys))
## [v3.1.4](https://github.com/inspec/train/tree/v3.1.4) (2019-10-10)
#### Merged Pull Requests
- Add powershell detection [#523](https://github.com/inspec/train/pull/523) ([miah](https://github.com/miah))
## [v3.1.3](https://github.com/inspec/train/tree/v3.1.3) (2019-10-03)
#### Merged Pull Requests
- Let expeditor respond to pull request [#512](https://github.com/inspec/train/pull/512) ([miah](https://github.com/miah))
- add def forward_remote to Transports::SSH [#457](https://github.com/inspec/train/pull/457) ([sawanoboly](https://github.com/sawanoboly))
- Fix chefstyle warnings [#514](https://github.com/inspec/train/pull/514) ([tas50](https://github.com/tas50))
- Add reason field while raising Train::ClientError. [#517](https://github.com/inspec/train/pull/517) ([samshinde](https://github.com/samshinde))
- Fix method called on string in os parse function [#519](https://github.com/inspec/train/pull/519) ([noisleahcim](https://github.com/noisleahcim))
## [v3.0.3](https://github.com/inspec/train/tree/v3.0.3) (2019-08-29)
#### Merged Pull Requests
- Ensure UserError is raised with a reason value [#511](https://github.com/inspec/train/pull/511) ([marcparadise](https://github.com/marcparadise))
## [v3.0.2](https://github.com/inspec/train/tree/v3.0.2) (2019-08-15)
#### Merged Pull Requests
- Fix raise invalid arguments [#508](https://github.com/inspec/train/pull/508) ([vsingh-msys](https://github.com/vsingh-msys))
## [v3.0.1](https://github.com/inspec/train/tree/v3.0.1) (2019-08-07)
#### Merged Pull Requests
- Add Windows to the verify pipeline [#484](https://github.com/inspec/train/pull/484) ([miah](https://github.com/miah))
- garbo [#485](https://github.com/inspec/train/pull/485) ([miah](https://github.com/miah))
- Fix up windows testing on buildkite [#487](https://github.com/inspec/train/pull/487) ([zenspider](https://github.com/zenspider))
- Remove coverage from general test runs and add its own pipeline [#486](https://github.com/inspec/train/pull/486) ([miah](https://github.com/miah))
- Testing coverage pipeline [#488](https://github.com/inspec/train/pull/488) ([miah](https://github.com/miah))
- yah-mail [#490](https://github.com/inspec/train/pull/490) ([miah](https://github.com/miah))
- Use our coverage.sh rather than embedded commands [#491](https://github.com/inspec/train/pull/491) ([miah](https://github.com/miah))
- chmod 755 coverage.sh [#492](https://github.com/inspec/train/pull/492) ([miah](https://github.com/miah))
- Load simplecov too [#493](https://github.com/inspec/train/pull/493) ([miah](https://github.com/miah))
- less clever to worry about here since this isn't InSpec ;) [#494](https://github.com/inspec/train/pull/494) ([miah](https://github.com/miah))
- Move coverage private and use our repo_token [#495](https://github.com/inspec/train/pull/495) ([miah](https://github.com/miah))
- Add newline to Rakefile [#496](https://github.com/inspec/train/pull/496) ([miah](https://github.com/miah))
- I understand how vault secrets in expeditor work now. [#497](https://github.com/inspec/train/pull/497) ([miah](https://github.com/miah))
- that image isnt supported for accounts/secrets [#498](https://github.com/inspec/train/pull/498) ([miah](https://github.com/miah))
- the secret doesnt seem to be propagating to docker? [#499](https://github.com/inspec/train/pull/499) ([miah](https://github.com/miah))
- correct the path to the secret in vault [#500](https://github.com/inspec/train/pull/500) ([miah](https://github.com/miah))
- Move this secrets stuff into the label [#501](https://github.com/inspec/train/pull/501) ([miah](https://github.com/miah))
- get more debugging details [#502](https://github.com/inspec/train/pull/502) ([miah](https://github.com/miah))
- Add codeclimate setup. [#460](https://github.com/inspec/train/pull/460) ([miah](https://github.com/miah))
- Minor cleanup to regexp for correctness. [#458](https://github.com/inspec/train/pull/458) ([zenspider](https://github.com/zenspider))
- Remove travis and appveyor [#503](https://github.com/inspec/train/pull/503) ([miah](https://github.com/miah))
- Remove WinRM support in favor of train-winrm plugin [#448](https://github.com/inspec/train/pull/448) ([clintoncwolfe](https://github.com/clintoncwolfe))
- Use /etc/os-release for SUSE detection (Adopted) [#505](https://github.com/inspec/train/pull/505) ([clintoncwolfe](https://github.com/clintoncwolfe))
## [v2.1.19](https://github.com/inspec/train/tree/v2.1.19) (2019-07-23)
#### Merged Pull Requests
- Resolve chefstyle warnings in 0.13 [#470](https://github.com/inspec/train/pull/470) ([tas50](https://github.com/tas50))
- Add verify script for pipeline [#477](https://github.com/inspec/train/pull/477) ([miah](https://github.com/miah))
- chefstyle -a [#478](https://github.com/inspec/train/pull/478) ([miah](https://github.com/miah))
- TRYING to get things normalized across chef, inspec, and train. [#480](https://github.com/inspec/train/pull/480) ([zenspider](https://github.com/zenspider))
- This fixes cisco_ios? being defined to return true by default [#481](https://github.com/inspec/train/pull/481) ([zenspider](https://github.com/zenspider))
- Add inspec-notify to the notify_channel list [#483](https://github.com/inspec/train/pull/483) ([zenspider](https://github.com/zenspider))
## [v2.1.13](https://github.com/inspec/train/tree/v2.1.13) (2019-07-01)
#### Merged Pull Requests
- Add github templates & fix the expeditor version bump script [#469](https://github.com/inspec/train/pull/469) ([tas50](https://github.com/tas50))
## [v2.1.12](https://github.com/inspec/train/tree/v2.1.12) (2019-06-26)
#### Merged Pull Requests
- Fixing inspec/train to be green again and improving test stability. [#463](https://github.com/inspec/train/pull/463) ([zenspider](https://github.com/zenspider))
- More cleanup of test output and stability fixes [#464](https://github.com/inspec/train/pull/464) ([zenspider](https://github.com/zenspider))
- Minor cleanup of logic in OSCommon#unix_uuid. [#465](https://github.com/inspec/train/pull/465) ([zenspider](https://github.com/zenspider))
- Apply Chefstyle to train [#459](https://github.com/inspec/train/pull/459) ([miah](https://github.com/miah))
- Fix to raise specific error when ssh user is not provided and root is used as default user. [#466](https://github.com/inspec/train/pull/466) ([Vasu1105](https://github.com/Vasu1105))
## [v2.1.7](https://github.com/inspec/train/tree/v2.1.7) (2019-05-23)
#### Merged Pull Requests
- Add Code of Conduct to train [#453](https://github.com/inspec/train/pull/453) ([miah](https://github.com/miah))
- Add codeclimate to train [#454](https://github.com/inspec/train/pull/454) ([miah](https://github.com/miah))
- Fix failing unit tests verify_host_key in ssh [#452](https://github.com/inspec/train/pull/452) ([marcparadise](https://github.com/marcparadise))
- Fix fallback regex for OpenSuse [#451](https://github.com/inspec/train/pull/451) ([n-rodriguez](https://github.com/n-rodriguez))
- Set chef-foundation as the project owner and update expeditor [#456](https://github.com/inspec/train/pull/456) ([tas50](https://github.com/tas50))
## [v2.1.2](https://github.com/inspec/train/tree/v2.1.2) (2019-05-15)
#### Merged Pull Requests
- Add Coveralls.io to Train [#440](https://github.com/inspec/train/pull/440) ([miah](https://github.com/miah))
- Rename ca_trust_file to ca_trust_path [#450](https://github.com/inspec/train/pull/450) ([marcparadise](https://github.com/marcparadise))
## [v2.1.0](https://github.com/inspec/train/tree/v2.1.0) (2019-05-06)
#### Merged Pull Requests
- Ensure we're using the latest OS on Appveyor [#441](https://github.com/inspec/train/pull/441) ([miah](https://github.com/miah))
- Fixes enable password and catches failure [#383](https://github.com/inspec/train/pull/383) ([btm](https://github.com/btm))
- Update backend test to match updated appveyor os [#442](https://github.com/inspec/train/pull/442) ([miah](https://github.com/miah))
- The Windows release also changed.. [#443](https://github.com/inspec/train/pull/443) ([miah](https://github.com/miah))
- Detect windows also with ssh transport [#416](https://github.com/inspec/train/pull/416) ([StefanScherer](https://github.com/StefanScherer))
## [v2.0.12](https://github.com/inspec/train/tree/v2.0.12) (2019-04-23)
#### Merged Pull Requests
- Add project state and SLA [#434](https://github.com/inspec/train/pull/434) ([miah](https://github.com/miah))
- Remove dependency on ed25519 gems [#439](https://github.com/inspec/train/pull/439) ([tas50](https://github.com/tas50))
- Require Ruby 2.4 or later [#438](https://github.com/inspec/train/pull/438) ([tas50](https://github.com/tas50))
- Add missed cisco_ios_connection to train-core. [#436](https://github.com/inspec/train/pull/436) ([marcparadise](https://github.com/marcparadise))
## [v2.0.8](https://github.com/inspec/train/tree/v2.0.8) (2019-04-22)
#### Merged Pull Requests
- Silence verify_host_key warning from net-ssh [#430](https://github.com/inspec/train/pull/430) ([clintoncwolfe](https://github.com/clintoncwolfe))
- add ssh/winrm to core [#433](https://github.com/inspec/train/pull/433) ([marcparadise](https://github.com/marcparadise))
- Require ed25519 and bcrypt_pbkdf gems for ed25519 support [#435](https://github.com/inspec/train/pull/435) ([tas50](https://github.com/tas50))
## [v2.0.5](https://github.com/inspec/train/tree/v2.0.5) (2019-04-15)
#### Merged Pull Requests
- [SUSTAIN-955] Provide ssh option to enable host key verify [#427](https://github.com/inspec/train/pull/427) ([marcparadise](https://github.com/marcparadise))
- [SUSTAIN-955] Add data callbacks to WinRM and SSH (adopted) [#431](https://github.com/inspec/train/pull/431) ([clintoncwolfe](https://github.com/clintoncwolfe))
- Add a passthrough option for winrm_operation_timeout under winrm [#432](https://github.com/inspec/train/pull/432) ([marcparadise](https://github.com/marcparadise))
## [v2.0.2](https://github.com/inspec/train/tree/v2.0.2) (2019-03-19)
#### Merged Pull Requests
- Add v2 to expeditor [#407](https://github.com/inspec/train/pull/407) ([clintoncwolfe](https://github.com/clintoncwolfe))
- Add api_call cache type [#411](https://github.com/inspec/train/pull/411) ([clintoncwolfe](https://github.com/clintoncwolfe))
- 2.x: Remove AWS transport [#408](https://github.com/inspec/train/pull/408) ([clintoncwolfe](https://github.com/clintoncwolfe))
- Fix detection of 'SLES Expanded Support' of Red Hat [#361](https://github.com/inspec/train/pull/361) ([jabofh](https://github.com/jabofh))
- Update gem deps to allow mixlib-shellout 3.x and net-scp 2.x [#421](https://github.com/inspec/train/pull/421) ([tas50](https://github.com/tas50))
- [SUSTAIN-955] Add kerberos and additional winrm options [#426](https://github.com/inspec/train/pull/426) ([marcparadise](https://github.com/marcparadise))
## [v1.7.5](https://github.com/inspec/train/tree/v1.7.5) (2019-03-13)
#### Merged Pull Requests
- Replace the usage of const_defined? in the WinRM detection helper [#406](https://github.com/inspec/train/pull/406) ([RoboticCheese](https://github.com/RoboticCheese))
## [v1.7.4](https://github.com/inspec/train/tree/v1.7.4) (2019-03-01)
#### Merged Pull Requests
- Add v2 to expeditor [#407](https://github.com/inspec/train/pull/407) ([clintoncwolfe](https://github.com/clintoncwolfe))
- Add api_call cache type [#411](https://github.com/inspec/train/pull/411) ([clintoncwolfe](https://github.com/clintoncwolfe))
## [v1.7.2](https://github.com/inspec/train/tree/v1.7.2) (2019-01-31)
#### Merged Pull Requests
- Prepare train for using credential sets [#394](https://github.com/inspec/train/pull/394) ([clintoncwolfe](https://github.com/clintoncwolfe))
## [v1.7.1](https://github.com/inspec/train/tree/v1.7.1) (2019-01-26)
#### Merged Pull Requests
- Update copyright year to 2019 [#403](https://github.com/inspec/train/pull/403) ([clintoncwolfe](https://github.com/clintoncwolfe))
## [v1.7.0](https://github.com/inspec/train/tree/v1.7.0) (2019-01-26)
#### Merged Pull Requests
- drop ruby 2.0-2.2 support, allow bundler 2.x, bump integration gems, allow mixlib-shellout 3.x [#396](https://github.com/inspec/train/pull/396) ([lamont-granquist](https://github.com/lamont-granquist))
- Fix Azure Test by adding a require [#402](https://github.com/inspec/train/pull/402) ([clintoncwolfe](https://github.com/clintoncwolfe))
- Remove compat with unsupported Ruby 1.9 in the Gemfile [#389](https://github.com/inspec/train/pull/389) ([tas50](https://github.com/tas50))
## [v1.6.3](https://github.com/inspec/train/tree/v1.6.3) (2018-12-19)
#### Merged Pull Requests
- Expose additional winrm options [#392](https://github.com/inspec/train/pull/392) ([frezbo](https://github.com/frezbo))
- Only ship the runtime files in the gem to slim install sizes [#388](https://github.com/inspec/train/pull/388) ([tas50](https://github.com/tas50))
- Small style/spelling changes for Train example plugin [#364](https://github.com/inspec/train/pull/364) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
- Update Travis config for Xenial / Ruby 2.6 and latest patchlevels of Ruby 2.2-2.5 [#390](https://github.com/inspec/train/pull/390) ([tas50](https://github.com/tas50))
## [v1.5.11](https://github.com/inspec/train/tree/v1.5.11) (2018-12-10)
#### Merged Pull Requests
- Add Google API application info [#378](https://github.com/inspec/train/pull/378) ([nathenharvey](https://github.com/nathenharvey))
- Fix shallow_link_path on remote unix [#373](https://github.com/inspec/train/pull/373) ([mheiges](https://github.com/mheiges))
- Remove `#local?` [#365](https://github.com/inspec/train/pull/365) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
- Added a new matcher for amazon linux 2 [#380](https://github.com/inspec/train/pull/380) ([artyomtkachenko](https://github.com/artyomtkachenko))
- Pass logger to Cisco IOS transport [#381](https://github.com/inspec/train/pull/381) ([btm](https://github.com/btm))
## [v1.5.6](https://github.com/inspec/train/tree/v1.5.6) (2018-11-01)
#### Merged Pull Requests
- Fix Cisco IOS detection when banners lack a `\r\n` [#372](https://github.com/inspec/train/pull/372) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
- Adds cached_client method in BaseConnection [#371](https://github.com/inspec/train/pull/371) ([dmccown](https://github.com/dmccown))
## [v1.5.4](https://github.com/inspec/train/tree/v1.5.4) (2018-10-18)
#### Merged Pull Requests
- Fixes the link pointing back to the plugin docs [#362](https://github.com/inspec/train/pull/362) ([cattywampus](https://github.com/cattywampus))
- Remove the legacy version bumping from the rakefile [#359](https://github.com/inspec/train/pull/359) ([tas50](https://github.com/tas50))
- Adds Azure Vault Client [#351](https://github.com/inspec/train/pull/351) ([r-fennell](https://github.com/r-fennell))
- Correct example plugin link [#363](https://github.com/inspec/train/pull/363) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
## [v1.5.0](https://github.com/inspec/train/tree/v1.5.0) (2018-09-27)
#### Merged Pull Requests
- Update google-api-client version. [#348](https://github.com/inspec/train/pull/348) ([skpaterson](https://github.com/skpaterson))
- Adding GCP admin_client helper. [#349](https://github.com/inspec/train/pull/349) ([skpaterson](https://github.com/skpaterson))
- Plugins: Test harness, test fixture, docs, and local-type example [#356](https://github.com/inspec/train/pull/356) ([clintoncwolfe](https://github.com/clintoncwolfe))
- Bump minor version. [#357](https://github.com/inspec/train/pull/357) ([jquick](https://github.com/jquick))
## [v1.4.37](https://github.com/inspec/train/tree/v1.4.37) (2018-09-13)
#### Merged Pull Requests
- Rescues SystemCallError instead of Errno [#346](https://github.com/inspec/train/pull/346) ([dmccown](https://github.com/dmccown))
- Add a export method for platforms [#347](https://github.com/inspec/train/pull/347) ([jquick](https://github.com/jquick))
## [v1.4.35](https://github.com/inspec/train/tree/v1.4.35) (2018-08-23)
#### Merged Pull Requests
- Ensure unique_identifier returns something meaningful for service acc… [#338](https://github.com/inspec/train/pull/338) ([skpaterson](https://github.com/skpaterson))
- Modify Cisco UUID detection to use processor ID [#342](https://github.com/inspec/train/pull/342) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
- Fixes failing test when you have a cred file [#343](https://github.com/inspec/train/pull/343) ([dmccown](https://github.com/dmccown))
- Adds connection to Graph RBAC API [#327](https://github.com/inspec/train/pull/327) ([r-fennell](https://github.com/r-fennell))
## [v1.4.31](https://github.com/inspec/train/tree/v1.4.31) (2018-08-17)
#### Merged Pull Requests
- Fixes an issue where the credential file was nil [#337](https://github.com/inspec/train/pull/337) ([dmccown](https://github.com/dmccown))
- Enable using rubygems as plugins [#335](https://github.com/inspec/train/pull/335) ([clintoncwolfe](https://github.com/clintoncwolfe))
## [v1.4.29](https://github.com/inspec/train/tree/v1.4.29) (2018-08-15)
#### Features & Enhancements
- Pulls file credentials parsing out of Azure class [#324](https://github.com/inspec/train/pull/324) ([dmccown](https://github.com/dmccown))
#### Merged Pull Requests
- Modify checksum logic to use system binaries [#251](https://github.com/inspec/train/pull/251) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
- Require Ruby 2.0 and allow net-ssh 5.0 [#334](https://github.com/inspec/train/pull/334) ([tas50](https://github.com/tas50))
- Add non_interactive support for SSH [#336](https://github.com/inspec/train/pull/336) ([marcparadise](https://github.com/marcparadise))
## [v1.4.25](https://github.com/inspec/train/tree/v1.4.25) (2018-08-01)
#### Merged Pull Requests
- Remove not needed google-cloud dependency (see #328) and correct GCP … [#329](https://github.com/inspec/train/pull/329) ([skpaterson](https://github.com/skpaterson))
## [v1.4.24](https://github.com/inspec/train/tree/v1.4.24) (2018-07-26)
#### Merged Pull Requests
- Add shallow_link_path to inspect symlink direct link [#309](https://github.com/inspec/train/pull/309) ([ColinHebert](https://github.com/ColinHebert))
- Retry SSH command on IOError (Cisco IOS specific) [#326](https://github.com/inspec/train/pull/326) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
## [v1.4.22](https://github.com/inspec/train/tree/v1.4.22) (2018-07-16)
#### Merged Pull Requests
- Add VMware transport [#321](https://github.com/inspec/train/pull/321) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
## [v1.4.21](https://github.com/inspec/train/tree/v1.4.21) (2018-07-05)
#### Merged Pull Requests
- Remove the delivery cookbook [#317](https://github.com/inspec/train/pull/317) ([tas50](https://github.com/tas50))
- Modify `WindowsPipeRunner` stderr to use String [#320](https://github.com/inspec/train/pull/320) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
## [v1.4.19](https://github.com/inspec/train/tree/v1.4.19) (2018-06-29)
#### Merged Pull Requests
- Fix detection of amazon linux 2 [#312](https://github.com/inspec/train/pull/312) ([artem-sidorenko](https://github.com/artem-sidorenko))
- Adding proper bastion support [#310](https://github.com/inspec/train/pull/310) ([frezbo](https://github.com/frezbo))
- Remove github_changelog_generator [#313](https://github.com/inspec/train/pull/313) ([tas50](https://github.com/tas50))
- Remove the deploy config from Travis [#315](https://github.com/inspec/train/pull/315) ([tas50](https://github.com/tas50))
## [v1.4.15](https://github.com/inspec/train/tree/v1.4.15) (2018-06-14)
#### Merged Pull Requests
- Allow TrainError to provide a supplement reason [#303](https://github.com/inspec/train/pull/303) ([marcparadise](https://github.com/marcparadise))
- Adding Oneview to platform detection. [#307](https://github.com/inspec/train/pull/307) ([skpaterson](https://github.com/skpaterson))
- Add the mock transport to train-core [#308](https://github.com/inspec/train/pull/308) ([jquick](https://github.com/jquick))
- Don't double-escape paths [#306](https://github.com/inspec/train/pull/306) ([voroniys](https://github.com/voroniys))
## [v1.4.11](https://github.com/inspec/train/tree/v1.4.11) (2018-05-17)
#### Merged Pull Requests
- Add required env for azure shell msi headers [#302](https://github.com/inspec/train/pull/302) ([jquick](https://github.com/jquick))
## [v1.4.10](https://github.com/inspec/train/tree/v1.4.10) (2018-05-17)
#### Merged Pull Requests
- support sudo passwords for cisco [#301](https://github.com/inspec/train/pull/301) ([arlimus](https://github.com/arlimus))
## [v1.4.9](https://github.com/inspec/train/tree/v1.4.9) (2018-05-16)
#### Bug Fixes
- Allow nil password and www_form_encoded_password to work together. [#297](https://github.com/inspec/train/pull/297) ([marcparadise](https://github.com/marcparadise))
#### Merged Pull Requests
- Support encoded passwords in target url [#296](https://github.com/inspec/train/pull/296) ([marcparadise](https://github.com/marcparadise))
- Initial import of transport for GCP. [#283](https://github.com/inspec/train/pull/283) ([skpaterson](https://github.com/skpaterson))
- Change Cisco IOS transport log level to INFO [#298](https://github.com/inspec/train/pull/298) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
- Unpin google-protobuf now that we are building it as a gem [#300](https://github.com/inspec/train/pull/300) ([scotthain](https://github.com/scotthain))
## [v1.4.4](https://github.com/inspec/train/tree/v1.4.4) (2018-05-02)
#### Merged Pull Requests
- Enable expeditor release tasks [#294](https://github.com/inspec/train/pull/294) ([jquick](https://github.com/jquick))
- Split train into a core gem. [#293](https://github.com/inspec/train/pull/293) ([miah](https://github.com/miah))
# Change Log
## [1.4.2](https://github.com/inspec/train/tree/1.4.2) (2018-04-26)
[Full Changelog](https://github.com/inspec/train/compare/v1.4.1...1.4.2)
**Merged pull requests:**
- switched method of determining aws account id to STS [\#286](https://github.com/inspec/train/pull/286) ([tkrueger](https://github.com/tkrueger))
## [v1.4.1](https://github.com/inspec/train/tree/v1.4.1) (2018-04-19)
[Full Changelog](https://github.com/inspec/train/compare/v1.4.0...v1.4.1)
**Merged pull requests:**
- Release 1.4.1 [\#287](https://github.com/inspec/train/pull/287) ([jquick](https://github.com/jquick))
- Add UUID for Cisco IOS and Nexus devices [\#285](https://github.com/inspec/train/pull/285) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
- Add handling for privileged exec mode [\#284](https://github.com/inspec/train/pull/284) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
## [v1.4.0](https://github.com/inspec/train/tree/v1.4.0) (2018-04-12)
[Full Changelog](https://github.com/inspec/train/compare/v1.3.0...v1.4.0)
**Closed issues:**
- Train reports directories with the archive bit set as files on the windows platform [\#274](https://github.com/inspec/train/issues/274)
**Merged pull requests:**
- Release 1.4.0 [\#282](https://github.com/inspec/train/pull/282) ([jquick](https://github.com/jquick))
- Add CloudLinux as a detected platform [\#281](https://github.com/inspec/train/pull/281) ([tarcinil](https://github.com/tarcinil))
- Move Cisco IOS connection under SSH transport [\#279](https://github.com/inspec/train/pull/279) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
- Initialize FileManager using '@service' [\#278](https://github.com/inspec/train/pull/278) ([marcparadise](https://github.com/marcparadise))
- small fix to make sure windows directories with the archive bit set a… [\#275](https://github.com/inspec/train/pull/275) ([devoptimist](https://github.com/devoptimist))
## [v1.3.0](https://github.com/inspec/train/tree/v1.3.0) (2018-03-29)
[Full Changelog](https://github.com/inspec/train/compare/v1.2.0...v1.3.0)
**Implemented enhancements:**
- Update errors to have a base type of Train::Error [\#273](https://github.com/inspec/train/pull/273) ([marcparadise](https://github.com/marcparadise))
**Closed issues:**
- RFC: Generate unique uuid for platforms [\#264](https://github.com/inspec/train/issues/264)
**Merged pull requests:**
- Release Train 1.3.0 [\#276](https://github.com/inspec/train/pull/276) ([jquick](https://github.com/jquick))
- Add MSI connection option for azure. [\#272](https://github.com/inspec/train/pull/272) ([jquick](https://github.com/jquick))
- Add transport for Cisco IOS [\#271](https://github.com/inspec/train/pull/271) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
- Add platform uuid information. [\#270](https://github.com/inspec/train/pull/270) ([jquick](https://github.com/jquick))
## [v1.2.0](https://github.com/inspec/train/tree/v1.2.0) (2018-03-15)
[Full Changelog](https://github.com/inspec/train/compare/v1.1.1...v1.2.0)
**Implemented enhancements:**
- Change error message to use `connection` [\#263](https://github.com/inspec/train/pull/263) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
**Closed issues:**
- Force 64bit powershell if using ruby32 on a 64bit os [\#265](https://github.com/inspec/train/issues/265)
- Master OS detect family [\#260](https://github.com/inspec/train/issues/260)
**Merged pull requests:**
- Release train 1.2.0 [\#269](https://github.com/inspec/train/pull/269) ([jquick](https://github.com/jquick))
- Force 64bit powershell for 32bit ruby running on 64bit windows [\#266](https://github.com/inspec/train/pull/266) ([jquick](https://github.com/jquick))
- support cisco ios xe [\#262](https://github.com/inspec/train/pull/262) ([arlimus](https://github.com/arlimus))
- Create a master OS family and refactor specifications [\#261](https://github.com/inspec/train/pull/261) ([jquick](https://github.com/jquick))
- Support for Brocade FOS-based SAN devices [\#254](https://github.com/inspec/train/pull/254) ([marcelhuth](https://github.com/marcelhuth))
- ProxyCommand support [\#227](https://github.com/inspec/train/pull/227) ([cbeckr](https://github.com/cbeckr))
## [v1.1.1](https://github.com/inspec/train/tree/v1.1.1) (2018-02-14)
[Full Changelog](https://github.com/inspec/train/compare/v1.1.0...v1.1.1)
**Merged pull requests:**
- Release train 1.1.1 [\#259](https://github.com/inspec/train/pull/259) ([jquick](https://github.com/jquick))
- Add api sdk versions as platform release [\#258](https://github.com/inspec/train/pull/258) ([jquick](https://github.com/jquick))
- Add plat helper methods to api direct platforms. [\#257](https://github.com/inspec/train/pull/257) ([jquick](https://github.com/jquick))
## [v1.1.0](https://github.com/inspec/train/tree/v1.1.0) (2018-02-08)
[Full Changelog](https://github.com/inspec/train/compare/v1.0.0...v1.1.0)
**Closed issues:**
- Add azure:// target [\#233](https://github.com/inspec/train/issues/233)
**Merged pull requests:**
- Release train 1.1.0 [\#255](https://github.com/inspec/train/pull/255) ([jquick](https://github.com/jquick))
- Add qnx platform support [\#253](https://github.com/inspec/train/pull/253) ([jquick](https://github.com/jquick))
- Add azure transport [\#250](https://github.com/inspec/train/pull/250) ([jquick](https://github.com/jquick))
- Fix AIX and QNX file support [\#249](https://github.com/inspec/train/pull/249) ([adamleff](https://github.com/adamleff))
## [v1.0.0](https://github.com/inspec/train/tree/v1.0.0) (2018-02-01)
[Full Changelog](https://github.com/inspec/train/compare/v0.32.0...v1.0.0)
**Closed issues:**
- Add aws:// target [\#229](https://github.com/inspec/train/issues/229)
**Merged pull requests:**
- Update version to 1.0.0 [\#248](https://github.com/inspec/train/pull/248) ([jquick](https://github.com/jquick))
- cisco nexus + ios12 [\#247](https://github.com/inspec/train/pull/247) ([arlimus](https://github.com/arlimus))
- Add a CONTRIBUTING.md to Train [\#245](https://github.com/inspec/train/pull/245) ([miah](https://github.com/miah))
- catch detect failing to parse json [\#243](https://github.com/inspec/train/pull/243) ([arlimus](https://github.com/arlimus))
- if ssh closes the session force it to reset and reopen [\#242](https://github.com/inspec/train/pull/242) ([arlimus](https://github.com/arlimus))
- Add AWS transport [\#239](https://github.com/inspec/train/pull/239) ([clintoncwolfe](https://github.com/clintoncwolfe))
- Fix detection of Scientific Linux [\#237](https://github.com/inspec/train/pull/237) ([schrd](https://github.com/schrd))
## [v0.32.0](https://github.com/inspec/train/tree/v0.32.0) (2018-01-04)
[Full Changelog](https://github.com/inspec/train/compare/v0.31.1...v0.32.0)
**Fixed bugs:**
- platform names should be lower case [\#191](https://github.com/inspec/train/issues/191)
- Return platform name that is lower case and underscored [\#228](https://github.com/inspec/train/pull/228) ([jquick](https://github.com/jquick))
**Merged pull requests:**
- Release 0.32.0 [\#232](https://github.com/inspec/train/pull/232) ([adamleff](https://github.com/adamleff))
- Set mock transport to use the platform instance variable [\#230](https://github.com/inspec/train/pull/230) ([jquick](https://github.com/jquick))
## [v0.31.1](https://github.com/inspec/train/tree/v0.31.1) (2017-12-06)
[Full Changelog](https://github.com/inspec/train/compare/v0.31.0...v0.31.1)
**Merged pull requests:**
- Release 0.31.1 [\#226](https://github.com/inspec/train/pull/226) ([adamleff](https://github.com/adamleff))
- Allow runner specifications for local connections [\#225](https://github.com/inspec/train/pull/225) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
## [v0.31.0](https://github.com/inspec/train/tree/v0.31.0) (2017-12-05)
[Full Changelog](https://github.com/inspec/train/compare/v0.30.0...v0.31.0)
**Fixed bugs:**
- Add release detect for failback debian [\#223](https://github.com/inspec/train/pull/223) ([jquick](https://github.com/jquick))
**Merged pull requests:**
- Release 0.31.0 [\#224](https://github.com/inspec/train/pull/224) ([adamleff](https://github.com/adamleff))
- Use named pipe to decrease local Windows runtime [\#220](https://github.com/inspec/train/pull/220) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
## [v0.30.0](https://github.com/inspec/train/tree/v0.30.0) (2017-12-04)
[Full Changelog](https://github.com/inspec/train/compare/v0.29.2...v0.30.0)
**Merged pull requests:**
- Release 0.30.0 [\#222](https://github.com/inspec/train/pull/222) ([adamleff](https://github.com/adamleff))
- Change the mock transport name to be 'mock' [\#221](https://github.com/inspec/train/pull/221) ([jquick](https://github.com/jquick))
- Enable caching on connections [\#214](https://github.com/inspec/train/pull/214) ([jquick](https://github.com/jquick))
## [v0.29.2](https://github.com/inspec/train/tree/v0.29.2) (2017-11-21)
[Full Changelog](https://github.com/inspec/train/compare/v0.29.1...v0.29.2)
**Fixed bugs:**
- Add unix\_mode\_mask method to Train::File::Local::Unix [\#215](https://github.com/inspec/train/pull/215) ([adamleff](https://github.com/adamleff))
**Merged pull requests:**
- Fix regressions in 0.29.1 [\#219](https://github.com/inspec/train/pull/219) ([adamleff](https://github.com/adamleff))
- Use the sanitized file path for remote linux files [\#218](https://github.com/inspec/train/pull/218) ([RoboticCheese](https://github.com/RoboticCheese))
- Remove bundler install during Appveyor tests [\#217](https://github.com/inspec/train/pull/217) ([adamleff](https://github.com/adamleff))
- Fix inspec mock tests [\#216](https://github.com/inspec/train/pull/216) ([jquick](https://github.com/jquick))
- Platform framework and detect DSL [\#209](https://github.com/inspec/train/pull/209) ([jquick](https://github.com/jquick))
## [v0.29.1](https://github.com/inspec/train/tree/v0.29.1) (2017-11-13)
[Full Changelog](https://github.com/inspec/train/compare/v0.29.0...v0.29.1)
**Merged pull requests:**
- Release 0.29.1 [\#213](https://github.com/inspec/train/pull/213) ([adamleff](https://github.com/adamleff))
- Allow for a nil value when mocking OS [\#212](https://github.com/inspec/train/pull/212) ([adamleff](https://github.com/adamleff))
- Ensure a `mounted?` method exists for all File classes, including Mock [\#211](https://github.com/inspec/train/pull/211) ([adamleff](https://github.com/adamleff))
## [v0.29.0](https://github.com/inspec/train/tree/v0.29.0) (2017-11-13)
[Full Changelog](https://github.com/inspec/train/compare/v0.28.0...v0.29.0)
**Merged pull requests:**
- Release 0.29.0 [\#210](https://github.com/inspec/train/pull/210) ([adamleff](https://github.com/adamleff))
- Reverting accidental push to master re: \#204 [\#208](https://github.com/inspec/train/pull/208) ([adamleff](https://github.com/adamleff))
- clearer error if no auth methods are available [\#207](https://github.com/inspec/train/pull/207) ([thommay](https://github.com/thommay))
- Build a complete mock OS object [\#206](https://github.com/inspec/train/pull/206) ([adamleff](https://github.com/adamleff))
- Platform framework and detect DSL [\#204](https://github.com/inspec/train/pull/204) ([jquick](https://github.com/jquick))
- add basic qnx support for train [\#203](https://github.com/inspec/train/pull/203) ([chris-rock](https://github.com/chris-rock))
- Add CODEOWNERS for train [\#202](https://github.com/inspec/train/pull/202) ([adamleff](https://github.com/adamleff))
- implement uploads and downloads for ssh and winrm [\#201](https://github.com/inspec/train/pull/201) ([thommay](https://github.com/thommay))
- \[MSYS-649\] Fix InSpec file size in Windows, refactor File classes [\#193](https://github.com/inspec/train/pull/193) ([Vasu1105](https://github.com/Vasu1105))
## [v0.28.0](https://github.com/inspec/train/tree/v0.28.0) (2017-09-25)
[Full Changelog](https://github.com/inspec/train/compare/v0.27.0...v0.28.0)
**Merged pull requests:**
- Release 0.28.0 [\#200](https://github.com/inspec/train/pull/200) ([adamleff](https://github.com/adamleff))
- Continue to support older net-ssh while fixing 4.2 deprecation [\#199](https://github.com/inspec/train/pull/199) ([adamleff](https://github.com/adamleff))
## [v0.27.0](https://github.com/inspec/train/tree/v0.27.0) (2017-09-25)
[Full Changelog](https://github.com/inspec/train/compare/v0.26.2...v0.27.0)
**Merged pull requests:**
- Release v0.27.0 [\#198](https://github.com/inspec/train/pull/198) ([adamleff](https://github.com/adamleff))
- Bump to net-ssh 4.2, fix bad net-ssh deprecation [\#197](https://github.com/inspec/train/pull/197) ([adamleff](https://github.com/adamleff))
## [v0.26.2](https://github.com/inspec/train/tree/v0.26.2) (2017-09-05)
[Full Changelog](https://github.com/inspec/train/compare/v0.26.1...v0.26.2)
**Merged pull requests:**
- Release 0.26.2 [\#195](https://github.com/inspec/train/pull/195) ([adamleff](https://github.com/adamleff))
- Fix inconsistent link\_path behavior [\#194](https://github.com/inspec/train/pull/194) ([adamleff](https://github.com/adamleff))
## [v0.26.1](https://github.com/inspec/train/tree/v0.26.1) (2017-08-14)
[Full Changelog](https://github.com/inspec/train/compare/v0.26.0...v0.26.1)
**Merged pull requests:**
- Release 0.26.1 [\#188](https://github.com/inspec/train/pull/188) ([adamleff](https://github.com/adamleff))
- Return non-zero exit code for unknown mock command [\#187](https://github.com/inspec/train/pull/187) ([chris-rock](https://github.com/chris-rock))
## [v0.26.0](https://github.com/inspec/train/tree/v0.26.0) (2017-08-10)
[Full Changelog](https://github.com/inspec/train/compare/v0.25.0...v0.26.0)
**Fixed bugs:**
- AIX operating system name is not detected properly [\#181](https://github.com/inspec/train/issues/181)
**Closed issues:**
- Add support for ssh-agent to ssh transport [\#129](https://github.com/inspec/train/issues/129)
**Merged pull requests:**
- Release v0.26.0 [\#186](https://github.com/inspec/train/pull/186) ([adamleff](https://github.com/adamleff))
- typo - should $g for group instead of doulbe $u [\#185](https://github.com/inspec/train/pull/185) ([aklyachkin](https://github.com/aklyachkin))
- update ruby requirements to 2.2 - 2.4 range [\#184](https://github.com/inspec/train/pull/184) ([arlimus](https://github.com/arlimus))
- detect operating system name for AIX [\#182](https://github.com/inspec/train/pull/182) ([chris-rock](https://github.com/chris-rock))
## [v0.25.0](https://github.com/inspec/train/tree/v0.25.0) (2017-06-15)
[Full Changelog](https://github.com/inspec/train/compare/v0.24.0...v0.25.0)
**Merged pull requests:**
- Fix CoreOS platform detection [\#180](https://github.com/inspec/train/pull/180) ([rarenerd](https://github.com/rarenerd))
- Remove autoloads in favor of eager loading [\#178](https://github.com/inspec/train/pull/178) ([Sharpie](https://github.com/Sharpie))
- Fixed IPv6 URI parsing [\#176](https://github.com/inspec/train/pull/176) ([zfjagann](https://github.com/zfjagann))
## [v0.24.0](https://github.com/inspec/train/tree/v0.24.0) (2017-05-30)
[Full Changelog](https://github.com/inspec/train/compare/v0.23.0...v0.24.0)
**Merged pull requests:**
- prevent sudo on localhost targets [\#179](https://github.com/inspec/train/pull/179) ([arlimus](https://github.com/arlimus))
## [v0.23.0](https://github.com/inspec/train/tree/v0.23.0) (2017-03-29)
[Full Changelog](https://github.com/inspec/train/compare/v0.22.1...v0.23.0)
**Merged pull requests:**
- Release 0.23.0 [\#173](https://github.com/inspec/train/pull/173) ([adamleff](https://github.com/adamleff))
- Fix Net::SSH warning when passing nil option values [\#172](https://github.com/inspec/train/pull/172) ([tylercloke](https://github.com/tylercloke))
- winrm: hide password [\#171](https://github.com/inspec/train/pull/171) ([crepetl](https://github.com/crepetl))
## [v0.22.1](https://github.com/inspec/train/tree/v0.22.1) (2017-01-17)
[Full Changelog](https://github.com/inspec/train/compare/v0.22.0...v0.22.1)
**Merged pull requests:**
- Release 0.22.1 [\#169](https://github.com/inspec/train/pull/169) ([tduffield](https://github.com/tduffield))
- Relax net-ssh dep to allow 4.0 [\#168](https://github.com/inspec/train/pull/168) ([tduffield](https://github.com/tduffield))
- Fix Oracle Linux detection [\#167](https://github.com/inspec/train/pull/167) ([carldjohnston](https://github.com/carldjohnston))
- Add support for parallels & virtuozzo linux [\#166](https://github.com/inspec/train/pull/166) ([jaxxstorm](https://github.com/jaxxstorm))
## [v0.22.0](https://github.com/inspec/train/tree/v0.22.0) (2016-11-29)
[Full Changelog](https://github.com/inspec/train/compare/v0.21.1...v0.22.0)
**Implemented enhancements:**
- Try to use ssh agent if no password or key files have been specified [\#165](https://github.com/inspec/train/pull/165) ([alexpop](https://github.com/alexpop))
**Merged pull requests:**
- Add openvms detection [\#159](https://github.com/inspec/train/pull/159) ([briandoodyie](https://github.com/briandoodyie))
## [v0.21.1](https://github.com/inspec/train/tree/v0.21.1) (2016-11-04)
[Full Changelog](https://github.com/inspec/train/compare/v0.21.0...v0.21.1)
**Closed issues:**
- detect\_arista\_eos raises exception against unix host [\#160](https://github.com/inspec/train/issues/160)
**Merged pull requests:**
- ensure the os detection works in pty mode [\#161](https://github.com/inspec/train/pull/161) ([chris-rock](https://github.com/chris-rock))
## [v0.21.0](https://github.com/inspec/train/tree/v0.21.0) (2016-11-04)
[Full Changelog](https://github.com/inspec/train/compare/v0.20.1...v0.21.0)
**Implemented enhancements:**
- Train doesn't create a login shell [\#148](https://github.com/inspec/train/issues/148)
**Merged pull requests:**
- Add detection for Arista EOS [\#158](https://github.com/inspec/train/pull/158) ([jerearista](https://github.com/jerearista))
## [v0.20.1](https://github.com/inspec/train/tree/v0.20.1) (2016-10-15)
[Full Changelog](https://github.com/inspec/train/compare/v0.20.0...v0.20.1)
**Fixed bugs:**
- support empty URIs [\#154](https://github.com/inspec/train/pull/154) ([arlimus](https://github.com/arlimus))
## [v0.20.0](https://github.com/inspec/train/tree/v0.20.0) (2016-09-21)
[Full Changelog](https://github.com/inspec/train/compare/v0.19.1...v0.20.0)
**Fixed bugs:**
- get `Preparing modules for first use.` when I use train on Windows [\#153](https://github.com/inspec/train/issues/153)
**Merged pull requests:**
- `Preparing modules for first use.` error message on Windows [\#152](https://github.com/inspec/train/pull/152) ([chris-rock](https://github.com/chris-rock))
- Convert `wmic` architecture to a normal standard [\#151](https://github.com/inspec/train/pull/151) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
- Login shell [\#149](https://github.com/inspec/train/pull/149) ([jonathanmorley](https://github.com/jonathanmorley))
## [v0.19.1](https://github.com/inspec/train/tree/v0.19.1) (2016-09-16)
[Full Changelog](https://github.com/inspec/train/compare/v0.19.0...v0.19.1)
**Implemented enhancements:**
- hostname property for WinRM::Connection [\#128](https://github.com/inspec/train/issues/128)
- Return hostname from WinRM::Connection same as SSH::Connection [\#150](https://github.com/inspec/train/pull/150) ([alexpop](https://github.com/alexpop))
## [v0.19.0](https://github.com/inspec/train/tree/v0.19.0) (2016-09-05)
[Full Changelog](https://github.com/inspec/train/compare/v0.18.0...v0.19.0)
**Fixed bugs:**
- use stat -c for alpine linux [\#146](https://github.com/inspec/train/pull/146) ([chris-rock](https://github.com/chris-rock))
**Merged pull requests:**
- support ruby 2.2.1 [\#145](https://github.com/inspec/train/pull/145) ([chris-rock](https://github.com/chris-rock))
- Use winrm v2 implementation [\#122](https://github.com/inspec/train/pull/122) ([mwrock](https://github.com/mwrock))
## [v0.18.0](https://github.com/inspec/train/tree/v0.18.0) (2016-08-26)
[Full Changelog](https://github.com/inspec/train/compare/v0.17.0...v0.18.0)
**Merged pull requests:**
- Allow JSON 2.0 on Ruby 2.2 and above [\#144](https://github.com/inspec/train/pull/144) ([jkeiser](https://github.com/jkeiser))
- Enable Ruby 2.3 in Travis, make it default suite [\#143](https://github.com/inspec/train/pull/143) ([jkeiser](https://github.com/jkeiser))
- Add the darwin platform family [\#141](https://github.com/inspec/train/pull/141) ([tas50](https://github.com/tas50))
- update integration test dependencies [\#139](https://github.com/inspec/train/pull/139) ([tas50](https://github.com/tas50))
- Add badges to the readme [\#138](https://github.com/inspec/train/pull/138) ([tas50](https://github.com/tas50))
- use --decode on base64 command to maintain compatibility with Darwin. [\#137](https://github.com/inspec/train/pull/137) ([thomascate](https://github.com/thomascate))
## [v0.17.0](https://github.com/inspec/train/tree/v0.17.0) (2016-08-19)
[Full Changelog](https://github.com/inspec/train/compare/v0.16.0...v0.17.0)
**Implemented enhancements:**
- return owner for files on windows [\#132](https://github.com/inspec/train/pull/132) ([chris-rock](https://github.com/chris-rock))
**Closed issues:**
- prefix powershell commands with `$ProgressPreference = "SilentlyContinue"` [\#134](https://github.com/inspec/train/issues/134)
**Merged pull requests:**
- CI improvements [\#133](https://github.com/inspec/train/pull/133) ([chris-rock](https://github.com/chris-rock))
- Rescue EPIPE on connect in ssh transport [\#130](https://github.com/inspec/train/pull/130) ([stevendanna](https://github.com/stevendanna))
## [v0.16.0](https://github.com/inspec/train/tree/v0.16.0) (2016-08-08)
[Full Changelog](https://github.com/inspec/train/compare/v0.15.1...v0.16.0)
**Merged pull requests:**
- provide file\_version and product\_version for windows files [\#127](https://github.com/inspec/train/pull/127) ([chris-rock](https://github.com/chris-rock))
- Bring train platform data more in line with ohai's platform data [\#126](https://github.com/inspec/train/pull/126) ([stevendanna](https://github.com/stevendanna))
## [v0.15.1](https://github.com/inspec/train/tree/v0.15.1) (2016-07-11)
[Full Changelog](https://github.com/inspec/train/compare/v0.15.0...v0.15.1)
**Fixed bugs:**
- bugfix: higher mode bits on local connection [\#125](https://github.com/inspec/train/pull/125) ([arlimus](https://github.com/arlimus))
**Merged pull requests:**
- Test ruby 2.1 instead of 1.9.3 and only launch one test group per travis/appveyor [\#123](https://github.com/inspec/train/pull/123) ([mwrock](https://github.com/mwrock))
## [v0.15.0](https://github.com/inspec/train/tree/v0.15.0) (2016-07-01)
[Full Changelog](https://github.com/inspec/train/compare/v0.14.2...v0.15.0)
**Implemented enhancements:**
- have net-ssh request a pty [\#60](https://github.com/inspec/train/issues/60)
**Merged pull requests:**
- Allow requesting a PTY [\#121](https://github.com/inspec/train/pull/121) ([srenatus](https://github.com/srenatus))
## [v0.14.2](https://github.com/inspec/train/tree/v0.14.2) (2016-06-28)
[Full Changelog](https://github.com/inspec/train/compare/v0.14.1...v0.14.2)
**Merged pull requests:**
- do not log password in ssh connection output [\#120](https://github.com/inspec/train/pull/120) ([marcparadise](https://github.com/marcparadise))
## [v0.14.1](https://github.com/inspec/train/tree/v0.14.1) (2016-06-27)
[Full Changelog](https://github.com/inspec/train/compare/v0.14.0...v0.14.1)
**Fixed bugs:**
- bugfix: add mock backend initialization [\#119](https://github.com/inspec/train/pull/119) ([arlimus](https://github.com/arlimus))
## [v0.14.0](https://github.com/inspec/train/tree/v0.14.0) (2016-06-27)
[Full Changelog](https://github.com/inspec/train/compare/v0.13.1...v0.14.0)
**Implemented enhancements:**
- json in and out for base connection [\#118](https://github.com/inspec/train/pull/118) ([arlimus](https://github.com/arlimus))
- ESX support [\#116](https://github.com/inspec/train/pull/116) ([Anirudh-Gupta](https://github.com/Anirudh-Gupta))
**Fixed bugs:**
- sporadic appveyor failure on `winrm delete ...` [\#105](https://github.com/inspec/train/issues/105)
- bugfix: run frozen string commands via ssh [\#117](https://github.com/inspec/train/pull/117) ([arlimus](https://github.com/arlimus))
## [v0.13.1](https://github.com/inspec/train/tree/v0.13.1) (2016-06-16)
[Full Changelog](https://github.com/inspec/train/compare/v0.13.0...v0.13.1)
**Implemented enhancements:**
- use train as gem name. Thanks @halo [\#115](https://github.com/inspec/train/pull/115) ([chris-rock](https://github.com/chris-rock))
## [v0.13.0](https://github.com/inspec/train/tree/v0.13.0) (2016-06-16)
[Full Changelog](https://github.com/inspec/train/compare/v0.12.1...v0.13.0)
**Implemented enhancements:**
- provide uri-formatted information on all connections [\#113](https://github.com/inspec/train/pull/113) ([arlimus](https://github.com/arlimus))
**Fixed bugs:**
- Authentication with SSH Server on OSX is failing [\#111](https://github.com/inspec/train/issues/111)
**Merged pull requests:**
- adding support for vmware's esx server [\#114](https://github.com/inspec/train/pull/114) ([Anirudh-Gupta](https://github.com/Anirudh-Gupta))
- add missing keyboard-interactive authentication method [\#112](https://github.com/inspec/train/pull/112) ([chris-rock](https://github.com/chris-rock))
## [v0.12.1](https://github.com/inspec/train/tree/v0.12.1) (2016-05-23)
[Full Changelog](https://github.com/inspec/train/compare/v0.12.0...v0.12.1)
**Fixed bugs:**
- loosen restriction for docker api [\#109](https://github.com/inspec/train/pull/109) ([chris-rock](https://github.com/chris-rock))
**Closed issues:**
- docker-api conflict when using docker cookbook [\#108](https://github.com/inspec/train/issues/108)
## [v0.12.0](https://github.com/inspec/train/tree/v0.12.0) (2016-05-16)
[Full Changelog](https://github.com/inspec/train/compare/v0.11.4...v0.12.0)
**Merged pull requests:**
- Custom sudo command [\#107](https://github.com/inspec/train/pull/107) ([jeremymv2](https://github.com/jeremymv2))
## [v0.11.4](https://github.com/inspec/train/tree/v0.11.4) (2016-05-13)
[Full Changelog](https://github.com/inspec/train/compare/v0.11.3...v0.11.4)
**Fixed bugs:**
- mount resource incorrect matching [\#103](https://github.com/inspec/train/issues/103)
- Add a space to avoid matching partial paths [\#104](https://github.com/inspec/train/pull/104) ([alexpop](https://github.com/alexpop))
- Update README.md [\#102](https://github.com/inspec/train/pull/102) ([mcquin](https://github.com/mcquin))
**Merged pull requests:**
- 0.11.4 [\#106](https://github.com/inspec/train/pull/106) ([arlimus](https://github.com/arlimus))
## [v0.11.3](https://github.com/inspec/train/tree/v0.11.3) (2016-05-10)
[Full Changelog](https://github.com/inspec/train/compare/v0.11.2...v0.11.3)
**Fixed bugs:**
- appveyor fixing... [\#98](https://github.com/inspec/train/pull/98) ([arlimus](https://github.com/arlimus))
**Merged pull requests:**
- fix: winrm https listener is not configured anymore in appveyor [\#100](https://github.com/inspec/train/pull/100) ([chris-rock](https://github.com/chris-rock))
- use aix stats implementation for hpux as well [\#99](https://github.com/inspec/train/pull/99) ([Anirudh-Gupta](https://github.com/Anirudh-Gupta))
## [v0.11.2](https://github.com/inspec/train/tree/v0.11.2) (2016-04-29)
[Full Changelog](https://github.com/inspec/train/compare/v0.11.1...v0.11.2)
**Fixed bugs:**
- bugfix: windows file failed to initialize with new symlink handler [\#96](https://github.com/inspec/train/pull/96) ([arlimus](https://github.com/arlimus))
**Merged pull requests:**
- 0.11.2 [\#97](https://github.com/inspec/train/pull/97) ([alexpop](https://github.com/alexpop))
## [v0.11.1](https://github.com/inspec/train/tree/v0.11.1) (2016-04-28)
[Full Changelog](https://github.com/inspec/train/compare/v0.11.0...v0.11.1)
**Fixed bugs:**
- fix nil file paths [\#94](https://github.com/inspec/train/pull/94) ([arlimus](https://github.com/arlimus))
**Merged pull requests:**
- provide a source path for filecommon [\#95](https://github.com/inspec/train/pull/95) ([arlimus](https://github.com/arlimus))
- restructure docker tests to balance load between 2 runs [\#93](https://github.com/inspec/train/pull/93) ([arlimus](https://github.com/arlimus))
## [v0.11.0](https://github.com/inspec/train/tree/v0.11.0) (2016-04-28)
[Full Changelog](https://github.com/inspec/train/compare/v0.10.8...v0.11.0)
**Implemented enhancements:**
- Overhault file\(...\) and stat\(...\); point to destination of symlinks [\#92](https://github.com/inspec/train/pull/92) ([arlimus](https://github.com/arlimus))
**Fixed bugs:**
- validate the backend configuration [\#91](https://github.com/inspec/train/pull/91) ([arlimus](https://github.com/arlimus))
## [v0.10.8](https://github.com/inspec/train/tree/v0.10.8) (2016-04-25)
[Full Changelog](https://github.com/inspec/train/compare/v0.10.7...v0.10.8)
**Implemented enhancements:**
- loose restriction for mixlib-shellout [\#89](https://github.com/inspec/train/pull/89) ([chris-rock](https://github.com/chris-rock))
**Merged pull requests:**
- use gemspec for travis [\#90](https://github.com/inspec/train/pull/90) ([chris-rock](https://github.com/chris-rock))
- Don't strip off the second byte of the octal mode. [\#88](https://github.com/inspec/train/pull/88) ([justindossey](https://github.com/justindossey))
## [v0.10.7](https://github.com/inspec/train/tree/v0.10.7) (2016-04-21)
[Full Changelog](https://github.com/inspec/train/compare/v0.10.6...v0.10.7)
**Merged pull requests:**
- 0.10.7 [\#87](https://github.com/inspec/train/pull/87) ([arlimus](https://github.com/arlimus))
- Revert "add -L to get stat for symlink" [\#86](https://github.com/inspec/train/pull/86) ([arlimus](https://github.com/arlimus))
## [v0.10.6](https://github.com/inspec/train/tree/v0.10.6) (2016-04-20)
[Full Changelog](https://github.com/inspec/train/compare/v0.10.5...v0.10.6)
**Merged pull requests:**
- add -L to get stat for symlink [\#85](https://github.com/inspec/train/pull/85) ([vjeffrey](https://github.com/vjeffrey))
- release via travis + test via rubygems [\#84](https://github.com/inspec/train/pull/84) ([arlimus](https://github.com/arlimus))
## [v0.10.5](https://github.com/inspec/train/tree/v0.10.5) (2016-04-18)
[Full Changelog](https://github.com/inspec/train/compare/v0.10.4...v0.10.5)
**Merged pull requests:**
- 0.10.5 [\#83](https://github.com/inspec/train/pull/83) ([srenatus](https://github.com/srenatus))
- detection for hp-ux machine [\#82](https://github.com/inspec/train/pull/82) ([Anirudh-Gupta](https://github.com/Anirudh-Gupta))
## [v0.10.4](https://github.com/inspec/train/tree/v0.10.4) (2016-03-31)
[Full Changelog](https://github.com/inspec/train/compare/v0.10.3...v0.10.4)
**Fixed bugs:**
- bugfix: do not use unix path escape for windows [\#79](https://github.com/inspec/train/pull/79) ([chris-rock](https://github.com/chris-rock))
**Merged pull requests:**
- 0.10.4 [\#80](https://github.com/inspec/train/pull/80) ([arlimus](https://github.com/arlimus))
## [v0.10.3](https://github.com/inspec/train/tree/v0.10.3) (2016-03-07)
[Full Changelog](https://github.com/inspec/train/compare/v0.10.1...v0.10.3)
**Fixed bugs:**
- set default value for ssh compression to false [\#77](https://github.com/inspec/train/pull/77) ([chris-rock](https://github.com/chris-rock))
- avoid mock backend error on nil commands [\#75](https://github.com/inspec/train/pull/75) ([arlimus](https://github.com/arlimus))
**Merged pull requests:**
- 0.10.3 [\#78](https://github.com/inspec/train/pull/78) ([chris-rock](https://github.com/chris-rock))
- 0.10.2 [\#76](https://github.com/inspec/train/pull/76) ([arlimus](https://github.com/arlimus))
## [v0.10.1](https://github.com/inspec/train/tree/v0.10.1) (2016-02-29)
[Full Changelog](https://github.com/inspec/train/compare/v0.10.0...v0.10.1)
**Merged pull requests:**
- 0.10.1 [\#74](https://github.com/inspec/train/pull/74) ([chris-rock](https://github.com/chris-rock))
- fix gem build license warning [\#73](https://github.com/inspec/train/pull/73) ([chris-rock](https://github.com/chris-rock))
- depend on docker-api 1.26.2 [\#72](https://github.com/inspec/train/pull/72) ([someara](https://github.com/someara))
## [v0.10.0](https://github.com/inspec/train/tree/v0.10.0) (2016-02-19)
[Full Changelog](https://github.com/inspec/train/compare/v0.9.7...v0.10.0)
**Implemented enhancements:**
- show mock failures for commands [\#69](https://github.com/inspec/train/pull/69) ([arlimus](https://github.com/arlimus))
- update gems and rubocop [\#68](https://github.com/inspec/train/pull/68) ([arlimus](https://github.com/arlimus))
**Fixed bugs:**
- complete rewrite of windows version detection [\#70](https://github.com/inspec/train/pull/70) ([chris-rock](https://github.com/chris-rock))
**Merged pull requests:**
- 0.10.0 [\#71](https://github.com/inspec/train/pull/71) ([chris-rock](https://github.com/chris-rock))
## [v0.9.7](https://github.com/inspec/train/tree/v0.9.7) (2016-02-05)
[Full Changelog](https://github.com/inspec/train/compare/v0.9.6...v0.9.7)
**Implemented enhancements:**
- feature: add file.basename [\#64](https://github.com/inspec/train/pull/64) ([arlimus](https://github.com/arlimus))
- add `requiretty` workaround measures [\#63](https://github.com/inspec/train/pull/63) ([srenatus](https://github.com/srenatus))
**Fixed bugs:**
- ensure bundler is installed on travis [\#66](https://github.com/inspec/train/pull/66) ([chris-rock](https://github.com/chris-rock))
**Merged pull requests:**
- 0.9.7 [\#67](https://github.com/inspec/train/pull/67) ([chris-rock](https://github.com/chris-rock))
## [v0.9.6](https://github.com/inspec/train/tree/v0.9.6) (2016-01-29)
[Full Changelog](https://github.com/inspec/train/compare/v0.9.5...v0.9.6)
**Implemented enhancements:**
- add solaris support [\#61](https://github.com/inspec/train/pull/61) ([chris-rock](https://github.com/chris-rock))
**Merged pull requests:**
- 0.9.6 [\#62](https://github.com/inspec/train/pull/62) ([chris-rock](https://github.com/chris-rock))
## [v0.9.5](https://github.com/inspec/train/tree/v0.9.5) (2016-01-25)
[Full Changelog](https://github.com/inspec/train/compare/v0.9.4...v0.9.5)
**Implemented enhancements:**
- use minitest for windows tests [\#56](https://github.com/inspec/train/pull/56) ([chris-rock](https://github.com/chris-rock))
- use negotiate auth for winrm and not basic\_auth [\#55](https://github.com/inspec/train/pull/55) ([mwrock](https://github.com/mwrock))
- bugfix: pin net-ssh 2.9 in gem file [\#54](https://github.com/inspec/train/pull/54) ([chris-rock](https://github.com/chris-rock))
- Add appveyor and Windows test [\#53](https://github.com/inspec/train/pull/53) ([chris-rock](https://github.com/chris-rock))
- Deprecating winrm-tansport gem [\#46](https://github.com/inspec/train/pull/46) ([mwrock](https://github.com/mwrock))
**Fixed bugs:**
- Cannot install train on Windows with ChefDK if username \>9 chars in length due to spec filename lengths in docker-api gem. [\#28](https://github.com/inspec/train/issues/28)
- Properly wrap commands in powershell for local backend [\#57](https://github.com/inspec/train/pull/57) ([chris-rock](https://github.com/chris-rock))
- Copying https://github.com/test-kitchen/test-kitchen/pull/919 to this repo [\#52](https://github.com/inspec/train/pull/52) ([tyler-ball](https://github.com/tyler-ball))
**Merged pull requests:**
- 0.9.5 [\#58](https://github.com/inspec/train/pull/58) ([chris-rock](https://github.com/chris-rock))
## [v0.9.4](https://github.com/inspec/train/tree/v0.9.4) (2016-01-15)
[Full Changelog](https://github.com/inspec/train/compare/v0.9.3...v0.9.4)
**Implemented enhancements:**
- 0.9.3 is empty on Windows [\#48](https://github.com/inspec/train/pull/48) ([tyler-ball](https://github.com/tyler-ball))
- Updating to the latest release of net-ssh to consume https://github.com/net-ssh/net-ssh/pull/280 [\#47](https://github.com/inspec/train/pull/47) ([tyler-ball](https://github.com/tyler-ball))
**Fixed bugs:**
- bugfix: command wrapper always return nil [\#50](https://github.com/inspec/train/pull/50) ([chris-rock](https://github.com/chris-rock))
**Merged pull requests:**
- 0.9.4 [\#51](https://github.com/inspec/train/pull/51) ([chris-rock](https://github.com/chris-rock))
## [v0.9.3](https://github.com/inspec/train/tree/v0.9.3) (2016-01-03)
[Full Changelog](https://github.com/inspec/train/compare/v0.9.2...v0.9.3)
**Implemented enhancements:**
- introduce `mounted` as a separate method to retrieve the content [\#44](https://github.com/inspec/train/pull/44) ([chris-rock](https://github.com/chris-rock))
- Support for local transport on Windows [\#43](https://github.com/inspec/train/pull/43) ([chris-rock](https://github.com/chris-rock))
- Split integration test preparation from executing [\#42](https://github.com/inspec/train/pull/42) ([chris-rock](https://github.com/chris-rock))
- Support for AIX and targeted SSH testing [\#41](https://github.com/inspec/train/pull/41) ([foobarbam](https://github.com/foobarbam))
**Merged pull requests:**
- 0.9.3 [\#45](https://github.com/inspec/train/pull/45) ([chris-rock](https://github.com/chris-rock))
## [v0.9.2](https://github.com/inspec/train/tree/v0.9.2) (2015-12-11)
[Full Changelog](https://github.com/inspec/train/compare/v0.9.1...v0.9.2)
**Implemented enhancements:**
- add changelog [\#38](https://github.com/inspec/train/pull/38) ([chris-rock](https://github.com/chris-rock))
- activate integration tests in travis [\#37](https://github.com/inspec/train/pull/37) ([chris-rock](https://github.com/chris-rock))
- Adding support for Wind River Linux in support of Cisco devices [\#33](https://github.com/inspec/train/pull/33) ([adamleff](https://github.com/adamleff))
**Fixed bugs:**
- Integration test failures [\#34](https://github.com/inspec/train/issues/34)
- Implemented WindowsFile\#exist? [\#36](https://github.com/inspec/train/pull/36) ([docwhat](https://github.com/docwhat))
- adapt integration test to changes in command\_wrapper [\#35](https://github.com/inspec/train/pull/35) ([srenatus](https://github.com/srenatus))
**Closed issues:**
- WinRM plaintext transport is hardcoded \(cannot use SSL\) [\#29](https://github.com/inspec/train/issues/29)
**Merged pull requests:**
- 0.9.2 [\#40](https://github.com/inspec/train/pull/40) ([arlimus](https://github.com/arlimus))
- add rake version helpers [\#39](https://github.com/inspec/train/pull/39) ([arlimus](https://github.com/arlimus))
## [v0.9.1](https://github.com/inspec/train/tree/v0.9.1) (2015-11-03)
[Full Changelog](https://github.com/inspec/train/compare/0.9.0...v0.9.1)
**Implemented enhancements:**
- R train [\#27](https://github.com/inspec/train/pull/27) ([arlimus](https://github.com/arlimus))
- Update style of readme [\#26](https://github.com/inspec/train/pull/26) ([chris-rock](https://github.com/chris-rock))
- Add Apache 2.0 License [\#25](https://github.com/inspec/train/pull/25) ([jamesc](https://github.com/jamesc))
## [0.9.0](https://github.com/inspec/train/tree/0.9.0) (2015-11-03)
**Implemented enhancements:**
- set windows name in :release [\#23](https://github.com/inspec/train/pull/23) ([arlimus](https://github.com/arlimus))
- basic file transport via winrm [\#21](https://github.com/inspec/train/pull/21) ([chris-rock](https://github.com/chris-rock))
- dont return nil on command errors stdout/stderr [\#20](https://github.com/inspec/train/pull/20) ([arlimus](https://github.com/arlimus))
- skip .delivery in gemspec [\#19](https://github.com/inspec/train/pull/19) ([arlimus](https://github.com/arlimus))
- Verify sudo is working and fail with error messages if it isn't [\#18](https://github.com/inspec/train/pull/18) ([arlimus](https://github.com/arlimus))
- improve file eposure [\#16](https://github.com/inspec/train/pull/16) ([chris-rock](https://github.com/chris-rock))
- add delivery [\#13](https://github.com/inspec/train/pull/13) ([arlimus](https://github.com/arlimus))
- Sudo [\#12](https://github.com/inspec/train/pull/12) ([arlimus](https://github.com/arlimus))
- Extract options handling for transport [\#11](https://github.com/inspec/train/pull/11) ([arlimus](https://github.com/arlimus))
- don't let mock commands return nil on stdout or stderr [\#10](https://github.com/inspec/train/pull/10) ([arlimus](https://github.com/arlimus))
- allow mock command to support sha256 mocking of commands [\#9](https://github.com/inspec/train/pull/9) ([arlimus](https://github.com/arlimus))
- register plugins with both names and symbols [\#8](https://github.com/inspec/train/pull/8) ([arlimus](https://github.com/arlimus))
- split of mock into transport and connection [\#7](https://github.com/inspec/train/pull/7) ([arlimus](https://github.com/arlimus))
- bugfix: add docker dependency to gemspec [\#6](https://github.com/inspec/train/pull/6) ([arlimus](https://github.com/arlimus))
- move train/plugins/common to train/extras [\#2](https://github.com/inspec/train/pull/2) ([arlimus](https://github.com/arlimus))
- add Travis [\#1](https://github.com/inspec/train/pull/1) ([arlimus](https://github.com/arlimus))
**Fixed bugs:**
- bugfix: prevent debugging info to stdout on winrm [\#22](https://github.com/inspec/train/pull/22) ([arlimus](https://github.com/arlimus))
- bugfix: fail ssh connections correctly [\#17](https://github.com/inspec/train/pull/17) ([arlimus](https://github.com/arlimus))
- bugfix: initialize mock transport to correct family [\#14](https://github.com/inspec/train/pull/14) ([arlimus](https://github.com/arlimus))
**Merged pull requests:**
- bump train version to 0.9.0 [\#24](https://github.com/inspec/train/pull/24) ([chris-rock](https://github.com/chris-rock)) train-3.2.20/CODE_OF_CONDUCT.md 0000644 0001750 0001750 00000031546 13630530357 015742 0 ustar terceiro terceiro # Chef Contributor Covenant Code of Conduct
**Note**: If you are in a physical space (e.g. ChefConf, Meetup, etc), please
see the [Physical Spaces Code of Conduct](physical-spaces-code-of-conduct.md)
## Our Pledge
Diversity is one of the greatest strengths that a community can have, and many times
that strength is born from the friction that can only come through sharing of
differing perspectives.
In the interest of fostering an open, welcoming, and encouraging environment, we
as contributors, maintainers, and community members pledge to making
participation in our projects and our community a harassment-free experience for
everyone, regardless of age, body size, disability, ethnicity, gender identity
and expression, level of experience, nationality, personal appearance, race,
religion, veteran status, or sexual identity and orientation.
## Our Standards
The Chef community contains a diverse group of professionals and volunteers
who come from all over the world to make Chef better. Community members may
fulfill many roles including mentoring, teaching, and connecting with other
members of the community.
Be careful in the words that you choose. Be kind to others. Practice empathy.
Don't insult or put down others. Remember that sexist, racist, ableist, ageist, and other
exclusionary jokes can be offensive to those around you. If you think your
conversation is making another community member uncomfortable _or_ if they tell
you so, stop immediately, make amends, and move forward.
As you are working with other members of the community, please keep in mind that the
following guidelines apply equally to founders, mentors, those who submit
new features/pull requests, and anyone who is seeking help and guidance.
The following list isn’t exhaustive, but these few examples can help all of us
communicate well, so that the community can work better together:
- Use welcoming and inclusive language
- Exercise patience and friendliness
- Be respectful of differing viewpoints and experiences
- Gracefully accept constructive criticism
- Focus on what is best for the community
- Show empathy towards other community members
The previous list applies to all forms of communication: Slack (or any web
chat), Discourse, the issue tracker, and any other forum that is used by the
community.
Please keep in mind that:
- Your work will be used by other people, and you, in turn, will depend on the
work of others
- Decisions that you make often will affect others in the community
- Disagreements happen, but should not be an excuse for poor behavior and bad
manners. When disagreements do happen, let’s work together to solve them
effectively and in a way that ensures that everyone understands what the
disagreements were
- Our community spans languages, cultures, perspectives (and continents!), and
as such people may not understand jokes, sarcasm, and oblique references in
the same way that you do. Remember that and be kind to the other members
of the community
- Be cautious about making assumptions about what someone does or does not know
about something - assuming that someone does not understand an issue and over
explaining can be condescending (even when not intended to be so)
- Sexist, racist, ableist, ageist, and other prejudicial or exclusionary comments are
not welcome in the community
## Unacceptable Behavior
Harassment comes in many forms, including but not limited to:
- Offensive comments related to gender, sexual orientation, age, disability,
physical appearance, body size, race, veteran status, or religion
- Posting/Exposing sexually explicit or violent images
- Deliberate (or implied) intimidation
- Trolling, insulting/derogatory comments, and personal or political attacks
particularly those related to gender, sexual orientation, age, race, religion or
disability
- Publishing others' private
information, such as a physical or electronic address, without explicit
permission ("doxing")
As a community that meets in physical public spaces, harassment also includes:
- Stalking or persistent following
- Intrusive or otherwise unwanted photography or recording
- Sustained disruption of talks or other events
- Inappropriate physical contact or unwelcome sexual attention
**NOTE**: If you are in a physical space -- e.g. Chef Conf, Meetup, etc. -- please
see the [Physical Spaces Code of Conduct](physical-spaces-code-of-conduct.md).
If you have any lack of clarity about behaviors we include in the definition of
"harassment", please read the [Citizen Code of
Conduct](http://citizencodeofconduct.org/). In particular, we do not tolerate
behavior that excludes people in socially marginalized groups.
## Enforcement/Getting Help
Instances of abusive, harassing, or otherwise unacceptable behavior should be
reported by contacting any of the Community Advocates directly. Each person's
contact information and role is listed in the repo that links to this document.
If you were not linked here, then contact the [individuals listed below](#roles). All
complaints will be reviewed, investigated, and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an
incident. Further details of specific enforcement policies may be posted
separately.
Community Organizers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Roles
The following are the various roles of our **Community Organizers** and the
person(s) assigned to each role:
- The **Deciders** have final say on community guidelines and final authority on correct actions and appeals
- The **Community Advocates** may be assigned for each area where the
community convenes online (Slack, email list, GitHub, etc.). Community
Advocates are volunteers who have the best interests of our community in
mind. They act in good faith to help enforce our community guidelines and
respond to incidents when they occur
- The **Project Maintainers** are expected to conduct their
behavior in line with the Code of Conduct and are individually responsible
for both escalating to a **Community Advocate** in case of witnessing an
incident, and helping to foster the community
- A **Community Member** is anyone who participates with the community
whether in-person or via online channels. Community members are responsible
for following the community guidelines, suggesting updates to the guidelines
when warranted, and helping enforce community guidelines
| Role | Name | Contact Info |
| ------------------- | ------------------------ | ---------------------- |
| Decider | Jenny Armstrong-Own | jowen@chef.io |
| Community Advocate | Mandi Walls | mandi@chef.io |
| Community Advocate | Nell Shamrell-Harrington | nshamrell@chef.io |
| Community Advocate | Robb Kidd | rkidd@chef.io |
## Consequences of Unacceptable Behavior
Unacceptable behavior from any community member, including sponsors and those
with decision-making authority, will *not* be tolerated.
Anyone who is asked to stop unacceptable behavior is expected to comply immediately.
If a community member engages in unacceptable behavior, the community organizers
may take action that they deem appropriate -- up to and including a temporary ban or
permanent expulsion from the community _without warning_ (and without refund, in
the case of a paid event). If you have been involved in unacceptable behavior
with current Chef community members outside the boundaries of the Chef
Community, the Community Organizers retain the right to treat those external
incidents in the same manner as internal incidents.
Any physical violence _or_ intimidation, threatened or acted on, is a serious
offense and will result in immediate exclusion from the community and
appropriate follow up with law enforcement. No, we are not kidding.
## Procedure for Handling Disagreements and Incidents
Disagreements are inherent to a group of impassioned people. When they occur, we
seek to resolve disagreements and differing views constructively and with the
help of the community and community processes. When disagreements escalate, we
ask our Community Advocates to step in to moderate, mediate, and help resolve
tense situations.
The Chef Community Advocates are well informed on how to deal with incidents.
Report the incident (preferably in writing) to one of the Community Advocates
listed in the [Roles](#roles) section.
### Handling Incidents
**NOTE**: If you are in a physical space -- e.g. Chef Conf, Meetup, etc. -- please
see the [Physical Spaces Code of Conduct](physical-spaces-code-of-conduct.md).
When a Community Organizer or Project Maintainer notices someone behaving in a
way that is outside of our guidelines (a violator), the Community Advocate should
make every reasonable attempt to help curtail that behavior. The Community
Advocate may:
- Remind the violator about our Community Code of Conduct and provide a link
to this document
- Ask the violator to stop the unacceptable behavior
- Raise the issue with a maintainer, the community manager, or any member of
the core project team
- Allow time for the violator to correct the behavior
The Community Advocate should take the following steps if the behavior is not
brought in-line with our guidelines or the incident is not resolved:
- Consult with another Community Organizer to make a judgment call about what
reasonable corrective actions are warranted
- In the case that no conclusion can be made, escalate to include the next
level of Community Organizers
- If still no conclusion can be made, report the incident to the **Deciders** listed above
- Apply the corrective action
- Document the incident as described below
#### Documenting Incidents
All incident reports will be kept in a private repository that is shared with
the aforementioned Community Advocates and Deciders under the [Roles]((#roles)
section. No other individuals or project contributors will be given access to
these incident reports. **This repo will hold no personal information on the
victim of an incident.** On the displacement of any Community Organizer in the
[Roles](#roles) list above, that individual will immediately lose access to this
repository and will terminate any local copies of the repository.
The important information to report consists of:
- Identifying information (name, email address, Slack username, etc.) of the
person doing the harassing
- The behavior that was in violation
- The approximate time and date of the behavior
- The circumstances surrounding the incident
- Where applicable, contextual information/proof (email body, chat log, GitHub
Issue, etc.)
- Contact information for witnesses to the incident
If you feel your safety is in jeopardy, please do not hesitate to contact local
law enforcement.
**Note:** Incidents that violate the Community Code of Conduct are extremely
damaging to the community. The silver lining is that, in many cases, these
incidents present a chance for the community as a whole to grow, learn, and
become better.
## Our Responsibilities
Community Organizers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Community Organizers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, messages, tweets, and other
contributions that are not aligned with this Code of Conduct, or to ban
temporarily or permanently any contributor for other behaviors that they deem
inappropriate, threatening, offensive, or harmful.
## Scope
Our community will convene in both physical and virtual spaces. This Code of
Conduct applies within project spaces and in public spaces when an individual is
representing the project or its community. Examples of representing a project or
community include using an official project e-mail address, posting via an
official social media account, or acting as an appointed representative at an
online or offline event. Representation of a project may be further defined and
clarified by project maintainers and community organizers.
## Attribution
This Code of Conduct is adapted from the following:
- [Contributor Covenant](http://contributor-covenant.org), version 1.4, available [here](http://contributor-covenant.org/version/1/4/)
- [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html)
- [Citizen Code of Conduct](http://citizencodeofconduct.org/)
## Community Members in Crisis
If a community member is in or appears to be in crisis, please refer to the [Community Members in Crisis Guide](./communication/community-members-in-crisis.md). train-3.2.20/CONTRIBUTING.md 0000644 0001750 0001750 00000016561 13630530357 015374 0 ustar terceiro terceiro # Contributing to Train
We are glad you want to contribute to Train! This document will help answer common questions you may have during your first contribution.
## Submitting Issues
We utilize **Github Issues** for issue tracking and contributions. You can contribute in two ways:
1. Reporting an issue or making a feature request [here](https://github.com/inspec/train/issues/new).
2. Adding features or fixing bugs yourself and contributing your code to Train.
We ask you not to submit security concerns via Github. For details on submitting potential security issues please see
## Contribution Process
We have a 3 step process for contributions:
1. Commit changes to a git branch, making sure to sign-off those changes for the [Developer Certificate of Origin](#developer-certification-of-origin-dco).
2. Create a Github Pull Request for your change, following the instructions in the pull request template.
3. Perform a [Code Review](#code-review-process) with the project maintainers on the pull request.
### Pull Request Requirements
Chef Projects are built to last. We strive to ensure high quality throughout the experience. In order to ensure this, we require that all pull requests to Chef projects meet these specifications:
1. **Tests:** To ensure high quality code and protect against future regressions, we require all the code in Chef Projects to have at least unit test coverage. See the [test/unit](https://github.com/chef/train/tree/master/test/unit)
directory for the existing tests and use ```bundle exec rake test``` to run them.
2. **Green CI Tests:** We use [Travis CI](https://travis-ci.org/) and/or [AppVeyor](https://www.appveyor.com/) CI systems to test all pull requests. We require these test runs to succeed on every pull request before being merged.
In addition to this it would be nice to include the description of the problem you are solving
with your change. You can use [Issue Template](https://github.com/chef/train/tree/master/ISSUE_TEMPLATE.md) in the description section
of the pull request.
### Code Review Process
Code review takes place in Github pull requests. See [this article](https://help.github.com/articles/about-pull-requests/) if you're not familiar with Github Pull Requests.
Once you open a pull request, project maintainers will review your code and respond to your pull request with any feedback they might have. The process at this point is as follows:
1. Two thumbs-up (:+1:) are required from project maintainers. See the master maintainers document for Train projects at .
2. When ready, your pull request will be merged into `master`, we may require you to rebase your PR to the latest `master`.
3. Once the PR is merged, you will be included in `CHANGELOG.md`.
### Developer Certification of Origin (DCO)
Licensing is very important to open source projects. It helps ensure the software continues to be available under the terms that the author desired.
Chef uses [the Apache 2.0 license](https://github.com/chef/chef/blob/master/LICENSE) to strike a balance between open contribution and allowing you to use the software however you would like to.
The license tells you what rights you have that are provided by the copyright holder. It is important that the contributor fully understands what rights they are licensing and agrees to them. Sometimes the copyright holder isn't the contributor, such as when the contributor is doing work on behalf of a company.
To make a good faith effort to ensure these criteria are met, Chef requires the Developer Certificate of Origin (DCO) process to be followed.
The DCO is an attestation attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a Signed-off-by statement and thereby agrees to the DCO, which you can find below or at .
```
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the
best of my knowledge, is covered under an appropriate open
source license and I have the right under that license to
submit that work with modifications, whether created in whole
or in part by me, under the same open source license (unless
I am permitted to submit under a different license), as
Indicated in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including
all personal information I submit with it, including my
sign-off) is maintained indefinitely and may be redistributed
consistent with this project or the open source license(s)
involved.
```
For more information on the change see the Chef Blog post [Introducing Developer Certificate of Origin](https://blog.chef.io/2016/09/19/introducing-developer-certificate-of-origin/)
#### DCO Sign-Off Methods
The DCO requires a sign-off message in the following format appear on each commit in the pull request:
```
Signed-off-by: Julia Child
```
The DCO text can either be manually added to your commit body, or you can add either **-s** or **--signoff** to your usual git commit commands. If you forget to add the sign-off you can also amend a previous commit with the sign-off by running **git commit --amend -s**. If you've pushed your changes to Github already you'll need to force push your branch after this with **git push -f**.
### Obvious Fix Policy
Small contributions, such as fixing spelling errors, where the content is small enough to not be considered intellectual property, can be submitted without signing the contribution for the DCO.
As a rule of thumb, changes are obvious fixes if they do not introduce any new functionality or creative thinking. Assuming the change does not affect functionality, some common obvious fix examples include the following:
- Spelling / grammar fixes
- Typo correction, white space and formatting changes
- Comment clean up
- Bug fixes that change default return values or error codes stored in constants
- Adding logging messages or debugging output
- Changes to 'metadata' files like Gemfile, .gitignore, build scripts, etc.
- Moving source files from one directory or package to another
**Whenever you invoke the "obvious fix" rule, please say so in your commit message:**
```
------------------------------------------------------------------------
commit 370adb3f82d55d912b0cf9c1d1e99b132a8ed3b5
Author: Julia Child
Date: Wed Sep 18 11:44:40 2015 -0700
Fix typo in the README.
Obvious fix.
------------------------------------------------------------------------
```
## Train Community
Train is made possible by a strong community of developers, system administrators, auditor and security experts. If you have any questions or if you would like to get involved in the Train community you can check out:
- [Chef Community Slack](https://community-slack.chef.io/)
Also here are some additional pointers to some awesome Chef content:
- [Learn Chef](https://learn.chef.io/)
- [Chef Website](https://www.chef.io/)
train-3.2.20/MAINTAINERS.md 0000644 0001750 0001750 00000001311 13630530357 015222 0 ustar terceiro terceiro # Maintainers
This file lists how the train project is maintained. When making changes to the
project, this file tells you who needs to review your patch - you need at least
two maintainers to provide a :+1: on your pull request. Additionally, you need
to not receive a veto from a Lieutenant or the Project Lead.
Check out [How Chef is Maintained](https://github.com/chef/chef-rfc/blob/master/rfc030-maintenance-policy.md#how-the-project-is-maintained)
for details on the process, how to become a maintainer, lieutenant, or the
project lead.
## List of Maintainers
The [Maintainers of the InSpec project](https://github.com/inspec/inspec/blob/master/MAINTAINERS.md) serve as maintainers of the train project.
train-3.2.20/train-core.gemspec 0000644 0001750 0001750 00000002512 13630530357 016542 0 ustar terceiro terceiro # encoding: utf-8
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "train/version"
Gem::Specification.new do |spec|
spec.name = "train-core"
spec.version = Train::VERSION
spec.authors = ["Chef InSpec Team"]
spec.email = ["inspec@chef.io"]
spec.summary = "Transport interface to talk to a selected set of backends."
spec.description = "A minimal Train with a backends for ssh and winrm."
spec.license = "Apache-2.0"
spec.metadata = {
"homepage_uri" => "https://github.com/inspec/train",
"changelog_uri" => "https://github.com/inspec/train/blob/master/CHANGELOG.md",
"source_code_uri" => "https://github.com/inspec/train",
"bug_tracker_uri" => "https://github.com/inspec/train/issues",
}
spec.required_ruby_version = ">= 2.4"
spec.files = Dir.glob("{LICENSE,lib/**/*}")
.grep_v(%r{transports/(azure|clients|docker|gcp|helpers|vmware)})
.reject { |f| File.directory?(f) }
spec.require_paths = ["lib"]
spec.add_dependency "addressable", "~> 2.5"
spec.add_dependency "inifile", "~> 3.0"
spec.add_dependency "json", ">= 1.8", "< 3.0"
spec.add_dependency "mixlib-shellout", ">= 2.0", "< 4.0"
spec.add_dependency "net-scp", ">= 1.2", "< 3.0"
spec.add_dependency "net-ssh", ">= 2.9", "< 6.0"
end
train-3.2.20/.github/ 0000755 0001750 0001750 00000000000 13630530357 014472 5 ustar terceiro terceiro train-3.2.20/.github/ISSUE_TEMPLATE/ 0000755 0001750 0001750 00000000000 13630530357 016655 5 ustar terceiro terceiro train-3.2.20/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md 0000644 0001750 0001750 00000000660 13630530357 021704 0 ustar terceiro terceiro ---
name: 🤗 Support Question
about: If you have a question 💬, please check out our Slack!
---
We use GitHub issues to track bugs and feature requests. If you need help please post to our Mailing List or join the Chef Community Slack.
* Chef Community Slack at http://community-slack.chef.io/.
* Chef Mailing List https://discourse.chef.io/
Support issues opened here will be closed and redirected to Slack or Discourse.
train-3.2.20/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md 0000644 0001750 0001750 00000001152 13630530357 021106 0 ustar terceiro terceiro ---
name: � Bug Report
about: If something isn't working as expected �.
labels: "Status: Untriaged"
---
# Version:
[Version of the project installed]
# Environment:
[Details about the environment such as the Operating System, cookbook details, etc...]
# Scenario:
[What you are trying to achieve and you can't?]
# Steps to Reproduce:
[If you are filing an issue what are the things we need to do in order to repro your problem?]
# Expected Result:
[What are you expecting to happen as the consequence of above reproduction steps?]
# Actual Result:
[What actually happens after the reproduction steps?]
train-3.2.20/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md 0000644 0001750 0001750 00000002343 13630530357 021471 0 ustar terceiro terceiro ---
name: Design Proposal
about: I have a significant change I would like to propose and discuss before starting
labels: "Status: Untriaged"
---
### When a Change Needs a Design Proposal
A design proposal should be opened any time a change meets one of the following qualifications:
- Significantly changes the user experience of a project in a way that impacts users.
- Significantly changes the underlying architecture of the project in a way that impacts other developers.
- Changes the development or testing process of the project such as a change of CI systems or test frameworks.
### Why We Use This Process
- Allows all interested parties (including any community member) to discuss large impact changes to a project.
- Serves as a durable paper trail for discussions regarding project architecture.
- Forces design discussions to occur before PRs are created.
- Reduces PR refactoring and rejected PRs.
---
## Motivation
## Specification
## Downstream Impact
train-3.2.20/.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md 0000644 0001750 0001750 00000001407 13630530357 023431 0 ustar terceiro terceiro ---
name: 🚀 Enhancement Request
about: I have a suggestion (and may want to implement it 🙂)!
labels: "Status: Untriaged"
---
### Describe the Enhancement:
### Describe the Need:
### Current Alternative
### Can We Help You Implement This?:
train-3.2.20/.github/CODEOWNERS 0000644 0001750 0001750 00000000221 13630530357 016060 0 ustar terceiro terceiro # Order is important. The last matching pattern has the most precedence.
* @inspec/inspec-core-team @chef/foundation-team-reviewers
train-3.2.20/.github/lock.yml 0000644 0001750 0001750 00000000022 13630530357 016137 0 ustar terceiro terceiro daysUntilLock: 60
train-3.2.20/VERSION 0000644 0001750 0001750 00000000006 13630530357 014176 0 ustar terceiro terceiro 3.2.20 train-3.2.20/test/ 0000755 0001750 0001750 00000000000 13630530357 014111 5 ustar terceiro terceiro train-3.2.20/test/integration/ 0000755 0001750 0001750 00000000000 13630530357 016434 5 ustar terceiro terceiro train-3.2.20/test/integration/chefignore 0000644 0001750 0001750 00000000011 13630530357 020460 0 ustar terceiro terceiro .kitchen
train-3.2.20/test/integration/test-travis-centos.yml 0000644 0001750 0001750 00000000127 13630530357 022735 0 ustar terceiro terceiro images:
- centos:5.11
- centos:6.8
- centos:7.2.1511
provision:
- script: bootstrap.sh
train-3.2.20/test/integration/test-travis-fedora.yml 0000644 0001750 0001750 00000000146 13630530357 022703 0 ustar terceiro terceiro images:
- fedora:20
- fedora:21
- fedora:22
- fedora:23
- fedora:24
provision:
- script: bootstrap.sh
train-3.2.20/test/integration/.kitchen.yml 0000644 0001750 0001750 00000001520 13630530357 020660 0 ustar terceiro terceiro ---
driver:
name: vagrant
provisioner:
name: chef_solo
data_path: ../../.
platforms:
- name: centos-7.1
- name: centos-6.7
- name: centos-6.7-i386
- name: centos-5.11
- name: centos-5.11-i386
- name: debian-6.0.10
- name: debian-6.0.10-i386
- name: debian-7.8
- name: debian-7.8-i386
- name: debian-8.1
- name: debian-8.1-i386
- name: fedora-21
- name: fedora-21-i386
- name: fedora-22
- name: freebsd-9.3
- name: freebsd-10.2
- name: opensuse-13.2-x86_64
- name: opensuse-13.2-i386
- name: ubuntu-14.04
- name: ubuntu-14.04-i386
- name: ubuntu-12.04
- name: ubuntu-12.04-i386
- name: ubuntu-10.04
- name: ubuntu-10.04-i386
suites:
- name: default
run_list:
- recipe[sudo]
- recipe[test]
attributes:
authorization:
sudo:
include_sudoers_d: true
train-3.2.20/test/integration/bootstrap.sh 0000644 0001750 0001750 00000000727 13630530357 021013 0 ustar terceiro terceiro #!/bin/sh
test ! -e /tmp/folder && \
mkdir /tmp/folder
chmod 0567 /tmp/folder
echo -n 'hello world' > /tmp/file
test ! -e /tmp/symlink && \
ln -s /tmp/file /tmp/symlink
chmod 0777 /tmp/symlink
chmod 0765 /tmp/file
echo -n 'hello suid/sgid/sticky' > /tmp/sfile
chmod 7765 /tmp/sfile
echo -n 'hello space' > /tmp/spaced\ file
test ! -e /tmp/pipe && \
mkfifo /tmp/pipe
test ! -e /tmp/block_device && \
mknod /tmp/block_device b 7 7
chmod 0666 /tmp/block_device
train-3.2.20/test/integration/tests/ 0000755 0001750 0001750 00000000000 13630530357 017576 5 ustar terceiro terceiro train-3.2.20/test/integration/tests/run_command_test.rb 0000644 0001750 0001750 00000001731 13630530357 023466 0 ustar terceiro terceiro # encoding: utf-8
describe "run_command" do
let(:backend) { get_backend.call }
it "can echo commands" do
res = backend.run_command("echo hello world")
_(res.stdout).must_equal("hello world\n")
_(res.stderr).must_equal("")
_(res.exit_status).must_equal(0)
end
it "can run frozen commands" do
res = backend.run_command("echo hello world".freeze)
_(res.stdout).must_equal("hello world\n")
_(res.stderr).must_equal("")
_(res.exit_status).must_equal(0)
end
it "can echo commands to stderr" do
# TODO: Specinfra often fails on this test.
# Fix and re-enable it.
res = backend.run_command(">&2 echo hello world")
_(res.stdout).must_equal("")
_(res.stderr).must_equal("hello world\n")
_(res.exit_status).must_equal(0)
end
it "prints a correct exit status" do
res = backend.run_command("exit 123")
_(res.stdout).must_equal("")
_(res.stderr).must_equal("")
_(res.exit_status).must_equal(123)
end
end
train-3.2.20/test/integration/tests/path_missing_test.rb 0000644 0001750 0001750 00000002761 13630530357 023655 0 ustar terceiro terceiro # encoding: utf-8
describe "file interface" do
let(:backend) { get_backend.call }
describe "a path that doesnt exist" do
let(:file) do
backend.file("/do_not_create_this_path_please_or_my_tests_will_fail")
end
it "does not exist" do
_(file.exist?).must_equal(false)
end
it "is not a file" do
_(file.file?).must_equal(false)
end
it "has type nil" do
_(file.type).must_be_nil
end
it "has no content" do
_(file.content).must_be_nil
end
it "has no owner" do
_(file.owner).must_be_nil
end
it "has no group" do
_(file.group).must_be_nil
end
it "has mode nil" do
_(file.mode).must_be_nil
end
it "checks mode? nil" do
_(file.mode?(nil)).must_equal(true)
end
it "has no link_path" do
_(file.link_path).must_be_nil
end
it "raises an error if md5sum is attempted" do
_ { file.md5sum }.must_raise RuntimeError
end
it "raises an error if sha256sum is attempted" do
_ { file.sha256sum }.must_raise RuntimeError
end
it "has a modified time" do
_(file.mtime).must_be_nil
end
it "has inode size" do
# Must be around 11 Bytes, +- 4
_(file.size).must_be_nil
end
it "has no selinux_label" do
_(file.selinux_label).must_be_nil
end
it "has no product_version" do
_(file.product_version).must_be_nil
end
it "has no file_version" do
_(file.file_version).must_be_nil
end
end
end
train-3.2.20/test/integration/tests/path_character_device_test.rb 0000644 0001750 0001750 00000003173 13630530357 025455 0 ustar terceiro terceiro # encoding: utf-8
describe "file interface" do
let(:backend) { get_backend.call }
describe "character device" do
let(:file) { backend.file("/dev/null") }
it "exists" do
_(file.exist?).must_equal(true)
end
it "is a character device" do
_(file.character_device?).must_equal(true)
end
it "has type :character_device" do
_(file.type).must_equal(:character_device)
end
it "has empty content" do
_(file.content).must_equal("")
end
it "has owner name root" do
_(file.owner).must_equal("root")
end
it "has group name" do
_(file.group).must_equal(Test.root_group(backend.os))
end
it "has mode 0666" do
_(file.mode).must_equal(00666)
end
it "checks mode? 0666" do
_(file.mode?(00666)).must_equal(true)
end
it "has no link_path" do
_(file.link_path).must_be_nil
end
it "has an md5sum" do
_(file.md5sum).must_equal("d41d8cd98f00b204e9800998ecf8427e")
end
it "has an sha256sum" do
_(file.sha256sum).must_equal("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")
end
it "has a modified time" do
_(file.mtime).must_be_close_to(Time.now.to_i - Test.mtime / 2, Test.mtime)
end
it "has inode size of 0" do
_(file.size).must_equal(0)
end
it "has selinux label handling" do
res = Test.selinux_label(backend, file.path)
_(file.selinux_label).must_equal(res)
end
it "has no product_version" do
_(file.product_version).must_be_nil
end
it "has no file_version" do
_(file.file_version).must_be_nil
end
end
end
train-3.2.20/test/integration/tests/path_block_device_test.rb 0000644 0001750 0001750 00000003176 13630530357 024616 0 ustar terceiro terceiro # encoding: utf-8
describe "file interface" do
let(:backend) { get_backend.call }
describe "block device" do
let(:file) { backend.file("/tmp/block_device") }
it "exists" do
_(file.exist?).must_equal(true)
end
it "is a block device" do
_(file.block_device?).must_equal(true)
end
it "has type :block_device" do
_(file.type).must_equal(:block_device)
end
it "has no content" do
_(file.content).must_equal("")
end
it "has owner name root" do
_(file.owner).must_equal("root")
end
it "has group name" do
_(file.group).must_equal(Test.root_group(backend.os))
end
it "has mode 0666" do
_(file.mode).must_equal(00666)
end
it "checks mode? 0666" do
_(file.mode?(00666)).must_equal(true)
end
it "has no link_path" do
_(file.link_path).must_be_nil
end
it "has the correct md5sum" do
_(file.md5sum).must_equal("d41d8cd98f00b204e9800998ecf8427e")
end
it "has the correct sha256sum" do
_(file.sha256sum).must_equal("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")
end
it "has a modified time" do
_(file.mtime).must_be_close_to(Time.now.to_i - Test.mtime / 2, Test.mtime)
end
it "has inode size of 0" do
_(file.size).must_equal(0)
end
it "has selinux label handling" do
res = Test.selinux_label(backend, file.path)
_(file.selinux_label).must_equal(res)
end
it "has no product_version" do
_(file.product_version).must_be_nil
end
it "has no file_version" do
_(file.file_version).must_be_nil
end
end
end
train-3.2.20/test/integration/tests/path_folder_test.rb 0000644 0001750 0001750 00000004023 13630530357 023450 0 ustar terceiro terceiro # encoding: utf-8
describe "file interface" do
let(:backend) { get_backend.call }
describe "a folder" do
let(:file) { backend.file("/tmp/folder") }
it "exists" do
_(file.exist?).must_equal(true)
end
it "is a directory" do
_(file.directory?).must_equal(true)
end
it "has type :directory" do
_(file.type).must_equal(:directory)
end
case get_backend.call.os[:family]
when "freebsd"
it "has freebsd folder content behavior" do
_(file.content).must_equal("\u0003\u0000")
end
it "has an md5sum" do
_(file.md5sum).must_equal("598f4fe64aefab8f00bcbea4c9239abf")
end
it "has an sha256sum" do
_(file.sha256sum).must_equal("9b4fb24edd6d1d8830e272398263cdbf026b97392cc35387b991dc0248a628f9")
end
else
it "has no content" do
_(file.content).must_be_nil
end
it "raises an error if md5sum is attempted" do
_ { file.md5sum }.must_raise RuntimeError
end
it "raises an error if sha256sum is attempted" do
_ { file.sha256sum }.must_raise RuntimeError
end
end
it "has owner name root" do
_(file.owner).must_equal("root")
end
it "has group name" do
_(file.group).must_equal(Test.root_group(backend.os))
end
it "has mode 0567" do
_(file.mode).must_equal(00567)
end
it "checks mode? 0567" do
_(file.mode?(00567)).must_equal(true)
end
it "has no link_path" do
_(file.link_path).must_be_nil
end
it "has a modified time" do
_(file.mtime).must_be_close_to(Time.now.to_i - Test.mtime / 2, Test.mtime)
end
it "has inode size" do
_(file.size).must_be_close_to(4096, 4096)
end
it "has selinux label handling" do
res = Test.selinux_label(backend, file.path)
_(file.selinux_label).must_equal(res)
end
it "has no product_version" do
_(file.product_version).must_be_nil
end
it "has no file_version" do
_(file.file_version).must_be_nil
end
end
end
train-3.2.20/test/integration/tests/path_file_test.rb 0000644 0001750 0001750 00000004233 13630530357 023117 0 ustar terceiro terceiro # encoding: utf-8
describe "file interface" do
let(:backend) { get_backend.call }
describe "regular file" do
let(:file) { backend.file("/tmp/file") }
it "exists" do
_(file.exist?).must_equal(true)
end
it "is a file" do
_(file.file?).must_equal(true)
end
it "has type :file" do
_(file.type).must_equal(:file)
end
it "has content" do
_(file.content).must_equal("hello world")
end
it "has owner name root" do
_(file.owner).must_equal("root")
end
it "has group name" do
_(file.group).must_equal(Test.root_group(backend.os))
end
it "has mode 0765" do
_(file.mode).must_equal(00765)
end
it "checks mode? 0765" do
_(file.mode?(00765)).must_equal(true)
end
it "doesnt check mode? 0764" do
_(file.mode?(00764)).must_equal(false)
end
it "has no link_path" do
_(file.link_path).must_be_nil
end
it "has an md5sum" do
_(file.md5sum).must_equal("5eb63bbbe01eeed093cb22bb8f5acdc3")
end
it "has an sha256sum" do
_(file.sha256sum).must_equal("b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9")
end
it "has a modified time" do
_(file.mtime).must_be_close_to(Time.now.to_i - Test.mtime / 2, Test.mtime)
end
it "has size" do
# Must be around 11 Bytes, +- 4
_(file.size).must_be_close_to(11, 4)
end
it "has selinux label handling" do
res = Test.selinux_label(backend, file.path)
_(file.selinux_label).must_equal(res)
end
it "has no product_version" do
_(file.product_version).must_be_nil
end
it "has no file_version" do
_(file.file_version).must_be_nil
end
it "provides a json representation" do
j = file.to_json
_(j).must_be_kind_of Hash
_(j["type"]).must_equal :file
end
end
describe "regular file" do
let(:file) { backend.file("/tmp/sfile") }
it "has mode 7765" do
_(file.mode).must_equal(07765)
end
end
describe "regular file" do
let(:file) { backend.file("/tmp/spaced file") }
it "has content" do
_(file.content).must_equal("hello space")
end
end
end
train-3.2.20/test/integration/tests/path_symlink_test.rb 0000644 0001750 0001750 00000003774 13630530357 023677 0 ustar terceiro terceiro # encoding: utf-8
describe "file interface" do
let(:backend) { get_backend.call }
describe "symlink file" do
let(:file) { backend.file("/tmp/symlink") }
it "exists" do
_(file.exist?).must_equal(true)
end
it "is a symlink" do
_(file.symlink?).must_equal(true)
end
it "is pointing to a file" do
_(file.file?).must_equal(true)
end
it "is not pointing to a folder" do
_(file.directory?).must_equal(false)
end
it "has type :file" do
_(file.type).must_equal(:file)
end
it "has content" do
_(file.content).must_equal("hello world")
end
it "has owner name root" do
_(file.owner).must_equal("root")
end
it "has uid 0" do
_(file.uid).must_equal(0)
end
it "has group name" do
_(file.group).must_equal(Test.root_group(backend.os))
end
it "has gid 0" do
_(file.gid).must_equal(0)
end
it "has mode 0777" do
_(file.source.mode).must_equal(00777)
end
it "has mode 0765" do
_(file.mode).must_equal(00765)
end
it "checks mode? 0765" do
_(file.mode?(00765)).must_equal(true)
end
it "has link_path" do
_(file.link_path).must_equal("/tmp/file")
end
it "has an md5sum" do
_(file.md5sum).must_equal("5eb63bbbe01eeed093cb22bb8f5acdc3")
end
it "has an sha256sum" do
_(file.sha256sum).must_equal("b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9")
end
it "has a modified time" do
_(file.mtime).must_be_close_to(Time.now.to_i - Test.mtime / 2, Test.mtime)
end
it "has size" do
# Must be around 11 Bytes, +- 4
_(file.size).must_be_close_to(11, 4)
end
it "has selinux label handling" do
res = Test.selinux_label(backend, file.path)
_(file.selinux_label).must_equal(res)
end
it "has no product_version" do
_(file.product_version).must_be_nil
end
it "has no file_version" do
_(file.file_version).must_be_nil
end
end
end
train-3.2.20/test/integration/tests/path_pipe_test.rb 0000644 0001750 0001750 00000002406 13630530357 023135 0 ustar terceiro terceiro # encoding: utf-8
describe "file interface" do
let(:backend) { get_backend.call }
describe "pipe / fifo" do
let(:file) { backend.file("/tmp/pipe") }
it "exists" do
_(file.exist?).must_equal(true)
end
it "is a pipe" do
_(file.pipe?).must_equal(true)
end
it "has type :pipe" do
_(file.type).must_equal(:pipe)
end
it "has owner name root" do
_(file.owner).must_equal("root")
end
it "has group name" do
_(file.group).must_equal(Test.root_group(backend.os))
end
it "has mode 0644" do
_(file.mode).must_equal(00644)
end
it "checks mode? 0644" do
_(file.mode?(00644)).must_equal(true)
end
it "has no link_path" do
_(file.link_path).must_be_nil
end
it "has a modified time" do
_(file.mtime).must_be_close_to(Time.now.to_i - Test.mtime / 2, Test.mtime)
end
it "has inode size of 0" do
_(file.size).must_equal(0)
end
it "has selinux label handling" do
res = Test.selinux_label(backend, file.path)
_(file.selinux_label).must_equal(res)
end
it "has no product_version" do
_(file.product_version).must_be_nil
end
it "has no file_version" do
_(file.file_version).must_be_nil
end
end
end
train-3.2.20/test/integration/test_ssh.rb 0000644 0001750 0001750 00000001433 13630530357 020616 0 ustar terceiro terceiro # encoding: utf-8
# author: Dominik Richter
require_relative "helper"
require "train"
require "logger"
backends = {}
backend_conf = {
"target" => ENV["target"] || "vagrant@localhost",
"key_files" => ENV["key_files"] || "/root/.ssh/id_rsa",
"logger" => Logger.new($stdout),
}
backend_conf["target"] = "ssh://" + backend_conf["target"]
backend_conf["logger"].level = \
if ENV.key?("debug")
case ENV["debug"].to_s
when /^false$/i, /^0$/i
Logger::INFO
else
Logger::DEBUG
end
else
Logger::INFO
end
backends[:ssh] = proc { |*args|
conf = Train.target_config(backend_conf)
Train.create("ssh", conf).connection(args[0])
}
tests = ARGV
backends.each do |type, get_backend|
tests.each do |test|
instance_eval(File.read(test), test, 1)
end
end
train-3.2.20/test/integration/cookbooks/ 0000755 0001750 0001750 00000000000 13630530357 020425 5 ustar terceiro terceiro train-3.2.20/test/integration/cookbooks/test/ 0000755 0001750 0001750 00000000000 13630530357 021404 5 ustar terceiro terceiro train-3.2.20/test/integration/cookbooks/test/recipes/ 0000755 0001750 0001750 00000000000 13630530357 023036 5 ustar terceiro terceiro train-3.2.20/test/integration/cookbooks/test/recipes/prep_files.rb 0000644 0001750 0001750 00000002022 13630530357 025507 0 ustar terceiro terceiro # encoding: utf-8
# author: Dominik Richter
# author: Christoph Hartmann
#
# Helper recipe to create create a few files in the operating
# systems, which the runner will test against.
gid = node["platform_family"] == "aix" ? "system" : node["root_group"]
file "/tmp/file" do
mode "0765"
owner "root"
group gid
content "hello world"
end
file "/tmp/sfile" do
mode "7765"
owner "root"
group gid
content "hello suid/sgid/sticky"
end
file "/tmp/spaced file" do
content "hello space"
end
directory "/tmp/folder" do
mode "0567"
owner "root"
group gid
end
link "/tmp/symlink" do
to "/tmp/file"
owner "root"
group gid
mode "0777"
end
link "/usr/bin/allyourbase" do
to "/usr/bin/sudo"
owner "root"
group gid
mode "0777"
end
execute "create pipe/fifo" do
command "mkfifo /tmp/pipe"
not_if "test -e /tmp/pipe"
end
execute "create block_device" do
command "mknod /tmp/block_device b 7 7 && chmod 0666 /tmp/block_device && chown root:#{gid} /tmp/block_device"
not_if "test -e /tmp/block_device"
end
train-3.2.20/test/integration/cookbooks/test/recipes/default.rb 0000644 0001750 0001750 00000005002 13630530357 025004 0 ustar terceiro terceiro # encoding: utf-8
# author: Dominik Richter
#
# Helper recipe to create create a few files in the operating
# systems, which the runner will test against.
# It also initializes the runner inside the machines
# and makes sure all dependencies are ready to go.
#
# Finally (for now), it actually executes the all tests with
# the local execution backend
include_recipe("test::prep_files")
# prepare ssh for backend
execute "create ssh key" do
command 'ssh-keygen -t rsa -b 2048 -f /root/.ssh/id_rsa -N ""'
not_if "test -e /root/.ssh/id_rsa"
end
execute "add ssh key to vagrant user" do
command "cat /root/.ssh/id_rsa.pub >> /home/vagrant/.ssh/authorized_keys"
end
execute "test ssh connection" do
command 'ssh -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa vagrant@localhost "echo 1"'
end
# prepare a few users
%w{ nopasswd passwd nosudo reqtty customcommand }.each do |name|
user name do
password "$1$7MCNTXPI$r./jqCEoVlLlByYKSL3sZ."
manage_home true
end
end
%w{nopasswd vagrant}.each do |name|
sudo name do
user "%" + name
nopasswd true
defaults ["!requiretty"]
end
end
sudo "passwd" do
user "passwd"
nopasswd false
defaults ["!requiretty"]
end
sudo "reqtty" do
user "reqtty"
nopasswd true
defaults ["requiretty"]
end
sudo "customcommand" do
user "customcommand"
nopasswd true
defaults ["!requiretty"]
end
# execute tests
execute "bundle install" do
command "/opt/chef/embedded/bin/bundle install --without integration tools"
cwd "/tmp/kitchen/data"
end
execute "run local tests" do
command "/opt/chef/embedded/bin/ruby -I lib test/integration/test_local.rb test/integration/tests/*_test.rb"
cwd "/tmp/kitchen/data"
end
execute "run ssh tests" do
command "/opt/chef/embedded/bin/ruby -I lib test/integration/test_ssh.rb test/integration/tests/*_test.rb"
cwd "/tmp/kitchen/data"
end
%w{passwd nopasswd reqtty customcommand}.each do |name|
execute "run local sudo tests as #{name}" do
command "/opt/chef/embedded/bin/ruby -I lib test/integration/sudo/#{name}.rb"
cwd "/tmp/kitchen/data"
user name
end
end
execute "fix sudoers for reqtty" do
command "chef-apply contrib/fixup_requiretty.rb"
cwd "/tmp/kitchen/data"
environment(
"TRAIN_SUDO_USER" => "reqtty",
"TRAIN_SUDO_VERY_MUCH" => "yes"
)
end
# if it's fixed, it should behave like user 'nopasswd'
execute "run local sudo tests as reqtty, no longer requiring a tty" do
command "/opt/chef/embedded/bin/ruby -I lib test/integration/sudo/nopasswd.rb"
cwd "/tmp/kitchen/data"
user "reqtty"
end
train-3.2.20/test/integration/cookbooks/test/metadata.rb 0000644 0001750 0001750 00000000014 13630530357 023504 0 ustar terceiro terceiro name "test"
train-3.2.20/test/integration/docker_test_container.rb 0000644 0001750 0001750 00000001021 13630530357 023323 0 ustar terceiro terceiro # encoding: utf-8
# author: Dominik Richter
require "train"
require_relative "helper"
(container_id = ENV["CONTAINER"]) ||
raise("You must provide a container ID via CONTAINER env")
tests = ARGV
puts ["Running tests:", tests].flatten.join("\n- ")
puts ""
backends = {}
backends[:docker] = proc { |*args|
opt = Train.target_config({ host: container_id })
Train.create("docker", opt).connection(args[0])
}
backends.each do |type, get_backend|
tests.each do |test|
instance_eval(File.read(test), test, 1)
end
end
train-3.2.20/test/integration/test-travis-oel.yml 0000644 0001750 0001750 00000000141 13630530357 022215 0 ustar terceiro terceiro images:
- oraclelinux:5.11
- oraclelinux:6.8
- oraclelinux:7.2
provision:
- script: bootstrap.sh
train-3.2.20/test/integration/test-travis-debian.yml 0000644 0001750 0001750 00000000125 13630530357 022662 0 ustar terceiro terceiro images:
- debian:6.0.10
- debian:7.11
- debian:8.5
provision:
- script: bootstrap.sh
train-3.2.20/test/integration/sudo/ 0000755 0001750 0001750 00000000000 13630530357 017406 5 ustar terceiro terceiro train-3.2.20/test/integration/sudo/reqtty.rb 0000644 0001750 0001750 00000000573 13630530357 021270 0 ustar terceiro terceiro require_relative "run_as"
describe "run_command" do
it "is running as non-root without sudo" do
run_as("whoami").stdout.wont_match(/root/i)
end
it "is throwing an error trying to use sudo" do
err = -> { run_as("whoami", { sudo: true }) }.must_raise Train::UserError
err.message.must_match(/Sudo failed: Sudo requires a TTY. Please see the README/i)
end
end
train-3.2.20/test/integration/sudo/customcommand.rb 0000644 0001750 0001750 00000000561 13630530357 022606 0 ustar terceiro terceiro # encoding: utf-8
# author: Jeremy Miller
require_relative "run_as"
describe "run custom sudo command" do
it "is running as non-root without sudo" do
run_as("whoami").stdout.wont_match(/root/i)
end
it "is running nopasswd custom sudo command" do
run_as("whoami", { sudo: true, sudo_command: "allyourbase" })
.stdout.must_match(/root/i)
end
end
train-3.2.20/test/integration/sudo/run_as.rb 0000644 0001750 0001750 00000000333 13630530357 021221 0 ustar terceiro terceiro # encoding: utf-8
# author: Dominik Richter
# author: Christoph Hartmann
require_relative "../helper"
require "train"
def run_as(cmd, opts = {})
Train.create("local", opts)
.connection
.run_command(cmd)
end
train-3.2.20/test/integration/sudo/nopasswd.rb 0000644 0001750 0001750 00000000416 13630530357 021572 0 ustar terceiro terceiro require_relative "run_as"
describe "run_command" do
it "is running as non-root without sudo" do
run_as("whoami").stdout.wont_match(/root/i)
end
it "is running nopasswd sudo" do
run_as("whoami", { sudo: true })
.stdout.must_match(/root/i)
end
end
train-3.2.20/test/integration/sudo/passwd.rb 0000644 0001750 0001750 00000000762 13630530357 021241 0 ustar terceiro terceiro require_relative "run_as"
describe "run_command" do
it "is running as non-root without sudo" do
run_as("whoami").stdout.wont_match(/root/i)
end
it "is not running sudo without password" do
err = -> { Train.create("local", { sudo: true }).connection }.must_raise Train::UserError
err.message.must_match(/Sudo requires a password/)
end
it "is running passwd sudo" do
run_as("whoami", { sudo: true, sudo_password: "password" })
.stdout.must_match(/root/i)
end
end
train-3.2.20/test/integration/test_local.rb 0000644 0001750 0001750 00000000474 13630530357 021117 0 ustar terceiro terceiro # encoding: utf-8
# author: Dominik Richter
require_relative "helper"
require "train"
backends = {}
backends[:local] = proc { |*opts|
Train.create("local", {}).connection(opts[0])
}
tests = ARGV
backends.each do |type, get_backend|
tests.each do |test|
instance_eval(File.read(test), test, 1)
end
end
train-3.2.20/test/integration/helper.rb 0000644 0001750 0001750 00000002724 13630530357 020245 0 ustar terceiro terceiro # encoding: utf-8
require "coveralls"
Coveralls.wear!
require "minitest/autorun"
require "minitest/spec"
# Tests configuration:
module Test
class << self
# MTime tracks the maximum range of modification time in seconds.
# i.e. MTime == 60*60*1 is 1 hour of modification time range,
# which translates to a modification time range of:
# [ now-1hour, now ]
def mtime
60 * 60 * 24 * 1
end
def dup(o)
Marshal.load(Marshal.dump(o))
end
def root_group(os)
case os[:family]
when "freebsd"
"wheel"
when "aix"
"system"
else
"root"
end
end
def selinux_label(backend, path = nil)
return nil if backend.class.to_s =~ /docker/i
os = backend.os
labels = {}
h = {}
h.default = Hash.new(nil)
h["redhat"] = {}
h["redhat"].default = "unconfined_u:object_r:user_tmp_t:s0"
h["redhat"]["5.11"] = "user_u:object_r:tmp_t"
h["centos"] = h["fedora"] = h["redhat"]
labels.default = dup(h)
h["redhat"].default = "unconfined_u:object_r:tmp_t:s0"
labels["/tmp/block_device"] = dup(h)
h = {}
h.default = Hash.new(nil)
h["redhat"] = {}
h["redhat"].default = "system_u:object_r:null_device_t:s0"
h["redhat"]["5.11"] = "system_u:object_r:null_device_t"
h["centos"] = h["fedora"] = h["redhat"]
labels["/dev/null"] = dup(h)
labels[path][os[:family]][os[:release]]
end
end
end
train-3.2.20/test/integration/Berksfile 0000644 0001750 0001750 00000000151 13630530357 020262 0 ustar terceiro terceiro source "https://supermarket.chef.io"
cookbook "sudo", "~> 2.7.2"
cookbook "test", path: "cookbooks/test"
train-3.2.20/test/integration/docker_test.rb 0000644 0001750 0001750 00000001160 13630530357 021265 0 ustar terceiro terceiro # encoding: utf-8
require_relative "docker_run"
tests = ARGV
def test_container(container, tests)
puts "--> run test on docker #{container.id}"
pid = Process.fork do
ENV["CONTAINER"] = container.id
require_relative "docker_test_container.rb"
Process.exit
end
_, status = Process.waitpid2(pid)
status.exitstatus == 0
end
results = DockerRunner.new.run_all do |name, container|
status = test_container(container, tests)
status ? nil : "Failed to run tests on #{name}"
end
failures = results.compact
failures.each { |f| puts "\033[31;1m#{f}\033[0m\n\n" }
failures.empty? || raise("Test failures")
train-3.2.20/test/integration/test-travis-ubuntu.yml 0000644 0001750 0001750 00000000165 13630530357 022766 0 ustar terceiro terceiro images:
- ubuntu:10.04
- ubuntu:12.04
- ubuntu:14.04
- ubuntu:16.04
- ubuntu:16.10
provision:
- script: bootstrap.sh
train-3.2.20/test/integration/docker_run.rb 0000644 0001750 0001750 00000007336 13630530357 021125 0 ustar terceiro terceiro require "docker"
require "yaml"
require "concurrent"
class DockerRunner
def initialize(conf_path = nil)
@conf_path = conf_path || ENV["config"]
unless File.file?(@conf_path)
raise "Can't find configuration in #{@conf_path}"
end
@conf = YAML.load_file(@conf_path)
if @conf.nil? || @conf.empty?
raise "Can't read coniguration in #{@conf_path}"
end
if @conf["images"].nil?
raise "You must configure test images in your #{@conf_path}"
end
@images = docker_images_by_tag
@image_pull_tickets = Concurrent::Semaphore.new(2)
@docker_run_tickets = Concurrent::Semaphore.new(5)
end
def run_all(&block)
raise "You must provide a block for run_all" unless block_given?
promises = @conf["images"].map do |id|
run_on_target(id, &block)
end
# wait for all tests to be finished
sleep(0.1) until promises.all?(&:fulfilled?)
# return resulting values
promises.map(&:value)
end
def run_on_target(name, &block)
pr = Concurrent::Promise.new do
begin
container = start_container(name)
res = yield(name, container)
# special rescue block to handle not implemented error
rescue NotImplementedError => err
raise err.message
end
# always stop the container
stop_container(container)
res
end.execute
# failure handling
pr.rescue do |err|
msg = "\033[31;1m#{err.message}\033[0m"
puts msg
msg + "\n" + err.backtrace.join("\n")
end
end
def provision_image(image, prov, files)
tries ||= 3
return image if prov["script"].nil?
path = File.join(File.dirname(@conf_path), prov["script"])
unless File.file?(path)
puts "Can't find script file #{path}"
return image
end
puts " script #{path}"
dst = "/bootstrap#{files.length}.sh"
files.push(dst)
image.insert_local("localPath" => path, "outputPath" => dst)
rescue StandardError => _
retry unless (tries -= 1) == 0
end
def bootstrap_image(name, image)
files = []
provisions = Array(@conf["provision"])
puts "--> provision docker #{name}" unless provisions.empty?
provisions.each do |prov|
image = provision_image(image, prov, files)
end
[image, files]
end
def start_container(name, version = nil)
unless name.include?(":")
version ||= "latest"
name = "#{name}:#{version}"
end
puts "--> schedule docker #{name}"
image = @images[name]
if image.nil?
puts "\033[35;1m--> pull docker images #{name} "\
"(this may take a while)\033[0m"
@image_pull_tickets.acquire(1)
puts "... start pull image #{name}"
image = Docker::Image.create("fromImage" => name)
@image_pull_tickets.release(1)
unless image.nil?
puts "\033[35;1m--> pull docker images finished for #{name}\033[0m"
end
end
raise "Can't find nor pull docker image #{name}" if image.nil?
@docker_run_tickets.acquire(1)
image, scripts = bootstrap_image(name, image)
puts "--> start docker #{name}"
container = Docker::Container.create(
"Cmd" => %w{sleep 3600},
"Image" => image.id,
"OpenStdin" => true
)
container.start
scripts.each do |script|
container.exec(%w{chmod +x}.push(script))
container.exec(%w{sh -c}.push(script))
end
container
end
def stop_container(container)
@docker_run_tickets.release(1)
puts "--> killrm docker #{container.id}"
container.kill
container.delete(force: true)
end
private
# get all docker image tags
def docker_images_by_tag
images = {}
Docker::Image.all.map do |img|
Array(img.info["RepoTags"]).each do |tag|
images[tag] = img
end
end
images
end
end
train-3.2.20/test/windows/ 0000755 0001750 0001750 00000000000 13630530357 015603 5 ustar terceiro terceiro train-3.2.20/test/windows/local_test.rb 0000644 0001750 0001750 00000016223 13630530357 020265 0 ustar terceiro terceiro # encoding: utf-8
# author: Christoph Hartmann
# author: Dominik Richter
require "minitest/autorun"
require "minitest/spec"
require "mocha/setup"
require "train"
require "tempfile"
require "logger"
# Loading here to ensure methods exist to be stubbed
require "train/transports/local"
describe "windows local command" do
let(:backend) do
# get final config
target_config = Train.target_config({ logger: Logger.new(STDERR, level: :info) })
# initialize train
Train.create("local", target_config)
end
let(:conn) { backend.connection }
it "verify os" do
os = conn.os
_(os[:name]).must_match(/windows_server.*/)
_(os[:family]).must_equal "windows"
_(os[:release]).must_match(/\d+(\.\d+)+/)
_(os[:arch]).must_equal "x86_64"
end
it "run echo test" do
cmd = conn.run_command('Write-Output "test"')
_(cmd.stdout).must_equal "test\r\n"
_(cmd.stderr).must_equal ""
_(cmd.exit_status).must_equal 0
end
it "run script without exit code" do
cmd = conn.run_command("powershell -file test/fixtures/PowerShell/exit_zero.ps1")
_(cmd.stdout).must_equal "Hello\r\n"
_(cmd.stderr).must_equal ""
_(cmd.exit_status).must_equal 0
end
it "run script without exit code" do
cmd = conn.run_command("powershell -file test/fixtures/PowerShell/exit_fortytwo.ps1")
_(cmd.stdout).must_equal "Goodbye\r\n"
_(cmd.stderr).must_equal ""
_(cmd.exit_status).must_equal 42
end
it "returns exit code 1 for a script that throws" do
cmd = conn.run_command("powershell -file test/fixtures/PowerShell/throws.ps1")
_(cmd.stdout).must_match(/Next line throws/)
_(cmd.stderr).must_equal ""
_(cmd.exit_status).must_equal 1
end
describe "force 64 bit powershell command" do
let(:runner) { conn.instance_variable_get(:@runner) }
let(:powershell) { runner.instance_variable_get(:@powershell_cmd) }
RUBY_PLATFORM_DUP = RUBY_PLATFORM.dup
def override_platform(platform)
::Object.send(:remove_const, :RUBY_PLATFORM)
::Object.const_set(:RUBY_PLATFORM, platform)
end
after do
backend.instance_variable_set(:@connection, nil)
::Object.send(:remove_const, :RUBY_PLATFORM)
::Object.const_set(:RUBY_PLATFORM, RUBY_PLATFORM_DUP)
end
it "use normal powershell with PipeRunner" do
Train::Transports::Local::Connection::WindowsPipeRunner
.any_instance
.expects(:acquire_pipe)
.returns("acquired")
override_platform("x64-mingw32")
_(powershell).must_equal "powershell"
end
it "use 64bit powershell with PipeRunner" do
Train::Transports::Local::Connection::WindowsPipeRunner
.any_instance
.expects(:acquire_pipe)
.returns("acquired")
override_platform("i386-mingw32")
_(powershell).must_equal "#{ENV["SystemRoot"]}\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"
end
it "use normal powershell with ShellRunner" do
Train::Transports::Local::Connection::WindowsPipeRunner
.any_instance
.expects(:acquire_pipe)
.returns(nil)
override_platform("x64-mingw32")
_(runner.class).must_equal Train::Transports::Local::Connection::WindowsShellRunner
_(powershell).must_equal "powershell"
end
it "use 64bit powershell with ShellRunner" do
Train::Transports::Local::Connection::WindowsPipeRunner
.any_instance
.expects(:acquire_pipe)
.returns(nil)
override_platform("i386-mingw32")
_(runner.class).must_equal Train::Transports::Local::Connection::WindowsShellRunner
_(powershell).must_equal "#{ENV["SystemRoot"]}\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"
end
end
it "use powershell piping" do
cmd = conn.run_command("New-Object -Type PSObject | Add-Member -MemberType NoteProperty -Name A -Value (Write-Output 'PropertyA') -PassThru | Add-Member -MemberType NoteProperty -Name B -Value (Write-Output 'PropertyB') -PassThru | ConvertTo-Json")
_(cmd.stdout).must_equal "{\r\n \"A\": \"PropertyA\",\r\n \"B\": \"PropertyB\"\r\n}\r\n"
_(cmd.stderr).must_equal ""
end
it "can execute a command using a named pipe" do
SecureRandom.expects(:hex).returns("via_pipe")
Train::Transports::Local::Connection::WindowsShellRunner
.any_instance
.expects(:new)
.never
cmd = conn.run_command('Write-Output "Create pipe"')
_(File.exist?("//./pipe/inspec_via_pipe")).must_equal true
_(cmd.stdout).must_equal "Create pipe\r\n"
_(cmd.stderr).must_equal ""
end
it "can execute a command via ShellRunner if pipe creation fails" do
# By forcing `acquire_pipe` to fail to return a pipe, any attempts to create
# a `WindowsPipeRunner` object should fail. If we can still run a command,
# then we know that it was successfully executed by `Mixlib::ShellOut`.
Train::Transports::Local::Connection::WindowsPipeRunner
.any_instance
.expects(:acquire_pipe)
.at_least_once
.returns(nil)
proc { Train::Transports::Local::Connection::WindowsPipeRunner.new }
.must_raise(Train::Transports::Local::PipeError)
cmd = conn.run_command('Write-Output "test"')
_(cmd.stdout).must_equal "test\r\n"
_(cmd.stderr).must_equal ""
end
describe "file" do
before do
@temp = Tempfile.new("foo")
@temp.write("hello world")
@temp.rewind
end
let(:file) { conn.file(@temp.path) }
it "exists" do
_(file.exist?).must_equal(true)
end
it "is a file" do
_(file.file?).must_equal(true)
end
it "has type :file" do
_(file.type).must_equal(:file)
end
it "has content" do
_(file.content).must_equal("hello world")
end
it "returns basename of file" do
file_name = ::File.basename(@temp)
_(file.basename).must_equal(file_name)
end
it "has owner name" do
_(file.owner).wont_be_nil
end
it "has no group name" do
_(file.group).must_be_nil
end
it "has no mode" do
_(file.mode).wont_be_nil
end
it "has an md5sum" do
_(file.md5sum).wont_be_nil
end
it "has an sha256sum" do
_(file.sha256sum).wont_be_nil
end
it "has no modified time" do
_(file.mtime).wont_be_nil
end
it "has no size" do
_(file.size).wont_be_nil
end
it "has size 11" do
size = ::File.size(@temp)
_(file.size).must_equal size
end
it "has no selinux_label handling" do
_(file.selinux_label).must_be_nil
end
it "has product_version" do
_(file.product_version).wont_be_nil
end
it "has file_version" do
_(file.file_version).wont_be_nil
end
it "provides a json representation" do
j = file.to_json
_(j).must_be_kind_of Hash
_(j["type"]).must_equal :file
end
after do
@temp.close
@temp.unlink
end
end
describe "file" do
before do
@temp = Tempfile.new("foo bar")
@temp.rewind
end
let(:file) { conn.file(@temp.path) }
it 'provides the full path with whitespace for path #{@temp.path}' do
_(file.path).must_equal @temp.path
end
after do
@temp.close
@temp.unlink
end
end
after do
# close the connection
conn.close
end
end
train-3.2.20/test/fixtures/ 0000755 0001750 0001750 00000000000 13630530357 015762 5 ustar terceiro terceiro train-3.2.20/test/fixtures/plugins/ 0000755 0001750 0001750 00000000000 13630530357 017443 5 ustar terceiro terceiro train-3.2.20/test/fixtures/plugins/train-test-fixture/ 0000755 0001750 0001750 00000000000 13630530357 023221 5 ustar terceiro terceiro train-3.2.20/test/fixtures/plugins/train-test-fixture/pkg/ 0000755 0001750 0001750 00000000000 13630530357 024002 5 ustar terceiro terceiro train-3.2.20/test/fixtures/plugins/train-test-fixture/pkg/train-test-fixture-0.1.0.gem 0000644 0001750 0001750 00000023000 13630530357 030677 0 ustar terceiro terceiro metadata.gz 0000444 0000000 0000000 00000001240 13352730225 013435 0 ustar 00wheel wheel 0000000 0000000 [TMo0WB>
"*Am"3b;ت;mQr$JdY.*ޢ^k%I;+4XymF([
w (/KZ;o*ks>T"38-(ж"zm[ &xۨ="V6WOS:.OE#YV>PU|GA4i@ҟ\U.ȅ~ǒR0=H&v!#l瑱ӻa +>$ˢ~}Ó8UfhL̇i4O
N[y&skv2Ĝ99"uDCԍ\9St"E:y#FB_lSbJx{:\ ܠIʸ!
W/k8UFLrɣenzUܷbWY{a3xEq0TۢʊտV$ Yld$;^VpK.PͫH}m0,.Y{RxG Kyc[{:bĮoLƗ}x%eL\I/^hY1%.܄WfX!>a4Fz\/&l5sujRO]?|.4o+z data.tar.gz 0000444 0000000 0000000 00000012460 13352730225 013361 0 ustar 00wheel wheel 0000000 0000000 [\{s7XD]JRŒɒKחJTHb=3`3~ 0=D"F?
t?ɓGZtvGbgx5)3CWy{_GsΔ8թ*5/ڔbe#}yƬ;;b(i;9obwzWX8?;].$'/Ώu<}?XMtk{HD/L(,E
GUUX!LxJ4V%RdM'̴+=nC!p3R\W+LgOLq&m
ULFRjJOg0RUY^
3SfȦLVfSVSZtmsJȔa,aK+˛䉐or5CM)q7J,t=Exxi*`TsjѲ1Ȗ$wKV63U%
dODmD*A8ԕ(d)
;&9.N
M%-Ш2@
$;s\f'R\wtm KӴJS32 JY7V%< N?/0۱Fg
.TXp"EB[KL:NB%쓂m4DU̥b{\0I.Ӽu"ׅ}AdLꐥ@kěDOr ueπMN?Lә,XR~}iqZCDH,p=5Z!Ѧ q >2!8
;^E*Ry8[S_3|HGA]j[zVn;J!3
7Rr{{