ramaze 0.0.6
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/Rakefile +360 -0
- data/bin/ramaze +152 -0
- data/doc/CHANGELOG +2021 -0
- data/doc/COPYING +56 -0
- data/doc/COPYING.ja +51 -0
- data/doc/README +275 -0
- data/doc/TODO +33 -0
- data/doc/allison/LICENSE +184 -0
- data/doc/allison/README +37 -0
- data/doc/allison/allison.css +300 -0
- data/doc/allison/allison.gif +0 -0
- data/doc/allison/allison.js +307 -0
- data/doc/allison/allison.rb +287 -0
- data/doc/allison/cache/BODY +588 -0
- data/doc/allison/cache/CLASS_INDEX +4 -0
- data/doc/allison/cache/CLASS_PAGE +1 -0
- data/doc/allison/cache/FILE_INDEX +4 -0
- data/doc/allison/cache/FILE_PAGE +1 -0
- data/doc/allison/cache/FONTS +1 -0
- data/doc/allison/cache/FR_INDEX_BODY +1 -0
- data/doc/allison/cache/IMGPATH +1 -0
- data/doc/allison/cache/INDEX +1 -0
- data/doc/allison/cache/JAVASCRIPT +307 -0
- data/doc/allison/cache/METHOD_INDEX +4 -0
- data/doc/allison/cache/METHOD_LIST +1 -0
- data/doc/allison/cache/SRC_PAGE +1 -0
- data/doc/allison/cache/STYLE +322 -0
- data/doc/allison/cache/URL +1 -0
- data/examples/blog/main.rb +16 -0
- data/examples/blog/public/screen.css +106 -0
- data/examples/blog/src/controller.rb +50 -0
- data/examples/blog/src/element.rb +53 -0
- data/examples/blog/src/model.rb +29 -0
- data/examples/blog/template/edit.xhtml +6 -0
- data/examples/blog/template/index.xhtml +24 -0
- data/examples/blog/template/new.xhtml +5 -0
- data/examples/blog/template/view.xhtml +15 -0
- data/examples/blog/test/tc_entry.rb +18 -0
- data/examples/caching.rb +23 -0
- data/examples/element.rb +40 -0
- data/examples/hello.rb +23 -0
- data/examples/simple.rb +60 -0
- data/examples/templates/template/external.haml +21 -0
- data/examples/templates/template/external.liquid +28 -0
- data/examples/templates/template/external.mab +27 -0
- data/examples/templates/template/external.rhtml +29 -0
- data/examples/templates/template/external.rmze +24 -0
- data/examples/templates/template_erubis.rb +50 -0
- data/examples/templates/template_haml.rb +48 -0
- data/examples/templates/template_liquid.rb +64 -0
- data/examples/templates/template_markaby.rb +52 -0
- data/examples/templates/template_ramaze.rb +49 -0
- data/examples/whywiki/main.rb +56 -0
- data/examples/whywiki/template/edit.xhtml +14 -0
- data/examples/whywiki/template/show.xhtml +17 -0
- data/lib/proto/conf/benchmark.yaml +35 -0
- data/lib/proto/conf/debug.yaml +34 -0
- data/lib/proto/conf/live.yaml +33 -0
- data/lib/proto/conf/silent.yaml +31 -0
- data/lib/proto/conf/stage.yaml +33 -0
- data/lib/proto/main.rb +18 -0
- data/lib/proto/public/404.jpg +0 -0
- data/lib/proto/public/css/coderay.css +105 -0
- data/lib/proto/public/css/ramaze_error.css +42 -0
- data/lib/proto/public/error.xhtml +74 -0
- data/lib/proto/public/favicon.ico +0 -0
- data/lib/proto/public/js/jquery.js +1923 -0
- data/lib/proto/public/ramaze.png +0 -0
- data/lib/proto/src/controller/main.rb +7 -0
- data/lib/proto/src/element/page.rb +16 -0
- data/lib/proto/src/model.rb +5 -0
- data/lib/proto/template/index.xhtml +6 -0
- data/lib/ramaze.rb +317 -0
- data/lib/ramaze/adapter/mongrel.rb +111 -0
- data/lib/ramaze/adapter/webrick.rb +161 -0
- data/lib/ramaze/cache.rb +11 -0
- data/lib/ramaze/cache/memcached.rb +52 -0
- data/lib/ramaze/cache/memory.rb +6 -0
- data/lib/ramaze/cache/yaml_store.rb +37 -0
- data/lib/ramaze/controller.rb +10 -0
- data/lib/ramaze/dispatcher.rb +315 -0
- data/lib/ramaze/error.rb +11 -0
- data/lib/ramaze/gestalt.rb +108 -0
- data/lib/ramaze/global.rb +120 -0
- data/lib/ramaze/helper.rb +32 -0
- data/lib/ramaze/helper/aspect.rb +189 -0
- data/lib/ramaze/helper/auth.rb +120 -0
- data/lib/ramaze/helper/cache.rb +52 -0
- data/lib/ramaze/helper/feed.rb +135 -0
- data/lib/ramaze/helper/form.rb +204 -0
- data/lib/ramaze/helper/link.rb +80 -0
- data/lib/ramaze/helper/redirect.rb +48 -0
- data/lib/ramaze/helper/stack.rb +67 -0
- data/lib/ramaze/http_status.rb +66 -0
- data/lib/ramaze/inform.rb +166 -0
- data/lib/ramaze/snippets.rb +5 -0
- data/lib/ramaze/snippets/hash/keys_to_sym.rb +19 -0
- data/lib/ramaze/snippets/kernel/aquire.rb +22 -0
- data/lib/ramaze/snippets/kernel/autoreload.rb +79 -0
- data/lib/ramaze/snippets/kernel/caller_lines.rb +58 -0
- data/lib/ramaze/snippets/kernel/constant.rb +24 -0
- data/lib/ramaze/snippets/kernel/rescue_require.rb +12 -0
- data/lib/ramaze/snippets/kernel/self_method.rb +41 -0
- data/lib/ramaze/snippets/kernel/silently.rb +13 -0
- data/lib/ramaze/snippets/object/traits.rb +60 -0
- data/lib/ramaze/snippets/openstruct/temp.rb +10 -0
- data/lib/ramaze/snippets/string/DIVIDE.rb +16 -0
- data/lib/ramaze/snippets/string/camel_case.rb +14 -0
- data/lib/ramaze/snippets/string/snake_case.rb +12 -0
- data/lib/ramaze/snippets/symbol/to_proc.rb +14 -0
- data/lib/ramaze/snippets/thread/deadQUESTIONMARK.rb +11 -0
- data/lib/ramaze/store/default.rb +48 -0
- data/lib/ramaze/template.rb +102 -0
- data/lib/ramaze/template/amrita2.rb +40 -0
- data/lib/ramaze/template/erubis.rb +58 -0
- data/lib/ramaze/template/haml.rb +65 -0
- data/lib/ramaze/template/haml/actionview_stub.rb +20 -0
- data/lib/ramaze/template/liquid.rb +74 -0
- data/lib/ramaze/template/markaby.rb +68 -0
- data/lib/ramaze/template/ramaze.rb +177 -0
- data/lib/ramaze/template/ramaze/element.rb +166 -0
- data/lib/ramaze/template/ramaze/morpher.rb +156 -0
- data/lib/ramaze/tool/create.rb +70 -0
- data/lib/ramaze/tool/tidy.rb +71 -0
- data/lib/ramaze/trinity.rb +38 -0
- data/lib/ramaze/trinity/request.rb +244 -0
- data/lib/ramaze/trinity/response.rb +41 -0
- data/lib/ramaze/trinity/session.rb +129 -0
- data/lib/ramaze/version.rb +14 -0
- data/spec/spec_all.rb +73 -0
- data/spec/spec_helper.rb +215 -0
- data/spec/tc_adapter_mongrel.rb +24 -0
- data/spec/tc_adapter_webrick.rb +22 -0
- data/spec/tc_cache.rb +79 -0
- data/spec/tc_controller.rb +39 -0
- data/spec/tc_element.rb +100 -0
- data/spec/tc_error.rb +23 -0
- data/spec/tc_gestalt.rb +90 -0
- data/spec/tc_global.rb +46 -0
- data/spec/tc_helper_aspect.rb +65 -0
- data/spec/tc_helper_auth.rb +61 -0
- data/spec/tc_helper_cache.rb +81 -0
- data/spec/tc_helper_feed.rb +129 -0
- data/spec/tc_helper_form.rb +146 -0
- data/spec/tc_helper_link.rb +58 -0
- data/spec/tc_helper_redirect.rb +51 -0
- data/spec/tc_helper_stack.rb +55 -0
- data/spec/tc_morpher.rb +90 -0
- data/spec/tc_params.rb +84 -0
- data/spec/tc_request.rb +111 -0
- data/spec/tc_session.rb +56 -0
- data/spec/tc_store.rb +25 -0
- data/spec/tc_template_amrita2.rb +34 -0
- data/spec/tc_template_erubis.rb +41 -0
- data/spec/tc_template_haml.rb +44 -0
- data/spec/tc_template_liquid.rb +98 -0
- data/spec/tc_template_markaby.rb +74 -0
- data/spec/tc_template_ramaze.rb +54 -0
- data/spec/tc_tidy.rb +14 -0
- data/spec/template/amrita2/data.html +6 -0
- data/spec/template/amrita2/index.html +1 -0
- data/spec/template/amrita2/sum.html +1 -0
- data/spec/template/erubis/sum.rhtml +1 -0
- data/spec/template/haml/index.haml +5 -0
- data/spec/template/haml/with_vars.haml +4 -0
- data/spec/template/liquid/index.liquid +1 -0
- data/spec/template/liquid/products.liquid +45 -0
- data/spec/template/markaby/external.mab +8 -0
- data/spec/template/markaby/sum.mab +1 -0
- data/spec/template/ramaze/file_only.rmze +1 -0
- data/spec/template/ramaze/index.rmze +1 -0
- data/spec/template/ramaze/nested.rmze +1 -0
- data/spec/template/ramaze/sum.rmze +1 -0
- metadata +317 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<title>MicroWiki Edit #{@page}</title>
|
|
4
|
+
</head>
|
|
5
|
+
#{ link(R(self), :title => "< Home") }
|
|
6
|
+
<body>
|
|
7
|
+
<h1>Edit #{@page}</h1>
|
|
8
|
+
<form method="POST" action="#{R(self, :save)}">
|
|
9
|
+
<input type="hidden" name="page" value="#{CGI.escape(@page)}" />
|
|
10
|
+
<textarea name="text" style="width: 90%; height: 20em;">#{@text}</textarea>
|
|
11
|
+
<input type="submit" />
|
|
12
|
+
</form>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<title>MicroWiki #{@page}</title>
|
|
4
|
+
</head>
|
|
5
|
+
#{ link(R(self), :title => "< Home") unless @page == "Home" }
|
|
6
|
+
<body>
|
|
7
|
+
<h1>#{@page}</h1>
|
|
8
|
+
<?r if @text.empty? ?>
|
|
9
|
+
#{ link(R(self, :edit, CGI.escape(@page)), :title => "Create #{@page}?") }
|
|
10
|
+
<?r else ?>
|
|
11
|
+
<div>
|
|
12
|
+
#{ link(R(self, :edit, CGI.escape(@page)), :title => "Edit #{@page}") }
|
|
13
|
+
#{@text}
|
|
14
|
+
</div>
|
|
15
|
+
<?r end ?>
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
port: !ruby/range
|
|
3
|
+
begin: 7000
|
|
4
|
+
end: 7000
|
|
5
|
+
|
|
6
|
+
adapter: :webrick
|
|
7
|
+
|
|
8
|
+
template_root: "template"
|
|
9
|
+
|
|
10
|
+
mapping:
|
|
11
|
+
/: :MainController
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
host: 0.0.0.0
|
|
15
|
+
tidy: false
|
|
16
|
+
cookies: true
|
|
17
|
+
error_page: true
|
|
18
|
+
autoreload: 60
|
|
19
|
+
|
|
20
|
+
cache: :MemoryCache
|
|
21
|
+
cache_all: false
|
|
22
|
+
|
|
23
|
+
inform_to: "stdout"
|
|
24
|
+
inform_timestamp: "%Y-%m-%d %H:%M:%S"
|
|
25
|
+
inform_prefix_error: "ERROR"
|
|
26
|
+
inform_prefix_debug: "DEBUG"
|
|
27
|
+
inform_prefix_info: "INFO "
|
|
28
|
+
inform_backtrace_size: 10
|
|
29
|
+
|
|
30
|
+
inform_tags: !ruby/object:Set
|
|
31
|
+
hash:
|
|
32
|
+
:benchmark: true
|
|
33
|
+
:debug: true
|
|
34
|
+
:info: true
|
|
35
|
+
:error: true
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
port: !ruby/range
|
|
3
|
+
begin: 7000
|
|
4
|
+
end: 7000
|
|
5
|
+
|
|
6
|
+
adapter: :webrick
|
|
7
|
+
|
|
8
|
+
template_root: "template"
|
|
9
|
+
|
|
10
|
+
mapping:
|
|
11
|
+
/: :MainController
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
host: 0.0.0.0
|
|
15
|
+
tidy: false
|
|
16
|
+
cookies: true
|
|
17
|
+
error_page: true
|
|
18
|
+
autoreload: 5
|
|
19
|
+
|
|
20
|
+
cache: :MemoryCache
|
|
21
|
+
cache_all: false
|
|
22
|
+
|
|
23
|
+
inform_to: "stdout"
|
|
24
|
+
inform_timestamp: "%Y-%m-%d %H:%M:%S"
|
|
25
|
+
inform_prefix_error: "ERROR"
|
|
26
|
+
inform_prefix_debug: "DEBUG"
|
|
27
|
+
inform_prefix_info: "INFO "
|
|
28
|
+
inform_backtrace_size: 10
|
|
29
|
+
|
|
30
|
+
inform_tags: !ruby/object:Set
|
|
31
|
+
hash:
|
|
32
|
+
:debug: true
|
|
33
|
+
:info: true
|
|
34
|
+
:error: true
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
port: !ruby/range
|
|
3
|
+
begin: 7000
|
|
4
|
+
end: 7000
|
|
5
|
+
|
|
6
|
+
adapter: :webrick
|
|
7
|
+
|
|
8
|
+
template_root: "template"
|
|
9
|
+
|
|
10
|
+
mapping:
|
|
11
|
+
/: :MainController
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
host: 0.0.0.0
|
|
15
|
+
tidy: false
|
|
16
|
+
cookies: true
|
|
17
|
+
error_page: true
|
|
18
|
+
autoreload: 60
|
|
19
|
+
|
|
20
|
+
cache: :MemoryCache
|
|
21
|
+
cache_all: false
|
|
22
|
+
|
|
23
|
+
inform_to: "log/all"
|
|
24
|
+
inform_timestamp: "%Y-%m-%d %H:%M:%S"
|
|
25
|
+
inform_prefix_error: "ERROR"
|
|
26
|
+
inform_prefix_debug: "DEBUG"
|
|
27
|
+
inform_prefix_info: "INFO "
|
|
28
|
+
inform_backtrace_size: 10
|
|
29
|
+
|
|
30
|
+
inform_tags: !ruby/object:Set
|
|
31
|
+
hash:
|
|
32
|
+
:info: true
|
|
33
|
+
:error: true
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
port: !ruby/range
|
|
3
|
+
begin: 7000
|
|
4
|
+
end: 7000
|
|
5
|
+
|
|
6
|
+
adapter: :webrick
|
|
7
|
+
|
|
8
|
+
template_root: "template"
|
|
9
|
+
|
|
10
|
+
mapping:
|
|
11
|
+
/: :MainController
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
host: 0.0.0.0
|
|
15
|
+
tidy: false
|
|
16
|
+
cookies: true
|
|
17
|
+
error_page: true
|
|
18
|
+
autoreload: 60
|
|
19
|
+
|
|
20
|
+
cache: :MemoryCache
|
|
21
|
+
cache_all: false
|
|
22
|
+
|
|
23
|
+
inform_to: "stdout"
|
|
24
|
+
inform_timestamp: "%Y-%m-%d %H:%M:%S"
|
|
25
|
+
inform_prefix_error: "ERROR"
|
|
26
|
+
inform_prefix_debug: "DEBUG"
|
|
27
|
+
inform_prefix_info: "INFO "
|
|
28
|
+
inform_backtrace_size: 10
|
|
29
|
+
|
|
30
|
+
inform_tags: !ruby/object:Set
|
|
31
|
+
hash: {}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
port: !ruby/range
|
|
3
|
+
begin: 7000
|
|
4
|
+
end: 7000
|
|
5
|
+
|
|
6
|
+
adapter: :webrick
|
|
7
|
+
|
|
8
|
+
template_root: "template"
|
|
9
|
+
|
|
10
|
+
mapping:
|
|
11
|
+
/: :MainController
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
host: 0.0.0.0
|
|
15
|
+
tidy: false
|
|
16
|
+
cookies: true
|
|
17
|
+
error_page: true
|
|
18
|
+
autoreload: 60
|
|
19
|
+
|
|
20
|
+
cache: :MemoryCache
|
|
21
|
+
cache_all: false
|
|
22
|
+
|
|
23
|
+
inform_to: "stdout"
|
|
24
|
+
inform_timestamp: "%Y-%m-%d %H:%M:%S"
|
|
25
|
+
inform_prefix_error: "ERROR"
|
|
26
|
+
inform_prefix_debug: "DEBUG"
|
|
27
|
+
inform_prefix_info: "INFO "
|
|
28
|
+
inform_backtrace_size: 10
|
|
29
|
+
|
|
30
|
+
inform_tags: !ruby/object:Set
|
|
31
|
+
hash:
|
|
32
|
+
:info: true
|
|
33
|
+
:error: true
|
data/lib/proto/main.rb
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Copyright (c) 2006 Michael Fellinger m.fellinger@gmail.com
|
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
|
3
|
+
|
|
4
|
+
require 'ramaze'
|
|
5
|
+
|
|
6
|
+
include Ramaze
|
|
7
|
+
|
|
8
|
+
require 'src/controller/main'
|
|
9
|
+
require 'src/element/page'
|
|
10
|
+
require 'src/model'
|
|
11
|
+
|
|
12
|
+
# mode selects the config-file.
|
|
13
|
+
# benchmark | debug | stage | live | silent
|
|
14
|
+
mode = 'debug'
|
|
15
|
+
|
|
16
|
+
Global.setup YAML.load_file("conf/#{mode}.yaml")
|
|
17
|
+
|
|
18
|
+
start
|
|
Binary file
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
.CodeRay {
|
|
2
|
+
background-color: #f8f8f8;
|
|
3
|
+
border: 1px solid silver;
|
|
4
|
+
font-family: 'Courier New', 'Terminal', monospace;
|
|
5
|
+
color: #100;
|
|
6
|
+
}
|
|
7
|
+
.CodeRay pre { margin: 0px }
|
|
8
|
+
|
|
9
|
+
div.CodeRay { }
|
|
10
|
+
|
|
11
|
+
span.CodeRay { white-space: pre; border: 0px; padding: 2px }
|
|
12
|
+
|
|
13
|
+
table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px }
|
|
14
|
+
table.CodeRay td { padding: 2px 4px; vertical-align: top }
|
|
15
|
+
|
|
16
|
+
.CodeRay .line_numbers, .CodeRay .no {
|
|
17
|
+
background-color: #def;
|
|
18
|
+
color: gray;
|
|
19
|
+
text-align: right;
|
|
20
|
+
}
|
|
21
|
+
.CodeRay .line_numbers tt { font-weight: bold }
|
|
22
|
+
.CodeRay .no { padding: 0px 4px }
|
|
23
|
+
.CodeRay .code { width: 100% }
|
|
24
|
+
|
|
25
|
+
ol.CodeRay { font-size: 10pt }
|
|
26
|
+
ol.CodeRay li { white-space: pre }
|
|
27
|
+
|
|
28
|
+
.CodeRay .code pre { overflow: auto }
|
|
29
|
+
|
|
30
|
+
.CodeRay .af { color:#00C }
|
|
31
|
+
.CodeRay .an { color:#007 }
|
|
32
|
+
.CodeRay .av { color:#700 }
|
|
33
|
+
.CodeRay .aw { color:#C00 }
|
|
34
|
+
.CodeRay .bi { color:#509; font-weight:bold }
|
|
35
|
+
.CodeRay .c { color:#888 }
|
|
36
|
+
|
|
37
|
+
.CodeRay .ch { color:#04D }
|
|
38
|
+
.CodeRay .ch .k { color:#04D }
|
|
39
|
+
.CodeRay .ch .dl { color:#039 }
|
|
40
|
+
|
|
41
|
+
.CodeRay .cl { color:#B06; font-weight:bold }
|
|
42
|
+
.CodeRay .co { color:#036; font-weight:bold }
|
|
43
|
+
.CodeRay .cr { color:#0A0 }
|
|
44
|
+
.CodeRay .cv { color:#369 }
|
|
45
|
+
.CodeRay .df { color:#099; font-weight:bold }
|
|
46
|
+
.CodeRay .di { color:#088; font-weight:bold }
|
|
47
|
+
.CodeRay .dl { color:black }
|
|
48
|
+
.CodeRay .do { color:#970 }
|
|
49
|
+
.CodeRay .ds { color:#D42; font-weight:bold }
|
|
50
|
+
.CodeRay .e { color:#666; font-weight:bold }
|
|
51
|
+
.CodeRay .en { color:#800; font-weight:bold }
|
|
52
|
+
.CodeRay .er { color:#F00; background-color:#FAA }
|
|
53
|
+
.CodeRay .ex { color:#F00; font-weight:bold }
|
|
54
|
+
.CodeRay .fl { color:#60E; font-weight:bold }
|
|
55
|
+
.CodeRay .fu { color:#06B; font-weight:bold }
|
|
56
|
+
.CodeRay .gv { color:#d70; font-weight:bold }
|
|
57
|
+
.CodeRay .hx { color:#058; font-weight:bold }
|
|
58
|
+
.CodeRay .i { color:#00D; font-weight:bold }
|
|
59
|
+
.CodeRay .ic { color:#B44; font-weight:bold }
|
|
60
|
+
|
|
61
|
+
.CodeRay .il { background: #eee }
|
|
62
|
+
.CodeRay .il .il { background: #ddd }
|
|
63
|
+
.CodeRay .il .il .il { background: #ccc }
|
|
64
|
+
.CodeRay .il .idl { font-weight: bold; color: #888 }
|
|
65
|
+
|
|
66
|
+
.CodeRay .in { color:#B2B; font-weight:bold }
|
|
67
|
+
.CodeRay .iv { color:#33B }
|
|
68
|
+
.CodeRay .la { color:#970; font-weight:bold }
|
|
69
|
+
.CodeRay .lv { color:#963 }
|
|
70
|
+
.CodeRay .oc { color:#40E; font-weight:bold }
|
|
71
|
+
.CodeRay .on { color:#000; font-weight:bold }
|
|
72
|
+
.CodeRay .op { }
|
|
73
|
+
.CodeRay .pc { color:#038; font-weight:bold }
|
|
74
|
+
.CodeRay .pd { color:#369; font-weight:bold }
|
|
75
|
+
.CodeRay .pp { color:#579 }
|
|
76
|
+
.CodeRay .pt { color:#339; font-weight:bold }
|
|
77
|
+
.CodeRay .r { color:#080; font-weight:bold }
|
|
78
|
+
|
|
79
|
+
.CodeRay .rx { background-color:#fff0ff }
|
|
80
|
+
.CodeRay .rx .k { color:#808 }
|
|
81
|
+
.CodeRay .rx .dl { color:#404 }
|
|
82
|
+
.CodeRay .rx .mod { color:#C2C }
|
|
83
|
+
.CodeRay .rx .fu { color:#404; font-weight: bold }
|
|
84
|
+
|
|
85
|
+
.CodeRay .s { background-color:#fff0f0 }
|
|
86
|
+
.CodeRay .s .s { background-color:#ffe0e0 }
|
|
87
|
+
.CodeRay .s .s .s { background-color:#ffd0d0 }
|
|
88
|
+
.CodeRay .s .k { color:#D20 }
|
|
89
|
+
.CodeRay .s .dl { color:#710 }
|
|
90
|
+
|
|
91
|
+
.CodeRay .sh { background-color:#f0fff0 }
|
|
92
|
+
.CodeRay .sh .k { color:#2B2 }
|
|
93
|
+
.CodeRay .sh .dl { color:#161 }
|
|
94
|
+
|
|
95
|
+
.CodeRay .sy { color:#A60 }
|
|
96
|
+
.CodeRay .sy .k { color:#A60 }
|
|
97
|
+
.CodeRay .sy .dl { color:#630 }
|
|
98
|
+
|
|
99
|
+
.CodeRay .ta { color:#070 }
|
|
100
|
+
.CodeRay .tf { color:#070; font-weight:bold }
|
|
101
|
+
.CodeRay .ts { color:#D70; font-weight:bold }
|
|
102
|
+
.CodeRay .ty { color:#339; font-weight:bold }
|
|
103
|
+
.CodeRay .v { color:#036 }
|
|
104
|
+
.CodeRay .xt { color:#444 }
|
|
105
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
img#logo {
|
|
2
|
+
float:left;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
h1.main {
|
|
6
|
+
text-align: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
table.main {
|
|
10
|
+
background: #000;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
table.main tr.head {
|
|
14
|
+
background: #fee;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
table.main tr.source_container {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
tr.source_container div {
|
|
23
|
+
width: 100%;
|
|
24
|
+
overflow: auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
tr.source_container div table {
|
|
28
|
+
background: #ddd;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
tr.source_container div table tr {
|
|
33
|
+
text-align:center;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
tr.source_container div table tr.source {
|
|
37
|
+
text-align:left;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
div.source {
|
|
41
|
+
background: #fff;
|
|
42
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<title>#{@title}</title>
|
|
4
|
+
<link rel="stylesheet" href="/css/coderay.css" />
|
|
5
|
+
<link rel="stylesheet" href="/css/ramaze_error.css" />
|
|
6
|
+
<script type="text/javascript" src="/js/jquery.js"></script>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<img id="logo" alt="Ramaze" src="/ramaze.png" />
|
|
10
|
+
|
|
11
|
+
<h1>#{@title}</h1>
|
|
12
|
+
|
|
13
|
+
<table class="main">
|
|
14
|
+
<tr class="head">
|
|
15
|
+
<td>File</td><td>Line</td><td>Method</td>
|
|
16
|
+
</tr>
|
|
17
|
+
<?r @backtrace.each do |lines, hash, file, lineno, meth| ?>
|
|
18
|
+
<tr id="line_#{hash}" style="background:rgb(#{@colors.shift},70,60);">
|
|
19
|
+
<td>#{file}</td><td>#{lineno}</td><td>#{meth}</td>
|
|
20
|
+
</tr>
|
|
21
|
+
<tr id="source_#{hash}" style="display:none;">
|
|
22
|
+
<td colspan="3">
|
|
23
|
+
<div class="source">
|
|
24
|
+
<table style="width:100%;">
|
|
25
|
+
<tr>
|
|
26
|
+
<td colspan="2">vim #{file} +#{lineno}</td>
|
|
27
|
+
</tr>
|
|
28
|
+
<?r
|
|
29
|
+
if @coderay
|
|
30
|
+
code = lines.map{|no, code, cur| code}.join("\n")
|
|
31
|
+
line = lines.first[0]
|
|
32
|
+
options = {
|
|
33
|
+
:wrap => :div,
|
|
34
|
+
:line_numbers => :inline,
|
|
35
|
+
:line_number_start => line
|
|
36
|
+
}
|
|
37
|
+
?>
|
|
38
|
+
#{CodeRay.scan(code, :ruby).html(options)}
|
|
39
|
+
<?r else ?>
|
|
40
|
+
<?r lines.each do |llineno, lcode, lcurrent| ?>
|
|
41
|
+
<tr class="source" #{'style="background:#faa;"' if lcurrent}>
|
|
42
|
+
<td>#{llineno}</td>
|
|
43
|
+
<td>#{lcode.rstrip}</td>
|
|
44
|
+
</tr>
|
|
45
|
+
<?r end ?>
|
|
46
|
+
<?r end ?>
|
|
47
|
+
</table>
|
|
48
|
+
</div>
|
|
49
|
+
<script type="text/javascript">
|
|
50
|
+
$("tr#line_#{hash}").click(function(){$("tr#source_#{hash}").toggle()});
|
|
51
|
+
</script>
|
|
52
|
+
</td>
|
|
53
|
+
</tr>
|
|
54
|
+
<?r end ?>
|
|
55
|
+
</table>
|
|
56
|
+
<?r
|
|
57
|
+
{
|
|
58
|
+
'Session' => Thread.current[:session],
|
|
59
|
+
'Request' => Thread.current[:request],
|
|
60
|
+
'Response' => Thread.current[:response],
|
|
61
|
+
'Global' => Global,
|
|
62
|
+
}.each do |title, content|
|
|
63
|
+
hash = [title, content].object_id.abs
|
|
64
|
+
?>
|
|
65
|
+
<div class="additional">
|
|
66
|
+
<h3 id="show_#{hash}">#{title}</h3>
|
|
67
|
+
<pre style="display:none" id="is_#{hash}">#{content.pretty_inspect}</pre>
|
|
68
|
+
<script type="text/javascript">
|
|
69
|
+
$("h3#show_#{hash}").click(function(){$("pre#is_#{hash}").toggle()});
|
|
70
|
+
</script>
|
|
71
|
+
</div>
|
|
72
|
+
<?r end ?>
|
|
73
|
+
</body>
|
|
74
|
+
</html>
|