(#20920) Include file and line number on invalid resource relationship

Change the error type to ResourceError to make it include the file name
and line number.
(#20302) Windows ruby 1.8 workarounds are not necessary in 1.9

Previously, the sprintf spec failed, because ruby outputted the
exponent with a leading zero, despite a precision of 2. The zaml spec
failed, because ruby didn't recognize the Europe/London timezone.

Ruby 1.9 fixes these issues, so the workaround in sprintf_spec is no
longer necessary, and the zaml_spec issue is no longer pending.
(#20302) Append .exe to spec "executables" on Windows

When running the tests on Windows and Ruby 1.8.7, File.executable?
returns true on regardless of the file extension. On Ruby 1.9, it only
returns true if the extension is .exe or similar.

This commit ensures the "executable" ends with .exe.
(#20302) Handle nested include filters

Nested rspec include filters don't work the way I expect. Given:

  describe "A", :if => rdoc1? do
    before :all do
      require 'rdoc/tokenstream'
    end

    describe "B", :if => windows? do
    end
  end

If rdoc1? is false, but windows? is true, the before :all/:each blocks
will still be executed, and the tests in B will be executed.

As a result, the spec tests fail on Windows and ruby 1.9, because our rdoc
parser is not compatible with newer versions of rdoc. For example,
rdoc/tokenstream.rb was moved to token_stream.rb, etc.

This commit adds the rdoc1? predicate to the example group B, so that
it is not executed when rdoc1? is false.
(#20302) File.expand_file('~') fails differently in Ruby19

In ruby 1.8, calling File.expand_path('~') when HOME is undefined
would raise ArgumentError on both Unix and Windows.

The same test in ruby 1.9 does not raise on Windows, because ruby
also looks at HOMEDRIVE and USERPROFILE. Only if all three are
undefined does ruby raise ArgumentError as expected.

This commit ensures all 3 environment variables are undefined in util_spec. It
also only tests the platform specific RunMode functionality on the appropriate
platforms, and adds tests that were missing on the Windows side.
Docs: Improve documentation of "duration" settings

A user pointed out that "as a duration" was not a helpful way to describe the
formats used by duration settings; although the formats are explained at the top
of the config reference, scrolling shouldn't be necessary, and most readers
wouldn't think to check the top of the file.

This commit puts a small list of the formats in each duration setting, as well
as marking the activerecord storeconfigs settings as deprecated.
Docs: Fix a persistent formatting glitch in the file type's ensure parameter docs
Maint: Don't execute facter during spec tests

Previously, the test was trying to test that the 'facts' application
could be invoked and return exit code 0 with meaningful output. However,
it causes the 'facter' terminus to be invoked, which actually runs
facter.

Since we don't care what facts are returned, this commit adds an
expection to make sure the indirection#save method is called and returns
successfully.

This was discovered on win2003 due to local facts being present, which
when evaluated, wrote errors into the log.
Merge pull request #1674 from nfagerlund/maint/duration_settings

Docs: Improve documentation of "duration" settings
Merge branch 'stable'
Merge pull request #1675 from nfagerlund/maint/file_typo

Docs: Fix a persistent formatting glitch in the file type's ensure parameter docs
Merge branch 'stable'
Merge pull request #1677 from joshcooper/ticket/stable/20302-ruby19-windows-specs

Update specs for Windows on Ruby 1.9
Merge branch 'stable'
(#20920) Test that missing resource deps add context

When calling the mixed in `#fail` method, an exception should be raised
that will add file and line information as part of the exception
message. This commit adds tests to ensure that when that context is
available it is part of the exception message.
Merge branch 'pull-1669'

This closes GH-1669
Merge branch 'master' of https://github.com/puppetlabs/puppet