(#14822) Re-evaluate features if they previously were false

Allow features to be re-evaluated each time they are checked, if they
previously evaluated to false.  This allows for providers by features to have
dependencies installed during a run and then for the feature state to change
from false to true.

Caching of feature results that were previously true has been kept.  Caching of
blocks used to evaluate features remains unaffected and are still run only once.
(#14822) Use feature confine for feature tests during run

Fixes two providers to use the "confine :feature" statement, allowing for the
features to be re-evaluated during a run instead of only once.
(#16376) Fix rails compatibility layer for activerecord < 3.0

Previously an alias was attempted between scope and named_scope to allow older
activerecord versions (< 3.0) to work with the inventory service while also
supporting modern activerecord. The scope alias failed because
Puppet::Rails::InventoryNode inherits from ActiveRecord::Base, which has a
scope method already. So activerecord's scope method is found instead of the
intended alias target. This commit removes the alias and simply switches on
activerecord version to use the correct scope (AR >= 3.0) or named_scope (AR <
3.0) method.
Update puppet.spec.erb to correct rpmlint issues

This commit updates the puppet rpm specfile for several warnings and errors
issued by rpmlint against our packages. These include incorrect perms on
scripts and self-obsoleting package. This also replaces Requires(stage) with a
simple requires with a comment explaining which stage it is required for and
adds cases for systemd requires.
Merge pull request #1170 from haus/maint/3.x/fixup_lint

Update puppet.spec.erb to correct rpmlint issues
fail better in package repo rake tasks

This commit modifies the top level Rakefile to only
load the packaging repo yaml file if it exists, as
well as provide some error handling for other unwanted
conditions that may arise as a result of trying to
set up the packaging repo.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Merge pull request #1171 from MosesMendoza/maint/2.7.x/cleanup_package_repo_rake_tasks

fail better in package repo rake tasks
Set ca_location in ca face

The ca face was not properly setting ca_location, and therefore not setting
the terminus correctly for Puppet::SSL::Certificate or CertificateRequest.
Because of this, the ca face would not read all available certificates, for
example certs waiting to be signed.
Update puppet.spec, bump required ruby to 1.8.7

Telly drops support for 1.8.5, moving the minimum required ruby to 1.8.7. For
el5, ruby 1.8.7 can be found in our devel repos at
yum.puppetlabs.com/el/5/devel/$ARCH until we release Puppet 3.0, at which time
they will move into our dependencies repo at
yum.puppetlabs.com/el/5/dependencies/$ARCH.
Update docs w/ new default logoutput value from ticket #10907

This commit updates the inline parameter docs to match a change that was
previously merged.
Remove CHANGELOG file

This commit removes the CHANGELOG file in the top level
of puppet, which only contains commit hashes/ messages
from the previous releases, and is of debatable utility.
This information can be gleaned easily from a git log,
and is not of much use without git. Removing it removes
yet another manual process from the releasing of puppet.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(#7316) Load applications from the modulepath

Without this patch Puppet does not search the modulepath lib
subdirectories for application subcommands.  This is a problem because
face applications that aren't affected by #3947 should work.

This patch fixes the problem by searching through the modules along the
modulepath to find available subcommands in addition to those available
along the Ruby $LOAD_PATH and RubyGems $GEM_PATH.

Both legacy application files and modern face applications are loaded
from the modulepath with this patch.

This patch does _not_ add the module's `lib/` subdirectory to the
$LOAD_PATH, so issue #3947 will still affect face applications that
attempt to use `require` with library files inside the module.
Merge branch 'fix/3.x/7316_load_faces_from_modulepath' into 3.x

* fix/3.x/7316_load_faces_from_modulepath:
  (#7316) Load applications from the modulepath

Paired-with: Andrew Parker <andy@puppetlabs.com>
Merge branch '3.x'

* 3.x:
  (#7316) Load applications from the modulepath
  Update puppet.spec.erb to correct rpmlint issues
(Maint) Fix spec failures with Puppet::Face[]

Without this patch the describe blocks are being executed before the
spec helper before hooks.  This is problem because the
Puppet::Face.find method now searches the modulepath.  The modulepath
setting is not yet initialized when the subject of the describe block is
evaluated.

This patch fixes the problem by explicitly setting the subject inside
the example groups.  Doing so delays evaluation of the find method until
after settings have initialized.

I suppose all of this could be summed up as, "Load faces after settings
have been initialized by the spec helper, not before."

Paired-with: Andrew Parker <andy@puppetlabs.com>
Merge branch 'fix/3.x/fix_puppet_face_failures' into 3.x

* fix/3.x/fix_puppet_face_failures:
  (Maint) Fix spec failures with Puppet::Face[]
Merge branch '3.x'

* 3.x:
  (Maint) Fix spec failures with Puppet::Face[]
Revert "Merge branch 'fix/3.x/7316_load_faces_from_modulepath' into 3.x"

Revert the modulepath face loader change set for the following reason:

This change set is intended to load faces from the module path.   It
works great...  _if_ you explicitly set --confdir on the command line
like I do with my zsh puppet() function.  If you don't, then it blows up
because the global for the confdir is set by defaults at a different
enough point in the code for us to overlook the issue.

If we invest in removing global state, specifically Puppet.settings, I
think we'll see a very quick return.

The confdir setting should be "available" for use at the same point,
regardless of where it comes from; defaults, puppet.conf, CLI, or
(hopefully) the environment.

This reverts commit 8b059a9a9e7c765d3050163ca59abeffe3e297b5, reversing
changes made to 7c3b620182602012b191a5b5ade7b1df5cbc8b19.
Revert "Merge branch 'fix/3.x/fix_puppet_face_failures' into 3.x"

This reverts commit 8dff14b9c5a3cdd99ede63dbcbb2dbe00b457926, reversing
changes made to 8b059a9a9e7c765d3050163ca59abeffe3e297b5.

Revert the modulepath face loader change set for the following reason:

This change set is intended to load faces from the module path.   It
works great...  _if_ you explicitly set --confdir on the command line
like I do with my zsh puppet() function.  If you don't, then it blows up
because the global for the confdir is set by defaults at a different
enough point in the code for us to overlook the issue.

If we invest in removing global state, specifically Puppet.settings, I
think we'll see a very quick return.

The confdir setting should be "available" for use at the same point,
regardless of where it comes from; defaults, puppet.conf, CLI, or
(hopefully) the environment.
Merge branch 'revert/3.x/faces_from_modulepath' into 3.x

* revert/3.x/faces_from_modulepath:
  Revert "Merge branch 'fix/3.x/fix_puppet_face_failures' into 3.x"
  Revert "Merge branch 'fix/3.x/7316_load_faces_from_modulepath' into 3.x"