redmine_airbrake_backend 0.4.1 → 0.4.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: 8e6f90597177ad780d201844dd5124b4a16624da
4
- data.tar.gz: 8012ff3736c04661bd5814c3074cc44ce8541011
3
+ metadata.gz: b1cdd4e2ac42fd9fbb0eb9f58d470ece482d7d12
4
+ data.tar.gz: 4b5911abdb103c30b570c0fbd83254e041899a0f
5
5
  SHA512:
6
- metadata.gz: 3848ce47f9d9ae77d8d35ea555779dd594d92c4860e3420c1fdec1d228531a257729a162f4233b48411d0be2bda216dc9ba1ddc0d9de861e7efcaa143fb4038a
7
- data.tar.gz: 22b795f58078aaebbe03b9cb1e5d3895e351f125a33260a202fd434873119b8ca73af0dc2f210ffccfdbafd54a2b77bd18e025b6db6418c806f73f98d9e1ea5e
6
+ metadata.gz: fcc9c6090efc958f1a404a312838295506a0962ad20d7624963cb32ced3eccbd5e29a95d5fe89c835a9dc0a7cce1e630f6baab103299dad7c71e25299b616f7e
7
+ data.tar.gz: 8db8b669c1c677e3b8c21cb24ebfa379177af965e29fb4209f7afa936cd92831cf1060cdfb1b3d422d8db37b1c12f846c1b3de00e2d823ae823feded26daa140
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redmine_airbrake_backend (0.4.1)
4
+ redmine_airbrake_backend (0.4.2)
5
5
  hpricot
6
6
  htmlentities
7
7
  rails
@@ -9,63 +9,62 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionmailer (4.0.1)
13
- actionpack (= 4.0.1)
12
+ actionmailer (4.0.4)
13
+ actionpack (= 4.0.4)
14
14
  mail (~> 2.5.4)
15
- actionpack (4.0.1)
16
- activesupport (= 4.0.1)
15
+ actionpack (4.0.4)
16
+ activesupport (= 4.0.4)
17
17
  builder (~> 3.1.0)
18
18
  erubis (~> 2.7.0)
19
19
  rack (~> 1.5.2)
20
20
  rack-test (~> 0.6.2)
21
- activemodel (4.0.1)
22
- activesupport (= 4.0.1)
21
+ activemodel (4.0.4)
22
+ activesupport (= 4.0.4)
23
23
  builder (~> 3.1.0)
24
- activerecord (4.0.1)
25
- activemodel (= 4.0.1)
24
+ activerecord (4.0.4)
25
+ activemodel (= 4.0.4)
26
26
  activerecord-deprecated_finders (~> 1.0.2)
27
- activesupport (= 4.0.1)
27
+ activesupport (= 4.0.4)
28
28
  arel (~> 4.0.0)
29
29
  activerecord-deprecated_finders (1.0.3)
30
- activesupport (4.0.1)
31
- i18n (~> 0.6, >= 0.6.4)
30
+ activesupport (4.0.4)
31
+ i18n (~> 0.6, >= 0.6.9)
32
32
  minitest (~> 4.2)
33
33
  multi_json (~> 1.3)
34
34
  thread_safe (~> 0.1)
35
35
  tzinfo (~> 0.3.37)
36
- arel (4.0.1)
37
- atomic (1.1.14)
36
+ arel (4.0.2)
38
37
  builder (3.1.4)
39
38
  erubis (2.7.0)
40
39
  hike (1.2.3)
41
40
  hpricot (0.8.6)
42
41
  htmlentities (4.3.1)
43
- i18n (0.6.5)
42
+ i18n (0.6.9)
44
43
  mail (2.5.4)
45
44
  mime-types (~> 1.16)
46
45
  treetop (~> 1.4.8)
47
- mime-types (1.25)
46
+ mime-types (1.25.1)
48
47
  minitest (4.7.5)
49
- multi_json (1.8.2)
50
- polyglot (0.3.3)
48
+ multi_json (1.9.2)
49
+ polyglot (0.3.4)
51
50
  rack (1.5.2)
52
51
  rack-test (0.6.2)
53
52
  rack (>= 1.0)
54
- rails (4.0.1)
55
- actionmailer (= 4.0.1)
56
- actionpack (= 4.0.1)
57
- activerecord (= 4.0.1)
58
- activesupport (= 4.0.1)
53
+ rails (4.0.4)
54
+ actionmailer (= 4.0.4)
55
+ actionpack (= 4.0.4)
56
+ activerecord (= 4.0.4)
57
+ activesupport (= 4.0.4)
59
58
  bundler (>= 1.3.0, < 2.0)
