By default, the SSL-related faces should all render a strings,
not with `Object#inspect`.

Reviewed-By: Daniel Pittman

Signed-off-by: Pieter van de Bruggen <pie...@puppetlabs.com>
---
Local-branch: tickets/2.7.x/7293
 lib/puppet/face/certificate.rb                 |    4 ++--
 lib/puppet/face/certificate_request.rb         |   10 ++++------
 lib/puppet/face/certificate_revocation_list.rb |    4 +---
 3 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/lib/puppet/face/certificate.rb b/lib/puppet/face/certificate.rb
index 5e176e2..8019b6b 100644
--- a/lib/puppet/face/certificate.rb
+++ b/lib/puppet/face/certificate.rb
@@ -97,9 +97,9 @@ Puppet::Indirector::Face.define(:certificate, '0.0.1') do
   find = get_action(:find)
   find.summary "Retrieve a certificate."
   find.arguments "<host>"
+  find.render_as = :s
   find.returns <<-EOT
-    An x509 SSL certificate. You will usually want to render this as a
-    string (--render-as s).
+    An x509 SSL certificate.
 
     Note that this action has a side effect of caching a copy of the
     certificate in Puppet's `ssldir`.
diff --git a/lib/puppet/face/certificate_request.rb 
b/lib/puppet/face/certificate_request.rb
index 1fb4e81..cf342d5 100644
--- a/lib/puppet/face/certificate_request.rb
+++ b/lib/puppet/face/certificate_request.rb
@@ -15,12 +15,10 @@ Puppet::Indirector::Face.define(:certificate_request, 
'0.0.1') do
   find = get_action(:find)
   find.summary "Retrieve a single CSR."
   find.arguments "<host>"
+  find.render_as = :s
   find.returns <<-EOT
     A single certificate request. When used from the Ruby API, returns a
     Puppet::SSL::CertificateRequest object.
-
-    RENDERING ISSUES: In most cases, you will want to render this as a string
-    ('--render-as s').
   EOT
   find.examples <<-EOT
     Retrieve a single CSR from the puppet master's CA:
@@ -31,10 +29,10 @@ Puppet::Indirector::Face.define(:certificate_request, 
'0.0.1') do
   search = get_action(:search)
   search.summary "Retrieve all outstanding CSRs."
   search.arguments "<dummy_text>"
-    A list of certificate requests; be sure to to render this as a string
-    ('--render-as s'). When used from the Ruby API, returns an array of
-    Puppet::SSL::CertificateRequest objects.
+  search.render_as = :s
   search.returns <<-EOT
+    A list of certificate requests. When used from the Ruby API, returns an
+    array of Puppet::SSL::CertificateRequest objects.
   EOT
   search.short_description <<-EOT
     Retrieves all outstanding certificate signing requests. Due to a known bug,
diff --git a/lib/puppet/face/certificate_revocation_list.rb 
b/lib/puppet/face/certificate_revocation_list.rb
index 1623d43..022323b 100644
--- a/lib/puppet/face/certificate_revocation_list.rb
+++ b/lib/puppet/face/certificate_revocation_list.rb
@@ -13,12 +13,10 @@ 
Puppet::Indirector::Face.define(:certificate_revocation_list, '0.0.1') do
   find = get_action(:find)
   find.summary "Retrieve the certificate revocation list."
   find.arguments "<dummy_text>"
+  find.render_as = :s
   find.returns <<-EOT
     The certificate revocation list. When used from the Ruby API: returns an
     OpenSSL::X509::CRL object.
-
-    RENDERING ISSUES: this should usually be rendered as a string
-    ('--render-as s').
   EOT
   find.short_description <<-EOT
     Retrieves the certificate revocation list. Due to a known bug, this action
-- 
1.7.5.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to