opbeat 3.0.2 → 3.0.3

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: e356fb2b372d206b983bbddfcb9050ab7d093b7c
4
- data.tar.gz: eb8b9d89680939500f3445d98fa054b437550e1a
3
+ metadata.gz: bd866037f5cf5ec4da1eff94c29ea67160e00a85
4
+ data.tar.gz: 708b72d84b7b7697d0c8a8d77eeb50f19dae413a
5
5
  SHA512:
6
- metadata.gz: e47cce396d2f37eabcae17c6175299d2022cef8a02bc2700cafb4caaa6e442a607605ad111e930d25efeebdbbcd64d30edbaccc86983ab41e34aaa5fb9380547
7
- data.tar.gz: c4b60b2125f1b62ee2346842be3142910f02892ba1d30d64e5e4d0525fa16ae834e2d4ac0838cf07000dea8682517cf22b72fdf2ca7b57769b660b4be3ab5572
6
+ metadata.gz: 1e7a83cf2c9326970bc635ee1ea941c8f6368448218716fa8a8a67bbbb1eaf252ac5cc0eb16fa8a650c40813dd9a2d6e4bad816010b74f50a8df201d78a3daea
7
+ data.tar.gz: e1c271dd9fa6942685b9fa28ab3ad4efcde20987e4942c8383d6907a8d05f9e9a55f370e81bd992c7ecd6cab6f84c63ff5c8e53d6c11dd33ac2b5f3ca330b4cf
data/HISTORY.md CHANGED
@@ -1,9 +1,19 @@
1
+ # 3.0.3
2
+
3
+ **Features**
4
+
5
+ - Support optional key-value extra info on error messages ([@jensnockert](https://github.com/jensnockert))
6
+
7
+ **Fixes**
8
+
9
+ - Stacktraces have bin flipped so the most relevant line is on top ([@jensnockert](https://github.com/jensnockert))
10
+
1
11
  # 3.0.2
2
12
 
3
13
  **Fixes**
4
14
 
5
- - Ensure worker is running when reporting errors (@jensnockert)
6
- - Increase timeout when closing worker thread and report failure (@jensnockert)
15
+ - Ensure worker is running when reporting errors ([@jensnockert](https://github.com/jensnockert))
16
+ - Increase timeout when closing worker thread and report failure - ([@jensnockert](https://github.com/jensnockert))
7
17
 
8
18
  # 3.0.1
9
19
 
@@ -55,7 +55,7 @@ module Opbeat
55
55
  end
56
56
 
57
57
  if frames = error_message.stacktrace && error_message.stacktrace.frames
58
- if first_frame = frames[0]
58
+ if first_frame = frames.last
59
59
  error_message.culprit = "#{first_frame.filename}:#{first_frame.lineno}:in `#{first_frame.function}'"
60
60
  end
61
61
  end
@@ -65,6 +65,10 @@ module Opbeat
65
65
  error_message.user = User.from_rack_env config, env
66
66
  end
67
67
 
68
+ if extra = opts[:extra]
69
+ error_message.extra = extra
70
+ end
71
+
68
72
  error_message
69
73
  end
70
74
  end
@@ -11,7 +11,7 @@ module Opbeat
11
11
  def self.from config, exception
12
12
  return unless exception.backtrace
13
13
 
14
- new(config, exception.backtrace.map do |line|
14
+ new(config, exception.backtrace.reverse.map do |line|
15
15
  Frame.from_line config, line
16
16
  end)
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module Opbeat
2
- VERSION = "3.0.2"
2
+ VERSION = "3.0.3"
3
3
  end
@@ -18,7 +18,7 @@ module Opbeat
18
18
  expect(stacktrace.frames).to_not be_empty
19
19
 
20
20
  # so meta
21
- last_frame = stacktrace.frames.first
21
+ last_frame = stacktrace.frames.last
22
22
  expect(last_frame.filename).to eq "opbeat/error_message/stacktrace_spec.rb"
23
23
  expect(last_frame.lineno).to be 7
24
24
  expect(last_frame.abs_path).to_not be_nil
@@ -71,6 +71,12 @@ module Opbeat
71
71
  expect(error.user).to be_a(ErrorMessage::User)
72
72
  expect(error.user.id).to be 1
73
73
  end
74
+
75
+ it "adds extra data to message" do
76
+ error = ErrorMessage.from_exception config, real_exception, extra: { "test" => 1 }
77
+
78
+ expect(error.extra).to eq("test" => 1)
79
+ end
74
80
  end
75
81
  end
76
82
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opbeat
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikkel Malmberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-17 00:00:00.000000000 Z
11
+ date: 2016-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport