honeybadger 2.3.0 → 2.3.1

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: 29f055b7a43795a7fb1dc2bd177bc4cc1543f550
4
- data.tar.gz: 0cb7571a9c2b042944a928b7ed5c4747d375fb4b
3
+ metadata.gz: b8fd7ece78bb49eb737c7e1b63fcade6ec62681e
4
+ data.tar.gz: d7403db13cc08a42b163935683efc7b2142c05c2
5
5
  SHA512:
6
- metadata.gz: daf005336c8edb14c837bac5ade4fd5d0117a45e04a630252dcc396022e9cbbd13720cec420c0c2594789a0d20be6b161213174b2ec9e05909ec02be5d9a3bd3
7
- data.tar.gz: 6455fdb12a7977e5bdacc793cb0a4a8005baa5f1fc8da3ff734d9de393b7e86e3fa5155f3937e33e164c1cc03319afd5511da1a30c40b3e323edb57ff3e8dc0c
6
+ metadata.gz: 1b983bdca80d05e73242350255360c01cc67c69d4237e78707b920234bfa4e37d778b4c8de9e7610e85f9bef0c05179681182f65b8d0725aff9ba1374ee1c6f0
7
+ data.tar.gz: 31b7be6e92207d526d78c6e4d72afb7b3c128eb1827adf33e0d75b8518763bac3ffc729017f08897aa8b67726a34b6837f5dcb950d501d403d49b066697eb836
@@ -3,8 +3,13 @@ All notable changes to this project will be documented in this file. See [Keep a
3
3
  CHANGELOG](http://keepachangelog.com/) for how to update this file. This project
4
4
  adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
- ## [2.3.0] - 2015-11-12
6
+ ## [Unreleased][unreleased]
7
+
8
+ ## [2.3.1] - 2015-11-20
9
+ ## Fixed
10
+ - Handle invalid utf8 in ActiveRecord SQL queries.
7
11
 
12
+ ## [2.3.0] - 2015-11-12
8
13
  ### Added
9
14
  - Rails 5 support.
10
15
  - Support overriding TTY behavior in rake reporter.
data/README.md CHANGED
@@ -252,7 +252,7 @@ You can use any of the options below in your config file, or in the environment.
252
252
  |`exceptions.ignore` | Array | A list of exception class names to ignore (appends to defaults).<br/>_Default: `['ActiveRecord::RecordNotFound', 'ActionController::RoutingError', 'ActionController::InvalidAuthenticityToken', 'CGI::Session::CookieStore::TamperedWithCookie', 'ActionController::UnknownAction', 'AbstractController::ActionNotFound', 'Mongoid::Errors::DocumentNotFound Sinatra::NotFound']`_|
253
253
  |`exceptions.ignore_only` | Array | A list of exception class names to ignore (overrides defaults).<br/>_Default: `[]`_|
254
254
  |`exceptions.` `ignored_user_agents` | Array | A list of user agents to ignore.<br/>_Default: `[]`_|
255
- |`exceptions.rescue_rake` | Boolean | Enable rescuing exceptions in rake tasks.<br/>_Default: `true`_|
255
+ |`exceptions.rescue_rake` | Boolean | Enable rescuing exceptions in rake tasks.<br/>_Default: `true` when run in background; `false` when run in terminal._|
256
256
  |`exceptions.source_radius` | Integer | The number of lines before and after the source when reporting snippets.<br/>_Default: `2`_|
257
257
  |`exceptions.local_variables` | Boolean | Enable sending local variables. Requires the [binding_of_caller gem](https://rubygems.org/gems/binding_of_caller).<br/>_Default: `false`_|
258
258
  |&nbsp; | ||
@@ -171,17 +171,28 @@ module Honeybadger
171
171
  EmptyReplacement = "".freeze
172
172
  DoubleQuoters = /(postgres|sqlite|postgis)/.freeze
173
173
 
174
+ def initialize(event)
175
+ super
176
+ @sql = Util::Sanitizer.sanitize_string(event.payload[:sql])
177
+ end
178
+
174
179
  def render?
175
- event.payload[:name] != Schema && !event.payload[:sql].match(SchemaMigrations)
180
+ event.payload[:name] != Schema && !sql.match(SchemaMigrations)
176
181
  end
177
182
 
178
183
  def to_s
179
- sql = event.payload[:sql]
180
- sql = sql.gsub(EscapedQuotes, EmptyReplacement).gsub(SQuotedData, Replacement)
181
- sql = sql.gsub(DQuotedData, Replacement) unless ::ActiveRecord::Base.connection_pool.spec.config[:adapter] =~ DoubleQuoters
182
- sql = sql.gsub(NumericData, Replacement).gsub(Newline, EmptyReplacement).squeeze(' ')
183
- Util::Sanitizer.sanitize_string(sql)
184
+ s = sql.dup
185
+ s.gsub!(EscapedQuotes, EmptyReplacement)
186
+ s.gsub!(SQuotedData, Replacement)
187
+ s.gsub!(DQuotedData, Replacement) unless ::ActiveRecord::Base.connection_pool.spec.config[:adapter] =~ DoubleQuoters
188
+ s.gsub!(NumericData, Replacement)
189
+ s.gsub!(Newline, EmptyReplacement)
190
+ s.squeeze!(' ')
191
+ s
184
192
  end
193
+
194
+ private
195
+ attr_reader :sql
185
196
  end
186
197
 
187
198
  class ActionView < Base
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # Public: The current String Honeybadger version.
3
- VERSION = '2.3.0'.freeze
3
+ VERSION = '2.3.1'.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: 2.3.0
4
+ version: 2.3.1
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: 2015-11-12 00:00:00.000000000 Z
11
+ date: 2015-11-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Make managing application errors a more pleasant experience.
14
14
  email: