summaryrefslogtreecommitdiffstats
path: root/lib/puppet/status.rb
Commit message (Collapse)AuthorAgeFilesLines
* (#7315) Fix `to_pson` method to render correctly.Daniel Pittman2011-05-021-1/+1
| | | | | | | | Puppet::Status had an outdated implementation of the `to_pson` hook, so would fail to render when asked. Changes to the faces system exposed this, resulting in a backtrace if the user wanted JSON output on the CLI. Reviewed-By: Nick Lewis <nick@puppetlabs.com>
* Code smell: Two space indentationMarkus Roberts2010-07-091-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix a failing test in #3115Jesse Wolfe2010-02-171-0/+8
| | | | Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Feature #3115 REST-ified status()Jesse Wolfe2010-02-171-0/+20
This patch re-implements the status() remote procedure as a REST interface. A running server returns key-value pairs, currently the only implemented key is "is_alive" which will always be set to true. Some future tool will consume this by: Puppet::Status.indirection.terminus_class = :rest Puppet::Status.find('https://puppet:8140/production/status/default') Now with unit tests. plus fixes a typo. plus integration test and default security setting. plus tests suggested by Brice. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>