uniform_notifier 1.8.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +44 -0
- data/lib/uniform_notifier.rb +8 -4
- data/lib/uniform_notifier/airbrake.rb +1 -1
- data/lib/uniform_notifier/base.rb +1 -1
- data/lib/uniform_notifier/bugsnag.rb +2 -1
- data/lib/uniform_notifier/customized_logger.rb +1 -1
- data/lib/uniform_notifier/errors.rb +1 -1
- data/lib/uniform_notifier/growl.rb +2 -2
- data/lib/uniform_notifier/javascript_alert.rb +2 -2
- data/lib/uniform_notifier/javascript_console.rb +1 -1
- data/lib/uniform_notifier/rails_logger.rb +1 -1
- data/lib/uniform_notifier/raise.rb +1 -1
- data/lib/uniform_notifier/rollbar.rb +1 -1
- data/lib/uniform_notifier/slack.rb +1 -1
- data/lib/uniform_notifier/version.rb +2 -2
- data/lib/uniform_notifier/xmpp.rb +1 -1
- data/spec/uniform_notifier/bugsnag_spec.rb +9 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8da3ce2873d3a8815e73e2949d20a318af6bf0d
|
4
|
+
data.tar.gz: 31bda16f462a5532493f63e74bb1b6a0a25a8778
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62004481c5550047776f977309ba8cd192ca4e6c4335a3fe5a4682f9799040bce5fd3bf7b9ea32a4c1b845d2c039ee42f308360729c4052a1830f3d5c651f25c
|
7
|
+
data.tar.gz: a46b36763d83f32babe56f6e35b6547e4fdc5ab0d66517a7474c47f2e52972393a1c54e0559f990063ab4bc33c1e72ebf25bbcdd0fb1cc27c7382300b4198642
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# Next Release
|
2
|
+
|
3
|
+
## 1.9.0 (04/19/2015)
|
4
|
+
|
5
|
+
* Add `UniformNotifier::AVAILABLE_NOTIFIERS` constant
|
6
|
+
|
7
|
+
## 1.8.0 (03/17/2015)
|
8
|
+
|
9
|
+
* Add rollbar notifier
|
10
|
+
|
11
|
+
## 1.7.0 (02/08/2015)
|
12
|
+
|
13
|
+
* Add slack notifier
|
14
|
+
|
15
|
+
## 1.6.0 (04/30/2014)
|
16
|
+
|
17
|
+
* Support detail notify data
|
18
|
+
* Add options for airbrake and bugsnag notifiers
|
19
|
+
|
20
|
+
## 1.5.0 (04/26/2014)
|
21
|
+
|
22
|
+
* Add bugsnag notifier
|
23
|
+
* Use custom excaption
|
24
|
+
|
25
|
+
## 1.4.0 (11/03/2013)
|
26
|
+
|
27
|
+
* Raise should implement `out_of_channel_notify` instead of `inline_notify`
|
28
|
+
|
29
|
+
## 1.3.0 (08/28/2012)
|
30
|
+
|
31
|
+
* Add raise notifier
|
32
|
+
|
33
|
+
## 1.2.0 (03/03/2013)
|
34
|
+
|
35
|
+
* Compatible with ruby-growl 4.0 gem
|
36
|
+
|
37
|
+
## 1.1.0 (09/28/2012)
|
38
|
+
|
39
|
+
* Add growl gntp support
|
40
|
+
* Add airbrake notifier
|
41
|
+
|
42
|
+
## 1.0.0 (11/19/2010)
|
43
|
+
|
44
|
+
* First release
|
data/lib/uniform_notifier.rb
CHANGED
@@ -12,13 +12,17 @@ require 'uniform_notifier/bugsnag'
|
|
12
12
|
require 'uniform_notifier/slack'
|
13
13
|
require 'uniform_notifier/raise'
|
14
14
|
|
15
|
-
|
15
|
+
class UniformNotifier
|
16
|
+
AVAILABLE_NOTIFIERS = [:alert, :console, :growl, :xmpp, :rails_logger, :customized_logger,
|
17
|
+
:airbrake, :rollbar, :bugsnag, :slack, :raise]
|
18
|
+
|
19
|
+
NOTIFIERS = [JavascriptAlert, JavascriptConsole, Growl, Xmpp, RailsLogger, CustomizedLogger,
|
20
|
+
AirbrakeNotifier, RollbarNotifier, BugsnagNotifier, Raise, Slack]
|
21
|
+
|
16
22
|
class NotificationError < StandardError; end
|
17
23
|
|
18
24
|
class <<self
|
19
|
-
attr_accessor
|
20
|
-
|
21
|
-
NOTIFIERS = [JavascriptAlert, JavascriptConsole, Growl, Xmpp, RailsLogger, CustomizedLogger, AirbrakeNotifier, BugsnagNotifier, Raise, Slack]
|
25
|
+
attr_accessor *AVAILABLE_NOTIFIERS
|
22
26
|
|
23
27
|
def active_notifiers
|
24
28
|
NOTIFIERS.select { |notifier| notifier.active? }
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
class UniformNotifier
|
2
2
|
class BugsnagNotifier < Base
|
3
3
|
def self.active?
|
4
4
|
!!UniformNotifier.bugsnag
|
@@ -13,6 +13,7 @@ module UniformNotifier
|
|
13
13
|
end
|
14
14
|
|
15
15
|
exception = Exception.new(data[:title])
|
16
|
+
exception.set_backtrace(data[:backtrace]) if data[:backtrace]
|
16
17
|
Bugsnag.notify(exception, opt.merge(
|
17
18
|
:grouping_hash => data[:body] || data[:title],
|
18
19
|
:notification => data
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
class UniformNotifier
|
2
2
|
class Growl < Base
|
3
3
|
@growl = nil
|
4
4
|
|
@@ -50,7 +50,7 @@ module UniformNotifier
|
|
50
50
|
|
51
51
|
notify 'Uniform Notifier Growl has been turned on (using GNTP)' if !growl.instance_of?(Hash) || !growl[:quiet]
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
protected
|
55
55
|
|
56
56
|
def self._out_of_channel_notify( data )
|
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
VERSION = "1.
|
1
|
+
class UniformNotifier
|
2
|
+
VERSION = "1.9.0"
|
3
3
|
end
|
@@ -44,4 +44,13 @@ describe UniformNotifier::BugsnagNotifier do
|
|
44
44
|
UniformNotifier::BugsnagNotifier.out_of_channel_notify(notification_data)
|
45
45
|
end
|
46
46
|
end
|
47
|
+
|
48
|
+
it "should notify bugsnag with correct backtrace" do
|
49
|
+
Bugsnag.should_receive(:notify) do |error|
|
50
|
+
error.should be_a UniformNotifier::Exception
|
51
|
+
error.backtrace.should eq ["bugsnag spec test"]
|
52
|
+
end
|
53
|
+
UniformNotifier.bugsnag = true
|
54
|
+
UniformNotifier::BugsnagNotifier.out_of_channel_notify(backtrace: ["bugsnag spec test"])
|
55
|
+
end
|
47
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uniform_notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-growl
|
@@ -90,6 +90,7 @@ extra_rdoc_files: []
|
|
90
90
|
files:
|
91
91
|
- ".gitignore"
|
92
92
|
- ".travis.yml"
|
93
|
+
- CHANGELOG.md
|
93
94
|
- Gemfile
|
94
95
|
- LICENSE
|
95
96
|
- README.md
|