diff --git a/Gemfile b/Gemfile index af62163f7..993057f80 100644 --- a/Gemfile +++ b/Gemfile @@ -68,7 +68,7 @@ gem "font-awesome-rails", '~> 3.2' gem 'turbolinks' gem 'jquery-turbolinks' gem 'nprogress-rails' -gem 'slack-post' +gem 'slack-post', '0.2.0' group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 709afec4c..dc7a18e7a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -255,7 +255,7 @@ GEM rack (~> 1.4) rack-protection (~> 1.4) tilt (~> 1.3, >= 1.3.4) - slack-post (0.0.1) + slack-post (0.2.0) yajl-ruby slim (2.0.2) temple (~> 0.6.6) @@ -359,7 +359,7 @@ DEPENDENCIES sidekiq simplecov sinatra - slack-post + slack-post (= 0.2.0) slim stamp state_machine diff --git a/lib/slack_notifier.rb b/lib/slack_notifier.rb index b0210082f..6d6ce8282 100644 --- a/lib/slack_notifier.rb +++ b/lib/slack_notifier.rb @@ -5,11 +5,11 @@ module Slack class Notifier class << self def build_fail_slack_post(build) - post("#{slack_text(build)} failed") + post(build, "#{slack_text(build)} failed") end def build_success_slack_post(build) - post("#{slack_text(build)} passed") + post(build, "#{slack_text(build)} passed") end def slack_text(build) @@ -27,7 +27,7 @@ def post(build, slack_string) subdomain: project.slack_notification_subdomain, token: project.slack_notification_token, username: project.slack_notification_username) - Slack::Post.post str, slack_notification_channel + Slack::Post.post slack_string, project.slack_notification_channel end end end