summaryrefslogtreecommitdiff
path: root/lib/oxidized/hook
diff options
context:
space:
mode:
authorWild Kat <wk@futureinquestion.net>2018-04-27 12:39:07 +0200
committerWild Kat <wk@futureinquestion.net>2018-04-27 12:39:07 +0200
commit83a00943d7333fafdfe352173713a22a5ac89f6f (patch)
treec12b52f0acd5192c457fa07189c4946674cd11fb /lib/oxidized/hook
parent8f1ac4ad5503ac4a59d41ebc3f142c1d5d097bfb (diff)
bring ciscosparkdiff.rb back into compliance with rubocop
Diffstat (limited to 'lib/oxidized/hook')
-rw-r--r--lib/oxidized/hook/ciscosparkdiff.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/oxidized/hook/ciscosparkdiff.rb b/lib/oxidized/hook/ciscosparkdiff.rb
index d43ff81..e45d7c6 100644
--- a/lib/oxidized/hook/ciscosparkdiff.rb
+++ b/lib/oxidized/hook/ciscosparkdiff.rb
@@ -15,8 +15,8 @@ class CiscoSparkDiff < Oxidized::Hook
return unless ctx.event.to_s == "post_store"
log "Connecting to Cisco Spark"
CiscoSpark.configure do |config|
- config.api_key = cfg.accesskey
- config.proxy = cfg.proxy if cfg.has_key?('proxy')
+ config.api_key = cfg.accesskey
+ config.proxy = cfg.proxy if cfg.has_key?('proxy')
end
space = cfg.space
client = CiscoSpark::Room.new(id: space)
@@ -39,10 +39,10 @@ class CiscoSparkDiff < Oxidized::Hook
end
if cfg.has_key?('message') == true
log cfg.message
- msg = format(cfg.message, :node => ctx.node.name.to_s, :group => ctx.node.group.to_s, :commitref => ctx.commitref, :model => ctx.node.model.class.name.to_s.downcase)
+ msg = cfg.message % { :node => ctx.node.name.to_s, :group => ctx.node.group.to_s, :commitref => ctx.commitref, :model => ctx.node.model.class.name.to_s.downcase }
log msg
log "Posting message to #{cfg.space}"
- client.chat_postMessage(channel: cfg.channel, text: msg, as_user: true)
+ client.chat_postMessage(channel: cfg.channel, text: msg, as_user: true)
end
log "Finished"
end