slackistrano 3.8.3 → 3.8.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4182bb65adae4e85721e87b7e8efd88dd44224ddab390954eaed03176d1d6e4c
4
- data.tar.gz: 83ca4551f0befdd201a20692842a294c4c663f42b008e73fa8a2a9060ba3b4d0
3
+ metadata.gz: 9ae282d3041a490b906223784c2cd9689450f30cae5c045e4891112e6295d39d
4
+ data.tar.gz: a8a4a0b022efe867ccc259e36bce4916f101d20800cb2cb14c8f21f58b58a171
5
5
  SHA512:
6
- metadata.gz: faa855d33d46be35c352cbfebce4821db657700574d462571ac1ad083e067629e28508de62cd33c5fc9c0567663edae2ec1d4663c282ab958f5267c08d791220
7
- data.tar.gz: b1f5ba9ac2df0d4a9599113207282a6a54151f35a3f018d794c1a481ae258dc19ccf27335aa595634752d89553db56953505f6c8a657f74f9e53f45a79cffa46
6
+ metadata.gz: 020d3c36889ef7696a5f5d1e2879bfb72c3084915da4724f6faa396498285581b6659468277317f392ca6ee812440636d8d6c0f5ce50abeffe85b221c6ab959c
7
+ data.tar.gz: 540bf2539b7ecac52f90260f2454e25cfcb7bcbc7d26409eb43765154e3ac6a22a02325513e1ff0a805dc82c8c9de4e8c2506ab290d0047785db710edb558bf9
@@ -2,7 +2,6 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.3.0
6
- - 2.2.4
7
- - 2.1.7
8
- - 2.0.0
5
+ - 2.6
6
+ - 2.5
7
+ - 2.3
@@ -1,5 +1,15 @@
1
1
  # Slackistrano Change Log
2
2
 
3
+ 3.8.4
4
+ -----
5
+
6
+ - Fix improper boolean check when using not using slackbot and channels are empty [#90]
7
+
8
+ 3.8.3
9
+ -----
10
+
11
+ - Never released
12
+
3
13
  3.8.2
4
14
  -----
5
15
 
@@ -53,7 +53,7 @@ module Slackistrano
53
53
  }.merge(payload)
54
54
 
55
55
  channels = Array(@messaging.channels_for(action))
56
- if !@messaging.via_slackbot? == false && channels.empty?
56
+ if !@messaging.via_slackbot? && channels.empty?
57
57
  channels = [nil] # default webhook channel
58
58
  end
59
59
 
@@ -1,3 +1,3 @@
1
1
  module Slackistrano
2
- VERSION = '3.8.3'
2
+ VERSION = '3.8.4'
3
3
  end
@@ -1,8 +1,14 @@
1
1
  require 'spec_helper'
2
2
 
3
+ class DryRunMessaging < Slackistrano::Messaging::Default
4
+ def channels_for(action)
5
+ "testing"
6
+ end
7
+ end
8
+
3
9
  describe Slackistrano do
4
10
  before(:all) do
5
- set :slackistrano, { klass: Slackistrano::Messaging::Default }
11
+ set :slackistrano, { klass: DryRunMessaging }
6
12
  end
7
13
 
8
14
  %w[updating reverting updated reverted failed].each do |stage|
@@ -7,6 +7,7 @@ describe Slackistrano::Messaging::Deprecated do
7
7
 
8
8
  %w[updating reverting updated reverted failed].each do |stage|
9
9
  it "posts to slack on slack:deploy:#{stage}" do
10
+ set :slack_webhook, -> { "..." }
10
11
  set :slack_run, ->{ true }
11
12
  set "slack_run_#{stage}".to_sym, ->{ true }
12
13
  expect_any_instance_of(Slackistrano::Capistrano).to receive(:post)
@@ -14,6 +15,7 @@ describe Slackistrano::Messaging::Deprecated do
14
15
  end
15
16
 
16
17
  it "does not post to slack on slack:deploy:#{stage} when disabled" do
18
+ set :slack_webhook, -> { "..." }
17
19
  set :slack_run, ->{ true }
18
20
  set "slack_run_#{stage}".to_sym, ->{ false }
19
21
  expect_any_instance_of(Slackistrano::Capistrano).not_to receive(:post)
@@ -21,6 +23,7 @@ describe Slackistrano::Messaging::Deprecated do
21
23
  end
22
24
 
23
25
  it "does not post to slack on slack:deploy:#{stage} when disabled globally" do
26
+ set :slack_webhook, -> { "..." }
24
27
  set :slack_run, ->{ false }
25
28
  set "slack_run_#{stage}".to_sym, ->{ true }
26
29
  expect_any_instance_of(Slackistrano::Capistrano).not_to receive(:post)
@@ -4,6 +4,10 @@ class NilPayloadMessaging < Slackistrano::Messaging::Default
4
4
  def payload_for_updating
5
5
  nil
6
6
  end
7
+
8
+ def channels_for(action)
9
+ "testing"
10
+ end
7
11
  end
8
12
 
9
13
  describe Slackistrano do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slackistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.3
4
+ version: 3.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Hallstrom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-08 00:00:00.000000000 Z
11
+ date: 2019-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -121,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubyforge_project:
125
- rubygems_version: 2.7.6
124
+ rubygems_version: 3.0.3
126
125
  signing_key:
127
126
  specification_version: 4
128
127
  summary: Send notifications to Slack about Capistrano deployments.