summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/execution.rb
Commit message (Collapse)AuthorAgeFilesLines
* (#6723) Fix withenv environment restoration bugMax Martin2011-03-151-5/+4
| | | | | | Ensured that withenv properly restores the environment after it runs a block and added testing for the method. Reviewed-by: Matt Robinson and Daniel Pittman
* Code smell: Two space indentationMarkus Roberts2010-07-091-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced 106806 occurances of ^( +)(.*$) with The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people who learned ruby in the 1900s) uses two-space indentation. 3 Examples: The code: end # Tell getopt which arguments are valid def test_get_getopt_args element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") becomes: end # Tell getopt which arguments are valid def test_get_getopt_args element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") The code: assert_equal(str, val) assert_instance_of(Float, result) end # Now test it with a passed object becomes: assert_equal(str, val) assert_instance_of(Float, result) end # Now test it with a passed object The code: end assert_nothing_raised do klass[:Yay] = "boo" klass["Cool"] = :yayness end becomes: end assert_nothing_raised do klass[:Yay] = "boo" klass["Cool"] = :yayness end
* Removed extra whitespace from end of linesIan Taylor2009-06-061-1/+1
|
* Removing the Id tags from all of the filesLuke Kanies2007-10-031-1/+0
|
* Adding an "env" parameter to exec, for providing extra environment settings, ↵luke2006-09-051-0/+1
| | | | | | as requested in #236. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1568 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a "withenv" execution util method, and using it in :exec for path ↵luke2006-09-051-0/+21
handling. Next will be other env handling. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1567 980ebf18-57e1-0310-9a29-db15c13687c0