redmine_airbrake_backend 0.5.1 → 0.5.2
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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/views/airbrake/issue_description/default.erb +7 -0
- data/lib/redmine_airbrake_backend/error.rb +4 -1
- data/lib/redmine_airbrake_backend/report/ios.rb +15 -6
- data/lib/redmine_airbrake_backend/request.rb +1 -0
- data/lib/redmine_airbrake_backend/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8974f2cd1f4c0d9f29192f69d4393a610c32b10d
|
4
|
+
data.tar.gz: f70c683add7289460a912899397467c56b189d0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f4fd01f0a25c111af8a8f966213fcc9ba5f06de0ee272b5bcc5e56158461f0c88a687ff40d3ab79b050f995cc5788c2a298a0cc3a84f11bc6ef89e419d980da
|
7
|
+
data.tar.gz: 79f7a059da64164cd17bee49e1d902d48a47d875831f77092f297cfb28ff727d12c5643ecb3f70889bb3548ef1a9a6671de1266467bed815c16e2a876065bb39
|
data/Gemfile.lock
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
<% if error.present? %>
|
2
2
|
h1. <%= error.message %>
|
3
3
|
|
4
|
+
<% if error.application.present? %>
|
5
|
+
h2. Application:
|
6
|
+
|
7
|
+
<%=format_list_item('Name', error.application[:name]) %>
|
8
|
+
<%=format_list_item('Version', error.application[:version]) %>
|
9
|
+
<% end %>
|
10
|
+
|
4
11
|
<% if error.backtrace.present? %>
|
5
12
|
h2. Stacktrace:
|
6
13
|
|
@@ -5,7 +5,7 @@ module RedmineAirbrakeBackend
|
|
5
5
|
class Error
|
6
6
|
attr_accessor :request
|
7
7
|
attr_reader :type, :message, :backtrace
|
8
|
-
attr_reader :airbrake_hash, :subject, :attachments
|
8
|
+
attr_reader :application, :airbrake_hash, :subject, :attachments
|
9
9
|
|
10
10
|
def initialize(error_data)
|
11
11
|
# Data
|
@@ -20,6 +20,9 @@ module RedmineAirbrakeBackend
|
|
20
20
|
# Backtrace
|
21
21
|
@backtrace = @data[:backtrace]
|
22
22
|
|
23
|
+
# Application
|
24
|
+
@application = @data[:application]
|
25
|
+
|
23
26
|
# Attachments
|
24
27
|
@attachments = @data[:attachments]
|
25
28
|
|
@@ -7,7 +7,8 @@ module RedmineAirbrakeBackend
|
|
7
7
|
def self.parse(data)
|
8
8
|
error = {
|
9
9
|
backtrace: [],
|
10
|
-
attachments: []
|
10
|
+
attachments: [],
|
11
|
+
application: {}
|
11
12
|
}
|
12
13
|
|
13
14
|
header_finished = false
|
@@ -19,14 +20,22 @@ module RedmineAirbrakeBackend
|
|
19
20
|
header_finished = true if line =~ /^(Application Specific Information|Last Exception Backtrace|Thread \d+( Crashed)?):$/
|
20
21
|
|
21
22
|
unless header_finished
|
22
|
-
key, value = line.split(':', 2)
|
23
|
+
key, value = line.split(':', 2).map { |s| s.strip }
|
23
24
|
|
24
25
|
next if key.blank? || value.blank?
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
case key
|
28
|
+
when 'Exception Type'
|
29
|
+
error[:type] = value
|
30
|
+
when 'Exception Codes'
|
31
|
+
error[:message] = value
|
32
|
+
when 'Incident Identifier'
|
33
|
+
indicent_identifier = value
|
34
|
+
when 'Identifier'
|
35
|
+
error[:application][:name] = value
|
36
|
+
when 'Version'
|
37
|
+
error[:application][:version] = value
|
38
|
+
end
|
30
39
|
end
|
31
40
|
|
32
41
|
if next_line_is_message
|
@@ -24,6 +24,7 @@ module RedmineAirbrakeBackend
|
|
24
24
|
# Project
|
25
25
|
@project = Project.where(identifier: @config[:project]).first
|
26
26
|
raise Invalid.new('No or invalid project') if @project.blank?
|
27
|
+
raise Invalid.new('Airbrake not enabled for project') if @project.enabled_modules.where(name: :airbrake).empty?
|
27
28
|
|
28
29
|
# Check configuration
|
29
30
|
raise Invalid.new('Custom field for notice hash is not configured!') if notice_hash_field.blank?
|
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.5.
|
4
|
+
version: 0.5.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: 2014-10-
|
11
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|