Add support for ssh-ed25519 keys
(maint) Don't setup puppet.conf for facter acceptance setup
(maint) Remove monkey patch

Prior to this patch, running spec tests with ruby 2.x
would result in deprecation warnings like so:

/Users/kylo/.rbenv/versions/2.1.0/lib/ruby/2.1.0/delegate.rb:343: warning: IO#lines is deprecated; use #each_line instead

This patch removes the monkey patching that led to those
warnings, and simply changes the code to use each_line rather
than lines, which is apparently supported in all the ruby versions
from 1.8.5 to 2.x.
(refactor) Remove double negation from resolution confine check
(maint) clean up Facter::Application#run

Move requires to top level, simplify how facts are sorted
(FACT-159) Extract facter command line formatting

This extracts facter's command line formatting to a separate file and
calls out plaintext formatting as a specific case. This allows us a
clean way of removing the plaintext behavior as we move towards
structured facts.
(FACT-186) Express windows specific gem dependencies

Previously, if a ruby module on windows tried to use facter as a
library, the calling module had to know about facter's platform specific
dependencies. This comes up when trying to develop and test puppet
modules on windows.

This commit adds the windows specific gems (which mirror the Gemfile) to
project_data.yaml. The build pipeline will automatically create an
x86-mingw32 gem in addition to the generic one.
Merge pull request #577 from adrienthebo/facter-2-output-formatting

Facter 2 output formatting
Revert "(maint) Workaround travis/rubygems failures with ruby 1.8.7"

This reverts commit 6ab0a03b53994dd7dd4a0243c31a4d81613dfccf.
Merge pull request #586 from jasperla/sshed25519key

Add support for ssh-ed25519 keys
Merge pull request #587 from adrienthebo/maint/stable/acceptance-remove-puppet.conf-setup

(maint) Don't setup puppet.conf for facter acceptance setup
21760/22005 update preflight to delete old lib dir

In order to install in the top-level site_ruby directory, we need to clean out
any installs in the old site_ruby/1.8 location. We're doing this by setting a
variable in the package:apple task. If it's set, we remove all files there as
well as files in the new location.

While I'm here:
* update erb to strip leading and trailing spaces
* validate critical variables so a script is never generated with dangerous paths
* only target top-level files/dirs in lib, since we're doing rm -RF anyway
Use Dir.glob(), don't require rubygems or rake, use Dir.chdir as a block
use instance_variable_get instead of eval
(21868) Move facter libary target to /Library/Ruby/Site

We currently drop the facter library files in /usr/lib/ruby/site_ruby/1.8
OSX, which is a symlink to /Library/Ruby/Site/1.8. As of OSX 10.9 Maverick
this will no longer work because it will be ruby 2.0.0. There are hard way
and easy ways to solve this problem. A hard way would be to somehow
introspect the target host at install time, and then dynamically copy the
payload into the correct ruby version specific path. Another hard way woul be
to create different OSX packages for different versions of OSX. Or, we could
pick the easy way, which is to just install into /Library/Ruby/Site (the
equivalent of /usr/lib/ruby/site_ruby). Since facter will work on all rubies
shipped with supported versions of OSX, this will "just work".

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Merge pull request #593 from MosesMendoza/21868/stable/cherry_pick_mavericks_pkging

21868/stable/cherry pick mavericks pkging
(FACT-186) Consolidate gem runtime dependencies

Previously, the Gemfile and ext/project_data.yaml both described gem runtime
dependencies, the former requiring an exact match, the latter a pessimistic
match.

This commit makes project_data.yaml be the single source of truth, and it
specifies exact versions.

Rubygems and bundler have different ideas about what constitutes a platform.
Rubygems requires an arch and os, e.g. x86-mingw32, while bundler has a
hard-coded list, see Bundler::Dependency::PLATFORM_MAP. As result, we need
to use the rubygems platform when building the facter gem, but use the
bundler platform when expressing gem dependencies.
Merge pull request #589 from kylog/maint/remove-monkey-patch-and-eliminate-spec-warnings-with-mri-2_x

(maint) Remove monkey patch
(FACT-134) Add module for normalizing fact values

This commits adds a module for normalizing fact values to UTF-8, and validating
that the string is properly encoded, e.g. a string may claim to be UTF-8
encoded, but actually contain binary data.
(FACT-134) Normalize and validate fact values

This commit normalizes fact values to UTF-8 and verifies that the resulting
encoding is valid.

On Windows, the default string encoding depends on the active code page. When
adding an environment based fact, e.g. FACTER_one=bar, the value is frozen
and cannot be encoded in place. So we dup fact values that come from the
environment.