rubyception 0.1.1 → 0.2.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.
- data/README.md +26 -6
- data/app/assets/images/rubyception/entry_collapse.png +0 -0
- data/app/assets/images/rubyception/entry_expand.png +0 -0
- data/app/assets/javascripts/rubyception/application.coffee +1 -3
- data/app/assets/javascripts/rubyception/routers/log.coffee +4 -2
- data/app/assets/javascripts/rubyception/syntax_highlighting.js +543 -0
- data/app/assets/javascripts/rubyception/views/backtrace_lines/index.coffee +0 -1
- data/app/assets/javascripts/rubyception/views/entries/entry.coffee +30 -11
- data/app/assets/stylesheets/rubyception/application.sass +1 -2
- data/app/assets/stylesheets/rubyception/entries.sass +54 -5
- data/app/assets/stylesheets/rubyception/lines.sass +10 -7
- data/app/assets/stylesheets/rubyception/syntax_highlighting.css +138 -0
- data/app/controllers/rubyception/templates_controller.rb +12 -0
- data/app/helpers/rubyception/application_helper.rb +19 -0
- data/app/models/rubyception/entry.rb +37 -2
- data/app/views/layouts/rubyception/application.haml +1 -0
- data/app/views/rubyception/entries/_entry.haml +14 -7
- data/app/views/rubyception/lines/action_view/_render_partial.haml +2 -2
- data/app/views/rubyception/lines/action_view/_render_template.haml +2 -2
- data/app/views/rubyception/lines/active_record/_identity.haml +2 -2
- data/app/views/rubyception/lines/active_record/_sql.haml +3 -3
- data/app/views/rubyception/templates/index.js.erb +4 -0
- data/config/initializers/sass.rb +1 -2
- data/config/initializers/templates.rb +5 -0
- data/config/routes.rb +1 -0
- data/config/{templating.yml → templates.yml} +7 -7
- data/lib/rubyception/engine.rb +27 -0
- data/lib/rubyception/version.rb +1 -1
- metadata +10 -13
- data/app/assets/javascripts/rubyception/shBrushSql.js +0 -66
- data/app/assets/javascripts/rubyception/shCore.js +0 -17
- data/app/assets/javascripts/rubyception/template.js +0 -1
- data/app/assets/stylesheets/rubyception/shCore.css +0 -226
- data/app/assets/stylesheets/rubyception/shThemeDefault.css +0 -117
- data/app/controllers/rubyception/templating_controller.rb +0 -22
- data/config/initializers/websocket_server.rb +0 -22
- data/lib/rubyception/templating.rb +0 -48
- data/lib/tasks/rubyception_tasks.rake +0 -4
- data/lib/tasks/templates.rake +0 -7
@@ -1,117 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* SyntaxHighlighter
|
3
|
-
* http://alexgorbatchev.com/SyntaxHighlighter
|
4
|
-
*
|
5
|
-
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
-
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
|
7
|
-
*
|
8
|
-
* @version
|
9
|
-
* 3.0.83 (July 02 2010)
|
10
|
-
*
|
11
|
-
* @copyright
|
12
|
-
* Copyright (C) 2004-2010 Alex Gorbatchev.
|
13
|
-
*
|
14
|
-
* @license
|
15
|
-
* Dual licensed under the MIT and GPL licenses.
|
16
|
-
*/
|
17
|
-
.syntaxhighlighter {
|
18
|
-
background-color: white !important;
|
19
|
-
}
|
20
|
-
.syntaxhighlighter .line.alt1 {
|
21
|
-
background-color: white !important;
|
22
|
-
}
|
23
|
-
.syntaxhighlighter .line.alt2 {
|
24
|
-
background-color: white !important;
|
25
|
-
}
|
26
|
-
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
|
27
|
-
background-color: #e0e0e0 !important;
|
28
|
-
}
|
29
|
-
.syntaxhighlighter .line.highlighted.number {
|
30
|
-
color: black !important;
|
31
|
-
}
|
32
|
-
.syntaxhighlighter table caption {
|
33
|
-
color: black !important;
|
34
|
-
}
|
35
|
-
.syntaxhighlighter .gutter {
|
36
|
-
color: #afafaf !important;
|
37
|
-
}
|
38
|
-
.syntaxhighlighter .gutter .line {
|
39
|
-
border-right: 3px solid #6ce26c !important;
|
40
|
-
}
|
41
|
-
.syntaxhighlighter .gutter .line.highlighted {
|
42
|
-
background-color: #6ce26c !important;
|
43
|
-
color: white !important;
|
44
|
-
}
|
45
|
-
.syntaxhighlighter.printing .line .content {
|
46
|
-
border: none !important;
|
47
|
-
}
|
48
|
-
.syntaxhighlighter.collapsed {
|
49
|
-
overflow: visible !important;
|
50
|
-
}
|
51
|
-
.syntaxhighlighter.collapsed .toolbar {
|
52
|
-
color: blue !important;
|
53
|
-
background: white !important;
|
54
|
-
border: 1px solid #6ce26c !important;
|
55
|
-
}
|
56
|
-
.syntaxhighlighter.collapsed .toolbar a {
|
57
|
-
color: blue !important;
|
58
|
-
}
|
59
|
-
.syntaxhighlighter.collapsed .toolbar a:hover {
|
60
|
-
color: red !important;
|
61
|
-
}
|
62
|
-
.syntaxhighlighter .toolbar {
|
63
|
-
color: white !important;
|
64
|
-
background: #6ce26c !important;
|
65
|
-
border: none !important;
|
66
|
-
}
|
67
|
-
.syntaxhighlighter .toolbar a {
|
68
|
-
color: white !important;
|
69
|
-
}
|
70
|
-
.syntaxhighlighter .toolbar a:hover {
|
71
|
-
color: black !important;
|
72
|
-
}
|
73
|
-
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
|
74
|
-
color: black !important;
|
75
|
-
}
|
76
|
-
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
|
77
|
-
color: #008200 !important;
|
78
|
-
}
|
79
|
-
.syntaxhighlighter .string, .syntaxhighlighter .string a {
|
80
|
-
color: blue !important;
|
81
|
-
}
|
82
|
-
.syntaxhighlighter .keyword {
|
83
|
-
color: #006699 !important;
|
84
|
-
}
|
85
|
-
.syntaxhighlighter .preprocessor {
|
86
|
-
color: gray !important;
|
87
|
-
}
|
88
|
-
.syntaxhighlighter .variable {
|
89
|
-
color: #aa7700 !important;
|
90
|
-
}
|
91
|
-
.syntaxhighlighter .value {
|
92
|
-
color: #009900 !important;
|
93
|
-
}
|
94
|
-
.syntaxhighlighter .functions {
|
95
|
-
color: #ff1493 !important;
|
96
|
-
}
|
97
|
-
.syntaxhighlighter .constants {
|
98
|
-
color: #0066cc !important;
|
99
|
-
}
|
100
|
-
.syntaxhighlighter .script {
|
101
|
-
font-weight: bold !important;
|
102
|
-
color: #006699 !important;
|
103
|
-
background-color: none !important;
|
104
|
-
}
|
105
|
-
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
|
106
|
-
color: gray !important;
|
107
|
-
}
|
108
|
-
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
|
109
|
-
color: #ff1493 !important;
|
110
|
-
}
|
111
|
-
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
|
112
|
-
color: red !important;
|
113
|
-
}
|
114
|
-
|
115
|
-
.syntaxhighlighter .keyword {
|
116
|
-
font-weight: bold !important;
|
117
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'jenny'
|
2
|
-
class Rubyception::TemplatingController < AbstractController::Base
|
3
|
-
include AbstractController::Logger
|
4
|
-
include AbstractController::Rendering
|
5
|
-
include AbstractController::Layouts
|
6
|
-
include AbstractController::Helpers
|
7
|
-
include AbstractController::Translation
|
8
|
-
include AbstractController::AssetPaths
|
9
|
-
include Rails.application.routes.url_helpers
|
10
|
-
|
11
|
-
self.view_paths = 'app/views'
|
12
|
-
self.assets_dir = 'app/public'
|
13
|
-
|
14
|
-
helper Rubyception::ApplicationHelper,
|
15
|
-
::JennyHelper
|
16
|
-
|
17
|
-
public
|
18
|
-
def r partial
|
19
|
-
render :partial => "rubyception/#{partial}"
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'rubyception/websocket_server'
|
2
|
-
require 'rubyception/subscriber'
|
3
|
-
require 'rubyception/catcher'
|
4
|
-
|
5
|
-
Rubyception::WebsocketServer.sockets = []
|
6
|
-
Rubyception::WebsocketServer.new
|
7
|
-
|
8
|
-
attach_to = [
|
9
|
-
:action_controller,
|
10
|
-
:action_view,
|
11
|
-
:active_record,
|
12
|
-
:action_mailer
|
13
|
-
]
|
14
|
-
attach_to.each do |notification|
|
15
|
-
Rubyception::Subscriber.attach_to notification
|
16
|
-
end
|
17
|
-
|
18
|
-
if defined? ::ActionDispatch::DebugExceptions
|
19
|
-
::ActionDispatch::DebugExceptions.send(:include,Rubyception::ExceptionsCatcher)
|
20
|
-
else
|
21
|
-
::ActionDispatch::ShowExceptions.send(:include,Rubyception::ExceptionsCatcher)
|
22
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# This compiles haml templates into a json object and writes it to
|
2
|
-
# the file app/javascripts/template.js. Its so we can render html
|
3
|
-
# via javascript.
|
4
|
-
|
5
|
-
class Rubyception::Templating
|
6
|
-
def self.r partial
|
7
|
-
t = Rubyception::TemplatingController.new
|
8
|
-
t.r partial
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.append_to_tree template, current
|
12
|
-
keys = current.split('/').collect{|k|"['#{k}']"}.join
|
13
|
-
partials = {}
|
14
|
-
template.each_index do |i|
|
15
|
-
partials[template[i]] = self.r("#{current}/#{template[i]}")
|
16
|
-
end
|
17
|
-
eval "@@templates#{keys} = partials"
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.process_tree template, key=nil, current=''
|
21
|
-
path = "#{current}/#{key}"
|
22
|
-
path = key.to_s if current == ''
|
23
|
-
kind = template.class.to_s
|
24
|
-
case kind
|
25
|
-
when 'Hash'
|
26
|
-
template.each do |k,v|
|
27
|
-
if v.nil?
|
28
|
-
self.append_to_tree [k], path
|
29
|
-
else
|
30
|
-
self.process_tree v, k, path
|
31
|
-
end
|
32
|
-
end
|
33
|
-
when 'Array'
|
34
|
-
self.append_to_tree template, path
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def self.compile
|
39
|
-
yml = File.join(File.dirname(__FILE__),'..','..','config','templating.yml')
|
40
|
-
file = File.open yml
|
41
|
-
templates = YAML::load file
|
42
|
-
@@templates = templates
|
43
|
-
self.process_tree templates
|
44
|
-
js = "Template = #{@@templates.to_json}"
|
45
|
-
path = File.join(File.dirname(__FILE__),'..','..','app','assets','javascripts','rubyception','template.js')
|
46
|
-
File.open(path,'w'){|f|f.write(js)}
|
47
|
-
end
|
48
|
-
end
|