airbrake-user_informer 0.4.0 → 0.5.0
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 +4 -4
- data/lib/airbrake/user_informer.rb +3 -2
- data/lib/airbrake/user_informer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e43717daf709666c6d791f9771ba18db29e043a8
|
4
|
+
data.tar.gz: 3ee3eceee8043d7dd1e7b4e510ff99a66b83d230
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3f15f50580e40232b177252da4e2b0bf1449b028816b75c15229a95fb3423241e838637c7e1d99e4b53a1f7e9c8046b92b4ffdecd3f36b85ec158c8642da7a7
|
7
|
+
data.tar.gz: a83073373d1c06eea66a3d4a586efce83edc0af37326714d7e1e803a9ecc6ae401829ced2693e343b0423e974607a1fe32c4ab3bda4c0d7646de39f7f882e20d
|
@@ -14,9 +14,9 @@ module Airbrake
|
|
14
14
|
# stolen from https://github.com/airbrake/airbrake/blob/v4.3.8/lib/airbrake/user_informer.rb
|
15
15
|
class Middleware
|
16
16
|
ENV_KEY = "airbrake.promise"
|
17
|
-
PLACEHOLDER = "<!-- AIRBRAKE ERROR -->"
|
18
17
|
TIMEOUT = 1.0 # seconds
|
19
18
|
STEPS = 100
|
19
|
+
DEFAULT_PLACEHOLDER = "<!-- AIRBRAKE ERROR -->"
|
20
20
|
|
21
21
|
def initialize(app)
|
22
22
|
@app = app
|
@@ -54,7 +54,7 @@ module Airbrake
|
|
54
54
|
# - always call .close on the old body so it can get garbage collected if it is a File
|
55
55
|
def replace_placeholder(replacement, body, headers)
|
56
56
|
new_body = []
|
57
|
-
body.each { |chunk| new_body << chunk.gsub(
|
57
|
+
body.each { |chunk| new_body << chunk.gsub(Airbrake.user_information_placeholder || DEFAULT_PLACEHOLDER, replacement) }
|
58
58
|
headers["Content-Length"] = new_body.inject(0) { |sum, x| sum + x.bytesize }.to_s
|
59
59
|
new_body
|
60
60
|
ensure
|
@@ -66,6 +66,7 @@ end
|
|
66
66
|
|
67
67
|
class << Airbrake
|
68
68
|
attr_accessor :user_information
|
69
|
+
attr_accessor :user_information_placeholder
|
69
70
|
end
|
70
71
|
|
71
72
|
if defined?(::Rails::Railtie)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake-user_informer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|