lib/pushpop-slack.rb in pushpop-slack-0.2.2 vs lib/pushpop-slack.rb in pushpop-slack-0.2.3
- old
+ new
@@ -19,18 +19,30 @@
attr_accessor :_attachments
attr_accessor :_unfurl
def run(last_response=nil, step_responses=nil)
+
ret = configure(last_response, step_responses)
if _message
send_message
else
Pushpop.logger.debug("No slack message sent - message was not set")
end
+ clear_settings
+
ret
+ end
+
+ def clear_settings
+ self._username = nil
+ self._message = nil
+ self._icon = nil
+ self._icon_type = nil
+ self._attachments = nil
+ self._unfurl = nil
end
def send_message
unless WEBHOOK_URL.nil? || WEBHOOK_URL.empty?
notifier = ::Slack::Notifier.new WEBHOOK_URL