(#19764) Fix ipaddress issue scanning beyond the first address

Without this patch the refactoring of the ipaddress fact in 0e514b8
changed the determination behavior unintentionally.  This is a problem
because the behavior change caused the setcode block to scan only one
address in the output of ifconfig.  If the first address is a loopback
(127) address, then no additional addresses will be checked.

This patch addresses the problem by restoring the behavior of splitting
the output of `ifconfig` into lines, then scanning each line.  If an
address is matched that begins with 127, then scanning continues.
Otherwise the matched address is determined to be the ipaddress.

The fixture has been extracted from the description of the issue
published in the comment at http://git.io/MbXKEg
Merge pull request #431 from jeffmccune/fix_ipaddress_scanning

(#19764) Fix ipaddress issue scanning beyond the first address
Merge branch 'stable'
(maint) Move facter.gemspec to .gemspec

So that people don't get confused.
(maint) Make facter gemspec report correct version

Without this patch the Gem system thinks that the version of Facter
running from a development branch is `1.6.11` even though many versions
have been released since then.  This is a problem because a project that
requires Facter >= 1.7.0 should be able to satisfy this dependency using
the `stable` development branch, however it cannot because the version
information is out of date.

This patch addresses the problem by using Facter's public version API to
determine the version of Facter contained in the git branch.

This patch also attempts to make it clear to the reader that the gemspec
is intended for use with the VCS branches under active development and
_not_ as the way to produce a gem release package.
Merge branch 'hide_gemspec' into stable

* hide_gemspec:
  (maint) Make facter gemspec report correct version
  (maint) Move facter.gemspec to .gemspec
Merge branch 'stable'

* stable:
  (maint) Make facter gemspec report correct version
  (maint) Move facter.gemspec to .gemspec

Conflicts:
	.gemspec
(#20321) Be more descriptive in deprecation message

Facter::Util::Resoultion.exec can be used to run arbitrary commands. On
windows it is currently allowed to pass a shell builtin but we raise a
deprecation warning.

But the deprecation warning did not include the actual commandline it is
complaining about so if you have custom facts that make use of this
feature you may ask yourself why you see the message.

Add the actual command to the deprecation message so it easier to
resolve the issue.
Merge branch 'pull-435' into stable
Merge branch 'stable'
(#17710) Refactor the IP module

This pull request aims to refactor the Facter::Util::IP module with kernel
specific classes adhering to a common interface. This pull request eliminates
case statements and crazy kernel conditionals within methods. Additionally, this
eliminates the giant REGEX_MAP constant at the top of the Facter::Util::IP
module and adds some documentation to methods that were previously left
undocumented.

This also removes the untested network.rb fact and moves in into interfaces.rb
since they are dynamically generated by the name of the interfaces. They now
have tests.

This supports the new on_flush method.

The related ticket is here: http://projects.puppetlabs.com/issues/17710
(maint) Avoid executing ifconfig from the specs

Without this patch the spec examples will execute /sbin/ifconfig.  This
is a problem because the test will fail on platform which do not have
ifconfig, like Windows.

This patch addresses the problem by expecting
Facter::Util::Resolution.exec is called, preventing the system command
from being executed.

The patch also re-words the example to describe the exact behavior being
tested.
(maint) Fix Facter::Util::IP.exec_ifconfig examples

Without this patch the Facter::Util::IP.exec_ifconfig examples only set
stub methods, they don't actually set expectations that ifconfig is
executed as the examples describe.

This patch addresses the problem by updating the examples to reflect the
intent of the behavior expressed in the description of the example.
(maint) Silence no facts loaded warning in specs

Without this patch the mocked fact value in some of the tests are
producing a warning that no facts are loaded.  This is a problem because
the warning is a red herring side effect of the mocking itself.

This patch addresses the problem by stubbing the Facter.warnonce method
for these specific examples that have no facts loaded at the time of
setting the expectation.
(maint) Remove focus tag from ec2 specs

This was a stray artifact from my debugging that shouldn't have been
committed, but was by accident.
Merge branch 'razic-fix/2.x/17710_ipmodule_refactor'

* razic-fix/2.x/17710_ipmodule_refactor:
  (maint) Remove focus tag from ec2 specs
  (maint) Silence no facts loaded warning in specs
  (maint) Fix Facter::Util::IP.exec_ifconfig examples
  (maint) Avoid executing ifconfig from the specs
  (#17710) Refactor the IP module
(maint) Replace rspec >= 2.11 expect(foo).to with foo.should

Without this patch the specs are failing in our CI system because we
have rspec 2.9 installed and the change set in c028d61 introduced a lot
of examples that use the `expect().to` syntax added in rspec-2.11.

This patch addresses the problem by replacing all instances of
`expect(foo).to` with `foo.should`.
Revert "(maint) Replace rspec >= 2.11 expect(foo).to with foo.should"

This reverts commit f83db167b7147f0fe05419b4c1ee83f7b03786dc.
Revert "Merge branch 'razic-fix/2.x/17710_ipmodule_refactor'"

This reverts commit c028d611ef294f2a206e90b9268b0afa61ff0654, reversing
changes made to e189f8a7739cad36bf8130741056ebb3f4a4f766.

This change set is being reverted because we're getting the following
error when running the acceptance test suite on Microsoft Windows.

     Could not retrieve local facts: undefined method `get_interfaces'
     for Facter::Util::IP:Class
Merge branch 'revert_ipmodule_refactor'

* revert_ipmodule_refactor:
  Revert "Merge branch 'razic-fix/2.x/17710_ipmodule_refactor'"
  Revert "(maint) Replace rspec >= 2.11 expect(foo).to with foo.should"

References GH-423