airbrake 5.0.3 → 5.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/airbrake.rb +0 -3
- data/lib/airbrake/capistrano/tasks.rb +5 -0
- data/lib/airbrake/rack/notice_builder.rb +0 -5
- data/lib/airbrake/version.rb +1 -1
- data/spec/apps/rails/logs/42.log +25 -0
- data/spec/integration/rails/rails_spec.rb +14 -11
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ca4aa5a607eb5034f26d2cfabd9febc5df85626
|
4
|
+
data.tar.gz: 1a3d5bc5ad22573ae8bff17156b242aa01a70743
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c2f4c899bcfe45fa113619077a168c60902e3de7ffc84867845afc04251946c13a21faedc24de7e51abd580e7a29cccfacaf3192302ff01881d834449602dfe
|
7
|
+
data.tar.gz: 40ceeadb1605a67a231384b769c83bbc83070a413c1ec907e55845f679dd5cdfadeabbe422e1a008920aeb8a36cc0e9010fb74672bcc812b5a2bba5d60a14c1e
|
data/lib/airbrake.rb
CHANGED
@@ -26,6 +26,7 @@ else
|
|
26
26
|
##
|
27
27
|
# The Capistrano v2 integration.
|
28
28
|
module Capistrano
|
29
|
+
# rubocop:disable Metrics/AbcSize
|
29
30
|
def self.load_into(config)
|
30
31
|
config.load do
|
31
32
|
after 'deploy', 'airbrake:deploy'
|
@@ -39,6 +40,9 @@ else
|
|
39
40
|
command = <<-CMD
|
40
41
|
cd #{config.release_path} && \
|
41
42
|
|
43
|
+
RACK_ENV=#{fetch(:rack_env, nil)} \
|
44
|
+
RAILS_ENV=#{fetch(:rails_env, nil)} \
|
45
|
+
|
42
46
|
bundle exec rake airbrake:deploy \
|
43
47
|
USERNAME=#{username} \
|
44
48
|
ENVIRONMENT=#{fetch(:rails_env, 'production')} \
|
@@ -53,6 +57,7 @@ else
|
|
53
57
|
end
|
54
58
|
end
|
55
59
|
end
|
60
|
+
# rubocop:enable Metrics/AbcSize
|
56
61
|
end
|
57
62
|
end
|
58
63
|
|
@@ -4,10 +4,6 @@ module Airbrake
|
|
4
4
|
# A helper class for filling notices with all sorts of useful information
|
5
5
|
# coming from the Rack environment.
|
6
6
|
class NoticeBuilder
|
7
|
-
##
|
8
|
-
# @return [String] the name of the host machine
|
9
|
-
HOSTNAME = Socket.gethostname.freeze
|
10
|
-
|
11
7
|
##
|
12
8
|
# @param [Hash{String=>Object}] rack_env The Rack environment
|
13
9
|
def initialize(rack_env)
|
@@ -49,7 +45,6 @@ module Airbrake
|
|
49
45
|
|
50
46
|
context[:url] = @request.url
|
51
47
|
context[:userAgent] = @request.user_agent
|
52
|
-
context[:hostname] = HOSTNAME
|
53
48
|
|
54
49
|
if context.key?(:version)
|
55
50
|
context[:version] += " #{@framework_version}"
|
data/lib/airbrake/version.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
# Logfile created on 2016-02-02 17:05:12 +0200 by logger.rb/53141
|
2
|
+
D, [2016-02-02T17:05:14.015907 #9715] DEBUG -- : [1m[36m (0.7ms)[0m [1mCREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar) [0m
|
3
|
+
D, [2016-02-02T17:05:14.046997 #9715] DEBUG -- : [1m[35m (0.3ms)[0m CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)
|
4
|
+
D, [2016-02-02T17:05:14.047637 #9715] DEBUG -- : [1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
5
|
+
D, [2016-02-02T17:05:14.048229 #9715] DEBUG -- : [1m[35m (0.2ms)[0m CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")
|
6
|
+
I, [2016-02-02T17:05:14.199050 #9715] INFO -- : Started GET "/crash" for 127.0.0.1 at 2016-02-02 17:05:14 +0200
|
7
|
+
I, [2016-02-02T17:05:14.203018 #9715] INFO -- : Processing by DummyController#crash as HTML
|
8
|
+
I, [2016-02-02T17:05:14.205209 #9715] INFO -- : Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)
|
9
|
+
F, [2016-02-02T17:05:14.221277 #9715] FATAL -- :
|
10
|
+
AirbrakeTestError (AirbrakeTestError):
|
11
|
+
lib/airbrake/rack/middleware.rb:22:in `call'
|
12
|
+
|
13
|
+
|
14
|
+
D, [2016-02-02T17:06:05.220146 #10044] DEBUG -- : [1m[36m (0.5ms)[0m [1mCREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar) [0m
|
15
|
+
D, [2016-02-02T17:06:05.227666 #10044] DEBUG -- : [1m[35m (0.3ms)[0m CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)
|
16
|
+
D, [2016-02-02T17:06:05.228240 #10044] DEBUG -- : [1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
17
|
+
D, [2016-02-02T17:06:05.228942 #10044] DEBUG -- : [1m[35m (0.2ms)[0m CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")
|
18
|
+
I, [2016-02-02T17:06:05.266037 #10044] INFO -- : Started GET "/crash" for 127.0.0.1 at 2016-02-02 17:06:05 +0200
|
19
|
+
I, [2016-02-02T17:06:05.268636 #10044] INFO -- : Processing by DummyController#crash as HTML
|
20
|
+
I, [2016-02-02T17:06:05.269978 #10044] INFO -- : Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
|
21
|
+
F, [2016-02-02T17:06:05.284178 #10044] FATAL -- :
|
22
|
+
AirbrakeTestError (AirbrakeTestError):
|
23
|
+
lib/airbrake/rack/middleware.rb:22:in `call'
|
24
|
+
|
25
|
+
|
@@ -115,21 +115,24 @@ RSpec.describe "Rails integration specs" do
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
118
|
+
# Delayed Job doesn't support Ruby 1.9.2
|
119
|
+
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.9.2')
|
120
|
+
describe "DelayedJob jobs" do
|
121
|
+
it "reports exceptions occurring in DelayedJob jobs" do
|
122
|
+
get '/delayed_job'
|
123
|
+
sleep 2
|
122
124
|
|
123
|
-
|
124
|
-
|
125
|
+
wait_for_a_request_with_body(
|
126
|
+
%r("message":"delayed_job\serror".*"params":{.*
|
125
127
|
"handler":"---\s!ruby/struct:BangoJob\\nbingo:\s
|
126
128
|
bingo\\nbongo:\sbongo\\n".*})x
|
127
|
-
|
129
|
+
)
|
128
130
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
131
|
+
# Two requests are performed during this example. We care only about one.
|
132
|
+
# Sleep guarantees that we let the unimportant request occur here and not
|
133
|
+
# elsewhere.
|
134
|
+
sleep 2
|
135
|
+
end
|
133
136
|
end
|
134
137
|
end
|
135
138
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airbrake Technologies, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: airbrake-ruby
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- spec/apps/rack/dummy_app.rb
|
188
188
|
- spec/apps/rails/dummy_app.rb
|
189
189
|
- spec/apps/rails/dummy_task.rake
|
190
|
+
- spec/apps/rails/logs/42.log
|
190
191
|
- spec/apps/sinatra/dummy_app.rb
|
191
192
|
- spec/integration/rack/rack_spec.rb
|
192
193
|
- spec/integration/rails/rails_spec.rb
|
@@ -233,6 +234,7 @@ test_files:
|
|
233
234
|
- spec/spec_helper.rb
|
234
235
|
- spec/apps/rack/dummy_app.rb
|
235
236
|
- spec/apps/sinatra/dummy_app.rb
|
237
|
+
- spec/apps/rails/logs/42.log
|
236
238
|
- spec/apps/rails/dummy_app.rb
|
237
239
|
- spec/apps/rails/dummy_task.rake
|
238
240
|
- spec/airbrake_spec.rb
|
@@ -241,3 +243,4 @@ test_files:
|
|
241
243
|
- spec/unit/rack/notice_builder_spec.rb
|
242
244
|
- spec/unit/sidekiq/error_handler_spec.rb
|
243
245
|
- spec/unit/rake/tasks_spec.rb
|
246
|
+
has_rdoc:
|