honeybadger 2.0.5 → 2.0.6

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: 068b9e2194b424660cdbb40d19fa3c22c60d9968
4
- data.tar.gz: 68181b2849fb96625616363debd565a8bb2f245f
3
+ metadata.gz: 45184c861193f93cac6f5079c6d0501f44fb1e29
4
+ data.tar.gz: 5dc11986399b1c0e712b3102358a76b4b65616a4
5
5
  SHA512:
6
- metadata.gz: 020b001e540dd1ed39ce283d073b6756dc1159759bdf0d49427995d07e2b6c3ce5033ef01e40ab3e2055066f21827b152c6d94a74738c17aa8b9eff8a970d4e3
7
- data.tar.gz: ebd0b1d4b62e87696dda8a1b18d8d6f0c72f1702155bce273bad363d8d93ca25d33ce061d3f6e2dd22104f93c60a3a0eeeb708957a161fea7daafaf4f35a9b96
6
+ metadata.gz: 7b0b237ca43d56e272df5dce38446dbd73d15c3979e7aa749d839b89dfb18ae827d405931b7c2542f428e89fcac373ddd340d6b07167765cb8cd7d7f6fc9183e
7
+ data.tar.gz: 934975d16d06daf5215c5b34ba97127cafad4df667d2c8d508b445fac36c1b2e44ab4bb3e6a9a0ff3acf2e739068a7b373b21c4a0172e896fbdbd08d8e85250d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ * Don't sub partial project root in backtrace lines.
2
+
3
+ *Joshua Wood*
4
+
1
5
  * Merge exceptions.ignore config values with default ignored exception class
2
6
  names and add exceptions.ignore_only option to override.
3
7
 
@@ -275,6 +275,19 @@ api_key: '#{self[:api_key]}'
275
275
  end
276
276
  end
277
277
 
278
+ # Internal: Match the project root.
279
+ #
280
+ # Returns Regexp matching the project root in a file string.
281
+ def root_regexp
282
+ return @root_regexp if @root_regexp
283
+ return nil if @no_root
284
+
285
+ root = get(:root).to_s
286
+ @no_root = true and return nil unless root =~ NOT_BLANK
287
+
288
+ @root_regexp = Regexp.new("^#{ Regexp.escape(root) }")
289
+ end
290
+
278
291
  private
279
292
 
280
293
  def ping_payload
@@ -305,11 +318,11 @@ api_key: '#{self[:api_key]}'
305
318
  end
306
319
 
307
320
  def locate_absolute_path(path, root)
308
- path = Pathname.new(path)
321
+ path = Pathname.new(path.to_s)
309
322
  if path.absolute?
310
323
  path
311
324
  else
312
- Pathname.new(root).join(path)
325
+ Pathname.new(root.to_s).join(path.to_s)
313
326
  end
314
327
  end
315
328
 
@@ -120,8 +120,8 @@ module Honeybadger
120
120
  return line unless config
121
121
  c = (PROJECT_ROOT_CACHE[config[:root]] ||= {})
122
122
  return c[line] if c.has_key?(line)
123
- c[line] ||= if (root = config[:root].to_s) != STRING_EMPTY
124
- line.sub(root, PROJECT_ROOT)
123
+ c[line] ||= if config.root_regexp
124
+ line.sub(config.root_regexp, PROJECT_ROOT)
125
125
  else
126
126
  line
127
127
  end
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # Public: The current String Honeybadger version.
3
- VERSION = '2.0.5'.freeze
3
+ VERSION = '2.0.6'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Honeybadger Industries LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-12 00:00:00.000000000 Z
11
+ date: 2015-02-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Make managing application errors a more pleasant experience.
14
14
  email: