rubymine_heaven 0.0.2 → 0.0.3
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.
data/README.md
CHANGED
data/lib/rubymine_heaven.rb
CHANGED
@@ -6,6 +6,7 @@ module RubymineHeaven
|
|
6
6
|
|
7
7
|
private
|
8
8
|
|
9
|
+
|
9
10
|
def link_to_code(text)
|
10
11
|
# we must create new String, because SafeBuffer#gsub don't set $1, $2, ... variables !!
|
11
12
|
String.new(text).gsub(/(\/?[\w\/\.@-]+)\:(\d+)/) do |match|
|
@@ -16,21 +17,37 @@ module RubymineHeaven
|
|
16
17
|
end
|
17
18
|
end
|
18
19
|
|
19
|
-
def
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
20
|
+
def render_exception(env, exception)
|
21
|
+
|
22
|
+
begin
|
23
|
+
wrapper = ActionDispatch::ExceptionWrapper.new(env, exception)
|
24
|
+
log_error(env, wrapper)
|
25
|
+
|
26
|
+
|
27
|
+
if env['action_dispatch.show_detailed_exceptions']
|
28
|
+
template = ActionView::Base.new([RESCUES_TEMPLATE_PATH],
|
29
|
+
:request => ActionDispatch::Request.new(env),
|
30
|
+
:exception => wrapper.exception,
|
31
|
+
:application_trace => wrapper.application_trace,
|
32
|
+
:framework_trace => wrapper.framework_trace,
|
33
|
+
:full_trace => wrapper.full_trace
|
34
|
+
)
|
35
|
+
|
36
|
+
file = "rescues/#{wrapper.rescue_template}"
|
37
|
+
body = template.render(:template => file, :layout => 'rescues/layout')
|
38
|
+
body = link_to_code(body)
|
39
|
+
|
40
|
+
render(wrapper.status_code, body)
|
41
|
+
else
|
42
|
+
raise exception
|
43
|
+
end
|
44
|
+
rescue => e
|
45
|
+
p e
|
46
|
+
|
47
|
+
end
|
31
48
|
end
|
32
|
-
end
|
33
49
|
|
50
|
+
end
|
34
51
|
end
|
35
52
|
end
|
36
53
|
|
@@ -6,7 +6,7 @@ module RubymineHeaven
|
|
6
6
|
Rails.backtrace_cleaner.add_filter { |line| line.sub("#{Rails.root}/", '') }
|
7
7
|
|
8
8
|
# point links on rails error pages to rubymine
|
9
|
-
ActionDispatch::
|
9
|
+
ActionDispatch::DebugExceptions.send(:include, LinkableErrors)
|
10
10
|
|
11
11
|
# point footnotes links to rubymine
|
12
12
|
if defined?(Footnotes)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubymine_heaven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-06 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70303737709920 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 3.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70303737709920
|
25
25
|
description: ! 'This gem connects stack trace on rails error page to rubymine (when
|
26
26
|
you click on stack trace line
|
27
27
|
|