lib/pushpop/web.rb in pushpop-0.3.3 vs lib/pushpop/web.rb in pushpop-0.4.0

- old
+ new

@@ -24,19 +24,24 @@ response = self.instance_eval(&job.webhook_proc) if response job.run(response, {'webhook' => response}) - { + status_resp = { status: 'success', job: job.name }.to_json else - { + status_resp = { status: 'failed', job: job.name, message: 'webhook step did not pass' }.to_json + end + + # The user can set the body manually.. If they did that, defer to their response + if self.response.body.empty? + status_resp end end Sinatra::Application.get url, &runner Sinatra::Application.post url, &runner