rack-exception_notifier 0.3.4 → 0.3.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf2148decb6912145472805c0088c901219d0303
|
4
|
+
data.tar.gz: 228107d797c19a313d9de30b9f79b48f9db2d010
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f438bcac29835c9259df6c74f0d6baf35e98931422ebe4b39cfbdbe80e492d3848abf74131e5798fce48a28b03d27686d10c8fffed5c60b0feef0465cf6f0da
|
7
|
+
data.tar.gz: 4778a9950da02bc867ba162cfb8caeacd8f02c49a3bd2611da3c73b53c8ae6941fb6420705ecd5f9513e3fb6150d8d7f37702328efc4a70b9c01672134bc7958
|
@@ -40,7 +40,7 @@ module Rack
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def _body_present?(env)
|
43
|
-
env
|
43
|
+
_extract_body(env, 1)
|
44
44
|
end
|
45
45
|
|
46
46
|
def _exclude_env_key?(env, key)
|
@@ -55,10 +55,10 @@ module Rack
|
|
55
55
|
_body_present?(env) && @options[:include_body]
|
56
56
|
end
|
57
57
|
|
58
|
-
def _extract_body(env)
|
58
|
+
def _extract_body(env, length = nil)
|
59
59
|
io = env['rack.input']
|
60
|
-
io.rewind
|
61
|
-
io.read
|
60
|
+
io.rewind
|
61
|
+
io.read(length)
|
62
62
|
end
|
63
63
|
|
64
64
|
Template = (<<-'EMAIL').gsub(/^ {4}/, '')
|
@@ -18,10 +18,16 @@ describe Rack::ExceptionNotifier do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'passes rack lint' do
|
21
|
-
|
21
|
+
lint_app = Rack::Lint.new(bad_app)
|
22
22
|
expect do
|
23
|
-
Rack::ExceptionNotifier.new(
|
24
|
-
|
23
|
+
app = Rack::ExceptionNotifier.new(
|
24
|
+
lint_app,
|
25
|
+
:to => 'bar@example.com',
|
26
|
+
:from => 'noreply@example.com',
|
27
|
+
:subject => 'testing - %s',
|
28
|
+
)
|
29
|
+
app.call(env_with_body)
|
30
|
+
end.to raise_error(TestError)
|
25
31
|
end
|
26
32
|
end
|
27
33
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-exception_notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Downey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|