Allow PE_VER to set @build.pe_version

Currently we only set @build.pe_version with the value of ENV['PE_VER'] in
pl:load_extras. We should set this always if present, otherwise it breaks
pe:local_deb.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Merge pull request #132 from MosesMendoza/allow_pe_ver_envvar

Allow PE_VER to set @build.pe_version
vendor gems without installing

Prior to this commit, the call to bundler would cause the gems to be
installed, thereby compiling native extensions for the as well, prior to
being vendored as plain ol' .gem files. This commit implements
functionality to look at the Gemfile and Gemfile.lock to determine
exactly which gem versions to install, excludes anything wholly
contained in the :development or :test groups, then then does an api
call to execute `gem fetch <gemname> -v <version>`.
Merge pull request #133 from jeffweiss/only_fetch_the_gems

vendor gems without installing
whitespace fixes
Use 'cd' in vendor_gems as a block

The 'cd' call in vendor_gems.rake doesn't return up to its previous location
afterwards, because its not in a do..end block. This means the tarball ends up
in vendor/cache/ instead of pkg/. This commit updates the task accordingly.

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

Maint/master/fix vendor gems cd
Pull in all the gems in fetch, don't exclude development and test

Originally we believed we wouldn't need the development and test groups fetched
into vendor/cache. This is no longer true because we're using the development
group to set up the js dependencies for our asset compilation. This commit
removes the exclusion of these groups.

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

Pull in all the gems in fetch, don't exclude development and test
Ensure we have PE_VER when kicking of jenkins debs

Currently the pe version is required when doing a deb build, but we don't check
that the PE version has been set when we kick off a jenkins deb build. This
causes delayed failures after the jenkins jobs kick off and no PE version is
present. This commit ensures the PE version has been provided before we kick
off the jenkins deb_all build.

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

Ensure we have PE_VER when kicking of jenkins debs
Allow github or other git repo URL as an origin for the vendor/cache gems
Merge pull request #138 from adaburrows/allow_github_origin_in_gemfile

Allow git repo URL as an origin for the vendor/cache gems
Fix type in case statement that prevents packaging from shipping x86_64 rpm builds for PE.
Merge pull request #140 from haus/one_char_fix

Fix type in case statement that prevents packaging from shipping x86_64 ...
Flesh out options

* Disable shared gems
* Use most verbose output
* Override local 'without' settings
Merge pull request #141 from adaburrows/allow_github_origin_in_gemfile

Flesh out gem caching options
Generate a new build_root and work_dir for each sles arch

Previously, a single build_root and work_dir were generated, but were
deleted by the first arch. Now a new build_root and work_dir will be
generated for each arch.
Merge pull request #142 from branan/allow_multi_arch_sles

Generate a new build_root and work_dir for each sles arch
Clean up package_repos before rsync call

Having multiple versions of the same package in the package_repos directory
causes problems when building. Sles' build automation is not smart about
choosing packages, so it is important to clean up the package directory before
rsyncing into it. This commit adds an rm_rf call to clean up all the files in
~/package_repos before building.