puppetlabs/puppetlabs-cloud-provisioner — pull request #50 by jeffmccune (2011-11-02 21:20:47+00:00)
Title: Ticket/master/10377 add ssl option for classify action

commit a2377faa395e6f22e0042c5f7b5dcc462aa8a35b
Author: Jeff McCune
Date: Wed Nov 2 14:06:15 2011 -0700

(#10377) Add --enc-ssl option and https support to classify action

This patch adds the --enc-ssl option to the classify action. Without
this patch, the classify action only speaks to the Puppet Dashboard
using plain HTTP. When the end user specifies this command line option
the classify action will use HTTPS rather than HTTP to communicate with
the Dashboard.

It is important to note this patch does not include a post validation
check of the HTTPS connection. This means this patch provides
encryption, but not assurances of validity of the remote service.

Spec tests are updated in a separate commit.

commit 2162357a7ca5f7031cfe6d8fac87ada94aabc1b2
Author: Jeff McCune
Date: Wed Nov 2 14:10:39 2011 -0700

(#10377) Change classify spec to use let memos

This is a patch that has no change in behavior. It simply changes the
before :each blocks and instances variables used in the classify spec to
memoized let statements.

This is optional, but nice, prep work for the addition of the test
coverage for --enc-ssl option.

commit e528e00e7d2aa73d4e4c4b206b31c0d5e1a998a3
Author: Jeff McCune
Date: Wed Nov 2 14:12:54 2011 -0700

(#10377) Add spec test for --enc-ssl option

This patch adds spec test behavior coverage for the --enc-ssl command
line option. Without this test, we don't have any test coverage for
--enc-ssl.

The test fails as expected if the option is removed or renamed in the
action.

commit 256941178b25ba7b6cfd74a836bd40a7415fd01f
Author: Jeff McCune
Date: Wed Nov 2 14:14:49 2011 -0700

(maint) Update doc strings for classify action

This patch updates the documentation strings of the classify action for
whitespace purity, clarity of information, and accuracy.

No behavioral changes are introduced by this patch.

commit 12481a608a39f949de9012a1a59b08616e2e6417
Author: Jeff McCune
Date: Wed Nov 2 14:16:07 2011 -0700

(#10377) Fix backtrace in classify when connection refused

The behavior without this patch is that the classify action would use
Kernel#exit(1) after catching a connection refused exception. This
behavior is a problem because we throw away the backtrace and relevant
context regarding the error.

This patch fixes the problem by catching the exception, displaying a
more helpful error message to the user, then throwing a new exception
with the original backtrace and error message.