(PUP-3718) Make defined function handle qualified variable names

The defined function can answer if a variable is defined. There
were however no tests for qualified variable names. The implementation,
when given a qualified name simply tried to lookup the complete name
in its own scope which naturally failed.

This commit adds logic to check if a variable is qualified in the
Scope#exist? method, and then mimics the behavior of a variable
lookup by splitting the name, then looking up the class and its scope
and finally delegating the exist? call to that scope.

This is made somewhat complicated when testing due to the fact how
scopes are wired (to find other names scopes). The test that checks for
the existence of a top scope variable now sets this up as if the main
class (called '') had been evaluated.
(PUP-1413) Add 'touch' command to Augeas provider

The touch command works like its POSIX namesake, only creating the node in
the Augeas tree when it doesn't already exist, and creating it with a NULL
value.  The behaviour is copied from augtool (augrun).
(PUP-3024) Add deltarpm_percentage and deltarpm_metadata_percentage to yumrepo

This patch adds deltarpm_percentage and deltarpm_metadata_percentage to the
yumrepo type.
(PUP-3718) Make it clear that exist?(varname) returns boolean

There was a code path that did not ensure that that the return
from exist?(varname) was a boolean. Now a test is added, and nil
result is always turned into a boolean.

This is primarily done to ensure against leaking values / object
that could be considered thruthy if this code changes. (It would
be harmeless to return nil/false or true as the code stands now,
but this commit makes it explicit that a boolean result is expected.
(maint) Add error message if GitURI is nil

Prior to this commit, if the options param was left out from the
ci:test:git rake task, it would only tell the user that nil was an
unrecognized task i.e.

`#<ArgumentError:  is not recognized.>`

This was not helpful in the case where that uri variable was nil.

This commit changes that by adding a ArgumentError check to see if that
git uri is nil.
(maint) Throw error if install urls are missing from final options

Prior to this commit, if the git urls were missing from the
final_options hash, the rake task would try to do a match on a nil
object and fail. This commit fixes that by raising an ArgumentError if a
url is nil.
(PUP-3756) Only chown log file when running as root

Previously, if you specified a log file destination on non-windows
platforms, puppet would attempt to chown the file to the `Puppet[:user]`
and `Puppet[:group]`. However, this will only work if puppet is running
as root.

This commit change the log file destination to only chown when running
as root. It continues to skip the operation on Windows.
(PUP-3268) resource/service/should_not_change_the_system should only run on agents

Use the agents object to more definitely run against the proper
machines.  This test would previously error on windows runs after the agent
role is removed from the master for windows tests.  This change fixes
this issue.
Merge pull request #3415 from er0ck/maint/master/PUP-3268-resource.service.should_not_change_the_system-should_only_run_on_agents

(PUP-3268) should_not_change_the_system should only run on agents
(PUP-3642) Remove environment name from URL path

This commit makes some changes to the indirector network layer
such that the environment name is no longer a part of the main
URL path structure.  This will allow us to have a more finite URL space
and run Puppet in the same webserver with other apps, without
worrying about URL collisions.  Instead, the environment becomes a query
parameter.
Merge pull request #3412 from cprice404/feature/master/PUP-3642-remove-env-from-url-path

(PUP-3642) Remove environment name from URL path
(MAINT) Remove PUPPET_LOADED from Gemfile

Remove the use of the PUPPET_LOADED environment variable from
the Gemfile, as the bug requiring its use has been eliminated by
Puppet Server's upgrade to JRuby 1.7.17.
(maint) Update ruby sha used to build

We've updated the certs included in ruby to access rubygems.org.
Since the website has updated their certs, we were behind, and
installing gems using the provided package of rubygems would fail. This
commit updates the sha of puppet-win32-ruby we are pulling in to include
in the msi build. This will provide the additional certs for use, and
allow people to access rubygems.org via the provided rubygem package.
Merge pull request #3419 from melissaanne/stable

(maint) Update ruby sha used to build
Merge pull request #3356 from hlindberg/PUP-3718_defined-function-misses-qualified-variables

(PUP-3718) Make defined function handle qualified variable names
(QENG-1592) undefined method `assertions' in Beaker 2.0.0

- update to work with beaker 2.0, maintain 1.x backwards compatability
Merge pull request #3416 from joshcooper/ticket/master/PUP-3756-only-chown-as-root

(PUP-3756) Only chown log file when running as root
(PUP-3769) resource/service/should_not_change_the_system should only run on agents

Use the agents object to more definitely run against the proper
machines.  This test would previously error on windows runs after the agent
role is removed from the master for windows tests.  This change fixes
this issue.
(PUP-3378) Don't require puppet resource service output to be the same

Previously, the acceptance test would execute `puppet resource service`
twice, and compare the output to ensure puppet did not change the state
of the system. This was done because in the past the `init` service
provider would invoke the status command on all scripts in /etc/init.d,
including /etc/init.d/reboot.sh, which would unconditionally reboot the
system[1]

However, this test is not reliable as some platforms like fedora 19 &
20 have services that change state between the two puppet runs, e.g.
NetworkManager-dispatcher.service, and this behavior is unrelated to
puppet.

This commit removes the requirement that the `puppet resource service`
command be identical. We continue to execute `puppet resource service`
twice and compare the output of the ssh(d) service. We also have specs
to ensure that the `init` service's instances method excludes dangerous
scripts.

This commit also changes the test to use beaker's `puppet` DSL method,
which is the preferred way of executing puppet in acceptance tests.

[1] http://projects.puppetlabs.com/issues/14615

Paired-with: Eric Thompson <erict@puppetlabs.com>
Merge pull request #3424 from joshcooper/ticket/stable/PUP-3378-less-fragile-service-test

(PUP-3378) Don't require puppet resource service output to be the same