redmine_airbrake_backend 0.3.1 → 0.3.2

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: fede908ea4433fdce923fbdd62b4bd27cd17e3bb
4
- data.tar.gz: 2e86039dabbd831acd7e98ef00c1fe4a2257c784
3
+ metadata.gz: 8185afe3bc7ac030e618be306c9be7880c0ffa21
4
+ data.tar.gz: 07c55aff9ccea9736ee713a4a163c705f2abd2ba
5
5
  SHA512:
6
- metadata.gz: 0bf50e59f151679b90705f180d054b3ae9eb1d889f4126c42ee1363422da36f6359e5485a4c06a610c1d805bb3bac9c3f57968245fa4072229da7dec6a837760
7
- data.tar.gz: afbdb05de2139170591a40c8a9b4cfa461be1f80c8482456768ba6cbf99d61988d07c61cffea130a2701fd50a3d2dcbb8f4484ab851484fc5c3c845d3b2cb997
6
+ metadata.gz: 3c137cba430f392e3f5253538027e7bf83702b1e6692f97f60f6d4c1f6a8c436ccd7fd94f1e5ff204cc8ce287bc5175f99a9fbda5f358d26efda2d7594ecfa14
7
+ data.tar.gz: ee61e400218e713a558989a22127c43fb06f7730d4164be7612c793bdbab4106aa359ab5f3f5e655e802dd7b79e1ba1b40fdba305f4f831cbb12aae3be27ab4b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redmine_airbrake_backend (0.3.1)
4
+ redmine_airbrake_backend (0.3.2)
5
5
  hpricot
6
6
  htmlentities
7
7
  rails
@@ -34,19 +34,19 @@ GEM
34
34
  thread_safe (~> 0.1)
35
35
  tzinfo (~> 0.3.37)
36
36
  arel (4.0.0)
37
- atomic (1.1.12)
37
+ atomic (1.1.13)
38
38
  builder (3.1.4)
39
39
  erubis (2.7.0)
40
40
  hike (1.2.3)
41
41
  hpricot (0.8.6)
42
42
  htmlentities (4.3.1)
43
- i18n (0.6.4)
43
+ i18n (0.6.5)
44
44
  mail (2.5.4)
45
45
  mime-types (~> 1.16)
46
46
  treetop (~> 1.4.8)
47
- mime-types (1.23)
47
+ mime-types (1.25)
48
48
  minitest (4.7.5)
49
- multi_json (1.7.8)
49
+ multi_json (1.7.9)
50
50
  polyglot (0.3.3)
51
51
  rack (1.5.2)
52
52
  rack-test (0.6.2)
@@ -78,7 +78,7 @@ GEM
78
78
  thread_safe (0.1.2)
79
79
  atomic
80
80
  tilt (1.4.1)
81
- treetop (1.4.14)
81
+ treetop (1.4.15)
82
82
  polyglot
83
83
  polyglot (>= 0.3.1)
84
84
  tzinfo (0.3.37)
data/README.md CHANGED
@@ -50,6 +50,7 @@ Based on https://github.com/milgner/redmine_airbrake_server
50
50
 
51
51
  ## Code Status
52
52
 
53
+ * [![Gem Version](https://badge.fury.io/rb/redmine_airbrake_backend.png)](http://badge.fury.io/rb/redmine_airbrake_backend)
53
54
  * [![Dependencies](https://gemnasium.com/ydkn/redmine_airbrake_backend.png?travis)](https://gemnasium.com/ydkn/redmine_airbrake_backend)
54
55
  * [![Code Climate](https://codeclimate.com/github/ydkn/redmine_airbrake_backend.png)](https://codeclimate.com/github/ydkn/redmine_airbrake_backend)
55
56
 
@@ -39,7 +39,9 @@ module RedmineAirbrakeBackend
39
39
  error[:backtrace] = format_backtrace(error[:backtrace])
40
40
 
41
41
  request = convert_element(notice.at('request'))
42
- request[:session][:log] = format_session_log(request[:session][:log]) if request[:session].present?
42
+ if request[:session].present?
43
+ request[:session][:log] = request[:session][:log].present? ? format_session_log(request[:session][:log]) : nil
44
+ end
43
45
 
44
46
  env = convert_element(notice.at('server-environment'))
45
47
 
@@ -85,13 +87,15 @@ module RedmineAirbrakeBackend
85
87
  end
86
88
 
87
89
  def self.ensure_hash_array(data)
90
+ return nil if data.blank?
91
+
88
92
  d = (data.is_a?(Array) ? data : [data]).compact
89
93
  d.reject!{|e| !e.is_a?(Hash)}
90
94
  d.blank? ? nil : d
91
95
  end
92
96
 
93
97
  def self.format_backtrace(backtrace)
94
- ensure_hash_array(backtrace)
98
+ ensure_hash_array(backtrace).first[:line] rescue nil
95
99
  end
96
100
 
97
101
  def self.format_session_log(log)
@@ -1,3 +1,3 @@
1
1
  module RedmineAirbrakeBackend
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_airbrake_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Schwab
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-07 00:00:00.000000000 Z
11
+ date: 2013-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails