lib/slackify.rb in capistrano-slackify-2.10.2 vs lib/slackify.rb in capistrano-slackify-2.10.3
- old
+ new
@@ -1,6 +1,7 @@
require 'multi_json'
+require 'shellwords'
module Slackify
class Payload
def initialize(context, status)
@@ -11,10 +12,10 @@
def self.build(context, status, channel)
new(context, status).build(channel)
end
def build(channel)
- "'payload=#{payload(channel)}'"
+ Shellwords.escape("payload=#{payload(channel)}")
end
def payload(channel)
fields = fetch(:slack_fields).each_with_object([]) { |field, fields|
if fields_map[field].fetch(:value).respond_to?(:call)