60
- railties (= 4.0.1)
59
+ railties (= 4.0.4)
61
60
  sprockets-rails (~> 2.0.0)
62
- railties (4.0.1)
63
- actionpack (= 4.0.1)
64
- activesupport (= 4.0.1)
61
+ railties (4.0.4)
62
+ actionpack (= 4.0.4)
63
+ activesupport (= 4.0.4)
65
64
  rake (>= 0.8.7)
66
65
  thor (>= 0.18.1, < 2.0)
67
- rake (10.1.0)
68
- sprockets (2.10.0)
66
+ rake (10.2.2)
67
+ sprockets (2.12.0)
69
68
  hike (~> 1.2)
70
69
  multi_json (~> 1.0)
71
70
  rack (~> 1.0)
@@ -74,14 +73,13 @@ GEM
74
73
  actionpack (>= 3.0)
75
74
  activesupport (>= 3.0)
76
75
  sprockets (~> 2.8)
77
- thor (0.18.1)
78
- thread_safe (0.1.3)
79
- atomic
76
+ thor (0.19.1)
77
+ thread_safe (0.3.2)
80
78
  tilt (1.4.1)
81
79
  treetop (1.4.15)
82
80
  polyglot
83
81
  polyglot (>= 0.3.1)
84
- tzinfo (0.3.38)
82
+ tzinfo (0.3.39)
85
83
 
86
84
  PLATFORMS
87
85
  ruby
@@ -1,6 +1,7 @@
1
1
  require 'redmine_airbrake_backend/notice'
2
2
 
3
3
  class AirbrakeController < ::ApplicationController
4
+ protect_from_forgery except: :notice
4
5
  prepend_before_filter :parse_notice_and_api_auth
5
6
  before_filter :load_records
6
7
 
@@ -29,8 +30,10 @@ class AirbrakeController < ::ApplicationController
29
30
  custom_field_values[notice_hash_field.id] = notice_hash if @issue.new_record?
30
31
 
31
32
  # Update occurrences
32
- occurrences_value = @issue.custom_value_for(occurrences_field.id)
33
- custom_field_values[occurrences_field.id] = ((occurrences_value ? occurrences_value.value.to_i : 0) + 1).to_s if occurrences_field.present?
33
+ if occurrences_field.present?
34
+ occurrences_value = @issue.custom_value_for(occurrences_field.id)
35
+ custom_field_values[occurrences_field.id] = ((occurrences_value ? occurrences_value.value.to_i : 0) + 1).to_s
36
+ end
34
37
 
35
38
  @issue.custom_field_values = custom_field_values
36
39
 
@@ -67,13 +70,19 @@ class AirbrakeController < ::ApplicationController
67
70
  def load_records
68
71
  # Project
69
72
  unless @project = Project.where(identifier: @notice.params[:project]).first
70
- render nothing: true, status: :bad_request
73
+ render text: 'Project not found!', status: :bad_request
74
+ return
75
+ end
76
+
77
+ # Check configuration
78
+ if notice_hash_field.blank?
79
+ render text: 'Custom field for notice hash is not configured!', status: :internal_server_error
71
80
  return
72
81
  end
73
82
 
74
83
  # Tracker
75
84
  unless (@tracker = record_for(@project.trackers, :tracker)) && @tracker.custom_fields.where(id: notice_hash_field.id).first
76
- render nothing: true, status: :bad_request
85
+ render text: 'Tracker not found!', status: :bad_request
77
86
  return
78
87
  end
79
88
 
@@ -1,3 +1,3 @@
1
1
  module RedmineAirbrakeBackend
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_airbrake_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.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-11-11 00:00:00.000000000 Z
11
+ date: 2014-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: hpricot
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: htmlentities
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.3'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  description: Plugin which adds Airbrake support to Redmine
@@ -88,7 +88,7 @@ executables:
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
- - .gitignore
91
+ - ".gitignore"
92
92
  - Gemfile
93
93
  - Gemfile.lock
94
94
  - MIT-LICENSE
@@ -130,17 +130,17 @@ require_paths:
130
130
  - lib
131
131
  required_ruby_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
- - - '>='
133
+ - - ">="
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - '>='
138
+ - - ">="
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.0.3
143
+ rubygems_version: 2.2.2
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: This plugin provides the necessary API to use Redmine as a Airbrake backend