exception_notification-slacky 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/exception_notification/slacky/version.rb +1 -1
- data/lib/exception_notifier/slacky_notifier.rb +2 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c64243d1375857814fd33a6d043a62d7090f087
|
4
|
+
data.tar.gz: d07ff1574b2cee9526fa9e288d4f83ac38bb5f1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74ae0a0721bb92154a84dc368f001f2015533bc547e998c3f416122f9c19cedd0c18af9b1e64246e86770a38d2f56b7f410095e3f87f6cf5ea483722c959661d
|
7
|
+
data.tar.gz: 25d112e40b4e5eb67f2dbf553bb56b689181a9cdf252d158bf439a1239b36312c1d6621c87a6b7a6d3ce28b01ef00686d6170649a08dbdb50a12b475dea8df6c
|
data/README.md
CHANGED
@@ -35,6 +35,7 @@ add below lines to config/initializers/exception_notification.rb.
|
|
35
35
|
webhook_url: 'your slack incoming webhook url',
|
36
36
|
channel: 'channel you want to being notified to',
|
37
37
|
username: 'slacky',
|
38
|
+
color: :danger, # optional, default to :danger
|
38
39
|
addtional_parameters: {
|
39
40
|
icon_emoji: ':warning:'
|
40
41
|
}
|
@@ -5,6 +5,7 @@ module ExceptionNotifier
|
|
5
5
|
def initialize(options)
|
6
6
|
begin
|
7
7
|
webhook_url = options.fetch(:webhook_url)
|
8
|
+
@color = options.fetch(:color, :danger)
|
8
9
|
@message_opts = options.fetch(:additional_parameters, {})
|
9
10
|
@notifier = Slack::Notifier.new(webhook_url, options)
|
10
11
|
rescue
|
@@ -37,7 +38,7 @@ module ExceptionNotifier
|
|
37
38
|
def build_attachemnt(exception, options = {})
|
38
39
|
{
|
39
40
|
fallback: "#{exception.class} #{exception.message}",
|
40
|
-
color:
|
41
|
+
color: @color.to_s,
|
41
42
|
title: "[ERROR] #{exception.class}",
|
42
43
|
fields: [
|
43
44
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exception_notification-slacky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "森井ゴンザレス"
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: exception_notification
|
@@ -154,4 +154,3 @@ signing_key:
|
|
154
154
|
specification_version: 4
|
155
155
|
summary: Send Exception notification to slack
|
156
156
|
test_files: []
|
157
|
-
has_rdoc:
|