honeybadger 2.0.0.beta.11 → 2.0.0.beta.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/honeybadger/agent.rb +12 -4
- data/lib/honeybadger/agent/null_worker.rb +1 -1
- data/lib/honeybadger/agent/worker.rb +4 -6
- data/lib/honeybadger/cli/helpers.rb +1 -1
- data/lib/honeybadger/cli/heroku.rb +10 -6
- data/lib/honeybadger/cli/main.rb +1 -1
- data/lib/honeybadger/config.rb +2 -2
- data/lib/honeybadger/config/defaults.rb +4 -0
- data/lib/honeybadger/util/http.rb +1 -1
- data/lib/honeybadger/version.rb +1 -1
- metadata +10 -15
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
N2NjM2Y4Yzg0ODBmNmVjZTBkYWEzNDgxNzc3MDlmMWFmMTlmODRhMQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Njc3ZjA5YTRjZGExMjVlMmY1NmUxMmEwZjU1YjI5ZGNlNmQyNDA2MQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZTg5NWI3ZmE0NTc3N2E4ZTZhZmQwZWQyMjY2ODQ5ZTJkYTVkMzBkN2U0OTZk
|
10
|
+
MWQ2MzFmMDE4ZDk0Y2Q4MjI0MjJjOTRkMzAxNzQ0MDMzMzBmZWY3YzQ2NThj
|
11
|
+
YjYzM2I3NWZmMGNiZjA0N2Q3ODZmMjMyNDAyNzUzZWE1N2JmMWU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OTZmZTg0MjBhMmY0N2M3NWQ2YWJhMmNjZGI0NWFjOWJiYjFlNTE4ZjFhYWRh
|
14
|
+
MmZkZDZmMTlmZTIwMzcyMzRmYWVmZDk2NzFkODFjNmM5MjJkYzdiODljMDQ2
|
15
|
+
MzY4N2I4MGEzYmEzNjQxNWQzOGFmZjdiYzEzZmMxYTVkYzFlOTQ=
|
data/lib/honeybadger/agent.rb
CHANGED
@@ -63,9 +63,10 @@ module Honeybadger
|
|
63
63
|
elsif !config.valid?
|
64
64
|
config.logger.warn('Unable to start Honeybadger -- api_key is missing or invalid.')
|
65
65
|
return false
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
end
|
67
|
+
|
68
|
+
unless config.ping
|
69
|
+
config.logger.warn('Failed to connect to Honeybadger service -- please verify that api.honeybadger.io is reachable (connection will be retried).')
|
69
70
|
end
|
70
71
|
|
71
72
|
config.logger.info("Starting Honeybadger version #{VERSION}")
|
@@ -147,8 +148,15 @@ module Honeybadger
|
|
147
148
|
init_metrics
|
148
149
|
|
149
150
|
at_exit do
|
150
|
-
|
151
|
+
# Fix for https://bugs.ruby-lang.org/issues/5218
|
152
|
+
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby' && RUBY_VERSION =~ /1\.9/
|
153
|
+
exit_status = $!.status if $!.is_a?(SystemExit)
|
154
|
+
end
|
155
|
+
|
156
|
+
stop if config[:'send_data_at_exit']
|
151
157
|
self.class.at_exit.call if self.class.at_exit
|
158
|
+
|
159
|
+
exit(exit_status) if exit_status
|
152
160
|
end
|
153
161
|
end
|
154
162
|
|
@@ -48,12 +48,10 @@ module Honeybadger
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
-
# Internal: Shutdown the worker.
|
51
|
+
# Internal: Shutdown the worker after sending remaining data.
|
52
52
|
#
|
53
|
-
#
|
54
|
-
|
55
|
-
# Returns false if timeout reached, otherwise true.
|
56
|
-
def shutdown(timeout = 3)
|
53
|
+
# Returns true.
|
54
|
+
def shutdown
|
57
55
|
mutex.synchronize do
|
58
56
|
@shutdown = true
|
59
57
|
@pid = nil
|
@@ -65,7 +63,7 @@ module Honeybadger
|
|
65
63
|
r = true
|
66
64
|
unless Thread.current.eql?(thread)
|
67
65
|
begin
|
68
|
-
r = !!thread.join
|
66
|
+
r = !!thread.join
|
69
67
|
ensure
|
70
68
|
shutdown! unless r
|
71
69
|
end
|
@@ -141,10 +141,10 @@ module Honeybadger
|
|
141
141
|
begin
|
142
142
|
r.disable_clear_and_finalize = true
|
143
143
|
r.clear!
|
144
|
-
::Rails.application.routes_reloader.paths.each{ |path| load(path) }
|
145
144
|
r.draw do
|
146
145
|
match 'verify' => 'honeybadger/test#verify', :as => 'verify', :via => :get
|
147
146
|
end
|
147
|
+
::Rails.application.routes_reloader.paths.each{ |path| load(path) }
|
148
148
|
::ActiveSupport.on_load(:action_controller) { r.finalize! }
|
149
149
|
ensure
|
150
150
|
r.disable_clear_and_finalize = d
|
@@ -29,10 +29,10 @@ module Honeybadger
|
|
29
29
|
exit(1)
|
30
30
|
end
|
31
31
|
|
32
|
-
|
32
|
+
cmd = %Q(heroku addons:add deployhooks:http --url="https://api.honeybadger.io/v1/deploys?deploy[environment]=#{rails_env}&deploy[local_username]={{user}}&deploy[revision]={{head}}&api_key=#{api_key}"#{app ? " --app #{app}" : ''})
|
33
33
|
|
34
|
-
say("Running: `#{
|
35
|
-
say(
|
34
|
+
say("Running: `#{cmd}`")
|
35
|
+
say(run(cmd))
|
36
36
|
end
|
37
37
|
|
38
38
|
desc 'install API_KEY', 'Install Honeybadger on Heroku using API_KEY'
|
@@ -115,16 +115,20 @@ module Honeybadger
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
118
|
+
def run(cmd)
|
119
|
+
Bundler.with_clean_env { `#{cmd}` }
|
120
|
+
end
|
121
|
+
|
118
122
|
def heroku_var(var, app_name, default = nil)
|
119
123
|
app = app_name ? "--app #{app_name}" : ''
|
120
|
-
result =
|
124
|
+
result = run("heroku config:get #{var} #{app} 2> /dev/null").strip
|
121
125
|
result.split.find(lambda { default }) {|x| x =~ /\S/ }
|
122
126
|
end
|
123
127
|
|
124
128
|
def read_heroku_env(app = nil)
|
125
129
|
cmd = ['heroku config']
|
126
130
|
cmd << "--app #{app}" if app
|
127
|
-
output =
|
131
|
+
output = run(cmd.join("\s"))
|
128
132
|
return false unless $?.to_i == 0
|
129
133
|
Hash[output.scan(/(HONEYBADGER_[^:]+):\s*(\S.*)\s*$/)]
|
130
134
|
end
|
@@ -140,7 +144,7 @@ module Honeybadger
|
|
140
144
|
cmd = ["heroku config:set"]
|
141
145
|
Hash(env).each_pair {|k,v| cmd << "#{k}=#{v}" }
|
142
146
|
cmd << "--app #{app}" if app
|
143
|
-
|
147
|
+
run(cmd.join("\s"))
|
144
148
|
$?.to_i == 0
|
145
149
|
end
|
146
150
|
end
|
data/lib/honeybadger/cli/main.rb
CHANGED
@@ -123,7 +123,7 @@ module Honeybadger
|
|
123
123
|
ENV['HONEYBADGER_REPORT_DATA'] = 'true'
|
124
124
|
|
125
125
|
config = Config.new(rails_framework_opts)
|
126
|
-
config[:api_key] = api_key
|
126
|
+
config[:api_key] = api_key.to_s
|
127
127
|
|
128
128
|
if (path = config.config_path).exist?
|
129
129
|
say("You're already on Honeybadger, so you're all set.", :yellow)
|
data/lib/honeybadger/config.rb
CHANGED
@@ -98,7 +98,7 @@ module Honeybadger
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def valid?
|
101
|
-
self[:api_key] =~ /\S/
|
101
|
+
self[:api_key].to_s =~ /\S/
|
102
102
|
end
|
103
103
|
|
104
104
|
def debug?
|
@@ -204,7 +204,7 @@ module Honeybadger
|
|
204
204
|
File.open(path, 'w+') do |file|
|
205
205
|
file.write(<<-CONFIG)
|
206
206
|
---
|
207
|
-
api_key: #{self[:api_key]}
|
207
|
+
api_key: '#{self[:api_key]}'
|
208
208
|
CONFIG
|
209
209
|
end
|
210
210
|
end
|
@@ -49,6 +49,10 @@ module Honeybadger
|
|
49
49
|
description: 'Environments which will not report data by default (use report_data to enable/disable explicitly).',
|
50
50
|
default: ['development'.freeze, 'test'.freeze, 'cucumber'.freeze].freeze
|
51
51
|
},
|
52
|
+
:'send_data_at_exit' => {
|
53
|
+
description: 'Send remaining data when Ruby exits.',
|
54
|
+
default: true
|
55
|
+
},
|
52
56
|
plugins: {
|
53
57
|
description: 'An optional list of plugins to load. Default is to load all plugins.',
|
54
58
|
default: nil
|
data/lib/honeybadger/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.beta.
|
4
|
+
version: 2.0.0.beta.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Honeybadger Industries LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Make managing application errors a more pleasant experience.
|
14
14
|
email:
|
@@ -117,33 +117,28 @@ homepage: https://github.com/honeybadger-io/honeybadger-ruby
|
|
117
117
|
licenses:
|
118
118
|
- MIT
|
119
119
|
metadata: {}
|
120
|
-
post_install_message:
|
121
|
-
|
122
|
-
|
123
|
-
please note that there may be a few configuration changes required. Read the
|
124
|
-
upgrade instructions at:
|
125
|
-
|
126
|
-
https://www.honeybadger.io/s/gem-upgrade
|
127
|
-
|
120
|
+
post_install_message: ! "\n Thanks for installing honeybadger version 2.0! If you're
|
121
|
+
upgrading from 1.x,\n please note that there may be a few configuration changes
|
122
|
+
required. Read the\n upgrade instructions at:\n\n https://www.honeybadger.io/s/gem-upgrade\n\n"
|
128
123
|
rdoc_options:
|
129
|
-
-
|
130
|
-
-
|
124
|
+
- --markup=tomdoc
|
125
|
+
- --main=README.md
|
131
126
|
require_paths:
|
132
127
|
- lib
|
133
128
|
- vendor/capistrano-honeybadger/lib
|
134
129
|
required_ruby_version: !ruby/object:Gem::Requirement
|
135
130
|
requirements:
|
136
|
-
- -
|
131
|
+
- - ! '>='
|
137
132
|
- !ruby/object:Gem::Version
|
138
133
|
version: 1.9.3
|
139
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
135
|
requirements:
|
141
|
-
- -
|
136
|
+
- - ! '>'
|
142
137
|
- !ruby/object:Gem::Version
|
143
138
|
version: 1.3.1
|
144
139
|
requirements: []
|
145
140
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.4.
|
141
|
+
rubygems_version: 2.4.4
|
147
142
|
signing_key:
|
148
143
|
specification_version: 4
|
149
144
|
summary: Error reports you can be happy about.
|