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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4e0c071bc0b3db410950dbc4c5ad21934920910
4
- data.tar.gz: 46fec238b22746bec193ac2286276837133799f3
3
+ metadata.gz: 1ca4aa5a607eb5034f26d2cfabd9febc5df85626
4
+ data.tar.gz: 1a3d5bc5ad22573ae8bff17156b242aa01a70743
5
5
  SHA512:
6
- metadata.gz: 8a8c69497bdc7e1327703faa0449d91bf1253c8aa387fdfba3d4a6702c6041a45119e4a4afda8a14dd847679c1f8373dd56ff1aa9efc08871d431eee36ff5d14
7
- data.tar.gz: 6f9df2ee70a463fee578b3ae9c3eeaf51c4d345cb7fb25804ff9226b337e322d79f07eca98f3ae6ff70a679da5447a926a1dc80a99c1f97009ebe082a7ead527
6
+ metadata.gz: 8c2f4c899bcfe45fa113619077a168c60902e3de7ffc84867845afc04251946c13a21faedc24de7e51abd580e7a29cccfacaf3192302ff01881d834449602dfe
7
+ data.tar.gz: 40ceeadb1605a67a231384b769c83bbc83070a413c1ec907e55845f679dd5cdfadeabbe422e1a008920aeb8a36cc0e9010fb74672bcc812b5a2bba5d60a14c1e
@@ -1,6 +1,3 @@
1
- # For 'Socket.gethostname' only.
2
- require 'socket'
3
-
4
1
  require 'shellwords'
5
2
 
6
3
  # Core library that sends notices.
@@ -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}"
@@ -2,5 +2,5 @@
2
2
  # We use Semantic Versioning v2.0.0
3
3
  # More information: http://semver.org/
4
4
  module Airbrake
5
- AIRBRAKE_VERSION = '5.0.3'.freeze
5
+ AIRBRAKE_VERSION = '5.0.4'.freeze
6
6
  end
@@ -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 -- :  (0.7ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar) 
3
+ D, [2016-02-02T17:05:14.046997 #9715] DEBUG -- :  (0.3ms) 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 -- :  (0.1ms) select sqlite_version(*)
5
+ D, [2016-02-02T17:05:14.048229 #9715] DEBUG -- :  (0.2ms) 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 -- :  (0.5ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar) 
15
+ D, [2016-02-02T17:06:05.227666 #10044] DEBUG -- :  (0.3ms) 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 -- :  (0.1ms) select sqlite_version(*)
17
+ D, [2016-02-02T17:06:05.228942 #10044] DEBUG -- :  (0.2ms) 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
- describe "DelayedJob jobs" do
119
- it "reports exceptions occurring in DelayedJob jobs" do
120
- get '/delayed_job'
121
- sleep 2
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
- wait_for_a_request_with_body(
124
- %r("message":"delayed_job\serror".*"params":{.*
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
- # Two requests are performed during this example. We care only about one.
130
- # Sleep guarantees that we let the unimportant request occur here and not
131
- # elsewhere.
132
- sleep 2
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.3
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-01-19 00:00:00.000000000 Z
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: