slackistrano 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: 0a1407bbf8b606b2623a052d52055df8cc7b36bb
4
- data.tar.gz: 81a5347837440d5955545f6fc3f74bc6b1e69ffe
3
+ metadata.gz: 0a8731a8a9a82bfb30e37575ceda1c33236a3104
4
+ data.tar.gz: 255d1dba2c55f8fabe6e3d8d318b46e22c1270d4
5
5
  SHA512:
6
- metadata.gz: f06468179a1d516d756972e6eae955ffa1d340284b415e2bd588950cd42eb7db164b2a9edb9e81a2d69fbb5029490947991bd58dc17e41009866e410aa25a8f9
7
- data.tar.gz: c193cbf26a18f3d8b1a73591cb95dd85b4bb31340d3db76790955e5ccdb7a603b9ebf7aee6e5b1eb5d9566aade7a2c567fc7ce7bfe0d0c348b593ec5bf1e3ba5
6
+ metadata.gz: 0c933eb679cb0886d404bddc7019224dedd22f5a8a8732ec7dac067c4f195f8799959d26811cfb5ef984f0e2a737cb063092278fdacc18c5e5838727d528933d
7
+ data.tar.gz: 5f31c28b4a946d680ead0d722ca92f4fbebc6daa2d94199356228c563add106f0a1bbffad5953bfb092cfed9be4f1a477f10a21002cad110e4c1154ffc95bd4c
@@ -1,3 +1,3 @@
1
1
  module Slackistrano
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
data/lib/slackistrano.rb CHANGED
@@ -26,8 +26,10 @@ module Slackistrano
26
26
  def self.post_as_slackbot(team: nil, token: nil, webhook: nil, payload: {})
27
27
  uri = URI(URI.encode("https://#{team}.slack.com/services/hooks/slackbot?token=#{token}&channel=#{payload[:channel]}"))
28
28
 
29
+ text = payload[:attachments].collect { |a| a[:text] }.join("\n")
30
+
29
31
  Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
30
- http.request_post uri.request_uri, payload[:text]
32
+ http.request_post uri.request_uri, text
31
33
  end
32
34
  end
33
35
 
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: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Hallstrom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-12 00:00:00.000000000 Z
11
+ date: 2015-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano