(FACT-186) Know about bundle_platform

Per https://github.com/puppetlabs/facter/pull/591, in order to make
project_data.yaml the single source of truth for gem dependencies, we need to
support some form of mapping between ruby platforms and their bundler
counterparts for the purposes of composing a Gemfile. The suggested approach
was a key, bundle_platforms, that contains this mapping, but in order to avoid
printing a warning about unknown build parameters, we need to add it here as
well. This commit does so.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(maint) Use GNU-style long flags for createrepo

While updating `createrepo` commands to use SHA1 checksums as an option,
I also replaced usage of short flags with GNU-style long flags. Is it
more characters? Absolutely. Is intent a little bit clearer now? I hope so.
(RE-691) Add '--checksum=sha' to createrepo commands

This change is needed to support the pending upgrade of `createrepo`
from 0.4.11 to 0.9.9. If you use the `--checksum` flag with 0.4.11,
it complains to STDERR about a deprecated option but it doesn't stop
repo scanning. If we stage this change now, then legacy yum instances
(such as EL4) will continue to work when we upgrade `createrepo`.
(maint) Use an intermediate variable for remote command in :update_yum_repo

This brings usage more in-line with other instances of `remote_ssh_cmd`, and
will make it easier to break the command apart in the future.
(maint) Split up the remote:update_yum_repo `createrepo` command

 FOR READABILITY!
Merge pull request #252 from mckern/createrepo-loves-checksums

`createrepo` loves checksums! And long options!
(maint) Consolidate two methods into one

create_rpm_repo and update_rpm_repo are almost identical methods except for the
passing of --update, which will still work when creating a repo. This commit
collapses the two methods into one by aliasing create_rpm_repo to
update_rpm_repo, so that only one method needs maintenance.
Merge pull request #253 from haus/createrepo-loves-checksums

(maint) Consolidate to methods into one
Merge pull request #248 from MosesMendoza/FACT-186/master/add_bundle_platforms

(FACT-186) Know about bundle_platform
(Maint) Don't abort if gembuilddir doesn't exist

Previously, running `rake package:gem` from facter would fail with the
error:

    $ rake package:gem
    rm -rf pkg
    mkdir -p pkg
    WARNING:  no rubyforge_project specified
    mv facter-1.7.4.38.gem pkg/facter-1.7.4.38.gem
    rm -r pkg/facter-1.7.4.38
    rake aborted!
    No such file or directory - pkg/facter-1.7.4.38

This changes the gem task to rm -rf pkg/facter-1.7.4.38 instead. I don't
know why the same error doesn't occur when creating a puppet gem.
(RE-828) Fix shebangs in apple packages

Our packages were using /usr/bin/env ruby and installing to
system ruby loadpath, which breaks horribly in a multi-ruby (rbenv, etc)
environment. This goes into the workdir and looks for any files dropped in
bin, and "seds" the shebang to /usr/bin/ruby. I would love to be using a
ruby approach to this instead of shelling out to sed, but the problem is
we've already set ownership on these files, almost exclusively to root, and
thus we need to sudo out.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Merge pull request #255 from MosesMendoza/maint/master/shebang_apple_bins

(RE-828) Fix shebangs in apple packages
Merge pull request #254 from joshcooper/maint/master/gem-task

(Maint) Don't abort if gembuilddir doesn't exist
(RE-279) Send a bundle of the packaging repo to distribution server

Let's also make a git bundle of the packaging repo that we're using when we
invoke pl:jenkins:ship. We can have a reasonable level of confidence, later on,
that the git bundle on the distribution server was, in fact, the git bundle
used to create the associated packages. This is because this ship task is
automatically called upon completion each cell of the pl:jenkins:uber_build,
and we have --ignore-existing set below. As such, the only git bundle that
should possibly be on the distribution is the one used to create the packages.
We're bundling the packaging repo because it allows us to keep an
archive of the packaging source that was used to create the packages,
so that later on if we need to rebuild an older package to audit it or
for some other reason we're assured that the new package isn't
different by virtue of the packaging automation.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(RE-399) make build object properties accessible

It would be useful to have access from the rake entry point to all of the build
properties individually. This commit makes it so, by creating a new rake task,
pl:print_build_param[:param], where the passed parameter is the one to print.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(maint) Use gem_name when pushing

Previously if a project name did not match the gem name, it would not get
pushed automatically during a pl:ship_gem. This commit updates the task to use
the gem_name instead of project name to avoid this problem. gem_name defaults
to project name if it is not set.
Merge pull request #258 from haus/push_using_gem_name

(maint) Use gem_name when pushing
Merge pull request #256 from MosesMendoza/RE-279/master/send_git_bundle

(RE-279) Send a bundle of the packaging repo to distribution server
Merge pull request #257 from MosesMendoza/RE-399/master/make_param_print

(RE-399) make build object properties accessible
Initial work on reorg into classes