honeybadger 4.7.1 → 4.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c76ef937ae77d449421f97e342bd86f77176a705fb6b7a75e4928e0a48fc71b
4
- data.tar.gz: db036be307a2f741187951a46f30845451e5e01d49d266250837dcb6869b084c
3
+ metadata.gz: ae86ea681a8b1e58775976adc5fe1300cfa043865c9a72344b5ae2dfcde2565a
4
+ data.tar.gz: 98a92af83ec77fff0fba12fd551ca81417ed04d0cfdba225a262f1db2786ad82
5
5
  SHA512:
6
- metadata.gz: e57d7371fa97c9e9f356824ac5ee15454106cbf332d772c0fc74f01a5d8d5aaac7b78f7f09eacc2d4e902c432f24ca30146ed36e697048ee9a9e31902472942d
7
- data.tar.gz: 6f14009e5ea56d72bdba4a95a3bcfe23fd29e6bc8870b701e3f6a0869e4aa750bc56485ac149f512484881bdd477af7c8dd41668b104323d54be840c31f13800
6
+ metadata.gz: bad75cfca393708ec07292b6e34257afdaad23753e7fe26b96e8c9d1ca5d46099f9da13b93b53d49d5a77569913e0048a883cc6bf73b04686d85060805e8d681
7
+ data.tar.gz: 79e8f88c82d3e8da1eb968b4f9df0ba88da145a034cd6c82cd7e3bf84649d9d5d3c7e3586ce12e391b3f097c9a955231654a825726ac9a697050ffdbca2df64d
@@ -5,6 +5,11 @@ adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.7.2] - 2020-08-17
9
+ ### Fixed
10
+ - Remove usage of `ActiveRecord::Base.connection` (thanks @jcoyne for testing)
11
+ - Check for UTF-8 in ActiveRecord breadcrumb exclusion filter
12
+
8
13
  ## [4.7.1] - 2020-08-11
9
14
  ### Fixed
10
15
  - ActiveRecord SQL Breadcrumb event pulls adapter from supplied connection,
@@ -18,15 +18,16 @@ module Honeybadger
18
18
  select_keys: [:sql, :name, :connection, :connection_id, :cached],
19
19
  transform: lambda do |data|
20
20
  if data[:sql]
21
- connection = data.delete(:connection) || ::ActiveRecord::Base.connection
22
- adapter = connection.adapter_name.downcase
21
+ connection = data.delete(:connection)
22
+ adapter = (connection && connection.adapter_name.downcase) || active_record_connection_db_config[:adapter]
23
23
  data[:sql] = Util::SQL.obfuscate(data[:sql], adapter)
24
24
  end
25
25
  data
26
26
  end,
27
27
  exclude_when: lambda do |data|
28
28
  # Ignore schema, begin, and commit transaction queries
29
- data[:name] == "SCHEMA" || (data[:sql] && (data[:sql] =~ /^(begin|commit)( transaction)?$/i))
29
+ data[:name] == "SCHEMA" ||
30
+ (data[:sql] && (Util::SQL.force_utf_8(data[:sql].dup) =~ /^(begin|commit)( transaction)?$/i))
30
31
  end
31
32
  },
32
33
 
@@ -103,6 +104,16 @@ module Honeybadger
103
104
  }
104
105
  }
105
106
  end
107
+
108
+ private_class_method def self.active_record_connection_db_config
109
+ if ::ActiveRecord::Base.respond_to?(:connection_db_config)
110
+ # >= Rails 6.1
111
+ ::ActiveRecord::Base.connection_db_config.configuration_hash
112
+ else
113
+ # < Rails 6.1
114
+ ::ActiveRecord::Base.connection_config
115
+ end
116
+ end
106
117
  end
107
118
  end
108
119
  end
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # The current String Honeybadger version.
3
- VERSION = '4.7.1'.freeze
3
+ VERSION = '4.7.2'.freeze
4
4
  end
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.1
4
+ version: 4.7.2
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: 2020-08-11 00:00:00.000000000 Z
11
+ date: 2020-08-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Make managing application errors a more pleasant experience.
14
14
  email: