summaryrefslogtreecommitdiffstats
path: root/lib/puppet
Commit message (Collapse)AuthorAgeFilesLines
* (#7507) Add more 1.9 filtersJosh Cooper2011-05-201-1/+1
| | | | | | Additionally we fixed a scoping issue with the File type. Paired-With: Matt Robinson <matt@puppetlabs.com>
* Merge branch '2.7.next' into 2.7.xMatt Robinson2011-05-1918-1302/+1056
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.next: (42 commits) (#6395) Add extpuppet help, eval, and interfaces Adding a sleep state post starting master maint: fix spec_helper inclusions again. (#7523) Refactor the grammar to reduce duplication (#7114) Fix specs for ssh authorized key parsed provider (#7114) Target returns correct value (#7114) Add integration tests for authorized_key (#7114) Improve unit tests for ssh_authorized_key (#7114) Improve value validation for authorized_key (#7300) Fix instances method of mount provider (#7259) Remove ActiveRecord requirement from indirector face spec (#7259) Do not try to load all Terminus classes when configuring the Indirector (#3836) External nodes should only capture stdout Revert "(#7220) Add the ability to "inherit" options." maint: sync 'authconfig' to 'rest_authconfig' setting adding test for ticket 7139 (#7139) Accept '/' as a valid path in filesets (#7300) Add specs for the mount provider case seems needless here as there is only two opts, also the rest of the file seems to use if so this should make things more consistant (#6845) Mount writes incorrect vfstab entries ...
| * Merge branch '2.6.x' into 2.7.nextPieter van de Bruggen2011-05-181-3/+3
| |\
| | * (#3836) External nodes should only capture stdoutOliver Hookins2011-05-131-3/+3
| | | | | | | | | | | | This patch prevents stdout and stderr from being combined by Puppet::Util.execute, when used by Puppet::Indirector::Exec for external nodes.
| * | Merge branch 'ticket/2.7.next/7523' into 2.7.nextNick Lewis2011-05-173-1261/+952
| |\ \
| | * | (#7523) Refactor the grammar to reduce duplicationNick Lewis2011-05-173-1261/+952
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit unifies some paths in the grammar, which had previously been duplicated to avoid shift/reduce conflicts. Merging these paths together and separating only the conflicting structures leads to a cleaner grammar, with fewer holes. Several bugs are fixed as a result: (#3129) Nested class names beginning with numbers work correctly (#5268) Hyphens in class names work correctly (#5817) Hashes and arrays can now be passed to functions (hashes require parentheses) Additionally, expressions are now legal in most places where they would make sense, when previously only bare rvalues were allowed. Paired-With: Markus Roberts Reviewed-By: Matt Robinson
| * | | Merge branch '2.7.x' into 2.7.nextPieter van de Bruggen2011-05-1710-11/+12
| |\ \ \ | | |/ / | |/| |
| * | | (#7114) Target returns correct valueStefan Schulte2011-05-161-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the ssh_authorized_key parsedfile provider to return the current target value instead of the should value. Without this change puppet always thinks that the target property is in sync and thus will never move one key to the correct file. Reviewed-By: Nick Lewis Reviewed-By: Josh Cooper
| * | | (#7114) Improve value validation for authorized_keyStefan Schulte2011-05-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whitespaces in any of the properties can lead to incorrect entries in the authorized_keys file. Reviewed-By: Nick Lewis Reviewed-By: Josh Cooper
| * | | Merge branch 'ticket/2.7.x/7300' into 2.7.nextNick Lewis2011-05-161-0/+18
| |\ \ \
| | * | | (#7300) Fix instances method of mount providerStefan Schulte2011-05-161-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The instance method now behaves like the prefetch method: After parsing /etc/(v)fstab run mount to update the ensure state from either :unmounted to :mounted and from :absent to :ghost Reviewed-By: Nick Lewis Reviewed-By: Josh Cooper
| * | | | Merge branch ↵Jacob Helwig2011-05-161-1/+1
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'tickets/2.7.x/7259-make-active-record-test-requirement-optional' into 2.7.next * tickets/2.7.x/7259-make-active-record-test-requirement-optional: (#7259) Remove ActiveRecord requirement from indirector face spec (#7259) Do not try to load all Terminus classes when configuring the Indirector
| | * | | | (#7259) Do not try to load all Terminus classes when configuring the IndirectorJacob Helwig2011-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When configuring the Indirector routes, we should only try loading the Terminus classes that are referenced by the configuration. Previously, we were loading all Terminus classes, which would cause errors if we didn't have all of the prerequisites for all of them, even if the ones with missing prerequisites weren't being used by the configuration. Paired-with: Nick Lewis <nick@puppetlabs.com>
| * | | | | Merge branch '2.7.x' into 2.7.nextMatt Robinson2011-05-132-41/+47
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.x: (#7469) Add license to test face so tests pass (#7264) Docs: Clarify that subscribe/notify imply require/before (#7468) Stub spec that tries to connect to pypi.python.org Prevent spec failure caused by network device mock leak Fix #7299 - do not require net/ssh for running rake spec Resolved Conflicts: lib/puppet/util/network_device.rb spec/unit/util/network_device_spec.rb
| * | | | | Revert "(#7220) Add the ability to "inherit" options."Daniel Pittman2011-05-122-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9329a1f33b4d7df81ad8661de74f8a3656428570. Conflicts: spec/unit/interface/action_builder_spec.rb spec/unit/interface/action_spec.rb
| * | | | | Merge branch '2.6.x' into 2.7.nextDaniel Pittman2011-05-122-3/+3
| |\ \ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix conflicts in the changelog, and one agent spec in favour of the 2.7.next version of the code. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| | * | | | (#7139) Accept '/' as a valid path in filesetsNick Lewis2011-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was unconditionally removing the trailing file separator ('/'), which is only valid when the file separator isn't the entire path. This fixes 'puppet resource file <path>'. Paired-With: Jacob Helwig
| | * | | | (#6845) Mount writes incorrect vfstab entriesStefan Schulte2011-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Facter[:operatingsystem] will not retrieve the operatingsystem as a string so puppet will always write fstab entries.
| | * | | | (#6442) Be able to start agents --listen without namespaceauth.confMatt Robinson2011-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The namespaceauth.conf isn't being used since we switched from XMLRPC to Rest. There's still a lot of cleanup of the code that deals with authorization from the namespaceauth.conf and XMLRPC in general, but that can be address later. For now just being able to start puppet agent in listen mode without a useless file will be a big win. You still need the auth.conf file though since that is used. Reviewed-by: Max Martin <max@puppetlabs.com>
| * | | | | Merge branch '2.7.x' into 2.7.nextDaniel Pittman2011-05-0652-366/+1319
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: * spec/unit/node/facts_spec.rb Updates: * spec/unit/interface/action{,_builder}_spec.rb => update for 'when_invoked' block being required.
| * \ \ \ \ \ Merge branch '2.6.next' into 2.7.nextMax Martin2011-04-273-9/+27
| |\ \ \ \ \ \ | | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.next: (#3420) Nagios "name" attribute does not output correctly (#4487) When setting environment on a host, ensure it is a string. add test for ticket 7101 (#6487) Add some testing for OS X version support in DirectoryService provider (#6487) Directoryservice provider will fail in future OS releases
| | * | | | | Merge branch 'tickets/2.6.next/3420' into 2.6.nextJosh Cooper2011-04-261-1/+9
| | |\ \ \ \ \
| | | * | | | | (#3420) Nagios "name" attribute does not output correctlyJim Pirzyk2011-04-261-1/+9
| | | | | | | |
| | * | | | | | Merge branch 'tickets/2.6.next/4487' into 2.6.nextJosh Cooper2011-04-261-0/+7
| | |\ \ \ \ \ \
| | | * | | | | | (#4487) When setting environment on a host, ensure it is a string.Josh Cooper2011-04-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change when environment strings were read out of the storeconfigs database, they were eventually converted up to Puppet::Node::Environment objects. When these objects are returned to the storeconfigs database, ActiveRecord dumps them as YAML, which begins the death-spiral of YAML. This change makes it so the host will always store the environment as a string, preventing the Puppet::Node::Environment object from being YAMLized, and stored as such in the database. This change was based on one by Richard Crowley. Paired-with: Jacob Helwig <jacob@puppetlabs.com> Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com> Signed-off-by: Richard Crowley <r@rcrowley.org>
| | * | | | | | | (#6487) Directoryservice provider will fail in future OS releasesGary Larizza2011-04-221-8/+11
| | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes a case statement in the get_exec_pramble and single_report methods. In its place is an if statement that will cause Puppet to fail if its being run on an OS X system with a version < 10.4. This if-statement will also allow Puppet to run in 10.7. Signed-off-by: Gary Larizza <ccshots@gmail.com>
| * | | | | | | (#7220) Add the ability to "inherit" options.Pieter van de Bruggen2011-04-252-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-By: Matt Robinson
| * | | | | | | Merge branch ↵Jacob Helwig2011-04-221-2/+8
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'tickets/2.7.next/6368-files-autorequire-nearest-ancestor-directory' into 2.7.next * tickets/2.7.next/6368-files-autorequire-nearest-ancestor-directory: (#6368) Make the File type autorequire its nearest ancestor directory
| | * | | | | | | (#6368) Make the File type autorequire its nearest ancestor directoryIan Ward Comfort2011-04-221-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The File type will now autorequire the nearest ancestor directory found in the catalog, not just the file's parent directory. This is useful for setting up transitive relationships in cases when a package or other resource creates a large directory hierarchy, e.g. package { 'foo': ensure => present } file { '/var/lib/foo': require => Package['foo'] } This will make File resources at arbitrarily deep levels under /var/lib/foo automatically (transitively) require the foo package. Only the nearest ancestor is autorequired, to prevent explosion of the relationship graph.
| * | | | | | | | Merge branch '2.7.x' into 2.7.nextMax Martin2011-04-218-92/+118
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.x: (#6928) Don't blow up when the method is undefined... (#6928) backport Symbol#to_proc for Ruby < 1.8.7 (#7183) Implement "invisible glob" version matching for faces maint: better disabling of Signal#trap in our tests. maint: more robust listing of valid faces. maint: clean up testing code a fraction... maint: better error report for a missing version of a face. maint: handle face clear/reset sanely in the interface spec. maint: stop stubbing log level setting. Move tests from Puppet-acceptance repo (#7116) Handle application-level options in parse_options maint: fix gratuitous whitespace in the code. maint: remove redundant context from the test. (#7062) better argument handling in the action wrapper methods maint: move method comments outside the comment. Fixed #7166 - Replaced deprecated stomp "send" method with "publish" maint: Remove unused faces code
| * \ \ \ \ \ \ \ \ Merge branch '2.6.next' into 2.7.nextJosh Cooper2011-04-212-0/+3
| |\ \ \ \ \ \ \ \ \ | | | |_|/ / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually resolved conflicts: lib/puppet/parser/resource.rb lib/puppet/parser/scope.rb spec/unit/parser/scope_spec.rb
| | * | | | | | | | Maint: Fix a #4655 introduced log inconsistencyJesse Wolfe2011-04-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we moved code from the compiler to parser/resource, we lost a conditional that prevented defined resources from gaining containment edges to stages. Adding a stage to a defined resource was usually harmless, but it violated the invariant of "resources should only have exactly one container as their direct parent", producing a 50% chance of a malformed containment path in log messages. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
| | * | | | | | | | Fixed #7166 - Replaced deprecated stomp "send" method with "publish"James Turnbull2011-04-203-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "send" method in the stomp gem has been deprecated since: http://gitorious.org/stomp/mainline/commit/d542a976028cb4c5badcbb69e3383e746721e44c It's been replaced with the "publish" method. Also renamed the send_message method to publish_message more in keeping with language used in queuing.
| | * | | | | | | | Merge branch 'tickets/2.6.x/4655-parameterized-classes-default-stages' into ↵Jacob Helwig2011-04-193-14/+26
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.6.next * tickets/2.6.x/4655-parameterized-classes-default-stages: (#4655) Allow stage to be set using a default class parameter Updated CHANGELOG for 2.6.8rc1
| | | * | | | | | | | (#4655) Allow stage to be set using a default class parameterJacob Helwig2011-04-193-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example: stage{ pre: before => Stage[main] } class someclass ($stage=pre ) { ... } class { someclass: } This transplants adding the edge from the resource to the stage from the compiler into when the resource is evaluated. This moves adding the stage edges to after when the defaults are copied into the resources, making them available. Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
| | * | | | | | | | | Merge remote branch 'james/tickets/2.6.x/6681' into 2.6.nextJames Turnbull2011-04-141-0/+1
| | |\ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * james/tickets/2.6.x/6681: Fixed #6681 - Remove --force-yes option from aptitude is used
| | | * | | | | | | | Fixed #6681 - Remove --force-yes option from aptitude is usedJames Turnbull2011-03-121-0/+1
| | | | |_|/ / / / / | | | |/| | | | | |
| * | | | | | | | | (#7021) Fix order dependent spec failuresMatt Robinson2011-04-212-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running: rspec spec/unit/util/network_device_spec.rb spec/integration/transaction_spec.rb Caused Mocha::ExpectationError: unexpected invocation: #<Mock:device>.command() The NetworkDevice class had a current reader that once set, never got unset and lived between tests. Paired-with: Josh Cooper <josh@puppetlabs.com>
| * | | | | | | | | Merge remote-tracking branch 'jamtur01/tickets/master/7166' into nextJosh Cooper2011-04-193-4/+4
| |\ \ \ \ \ \ \ \ \
| | * | | | | | | | | Fixed #7166 - Replaced deprecated stomp "send" method with "publish"James Turnbull2011-04-203-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "send" method in the stomp gem has been deprecated since: http://gitorious.org/stomp/mainline/commit/d542a976028cb4c5badcbb69e3383e746721e44c It's been replaced with the "publish" method. Also renamed the send_message method to publish_message more in keeping with language used in queuing.
| * | | | | | | | | | Merge branch 'tickets/2.7.x/4655-parameterized-classes-default-stages' into nextJacob Helwig2011-04-193-14/+26
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tickets/2.7.x/4655-parameterized-classes-default-stages: (#4655) Allow stage to be set using a default class parameter
| | * | | | | | | | | | (#4655) Allow stage to be set using a default class parameterJacob Helwig2011-04-193-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example: stage{ pre: before => Stage[main] } class someclass ($stage=pre ) { ... } class { someclass: } This transplants adding the edge from the resource to the stage from the compiler into when the resource is evaluated. This moves adding the stage edges to after when the defaults are copied into the resources, making them available. Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
* | | | | | | | | | | | maint: move trap call to Signal so we can stub it for specsMatt Robinson2011-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also removed some monkey patching on Signal that would have theoretically done this without having to explicitly call trap on Signal in order to stub it, but it's not working. This allows us to ctrl+c (send SIGINT) in the middle of a spec run. Paired-with: Josh Cooper <josh@puppetlabs.com>
* | | | | | | | | | | | (#7259) Do not try to load all Terminus classes when configuring the IndirectorJacob Helwig2011-05-181-1/+1
| |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When configuring the Indirector routes, we should only try loading the Terminus classes that are referenced by the configuration. Previously, we were loading all Terminus classes, which would cause errors if we didn't have all of the prerequisites for all of them, even if the ones with missing prerequisites weren't being used by the configuration. Paired-with: Nick Lewis <nick@puppetlabs.com>
* | | | | | | | | | | Merge branch 'ticket/2.7.x/7507-filter_19_failures' into 2.7.xMatt Robinson2011-05-171-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.7.x/7507-filter_19_failures: (#7507) Add ability to filter Ruby 1.9 spec failures (#7507) Fix when_invoked action specs in Ruby 1.9
| * | | | | | | | | | | (#7507) Fix when_invoked action specs in Ruby 1.9Matt Robinson2011-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 1.9 is strict about argument arity for methods that are metaprogrammatically defined. A ton of specs that were setting up when_invoked didn't pass options even though they should have been. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | | | | | | | | | | | (#7297) Fix Puppet::Resource#to_manifest in Ruby 1.9Nick Lewis2011-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method was relying on the implicit join in Ruby 1.8's Array#to_s, eg. [1,2,3].to_s => "123". The behavior in Ruby 1.9 is more akin to Array#inspect, eg. [1,2,3].to_s => "[1, 2, 3]". Since the array we were building was lines to be printed, the latter behavior is incorrect. So we just join into a single string, which prints consistently in all versions of Ruby. Paired-With: Josh Cooper Original patch by Aria Stewart <aredridel@nbtsc.org>
* | | | | | | | | | | | (#7298) require 'English' to provide $CHILD_STATUS in Ruby 1.9Nick Lewis2011-05-161-0/+1
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This had been coming from 'cgi', but in Ruby 1.9, cgi no longer requires English. Since we use $CHILD_STATUS when execing, we need to have it available, so require it manually. This also provides the other named special globals, should we choose to use them. Paired-With: Josh Cooper
* | | | | | | | | | | (#7291) Fix issues with instance_methods in Ruby 1.9Matt Robinson2011-05-165-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instance_methods in Ruby 1.8.7 returns an array of strings, but returns an array of symbols in 1.9.2. This manifested itself when running the tests because in 1.9.2 we were trying to call sub on a sybmol. The original proposed solution was to monkey patch symbols to have a sub method, but this didn't deal with the real issue of need to check whether a method was defined, and actually made it worse. Turns out that checking for the presence of a method in an array that may contain symbols and may contain strings is better done by just calling method_defined? instead. This patch addresses all the places ack turned up the code doing this include? check instead of directly calling method_defined?. Thanks to Alex Sharp ajsharp@gmail.com for pointing out the Ruby 1.9 problems and working toward a solution. Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | | | | | | | | (#7291) Fixed ascii problem with Ruby 1.9.2Matt Robinson2011-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As with the previous commit, there was a problem loading a face because Ruby 1.9.2 doesn't like using non-standard ascii characters without declaring the encoding at the top of the file. SyntaxError Exception: /Users/matthewrobinson/work/puppet/lib/puppet/face/resource.rb:10: invalid multibyte char (US-ASCII) Rather than declare the encoding to allow the French word, I've translated it (after having to look it up myself). Reviewed-by: Pieter van de Bruggen <pieter@puppetlabs.com>