yeller_ruby 0.5.0 → 0.6.0

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: 987873d3cdad8bcf664a9c4970742526239d5303
4
- data.tar.gz: b699500e4c0f6e7adbb3a651ad6298f292c1a33d
3
+ metadata.gz: 036bd0f49c25b2ce2ec5c0ba0d7575b0909ed702
4
+ data.tar.gz: 7d13a62dd31ae978e9d6717c592e6f2edd27af01
5
5
  SHA512:
6
- metadata.gz: e1fd2d3ab49ae81801d2ce90c94f736e57916928c2ff6cf20331fb6e8cc011c31d47fa26199e25d9dbce5c4a7ed9601a5323cdd5603a05542f0a7d97797b8848
7
- data.tar.gz: 0e51458e66b81d0a630913b9df726bf22dd76ec2df49a5c741f84e079a5f4db47897a3bff5e7ebbc09b2da0ad430b53b60ab3111279921956b7695e68aa433d4
6
+ metadata.gz: f1d15bdb3cbb743308db0f03fe894dd3a46ca9b318e948b0d14f5d8c56ae769b179ab7695000c891faa810995352667cef4b9d17c3a4bb6108fe81662498a1d5
7
+ data.tar.gz: 188d95154fe286931484da8982b0ce29d3c99b8328fbec6cebffbe9ed337fe519a391c18cc857ea1545deea4ba140322463310d0c62ce82f87df02fe831c9aa6
@@ -1,5 +1,4 @@
1
1
  require 'net/http'
2
- require 'yajl/json_gem'
3
2
 
4
3
  require File.expand_path('../yeller/backtrace_filter', __FILE__)
5
4
  require File.expand_path('../yeller/client', __FILE__)
@@ -1,3 +1,4 @@
1
+ require 'set'
1
2
  module Yeller
2
3
  class ExceptionFormatter
3
4
  BACKTRACE_FORMAT = %r{^((?:[a-zA-Z]:)?[^:]+):(\d+)(?::in `([^']+)')?$}.freeze
@@ -16,16 +17,22 @@ module Yeller
16
17
  end
17
18
 
18
19
  def self.process_causes(exception)
19
- unwrap_causes(exception, [])
20
+ unwrap_causes(exception)
20
21
  end
21
22
 
22
- def self.unwrap_causes(exception, causes)
23
- causes << exception
24
- if exception.respond_to?(:cause) && exception.cause
25
- unwrap_causes(exception.cause, causes)
26
- else
27
- causes.reverse
23
+ def self.unwrap_causes(exception)
24
+ causes = [exception]
25
+ previously_seen = Set.new([exception.object_id])
26
+ while exception.respond_to?(:cause) && exception.cause
27
+ cause = exception.cause
28
+ if previously_seen.include?(cause.object_id)
29
+ break
30
+ end
31
+ causes << cause
32
+ previously_seen << cause.object_id
33
+ exception = cause
28
34
  end
35
+ causes.reverse!
29
36
  end
30
37
 
31
38
  attr_reader :type, :options, :backtrace_filter
@@ -1,3 +1,3 @@
1
1
  module Yeller
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeller_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Crayford
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2016-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: yajl-ruby
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 1.2.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 1.2.0
55
41
  description: A Ruby/Rack/Rails client for yellerapp.com
56
42
  email:
57
43
  - tcrayford@googlemail.com