Method: Puppet::ModuleTool::Applications::Application#discuss
- Defined in:
- lib/vendor/puppet/module_tool/applications/application.rb
#discuss(response, success, failure) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/vendor/puppet/module_tool/applications/application.rb', line 27 def discuss(response, success, failure) case response when Net::HTTPOK, Net::HTTPCreated Puppet.notice success else errors = PSON.parse(response.body)['error'] rescue "HTTP #{response.code}, #{response.body}" Puppet.warning "#{failure} (#{errors})" end end |