lib/lumberg/format_whm.rb in lumberg-2.0.0.pre6 vs lib/lumberg/format_whm.rb in lumberg-2.0.0.pre7

- old
+ new

@@ -26,10 +26,12 @@ success, message, params = format_action_response(response) when :query success, message, params = format_query_response(response) when :ssl success, message, params = format_ssl_response(response) + when :whostmgr + success, message, params = format_whostmgr_response(response) when :error message = response['error'] when :unknown message = "Unknown error occurred #{response.inspect}" end @@ -118,8 +120,15 @@ res = response['results'].dup res.delete('status') res.delete('message') end return success, message, res + end + + def format_whostmgr_response(response) + message = "You have successfully deleted the SSL host" + if res = response.match(/(?<message>#{message})/) + return true, res[:message], [] + end end end end