errplane 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/errplane/black_box.rb +1 -1
- data/lib/errplane/sinatra.rb +21 -2
- data/lib/errplane/version.rb +1 -1
- metadata +2 -2
data/lib/errplane/black_box.rb
CHANGED
@@ -16,7 +16,7 @@ module Errplane
|
|
16
16
|
@session_data = params[:session_data] || {}
|
17
17
|
@controller = params[:controller]
|
18
18
|
@action = params[:action]
|
19
|
-
@request_url = params[:request_url]
|
19
|
+
@request_url = params[:request_url] || params["PATH_INFO"]
|
20
20
|
@user_agent = params[:user_agent]
|
21
21
|
@custom_data = params[:custom_data] || {}
|
22
22
|
end
|
data/lib/errplane/sinatra.rb
CHANGED
@@ -1,5 +1,15 @@
|
|
1
|
+
module Errplane
|
2
|
+
def self.get_logger
|
3
|
+
if( defined?(logger))
|
4
|
+
logger
|
5
|
+
else
|
6
|
+
ENV['rack.logger']
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
1
11
|
Errplane.configure(true) do |config|
|
2
|
-
config.logger ||=
|
12
|
+
config.logger ||= Errplane::get_logger
|
3
13
|
config.rails_environment ||= settings.environment if defined?(settings)
|
4
14
|
config.application_root ||= settings.root if defined?(settings)
|
5
15
|
config.framework = "Sinatra"
|
@@ -11,4 +21,13 @@ if defined?(error)
|
|
11
21
|
Errplane.transmit_unless_ignorable(request.env['sinatra.error'], request.env)
|
12
22
|
raise request.env['sinatra.error']
|
13
23
|
end
|
14
|
-
|
24
|
+
elsif defined?(Sinatra::Base)
|
25
|
+
class Sinatra::Base
|
26
|
+
error do
|
27
|
+
Errplane.transmit_unless_ignorable(request.env['sinatra.error'], request.env)
|
28
|
+
raise request.env['sinatra.error']
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
|
data/lib/errplane/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: errplane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|