hatchet-hipchat 0.3.0 → 0.3.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c6530dc42e5b50fd329f8872362c121324f0963
|
4
|
+
data.tar.gz: 3d8abfe38034273d6856cce3d2ae09570bba5cca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54834efebc025b6da461fa3afa3a46428ab1627b80940b4d3df28bfe51f0b7ce38d8ab5376ec4e2cafa8312a6e10d333f6da0c1ec5e0d9d2a1d295d5f5add409
|
7
|
+
data.tar.gz: df6fe15231fce381b471b0066a3381a9af4378e5bf35f985f1bf7d9756b364b9e3df417d5045579e4a212e0d42e25ba247e351140472658a0f87a74f5e1919ae
|
@@ -33,7 +33,7 @@ module Hatchet
|
|
33
33
|
# Public: Creates a new instance.
|
34
34
|
#
|
35
35
|
def initialize(args = {})
|
36
|
-
backtrace_limit = args.fetch(:backtrace_limit, DEFAULT_BACKTRACE_LIMIT)
|
36
|
+
self.backtrace_limit = args.fetch(:backtrace_limit, DEFAULT_BACKTRACE_LIMIT)
|
37
37
|
end
|
38
38
|
|
39
39
|
# Public: Returns the formatted message with HipChat emoticons in place of
|
@@ -17,11 +17,20 @@ describe HipChatEmoticonFormatter do
|
|
17
17
|
assert '(ohcrap) - Context one two - Hello, World' == formatter.format(:warn, context, message)
|
18
18
|
end
|
19
19
|
|
20
|
-
it 'maps
|
20
|
+
it 'maps error to (omg)' do
|
21
21
|
assert '(omg) - Context one two - Hello, World' == formatter.format(:error, context, message)
|
22
22
|
end
|
23
23
|
|
24
|
-
it 'maps
|
24
|
+
it 'maps fatal to (boom)' do
|
25
25
|
assert '(boom) - Context one two - Hello, World' == formatter.format(:fatal, context, message)
|
26
26
|
end
|
27
|
+
|
28
|
+
describe 'backtrace limiting' do
|
29
|
+
let(:error) { OpenStruct.new(message: 'Boom!', backtrace: (1..10).map { |i| "foo.rb:#{i}:a" }) }
|
30
|
+
let(:message) { Message.new(ndc: [], message: ' Hello, World ', error: error) }
|
31
|
+
|
32
|
+
it "includes #{HipChatEmoticonFormatter::DEFAULT_BACKTRACE_LIMIT} lines of backtrace" do
|
33
|
+
assert (1 + HipChatEmoticonFormatter::DEFAULT_BACKTRACE_LIMIT) == formatter.format(:error, context, message).lines.count
|
34
|
+
end
|
35
|
+
end
|
27
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hatchet-hipchat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garry Shutler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hatchet
|