(QENG-716) install_package_version

This commit adds 'install_package_version' method to the DSL helper utils and an
associated method that given package name as well as optional version string
that will be used to construct a package name that includes a specific version
string for installation on the SUT.

This currently only supports apt and yum based package managers, as I am no
familiar enough with other platforms. For non apt or yum based platforms, an
exception will be raised.

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-725) Implements install_from_ezbake.

Adds a new module, Beaker::DSL::EZbake to extend the Beaker DSL with
functionality that should be useful across multiple JVM based projects,
particularly those that use TrapperKeeper and are packaged using ezbake.

Don't want to add user to system from install_from_ezbake, that should be done
at a higher level or from within a preinst step if absolutely necessary. Also
shouldn't be making any puppet calls using Beaker before the Puppet master is
run for the first time using init scripts since this will lead to
/var/lib/puppet directories being owned by root. Bad.

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-725) Adds spec tests for EZBakeUtils.

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-725) Minor bugfix and documentation addition.

* Document `ezbake_stage` method.
* Fix directory creation bug in `conditionally_clone` method.

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-716) Add package_version option to install_package.

Makes more sense to make this optional behavior in `install_package` than to
implement new method.

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-725) Minor code cleanup and EZBakeUtils fix.

* Fixes defaultsdir argument passed to make in `install_from_ezbake` for debian
  systems.
* Adds `--force-yes` to apt-get calls when installing packages on debian.
* Minor code cleanup when interpreting package and version information from
  `ezbake_config`

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-725) Improve install_from_ezbake

Need to be able to pass in arbitrary key-value pairs to add to environment in
which `make` is called on the given host in install_from_ezbake. If the hash is
empty, then don't prepend the `env` call to make.

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-725) Add attributes to `Beaker::Platform`

* Add attributes to `Beaker::Platform` and use those in
  `Beaker::Platform.with_numeric_version` and
  `Beaker::Platform.with_codename_version`.
* Add spec tests to confirm that `Beaker::Platform.codename` is nil when a given
  platform does not have version codenames and to verify behavior of
  `Beaker::Platform.to_array`
* Update `Beaker::DSL::EZBakeUtils` to make use of new
  `Beaker::Platform.to_array` method.
* Update `spec/beaker/dsl/ezbake_utils.rb` to use `Beaker::Platform` object.

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-725) Add `ezbake_tools_available?`

Add `Beaker::DSL::EZBakeUtils.ezbake_tools_available?` to ensure that both the development system and the
SUT have the required software necessary for this stuff to work correctly.

Also add spec tests for this new method and update existing method rspec tests to
verify that they actually use the new method where appropriate.

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-725) `install_from_ezbake` check for unsupported platforms

Signed-off-by: Wayne <wayne@puppetlabs.com>
Merge pull request #295 from waynr/feature/ezbake-utils

(QE-725) Feature/ezbake utils
(QENG-715) Add `install_dev_repo` to Beaker DSL

This is a "push" style method of installing a dev repo from
builds.puppetlabs.lan by first downloading to a directory on the local machine
then pushing to the appropriate configuration directory on the remote machine.

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-431) expanded and improved role support in beaker

- make is possible to use arbitrary role names for most beaker DSL APIs
(QENG-431) expanded and improved role support in beaker (part 2)

- add support for running commands against hosts by name
- add support for arbitrary role methods, like those for built in roles
    eg, on master, "echo hello"
        on myrole, "echo hello"
(QENG-715) Copy methods over from puppet acceptance lib.

Copy `fetch`, `fetch_remote_dir`, and `install_repos_on` from puppet accentance
testing library since this functionality is actually useful on pretty much all
projects using Beaker. Still needs to be cleaned up and tuned to work in this
context.

(QENG-715) Minor code cleanup.

Matches when/case indentation levels.

(QENG-715) Use new `Beaker::Platform.to_array` method.

This method simplifies the logic by highlighting through semantics the
difference between `version` and `codename`.

(QENG-715) Remove hard-coded URIs.

Grab URIs from options presets instead of hard-coding. Do this for development
builds repositories, apt repositories, and yum repositories.

(QENG-715) Add `:dev_builds_url` to Beaker presets.

Use this in `Beaker::DSL::InstallUtils.install_repos_on`.

Also renames soem variables and standardize on how to populate a string pattern
with variables since the last couple commits were injecting variables directly
into the string.

(QENG-715) Separate release repo installation step.

Some pre_suites may only want to install the release repository.

(QENG-715) Clean up `install_release_repo`

Since we are installing a public repository we don't need to go through the
intermediate fetch step.

(QENG-715) Minor bug fix and code cleanup.

Don't scp files to a directory then move them to another directory in a later
step, instead copy them directly to their intended target directory.

Also fix some typos, bugs, and other miscellany.

(QENG-715) Break find-and-sed into smaller exprs.

(QENG-715) Raise RuntimeError instead of log message.

(QENG-715) Remove extraneous SUT commands.

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-715) Add yard docs.

(QENG-715) Add new rspec tests.

(QENG-715) Give methods less generic names.

As pointed out in PR review, the use cases for these methods are pretty specific
and their names ought to reflect that specificity.

Signed-off-by: Wayne <wayne@puppetlabs.com>
(QENG-715) Remove old `install_dev_repo`

This method, rather than pushing repos to the SUT, has it pull from puppet labs
internal repository. This is deprecated by the newer
`Beaker::DSL::InstallUtils.install_dev_repo` which uses a push method.

Signed-off-by: Wayne <wayne@puppetlabs.com>
Merge pull request #322 from waynr/feature/install-dev-release-repos

(QENG-715) Add `install_dev_repo` to Beaker DSL
(GEM) create beaker 1.14.0 gem
Merge pull request #340 from anodelman/make-gem

(GEM) create beaker 1.14.0 gem