redmine_airbrake_backend 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/controllers/airbrake_controller.rb +9 -6
- data/app/models/airbrake_project_setting.rb +1 -1
- data/app/views/projects/settings/_airbrake.html.erb +4 -2
- data/config/locales/de.yml +11 -0
- data/config/locales/en.yml +1 -0
- data/db/migrate/20131003151228_add_reopen_repeat_description.rb +20 -0
- data/lib/redmine_airbrake_backend/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c81ea1d572058eb01eaf6ca6e01737b3280d889
|
4
|
+
data.tar.gz: 09547734314aa2eefab4b4310845767b1f074aad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b807833875e1c7375e74213a4d24f8e1f90ba8172b1e5cf06d18799ebd651f45633a6a7476a7f175365b8ee79264a963d3047abb8195c1182ab7b49c576806d
|
7
|
+
data.tar.gz: f97588a065e4cdc4e46498fba37672eae768794f9931d1617f0c5c22e86e63b35c50cc53fa432097f6f2750459cd119ed958d7b1dd1a674dd3d607d74ecb6a7f
|
data/Gemfile.lock
CHANGED
@@ -25,21 +25,24 @@ class AirbrakeController < ::ApplicationController
|
|
25
25
|
|
26
26
|
custom_field_values = {}
|
27
27
|
|
28
|
+
# Error hash
|
29
|
+
custom_field_values[notice_hash_field.id] = notice_hash if @issue.new_record?
|
30
|
+
|
28
31
|
# Update occurrences
|
29
32
|
occurrences_value = @issue.custom_value_for(occurrences_field.id)
|
30
33
|
custom_field_values[occurrences_field.id] = ((occurrences_value ? occurrences_value.value.to_i : 0) + 1).to_s if occurrences_field.present?
|
31
34
|
|
35
|
+
@issue.custom_field_values = custom_field_values
|
36
|
+
|
32
37
|
# Reopen if closed
|
33
38
|
if reopen? && @issue.status.is_closed?
|
39
|
+
desc = "*Issue reopened after occurring again in _#{@notice.env[:environment_name]}_ environment.*"
|
40
|
+
desc << "\n\n#{render_description}" if project_setting(:reopen_repeat_description)
|
41
|
+
|
34
42
|
@issue.status = IssueStatus.where(is_default: true).order(:position).first
|
35
|
-
@issue.init_journal(User.current,
|
43
|
+
@issue.init_journal(User.current, desc)
|
36
44
|
end
|
37
45
|
|
38
|
-
# Hash
|
39
|
-
custom_field_values[notice_hash_field.id] = notice_hash if @issue.new_record?
|
40
|
-
|
41
|
-
@issue.custom_field_values = custom_field_values
|
42
|
-
|
43
46
|
if @issue.save
|
44
47
|
render xml: {
|
45
48
|
notice: {
|
@@ -10,5 +10,5 @@ class AirbrakeProjectSetting < ActiveRecord::Base
|
|
10
10
|
|
11
11
|
validates_presence_of :project_id
|
12
12
|
|
13
|
-
safe_attributes :tracker_id, :category_id, :priority_id, :reopen_regexp
|
13
|
+
safe_attributes :tracker_id, :category_id, :priority_id, :reopen_regexp, :reopen_repeat_description
|
14
14
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
de:
|
2
|
+
label_airbrake: Airbrake
|
3
|
+
|
4
|
+
field_reopen_regexp: Regulärer Ausdruck für erneutes Öffnen
|
5
|
+
field_reopen_repeat_description: Neue Fehlerbeschreibung bei erneutem Öffnen anfügen
|
6
|
+
|
7
|
+
settings_airbrake_hash_field: "Benutzerdefiniertes Feld für Fehlernummer"
|
8
|
+
settings_airbrake_occurrences_field: "Benutzerdefiniertes Feld für # Auftreten"
|
9
|
+
|
10
|
+
project_module_airbrake: Airbrake
|
11
|
+
permission_manage_airbrake: Airbrake verwalten
|
data/config/locales/en.yml
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
class AddReopenRepeatDescription < ActiveRecord::Migration
|
2
|
+
|
3
|
+
def up
|
4
|
+
add_column :airbrake_project_settings, :reopen_repeat_description, :boolean
|
5
|
+
|
6
|
+
AirbrakeProjectSetting.reset_column_information
|
7
|
+
|
8
|
+
AirbrakeProjectSetting.find_each do |s|
|
9
|
+
s.reopen_repeat_description = false
|
10
|
+
s.save!
|
11
|
+
end
|
12
|
+
|
13
|
+
change_column :airbrake_project_settings, :reopen_repeat_description, :boolean, null: false, default: false
|
14
|
+
end
|
15
|
+
|
16
|
+
def down
|
17
|
+
remove_column :airbrake_project_settings, :reopen_repeat_description
|
18
|
+
end
|
19
|
+
|
20
|
+
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.
|
4
|
+
version: 0.4.0
|
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-
|
11
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -102,9 +102,11 @@ files:
|
|
102
102
|
- app/views/projects/settings/_airbrake.html.erb
|
103
103
|
- app/views/settings/_airbrake.html.erb
|
104
104
|
- bin/rails
|
105
|
+
- config/locales/de.yml
|
105
106
|
- config/locales/en.yml
|
106
107
|
- config/routes.rb
|
107
108
|
- db/migrate/20130708102357_create_airbrake_project_settings.rb
|
109
|
+
- db/migrate/20131003151228_add_reopen_repeat_description.rb
|
108
110
|
- lib/redmine_airbrake_backend.rb
|
109
111
|
- lib/redmine_airbrake_backend/engine.rb
|
110
112
|
- lib/redmine_airbrake_backend/notice.rb
|