fde-slack-notification 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.test.env +2 -1
- data/Gemfile +0 -1
- data/README.md +4 -1
- data/lib/slack/message.rb +10 -4
- data/lib/slack/notification/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1209a9fe99d93f81a30984f36b60947a7fe002d3
|
4
|
+
data.tar.gz: e6c380a20c76985e87059449bf6f4934e05e7b55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2feb236a12c175d07b36a5e552ae33c01048196f348b1d234b9158dd184fbfd5e1f5080d8c70a17240b7dee2b6addf53649e123e725b8b872b792703162129a
|
7
|
+
data.tar.gz: 6d7407d5799af7506a0766d8dc57588b55888b453be8f48ec1a1c0648b71a7ba0a3c094355ab905ee55749562517d4471a57748435c42fa2fb9e4e4748ddbb22
|
data/.test.env
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
# This url is not valid anymore, but used for the tests. :)
|
2
|
+
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/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
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,2 +1,5 @@
|
|
1
|
-
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/fde-slack-notification.svg)](https://badge.fury.io/rb/fde-slack-notification)
|
2
|
+
[![Build Status](https://travis-ci.org/fashion-data-exchange/slack-notification.svg?branch=master)](https://travis-ci.org/fashion-data-exchange/slack-notification)
|
3
|
+
[![Code Climate](https://codeclimate.com/github/fashion-data-exchange/slack-notification/badges/gpa.svg)](https://codeclimate.com/github/fashion-data-exchange/slack-notification)
|
2
4
|
|
5
|
+
# Slack::Notification
|
data/lib/slack/message.rb
CHANGED
@@ -13,12 +13,18 @@ module FDE
|
|
13
13
|
:footer,
|
14
14
|
:color
|
15
15
|
|
16
|
-
def initialize(title, fields,
|
17
|
-
@username = username || 'FDE Slack Notifier'
|
16
|
+
def initialize(title, fields, options = {})
|
18
17
|
@title = title
|
19
|
-
@author = author
|
20
18
|
@fields = fields
|
21
|
-
|
19
|
+
if options[:username]
|
20
|
+
@username = options[:username] || 'FDE Slack Notifier'
|
21
|
+
end
|
22
|
+
if options[:author]
|
23
|
+
@author = options[:author]
|
24
|
+
end
|
25
|
+
if options[:footer]
|
26
|
+
@footer = options[:footer]
|
27
|
+
end
|
22
28
|
end
|
23
29
|
|
24
30
|
def info(channel)
|