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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9888104b6904df059379e19bd43adf41f66987b9
4
- data.tar.gz: b317c996310bb3e1e25ae3724711b74fb6d96375
3
+ metadata.gz: 1209a9fe99d93f81a30984f36b60947a7fe002d3
4
+ data.tar.gz: e6c380a20c76985e87059449bf6f4934e05e7b55
5
5
  SHA512:
6
- metadata.gz: 13f37ee55bdb636b4182262beb6d5f4ad074a817f6790ed3b015d01cdc79090241db2c68c180b16ccd96ac4d0f8f17bc6be6bbaf2a4f2f0967faf46aa1c35e29
7
- data.tar.gz: a66819f25ebea35bef1619aaf3337a4cef25cb24398551152405b296314531b0c92aa46fcdd6a3b9dd1981840b0550932a90579cbcc79e42123cc0e8b5d51b7f
6
+ metadata.gz: a2feb236a12c175d07b36a5e552ae33c01048196f348b1d234b9158dd184fbfd5e1f5080d8c70a17240b7dee2b6addf53649e123e725b8b872b792703162129a
7
+ data.tar.gz: 6d7407d5799af7506a0766d8dc57588b55888b453be8f48ec1a1c0648b71a7ba0a3c094355ab905ee55749562517d4471a57748435c42fa2fb9e4e4748ddbb22
data/.test.env CHANGED
@@ -1 +1,2 @@
1
- SLACK_WEBHOOK_URL=SLACK_WEBHOOK_URL
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
@@ -2,5 +2,4 @@ source "https://rubygems.org"
2
2
 
3
3
  git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
- # Specify your gem's dependencies in slack-notification.gemspec
6
5
  gemspec
data/README.md CHANGED
@@ -1,2 +1,5 @@
1
- # Slack::Notification
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
@@ -13,12 +13,18 @@ module FDE
13
13
  :footer,
14
14
  :color
15
15
 
16
- def initialize(title, fields, author = nil, footer = nil, username = nil)
17
- @username = username || 'FDE Slack Notifier'
16
+ def initialize(title, fields, options = {})
18
17
  @title = title
19
- @author = author
20
18
  @fields = fields
21
- @footer = footer
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)
@@ -1,7 +1,7 @@
1
1
  module FDE
2
2
  module Slack
3
3
  module Notification
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fde-slack-notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Langenegger