exception_notification-slacky 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48880a6050b285b00eb2e4a69cc8df0a04192d41
4
- data.tar.gz: 475b71e1b5c75d15438fd2cc83fdd5f7bac4b622
3
+ metadata.gz: 1c64243d1375857814fd33a6d043a62d7090f087
4
+ data.tar.gz: d07ff1574b2cee9526fa9e288d4f83ac38bb5f1f
5
5
  SHA512:
6
- metadata.gz: 6ad81a5e23fadb1efdf640d10da9a0e8db8bda64a24b5968c50bced7ca9712a63ef5491114e5ae683a42b75d0de3f9d61779fb47d7a3765628846a4fbfd94b75
7
- data.tar.gz: 038f42a6dd3b24b9cf8fcf4984c91478d4bdf888f2e47818c54511e7242d99985e6c58aa9519021fc4139f7ef1af05d278a25b7fae8d82483b5f7c877c14b093
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
  }
@@ -1,5 +1,5 @@
1
1
  module ExceptionNotification
2
2
  module Slacky
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -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: "danger",
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.0
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-04-09 00:00:00.000000000 Z
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: