hatchet-hipchat 0.3.0 → 0.3.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: ff61118ae9db2c3297724c40d6d479fdde61f218
4
- data.tar.gz: bd3f77f141cb48f46511eedbd3335e951a63c1fc
3
+ metadata.gz: 8c6530dc42e5b50fd329f8872362c121324f0963
4
+ data.tar.gz: 3d8abfe38034273d6856cce3d2ae09570bba5cca
5
5
  SHA512:
6
- metadata.gz: a267a85608c987748fb716a5489df8a8379ee0aec7cf81dea8d9673038841a58270ddf3273028be150610c180f5a8dd6637d2b650bc0e678c61b75ff40a6a86d
7
- data.tar.gz: b63f6cecb89352873b72d94eb8fa741ddcb0463ffa629d18a29e0ac6f58cf1356535839055f921507037d88b3ab966bc92f49339980142328e77c10bd7dd20d5
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
@@ -1,5 +1,5 @@
1
1
  module Hatchet
2
2
  module Hipchat
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  end
5
5
  end
@@ -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 debug to (omg)' do
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 debug to (boom)' do
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.0
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-05 00:00:00.000000000 Z
11
+ date: 2014-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hatchet