Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -359,7 +359,7 @@ DEPENDENCIES
sidekiq
simplecov
sinatra
slack-post
slack-post (= 0.2.0)
slim
stamp
state_machine
Expand Down
6 changes: 3 additions & 3 deletions lib/slack_notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down