Merge pull request #1330 from zaphod42/issue/master/15496-incorrect-zaml-utc-offset

(#15496) Correctly determine timezone offset
Maint: Skip yaml/timezone specs on Windows

Previously, the tests were failing on Windows because ruby 1.8.7 does
not take into account the TZ enviroment variable when creating Time
instances. Ruby 1.9 does take this into account, but the timezone
identifier must be specified using MS-specific syntax, e.g. EST5EDT.

This commit marks those tests as pending on Windows, so that if/when
they start working, the test will fail and we can re-enable them.

It also adds a test to ensure we can at least round-trip YAML (all
within the same timezone) on all platforms.

Paired-with: Andy Parker <andy@puppetlabs.com>
Maint: Only validate that 6 digits of precision can be roundtripped

Previously, the spec test was failing on ec2 jenkins nodes running ruby
1.9. The test would fail, because the time object contained
nanoseconds, but the roundtripped version was truncated to only
microseconds.

This test truncates the time object to contain only microseconds in a
way that is compatible with both ruby 1.8 and 1.9.

Paired-with: Andy Parker <andy@puppetlabs.com>
Disable debug log in the transport
(#15529) Initialize app settings before all and each test

Adds a new initialize() call to the TestHelper API, designed to be run before
all testing and further loading commences.

It initializes Puppet settings using the proper initialize_app_defaults call
rather than setting items individually, so the settings class correctly states
the app has been initialized.  This then makes the autoloader set up paths as
it queries this value to determine if the libdir and others have been set up
and it can autoload from them.

Patch modified by Josh Cooper <josh@puppetlabs.com>
 (#15529) Initialize settings before executing puppet specs

Previously, Puppet's settings were not initialized until the first
example was executed. Depending on the test being executed, this could
cause errors that $confdir was not initialized. For example, if the
first spec test to be executed contained:

    Puppet::Interface.faces.each do |name|
      it "should ... #{name}" do
        ..
      end
    end

Then the test would blow up, since the call to `faces` happens before
the spec_helper's before each block is executed.

This commit ensures Puppet's application default settings have been
initialized before any test code executes. A similar change will need to
be made in puppet_spec_helper.
(#10963) Collector overrides should work in Ruby 1.9

Increase arity of child_of? meta_def to 1

child_of? defined for Puppet::Resource::Type objects has an arity of 1,
but the meta_def of the same function created by
Puppet::Parser::Collector objects has an arity of 0. This throws errors
when the meta_def method is called with arguments. This commit matches
the arity so that this error will not be present.
Merge branch 'maint/master/cleanup-config-parsing' of git://github.com/zaphod42/puppet

* 'maint/master/cleanup-config-parsing' of git://github.com/zaphod42/puppet:
  (Maint) Remove code to support multiple config files
  (Maint) Remove unused method sectionlist
  (Maint) Remove unneeded parse_file method
  (Maint) Use value translator directly
  (Maint) Extract value translator for settings
  (Maint) Extract class to encapsulate value translation
  (Maint) Move initialize near top
(Maint) Canonization is for saints

The proper name for this sort of thing is canonicalization or
normalization.
(Maint) Reformat collector test to make it easier to read

The previous layout was very compact and did not make the parts very
clear. This simply reformats it some to make the different parts a
little clearer.
Revert "(Maint) Remove unused method sectionlist"

This reverts commit f3d0c7315d84ac120ef302244f885cc394f4be31.
Revert "(Maint) Remove unneeded parse_file method"

This reverts commit 2d00869443831227ee2c4e1f3a3c09ca31845424.
(Maint) Change collector tests to be more intent revealing

The previous tests did very little to inform anyone what the behavior of
the collector was expected to be in various situations. This changes the
tests to be individually split out, named, and transformed into
manifests that use the feature.
(#10963) Test resource collection inside a class/define

This adds a test for the issue reported and fixed in a8aef51. It turns
out that the problem only manifests when the collect is done inside a
`class` or `define`.  This test has been verified to fail without the
patch.
Merge pull request #1334 from zaphod42/issue/master/10963-collected-resources-on-ruby-1.9

(#10963) Collector overrides should work in Ruby 1.9
(Maint) Fix syntax error in module generate template

Commit 0d3b84249 introduced a syntax error in the template for
generating the init.pp file. This fixes that syntax error.
(#10963) Collector overrides should work in Ruby 1.9

Increase arity of child_of? meta_def to 1

child_of? defined for Puppet::Resource::Type objects has an arity of 1,
but the meta_def of the same function created by
Puppet::Parser::Collector objects has an arity of 0. This throws errors
when the meta_def method is called with arguments. This commit matches
the arity so that this error will not be present.
Update PUPPETVERSION for 3.0.2-rc3
Merge branch '3.0.x'
(Maint) Cleanup tests for owner to actually test the logic

The previous tests around the owner behavior for a file setting did very
little to test the logic around what actual owner will be used when.
This commit changes the tests to make them more clearly define the
behavior of the owner selection.