lib/slackify.rb in capistrano-slackify-2.1.0 vs lib/slackify.rb in capistrano-slackify-2.2.0
- old
+ new
@@ -1,6 +1,6 @@
-require 'yajl/json_gem'
+require 'multi_json'
module Slackify
class Payload
attr_reader :text
@@ -17,16 +17,16 @@
def build
"'payload=#{payload}'"
end
def payload
- {
+ MultiJson.dump({
channel: fetch(:slack_channel),
username: fetch(:slack_username),
text: text,
icon_emoji: fetch(:slack_emoji),
parse: fetch(:slack_parse)
- }.to_json
+ })
end
def fetch(*args, &block)
@context.fetch(*args, &block)
end