honeybadger 4.7.0 → 4.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/honeybadger/agent.rb +2 -0
- data/lib/honeybadger/breadcrumbs/active_support.rb +3 -12
- data/lib/honeybadger/cli/helpers.rb +1 -1
- data/lib/honeybadger/cli/main.rb +1 -1
- data/lib/honeybadger/cli/test.rb +1 -1
- data/lib/honeybadger/config/defaults.rb +5 -0
- data/lib/honeybadger/util/sql.rb +10 -1
- data/lib/honeybadger/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c76ef937ae77d449421f97e342bd86f77176a705fb6b7a75e4928e0a48fc71b
|
4
|
+
data.tar.gz: db036be307a2f741187951a46f30845451e5e01d49d266250837dcb6869b084c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e57d7371fa97c9e9f356824ac5ee15454106cbf332d772c0fc74f01a5d8d5aaac7b78f7f09eacc2d4e902c432f24ca30146ed36e697048ee9a9e31902472942d
|
7
|
+
data.tar.gz: 6f14009e5ea56d72bdba4a95a3bcfe23fd29e6bc8870b701e3f6a0869e4aa750bc56485ac149f512484881bdd477af7c8dd41668b104323d54be840c31f13800
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,14 @@ adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [4.7.1] - 2020-08-11
|
9
|
+
### Fixed
|
10
|
+
- ActiveRecord SQL Breadcrumb event pulls adapter from supplied connection,
|
11
|
+
allowing for multiple databases.
|
12
|
+
- Fix Rails deprecation of `ActionDispatch::ParamsParser::ParseError`
|
13
|
+
- Deal with invalid UTF-8 byte sequences during SQL obfuscation
|
14
|
+
- Fix Ruby 2.7 deprecation notice in sql.rb
|
15
|
+
|
8
16
|
## [4.7.0] - 2020-06-02
|
9
17
|
### Fixed
|
10
18
|
- Alias `Notice#controller=` as `Notice#component=`
|
data/lib/honeybadger/agent.rb
CHANGED
@@ -15,10 +15,11 @@ module Honeybadger
|
|
15
15
|
["Active Record", name].compact.join(" - ")
|
16
16
|
end,
|
17
17
|
category: "query",
|
18
|
-
select_keys: [:sql, :name, :connection_id, :cached],
|
18
|
+
select_keys: [:sql, :name, :connection, :connection_id, :cached],
|
19
19
|
transform: lambda do |data|
|
20
20
|
if data[:sql]
|
21
|
-
|
21
|
+
connection = data.delete(:connection) || ::ActiveRecord::Base.connection
|
22
|
+
adapter = connection.adapter_name.downcase
|
22
23
|
data[:sql] = Util::SQL.obfuscate(data[:sql], adapter)
|
23
24
|
end
|
24
25
|
data
|
@@ -102,16 +103,6 @@ module Honeybadger
|
|
102
103
|
}
|
103
104
|
}
|
104
105
|
end
|
105
|
-
|
106
|
-
private_class_method def self.active_record_connection_db_config
|
107
|
-
if ::ActiveRecord::Base.respond_to?(:connection_db_config)
|
108
|
-
# >= Rails 6.1
|
109
|
-
::ActiveRecord::Base.connection_db_config.configuration_hash
|
110
|
-
else
|
111
|
-
# < Rails 6.1
|
112
|
-
::ActiveRecord::Base.connection_config
|
113
|
-
end
|
114
|
-
end
|
115
106
|
end
|
116
107
|
end
|
117
108
|
end
|
@@ -15,7 +15,7 @@ To fix this issue, please try the following:
|
|
15
15
|
|
16
16
|
- Make sure the gem is configured properly.
|
17
17
|
- Retry executing this command a few times.
|
18
|
-
- Make sure you can connect to #{host} (`
|
18
|
+
- Make sure you can connect to #{host} (`curl https://#{host}/v1/notices`).
|
19
19
|
- Email support@honeybadger.io for help. Include as much debug info as you
|
20
20
|
can for a faster resolution!
|
21
21
|
|
data/lib/honeybadger/cli/main.rb
CHANGED
@@ -196,7 +196,7 @@ WELCOME
|
|
196
196
|
# What can I do?
|
197
197
|
|
198
198
|
- Retry the command.
|
199
|
-
- Make sure you can connect to api.honeybadger.io (`
|
199
|
+
- Make sure you can connect to api.honeybadger.io (`curl https://api.honeybadger.io/v1/notices`).
|
200
200
|
- If you continue to see this message, email us at support@honeybadger.io
|
201
201
|
(don't forget to attach this output!)
|
202
202
|
|
data/lib/honeybadger/cli/test.rb
CHANGED
@@ -175,7 +175,7 @@ To fix this issue, please try the following:
|
|
175
175
|
|
176
176
|
- Make sure the gem is configured properly.
|
177
177
|
- Retry executing this command a few times.
|
178
|
-
- Make sure you can connect to #{host} (`
|
178
|
+
- Make sure you can connect to #{host} (`curl https://#{host}/v1/notices`).
|
179
179
|
- Email support@honeybadger.io for help. Include as much debug info as you
|
180
180
|
can for a faster resolution!
|
181
181
|
|
@@ -13,7 +13,12 @@ module Honeybadger
|
|
13
13
|
'ActionController::UnknownFormat',
|
14
14
|
'ActionController::InvalidAuthenticityToken',
|
15
15
|
'ActionController::InvalidCrossOriginRequest',
|
16
|
+
# ActionDispatch::ParamsParser::ParseError was removed in Rails 6.0
|
17
|
+
# and may be removed here once support for Rails 5.2 is dropped.
|
18
|
+
# https://github.com/rails/rails/commit/e16c765ac6dcff068ff2e5554d69ff345c003de1
|
19
|
+
# https://github.com/honeybadger-io/honeybadger-ruby/pull/358
|
16
20
|
'ActionDispatch::ParamsParser::ParseError',
|
21
|
+
'ActionDispatch::Http::Parameters::ParseError',
|
17
22
|
'ActionController::BadRequest',
|
18
23
|
'ActionController::ParameterMissing',
|
19
24
|
'ActiveRecord::RecordNotFound',
|
data/lib/honeybadger/util/sql.rb
CHANGED
@@ -11,7 +11,7 @@ module Honeybadger
|
|
11
11
|
DoubleQuoters = /(postgres|sqlite|postgis)/.freeze
|
12
12
|
|
13
13
|
def self.obfuscate(sql, adapter)
|
14
|
-
sql.dup.tap do |s|
|
14
|
+
force_utf_8(sql.dup).tap do |s|
|
15
15
|
s.gsub!(EscapedQuotes, EmptyReplacement)
|
16
16
|
s.gsub!(SQuotedData, Replacement)
|
17
17
|
s.gsub!(DQuotedData, Replacement) if adapter =~ DoubleQuoters
|
@@ -20,6 +20,15 @@ module Honeybadger
|
|
20
20
|
s.squeeze!(' ')
|
21
21
|
end
|
22
22
|
end
|
23
|
+
|
24
|
+
def self.force_utf_8(string)
|
25
|
+
string.encode(
|
26
|
+
Encoding.find('UTF-8'),
|
27
|
+
invalid: :replace,
|
28
|
+
undef: :replace,
|
29
|
+
replace: ''
|
30
|
+
)
|
31
|
+
end
|
23
32
|
end
|
24
33
|
end
|
25
34
|
end
|
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: 4.7.
|
4
|
+
version: 4.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Honeybadger Industries LLC
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Make managing application errors a more pleasant experience.
|
14
14
|
email:
|
@@ -135,7 +135,7 @@ homepage: https://github.com/honeybadger-io/honeybadger-ruby
|
|
135
135
|
licenses:
|
136
136
|
- MIT
|
137
137
|
metadata: {}
|
138
|
-
post_install_message:
|
138
|
+
post_install_message:
|
139
139
|
rdoc_options:
|
140
140
|
- "--markup=tomdoc"
|
141
141
|
- "--main=README.md"
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
156
|
rubygems_version: 3.1.2
|
157
|
-
signing_key:
|
157
|
+
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: Error reports you can be happy about.
|
160
160
|
test_files: []
|