(PUP-2508) Ensure env & trn-uuid are sent when configurer failures occur

Any failure in the configurer #run code might cause the ensure block to
evaluate early, and a report might be sent missing the details of what
the environment and transaction_uuid should be.

This patch moves where the report fields 'environment' and
'transaction_uuid' are set in the configurer code to ensure they are
populated early.

It also ensures the report environment is modified if the catalog or
server specifies it is different to the launched environment. This is
because we change this mid-flight, so our code simplies updates the
report environment when this happens.

Signed-off-by: Ken Barber <ken@bob.sh>
(PUP-2339) Modify $GEM_SOURCE for CI bootstrap

It is preferable to override the authoritative source (rubygems.org)
with our own internal resources, as opposed to the other way around.
This change ensures that if $GEM_SOURCE is set in the environment,
it is honored. Otherwise, we fall back to the public authority,
rubygems.org.

This change is analogous to the following line in our Gemfiles:

    source ENV['GEM_SOURCE'] || "https://rubygems.org"
(maint) Update beaker to 1.11.0

With beaker 1.10.0 (and probably any earlier version that included the
dependency on google-api-client), we started seeing this error:

/usr/local/opt/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.5.2/lib/bundler/rubygems_integration.rb:250:in `block in replace_gem': can't activate jwt (~> 0.1.4), already activated jwt-1.0.0.

This issue is discussed in https://tickets.puppetlabs.com/browse/QENG-655,
and it appears to be addressed by beaker 1.11.0.
(PUP-2561) Revert to using UNIX pipes in PMT’s tar operations.

Prior to this change, we’d attempted to handle shell escaping of
arguments by passing arrays of arguments rather than a single full
command string.  While this worked as intended, it meant that we needed
to stream data between processes through Ruby.  As it happens, larger
tarballs would cause the write pipeline to become backed up, and since
we would attempt to write all the data before reading any, we would
effectively deadlock.

Rather than attempting to stream by chunks, we’ve reverted back to using
the full string commands, and managing shell escapes (where needed) in
Ruby.
(PUP-2562) Remove uses of unsupported range syntax in PMT.

Prior to this commit, if any module contained a dependency statement
without a version requirement, it was erroneously treated as if no
version would satisfy (rather than allowing any version to satisfy).
This was a regression, and this change abstracts the places where we
made those checks, and corrects the error.  In addition, there is new
debugging output that will help identify similar cases in the future.
(PUP-2562) Remove uses of unsupported range syntax from Semantic.

This change pulls in an update to Semantic that was made in commit
6d17d5283e0868cfc3d74d1e9d37b572e1739b6e.
(PUP-2561) Remove the now obsolete ‘mode’ argument to ::execpipe.

Earlier, we’d added a ‘mode’ parameter to the P::U::Execution.execpipe
to support writing to the subprocess’ STDIN.  This commit removes that
functionality since we do not depend on it, we’ve never published it in
a supported release, and we do not wish to provide ongoing support for
it.
Merge pull request #2645 from pvande/bug/stable/pup2561_pmt_deadlocks_on_large_tarballs

(PUP-2561) Revert to using UNIX pipes in PMT’s tar operations.
Merge pull request #2644 from pvande/bug/stable/pup_2562_pmt_incorrectly_rejects_openstack_4_0_0

(PUP-2562) Remove uses of unsupported range syntax in PMT.
(PUP-2561) Fix spec test on windows
Merge branch 'pr/2650' into stable

* pr/2650:
  (PUP-2561) Fix spec test on windows
(packaging) Update PUPPETVERSION to 3.6.0
(PUP-2182) Add virtual_packages feature to package type.

In 3.5.x, the yum package provider changed to accept virtual package
names (packages that provide other package names).

That change in behavior caused some undesirable side-effects. As we did
not give users fair warning that this behavior was changing, we have
decided to change the yum provider back to only accepting "real" package
names by default.

To keep the support for virtual package names, a "virtual_packages"
feature has been implemented on the package type and supported on the
yum package provider.  The feature adds the "allow_virtual" parameter
that controls whether or not virtual package names will be allowed for
install/uninstall.

For now, the default value for this parameter will be false to restore
the previous behavior.  However, a deprecation warning will be issued to
let users know that the default will eventually be changed to true.
Users can prevent the deprecation warning by explicitly setting the
parameter to either true or false.
(PUP-2568) Downcase class name before validating

Previously the check for a valid name was done against the raw input,
however it later downcased the name and used that form. This order
caused Class['A'] to be an error, which isn't desired (at least not
until PUP-1810 is taken care of). By just changing the order of
operations capital letters are once again allowed.
Merge pull request #2626 from kbarber/ticket/stable/pup-2508-no-environment-trn-uuid-compilation-failure

(PUP-2508) Ensure env & trn-uuid are sent when configurer failures occur
(maint) Remove dead code in configurer
(PUP-2522) Include transaction_uuid in node requests

This makes the transaction_uuid available for use by a node terminus, to make
it easier to track the full catalog lifecycle when using an ENC.
Merge pull request #2654 from peterhuene/pup/2182

(PUP-2182) Add virtual_packages feature to package type.
(PUP-2505) Implement DELETE verb for HTTP routing

Duplicates:
   PUP-2483 Deleting a certificate does not work with the API
   PUP-2516 Delete a clients certificate with HTTP API no longer working

HTTP API requests using the DELETE method are failing with "Server Error:
undefined method `each' for nil:NilClass"...

e.g.
 curl -k -X DELETE https://${PMASTER}:8140/production/certificate_status/$AGENT

Traced problem back to missing specification for :DELETE in @method_handlers
(PUP-2505) Add method to specify delete handlers

Amending pull request per review comment.  Adding handler for delete
method.