Permalink
Commits on Mar 23, 2011
  1. Merge branch 'next'

    Max Martin committed Mar 23, 2011
    * next: (34 commits)
      (#6820) Fix File class lookup in the file type for Ruby 1.9
      (#6820) Fix nagios parser to use proper hash syntax for Ruby 1.9
      (#6820) Fix Invalid multibyte character
      (#6820) Fix RDOC parser to work with Ruby 1.9
      (#6820) Fix invalid next that should be a return
      (#2782) Fix constant_defined?
      (#6527) Fix pip tests
      (#6527) Fix uninstall problem and refactor
      (#6527) Added pip package provider.
      maint: Change code for finding spec_helper to work with Ruby 1.9
      Fix error "invalid multibyte char (US-ASCII)" under Ruby 1.9
      Fixed #6562 - Minor kick documentation fix
      (#6566) Replace tabs with spaces
      (#6566) Fix ruby 1.9 incompatible case statement
      Fixed #6566 Replace ftools with filetuils in rake gem task
      (#6555) Fix another ruby 1.9 incompatible case statement
      Fixed #6555 - Fixed two more when then colon issues
      Fixed #6555 - Ruby 1.9.x returning Invalid next (SyntaxError)
      Fixed #6555 - Ruby 1.9.x warning: class variable access from toplevel
      (#6658) Propagate ENC connection errors to the agent
      ...
  2. Merge branch '2.6.next' into next

    Max Martin committed Mar 23, 2011
    * 2.6.next:
      Fixed #6562 - Minor kick documentation fix
      (#6658) Propagate ENC connection errors to the agent
      (#4884) Remove typo from spec test
      (#4884) Modify tests to pass on non-OS X systems
      (#4884) Revise new exec tests, add a few more
      (#4884) Add an shell provider for execs
      (#4884) Fix Test::Unit exec tests
      (#4884) Break the exec type out to have a posix provider
      (#4884) Add consistent path validation and behavior
      (#4884) Add expand_path to requiring the spec_helper
      (#4884) Autorequire shared behaviors and method to silence warnings
      (#4884) Fix whitespace
      (#4884) Get rid of open3 require since it wasn't being used
      (#5814) Improved cron type specs
      (#5814) cron_spec shouldn't depend on cron provider
    
    Manually Resolved Conflicts:
    	lib/puppet/util/command_line/puppetrun
    	spec/spec_helper.rb
    	spec/unit/type/exec_spec.rb
    	spec/unit/type_spec.rb
    	test/ral/type/exec.rb
  3. Merge branch 'ticket/next/6820_ruby19_fixes' into next

    Matt Robinson committed Mar 23, 2011
    * ticket/next/6820_ruby19_fixes:
      (#6820) Fix File class lookup in the file type for Ruby 1.9
      (#6820) Fix nagios parser to use proper hash syntax for Ruby 1.9
      (#6820) Fix Invalid multibyte character
      (#6820) Fix RDOC parser to work with Ruby 1.9
      (#6820) Fix invalid next that should be a return
      (#2782) Fix constant_defined?
  4. (#6820) Fix File class lookup in the file type for Ruby 1.9

    Matt Robinson committed Mar 23, 2011
    Was getting the following error when we simply called File.dirname
    
    err: Got an uncaught exception of type NoMethodError: undefined method
    `dirname' for Puppet::Type::File:Class
    
    The constant lookup has changed in Ruby 1.9 to look at local scopes
    first, so we need to make it clearer that File is the Ruby File class
    and not something scoped in Puppet.
    
    Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
  5. (#6820) Fix nagios parser to use proper hash syntax for Ruby 1.9

    Matt Robinson committed Mar 23, 2011
    Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
  6. (#6820) Fix Invalid multibyte character

    Matt Robinson committed Mar 23, 2011
    puppet/spec/unit/network/authstore_spec.rb:89:
    invalid multibyte char (US-ASCII)
    puppet/spec/unit/network/authstore_spec.rb:89:
    syntax error, unexpected $end, expecting ']'
        " 2001:0000🔢0000:0000:C1C0:ABCD:0876  0",
                                                       ^
    
    There was a non-breaking space (HEX A0) in that line because according
    to Markus (who made the original commit), these test lines were copy
    pasted from a web page.  The intent wasn't to test non-breaking speace
    chacters for IPV6.
    
    Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
  7. (#6820) Fix RDOC parser to work with Ruby 1.9

    Matt Robinson committed Mar 23, 2011
    Lovely RDOC changed where it put everything in Ruby 1.9.  Now there's
    some conditional logic depending on Ruby version to determine which
    files to requrie. The tests still fail, but at least they run now.
    
    Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
  8. (#6820) Fix invalid next that should be a return

    Matt Robinson committed Mar 23, 2011
    The old code under ruby 1.8.7 if it was hit would result in:
    
    unexpected next (LocalJumpError)
    
    In Ruby 1.9 it doesn't even give you the chance to run the code since
    you get:
    
    compile error (SyntaxError)
    
    The code isn't tested so the intented behavior isn't clear, but in
    context this looks like the right change.
    
    Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
  9. (#2782) Fix constant_defined?

    Matt Robinson committed Mar 23, 2011
    Thanks to Al Hoang for the bit of code for choosing how to use
    constant_defined? depending on the version of Ruby.
    
    In Ruby 1.9 const_defined? has a new parameter for inherit (from Ruby docs)
    
    mod.const_defined?(sym, inherit=true) -> true or false
    Returns true if a constant with the given name is defined by mod, or its
    ancestors if inherit is not false.
    
    Unfortunately, the documentation isn't terribly clear about the behavior
    if inherit=false.  In Ruby 1.8 the inherit parameter doesn't exist.  It
    appears that setting inherit=false makes it behave like it used to in
    Ruby 1.8, but there may be sublties of autoloading that prove this wrong
    or ways in which were setting constants that changed and cause problems
    regardless of the behavior of const_defined?
    
    Ruby 1.8.7:
    irb(main):001:0> module Foo
    irb(main):002:1>   end
    => nil
    irb(main):003:0> A = 'find_me?'
    => "find_me?"
    irb(main):004:0> Foo.const_defined?('A')
    => false
    
    Ruby 1.9.2:
    ruby-1.9.2-p136 :001 > module Foo
    ruby-1.9.2-p136 :002?>   end
    => nil
    ruby-1.9.2-p136 :003 > A = 'find_me?'
    => "find_me?"
    ruby-1.9.2-p136 :004 > Foo.const_defined?('A')
    => true
    ruby-1.9.2-p136 :005 > Foo.const_defined?('A', false)
    => false
    
    Also noteworthy is that something about constants behavior changed
    between 1.9.1 and 1.9.2, though not in regard to the little test above,
    but we should only be testing against 1.9.2 anyway.
    
    At least with this change in we'll be able to start debugging test
    failures instead of just getting failures at the level of syntax errors.
    
    Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
Commits on Mar 22, 2011
  1. Merge branch 'feature/next/6527-pip_package_provider' into next

    Matt Robinson committed Mar 22, 2011
    * feature/next/6527-pip_package_provider:
      (#6527) Fix pip tests
  2. (#6527) Fix pip tests

    Matt Robinson committed Mar 22, 2011
    The testing of lazypip forgot to stub which, so they worked when pip was
    installed, but didn't work when it wasn't.  Appropriate stubbing has
    been put in place, and stubs changed to expects for some stronger
    assertions about what's happening.
    
    Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
  3. Merge branch 'feature/next/6257-pip_package_provider' into next

    Matt Robinson committed Mar 22, 2011
    * feature/next/6257-pip_package_provider:
      (#6527) Fix uninstall problem and refactor
      (#6527) Added pip package provider.
  4. (#6527) Fix uninstall problem and refactor

    Matt Robinson committed Mar 22, 2011
    Uninstall wasn't working properly because the instances method relied on
    the pip command having been defined by calling lazy_pip.  This lazy_pip
    pattern is a nice way of getting around Puppet's problem of
    disqualifying providers at the beginning of a run because the command
    doesn't yet exist even though part way through the run the command might
    exist.
    
    Really, we need to fix puppet to lazily evaluate a provider
    command for validity only at the time the provider is needed.
    
    The refactoring also pointed out that query could just reuse the logic
    from instances.
    
    The tests were also refactored to use real resources instead of stubbed
    ones, and they reflect the implementation changes to instances.
    
    Paired-with: Richard Crowley <r@rcrowley.org>
  5. (#6527) Added pip package provider.

    rcrowley committed with Matt Robinson Mar 1, 2011
    Python's pip package manager is analogous to RubyGems and should be included in Puppet.
    
    Reviewed-by: Matt Robinson <matt@puppetlabs.com>
  6. Merge branch 'ticket/next/maint-fix_require_spec_helper_for_ruby_19' …

    Matt Robinson committed Mar 22, 2011
    …into next
    
    * ticket/next/maint-fix_require_spec_helper_for_ruby_19:
      maint: Change code for finding spec_helper to work with Ruby 1.9
      Fix error "invalid multibyte char (US-ASCII)" under Ruby 1.9
  7. maint: Change code for finding spec_helper to work with Ruby 1.9

    Matt Robinson committed Mar 22, 2011
    Running the specs under Ruby 1.9 didn't work using the lambda to recurse
    down directories to find the spec_helper.  Standardizing the way to find
    spec_helper like the rest of specs seemed like the way to go.
    
    Here's the command line perl I used to make the change:
    
    perl -p -i -e "s/Dir.chdir.*lambda.*spec_helper.*$/require
    File.expand_path(File.dirname(__FILE__) + '\/..\/..\/spec_helper')/"
    `find spec -name "*_spec.rb"`
    
    Then I fixed the number of dots for files that weren't two levels from
    the spec dir and whose tests failed.
    
    Reviewed-by: Nick Lewis <nick@puppetlabs.com>
  8. Fix error "invalid multibyte char (US-ASCII)" under Ruby 1.9

    Matt Robinson committed Mar 22, 2011
    Reviewed-by: Nick Lewis <nick@puppetlabs.com>
  9. Merge branch 'tickets/2.6.x/6562' into 2.6.next

    jamtur01 committed Mar 22, 2011
    * tickets/2.6.x/6562:
      Fixed #6562 - Minor kick documentation fix
  10. Merge branch 'ticket/next/6566' into next

    Matt Robinson committed Mar 22, 2011
    * ticket/next/6566:
      (#6566) Replace tabs with spaces
      (#6566) Fix ruby 1.9 incompatible case statement
      Fixed #6566 Replace ftools with filetuils in rake gem task
  11. (#6566) Replace tabs with spaces

    Matt Robinson committed Mar 22, 2011
  12. (#6566) Fix ruby 1.9 incompatible case statement

    Matt Robinson committed Mar 22, 2011
    Once the futils area of the Rakefile was fixed, running `rake spec`
    turned up this problem.
  13. Fixed #6566 Replace ftools with filetuils in rake gem task

    jamtur01 committed with Matt Robinson Mar 2, 2011
    ftools is used in the rake gem rasks. It is deprecated in
    Ruby 1.9.x and so we've replaced it with FileUtils.
  14. Merge branch 'ticket/next/6555' into next

    Matt Robinson committed Mar 22, 2011
    * ticket/next/6555:
      (#6555) Fix another ruby 1.9 incompatible case statement
      Fixed #6555 - Fixed two more when then colon issues
      Fixed #6555 - Ruby 1.9.x returning Invalid next (SyntaxError)
      Fixed #6555 - Ruby 1.9.x warning: class variable access from toplevel
  15. (#6555) Fix another ruby 1.9 incompatible case statement

    Matt Robinson committed Mar 22, 2011
  16. Fixed #6555 - Fixed two more when then colon issues

    jamtur01 committed with Matt Robinson Mar 2, 2011
    Ruby 1.9.x doesn't support when foo:
    
    Replaced in the launchd provider and the Oracle rails ORM
  17. Fixed #6555 - Ruby 1.9.x returning Invalid next (SyntaxError)

    jamtur01 committed with Matt Robinson Mar 2, 2011
    The kick application has the option to ping hosts. On 1.9.x this
    code was returning "Invalid next". The next in this code has been
    replaced with an exit. Testing has confirmed this doesn't change the
    behavior of puppet kick.
  18. Fixed #6555 - Ruby 1.9.x warning: class variable access from toplevel

    jamtur01 committed with Matt Robinson Mar 2, 2011
    This came from the use of the @@colormap class variable.
    
    The variables has been changed to a constant.
Commits on Mar 18, 2011
  1. Merge branch 'ticket/2.6.next/6658' into 2.6.next

    Matt Robinson committed Mar 18, 2011
    * ticket/2.6.next/6658:
      (#6658) Propagate ENC connection errors to the agent
  2. (#6658) Propagate ENC connection errors to the agent

    Matt Robinson committed Mar 18, 2011
    When the master failed to run the External Node Classifier script it
    would log an error on the master, but the agent didn't get back the full
    error or the stack trace for it's logs.  By raising when there's an ENC
    script problem on the master, this causes the error messages to
    propagate to the agent.
    
    Paired-with: Jacob Helwig <jacob@puppetlabs.com>
  3. Merge branch 'ticket/2.6.x/5814' into 2.6.next

    Max Martin committed Mar 18, 2011
    * ticket/2.6.x/5814:
      (#5814) Improved cron type specs
      (#5814) cron_spec shouldn't depend on cron provider
  4. Merge branch 'ticket/next/maint-silence_false_test_output' into next

    Matt Robinson committed Mar 18, 2011
    * ticket/next/maint-silence_false_test_output:
      maint: Silence test output in the spec run
  5. maint: Silence test output in the spec run

    Matt Robinson committed Mar 17, 2011
    There was a test that output 'false' in the middle of the spec run.
    This fixes that and makes the test a little stronger, because we
    actually assert what puts is writing to standard out.
    
    Reviewed-by: Nick Lewis <nick@puppetlabs.com>
  6. Merge branch 'next'

    Matt Robinson committed Mar 18, 2011
    * next: (198 commits)
      (#6722) load all functions before testing...
      Updated CHANGELOG for 2.6.7rc1
      (#5073) Download plugins even if you're filtering on tags
      Fix #5610: Prevent unnecessary RAL lookups
      Revert "Merge branch 'ticket/2.6.x/5605' of git://github.com/stschulte/puppet into 2.6.next"
      (#6723) Fix withenv environment restoration bug
      (#6689) Remove extraneous include of Puppet::Util in InventoryActiveRecord
      Remove extra trailing whitespace from lib/puppet/resource.rb
      (#5428) More fully "stub" Puppet::Resource::Reference for use with storedconfigs
      (#6707) Fix typo in rest_authconfig.rb
      (#6689) Make inventory_active_record terminus search quickly
      (#5479) Test that we auto-require the zone dataset.
      (#5479) Autorequire zfs filesystem when zone dataset is configured
      (#5392) Give a better error when realizing a non-existant resource
      (#2645) Adding a less-stubby test to verify the "system" attribute's behavior
      Update CHANGELOG for 2.6.6
      maint: Remove serialization of InventoryFact values
      maint: Rename InventoryHost to InventoryNode
      (#6441) Add mount fixture for AIX's /etc/filesystems
      Fixed #2645 - Added support for creating system users
      ...
  7. Merge branch '2.6.x' into next

    Matt Robinson committed Mar 18, 2011
        * 2.6.x: (36 commits)
          Updated CHANGELOG for 2.6.7rc1
          (#5073) Download plugins even if you're filtering on tags
          Fix #5610: Prevent unnecessary RAL lookups
          Revert "Merge branch 'ticket/2.6.x/5605' of git://github.com/stschulte/puppet into 2.6.next"
          (#6723) Fix withenv environment restoration bug
          (#6689) Remove extraneous include of Puppet::Util in InventoryActiveRecord
          Remove extra trailing whitespace from lib/puppet/resource.rb
          (#5428) More fully "stub" Puppet::Resource::Reference for use with storedconfigs
          (#6707) Fix typo in rest_authconfig.rb
          (#6689) Make inventory_active_record terminus search quickly
          (#5392) Give a better error when realizing a non-existant resource
          (#2645) Adding a less-stubby test to verify the "system" attribute's behavior
          Update CHANGELOG for 2.6.6
          maint: Remove serialization of InventoryFact values
          maint: Rename InventoryHost to InventoryNode
          Fixed #2645 - Added support for creating system users
          maint: Remove spec run noise
          maint:Refactor of mount provider integration tests
          (#6338) Support searching on metadata in InventoryActiveRecord terminus
          (#6338) Implement search for InventoryActiveRecord facts terminus
          ...
    
        This merge includes essentially reverting #4904's change to the mount
        type since tests that came in from 2.6.x specified different
        behavior and what's correct is not clear to me.  I've reopened #4904 and
        added it to our backlog, and talked to Nigel about the RFC that's
        currently out on the puppet-users mailing list for a bigger refactor of
        how the mount provider works.
    
        Manually Resolved Conflicts:
            spec/spec_helper.rb
            spec/unit/indirector/queue_spec.rb