Pimki 1.3.092 → 1.4.092
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 +145 -131
- data/README-PIMKI +15 -5
- data/app/controllers/wiki.rb +167 -54
- data/app/models/author.rb +3 -3
- data/app/models/chunks/chunk.rb +3 -3
- data/app/models/chunks/engines.rb +18 -21
- data/app/models/chunks/include.rb +29 -29
- data/app/models/chunks/literal.rb +20 -20
- data/app/models/chunks/match.rb +19 -19
- data/app/models/chunks/nowiki.rb +31 -31
- data/app/models/chunks/nowiki_test.rb +14 -14
- data/app/models/chunks/test.rb +18 -18
- data/app/models/chunks/todo.rb +44 -23
- data/app/models/chunks/uri.rb +97 -97
- data/app/models/chunks/uri_test.rb +92 -92
- data/app/models/chunks/wiki.rb +4 -4
- data/app/models/chunks/wiki_symbols.rb +22 -22
- data/app/models/chunks/wiki_test.rb +36 -36
- data/app/models/page.rb +39 -7
- data/app/models/page_lock.rb +23 -23
- data/app/models/page_set.rb +72 -72
- data/app/models/page_test.rb +75 -75
- data/app/models/revision.rb +1 -1
- data/app/models/revision_test.rb +251 -251
- data/app/models/web.rb +19 -6
- data/app/models/web_test.rb +52 -52
- data/app/models/wiki_content.rb +131 -119
- data/app/models/wiki_service.rb +31 -16
- data/app/models/wiki_service_test.rb +15 -15
- data/app/models/wiki_words.rb +1 -1
- data/app/models/wiki_words_test.rb +12 -12
- data/app/views/bottom.rhtml +3 -3
- data/app/views/markdown_help.rhtml +15 -15
- data/app/views/menu.rhtml +20 -20
- data/app/views/navigation.rhtml +26 -26
- data/app/views/rdoc_help.rhtml +15 -15
- data/app/views/static_style_sheet.rhtml +237 -237
- data/app/views/style.rhtml +178 -178
- data/app/views/textile_help.rhtml +27 -27
- data/app/views/top.rhtml +7 -2
- data/app/views/wiki/authors.rhtml +15 -15
- data/app/views/wiki/bliki.rhtml +101 -101
- data/app/views/wiki/bliki_edit.rhtml +3 -0
- data/app/views/wiki/bliki_new.rhtml +3 -0
- data/app/views/wiki/bliki_revision.rhtml +90 -90
- data/app/views/wiki/edit.rhtml +12 -3
- data/app/views/wiki/edit_menu.rhtml +64 -47
- data/app/views/wiki/edit_web.rhtml +65 -18
- data/app/views/wiki/export.rhtml +14 -14
- data/app/views/wiki/feeds.rhtml +10 -10
- data/app/views/wiki/list.rhtml +17 -15
- data/app/views/wiki/locked.rhtml +13 -13
- data/app/views/wiki/login.rhtml +10 -10
- data/app/views/wiki/mind.rhtml +0 -1
- data/app/views/wiki/new.rhtml +8 -3
- data/app/views/wiki/new_system.rhtml +77 -77
- data/app/views/wiki/new_web.rhtml +63 -63
- data/app/views/wiki/page.rhtml +88 -82
- data/app/views/wiki/print.rhtml +15 -15
- data/app/views/wiki/published.rhtml +2 -1
- data/app/views/wiki/recently_revised.rhtml +31 -31
- data/app/views/wiki/revision.rhtml +1 -7
- data/app/views/wiki/rollback.rhtml +31 -0
- data/app/views/wiki/rss_feed.rhtml +21 -21
- data/app/views/wiki/search.rhtml +48 -48
- data/app/views/wiki/tex.rhtml +22 -22
- data/app/views/wiki/tex_web.rhtml +34 -34
- data/app/views/wiki/todo.rhtml +90 -67
- data/app/views/wiki/web_list.rhtml +12 -12
- data/app/views/wiki_words_help.rhtml +1 -1
- data/favicon.png +0 -0
- data/libraries/action_controller_servlet.rb +17 -2
- data/libraries/bluecloth.rb +1127 -1127
- data/libraries/diff/diff.rb +474 -474
- data/libraries/diff/diff_test.rb +79 -79
- data/libraries/erb.rb +490 -490
- data/libraries/madeleine/automatic.rb +418 -357
- data/libraries/madeleine/clock.rb +94 -94
- data/libraries/madeleine/files.rb +19 -0
- data/libraries/madeleine/zmarshal.rb +60 -0
- data/libraries/madeleine_service.rb +14 -15
- data/libraries/rdocsupport.rb +155 -155
- data/libraries/redcloth_for_tex.rb +869 -869
- data/libraries/redcloth_for_tex_test.rb +40 -40
- data/libraries/view_helper.rb +32 -32
- data/libraries/web_controller_server.rb +96 -94
- data/pimki.rb +47 -6
- metadata +18 -4
@@ -1,41 +1,41 @@
|
|
1
|
-
require "test/unit"
|
2
|
-
require "redcloth_for_tex"
|
3
|
-
|
4
|
-
class RedClothForTexTest < Test::Unit::TestCase
|
5
|
-
def test_basics
|
6
|
-
assert_equal '{\bf First Page}', RedClothForTex.new("*First Page*").to_tex
|
7
|
-
assert_equal '{\em First Page}', RedClothForTex.new("_First Page_").to_tex
|
8
|
-
assert_equal "\\begin{itemize}\n\t\\item A\n\t\t\\item B\n\t\t\\item C\n\t\\end{itemize}", RedClothForTex.new("* A\n* B\n* C").to_tex
|
9
|
-
end
|
10
|
-
|
11
|
-
def test_blocks
|
12
|
-
assert_equal '\section*{hello}', RedClothForTex.new("h1. hello").to_tex
|
13
|
-
assert_equal '\subsection*{hello}', RedClothForTex.new("h2. hello").to_tex
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_table_of_contents
|
17
|
-
assert_equal(
|
18
|
-
"\n\\section{A}\nAbe\n\n\\subsection{B}\nBabe\n\n\\subsection{C}\n\n\\section{D}\n\n\\subsection{E}\n\n\\subsubsection{F}",
|
19
|
-
table_of_contents("* [[A]]\n** [[B]]\n** [[C]]\n* D\n** [[E]]\n*** F", { "A" => "Abe", "B" => "Babe" } )
|
20
|
-
)
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_entities
|
24
|
-
assert_equal "Beck \\& Fowler are 100\\% cool", RedClothForTex.new("Beck & Fowler are 100% cool").to_tex
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_bracket_links
|
28
|
-
assert_equal "such a Horrible Day, but I won't be Made Useless", RedClothForTex.new("such a [[Horrible Day]], but I won't be [[Made Useless]]").to_tex
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_footnotes_on_abbreviations
|
32
|
-
assert_equal(
|
33
|
-
"such a Horrible Day\\footnote{1}, but I won't be Made Useless",
|
34
|
-
RedClothForTex.new("such a [[Horrible Day]][1], but I won't be [[Made Useless]]").to_tex
|
35
|
-
)
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_subsection_depth
|
39
|
-
assert_equal "\\subsubsection*{Hello}", RedClothForTex.new("h4. Hello").to_tex
|
40
|
-
end
|
1
|
+
require "test/unit"
|
2
|
+
require "redcloth_for_tex"
|
3
|
+
|
4
|
+
class RedClothForTexTest < Test::Unit::TestCase
|
5
|
+
def test_basics
|
6
|
+
assert_equal '{\bf First Page}', RedClothForTex.new("*First Page*").to_tex
|
7
|
+
assert_equal '{\em First Page}', RedClothForTex.new("_First Page_").to_tex
|
8
|
+
assert_equal "\\begin{itemize}\n\t\\item A\n\t\t\\item B\n\t\t\\item C\n\t\\end{itemize}", RedClothForTex.new("* A\n* B\n* C").to_tex
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_blocks
|
12
|
+
assert_equal '\section*{hello}', RedClothForTex.new("h1. hello").to_tex
|
13
|
+
assert_equal '\subsection*{hello}', RedClothForTex.new("h2. hello").to_tex
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_table_of_contents
|
17
|
+
assert_equal(
|
18
|
+
"\n\\section{A}\nAbe\n\n\\subsection{B}\nBabe\n\n\\subsection{C}\n\n\\section{D}\n\n\\subsection{E}\n\n\\subsubsection{F}",
|
19
|
+
table_of_contents("* [[A]]\n** [[B]]\n** [[C]]\n* D\n** [[E]]\n*** F", { "A" => "Abe", "B" => "Babe" } )
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_entities
|
24
|
+
assert_equal "Beck \\& Fowler are 100\\% cool", RedClothForTex.new("Beck & Fowler are 100% cool").to_tex
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_bracket_links
|
28
|
+
assert_equal "such a Horrible Day, but I won't be Made Useless", RedClothForTex.new("such a [[Horrible Day]], but I won't be [[Made Useless]]").to_tex
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_footnotes_on_abbreviations
|
32
|
+
assert_equal(
|
33
|
+
"such a Horrible Day\\footnote{1}, but I won't be Made Useless",
|
34
|
+
RedClothForTex.new("such a [[Horrible Day]][1], but I won't be [[Made Useless]]").to_tex
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_subsection_depth
|
39
|
+
assert_equal "\\subsubsection*{Hello}", RedClothForTex.new("h4. Hello").to_tex
|
40
|
+
end
|
41
41
|
end
|
data/libraries/view_helper.rb
CHANGED
@@ -1,33 +1,33 @@
|
|
1
|
-
module ViewHelper
|
2
|
-
# Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container
|
3
|
-
# where the elements respond to first and last (such as a two-element array), the "lasts" serve as option values and
|
4
|
-
# the "firsts" as option text. Hashes are turned into this form automatically, so the keys become "firsts" and values
|
5
|
-
# become lasts. If +selected+ is specified, the matching "last" or element will get the selected option-tag.
|
6
|
-
#
|
7
|
-
# Examples (call, result):
|
8
|
-
# html_options([["Dollar", "$"], ["Kroner", "DKK"]])
|
9
|
-
# <option value="$">Dollar</option>\n<option value="DKK">Kroner</option>
|
10
|
-
#
|
11
|
-
# html_options([ "VISA", "Mastercard" ], "Mastercard")
|
12
|
-
# <option>VISA</option>\n<option selected>Mastercard</option>
|
13
|
-
#
|
14
|
-
# html_options({ "Basic" => "$20", "Plus" => "$40" }, "$40")
|
15
|
-
# <option value="$20">Basic</option>\n<option value="$40" selected>Plus</option>
|
16
|
-
def html_options(container, selected = nil)
|
17
|
-
container = container.to_a if Hash === container
|
18
|
-
|
19
|
-
html_options = container.inject([]) do |options, element|
|
20
|
-
if element.respond_to?(:first) && element.respond_to?(:last)
|
21
|
-
if element.last != selected
|
22
|
-
options << "<option value=\"#{element.last}\">#{element.first}</option>"
|
23
|
-
else
|
24
|
-
options << "<option value=\"#{element.last}\" selected>#{element.first}</option>"
|
25
|
-
end
|
26
|
-
else
|
27
|
-
options << ((element != selected) ? "<option>#{element}</option>" : "<option selected>#{element}</option>")
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
html_options.join("\n")
|
32
|
-
end
|
1
|
+
module ViewHelper
|
2
|
+
# Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container
|
3
|
+
# where the elements respond to first and last (such as a two-element array), the "lasts" serve as option values and
|
4
|
+
# the "firsts" as option text. Hashes are turned into this form automatically, so the keys become "firsts" and values
|
5
|
+
# become lasts. If +selected+ is specified, the matching "last" or element will get the selected option-tag.
|
6
|
+
#
|
7
|
+
# Examples (call, result):
|
8
|
+
# html_options([["Dollar", "$"], ["Kroner", "DKK"]])
|
9
|
+
# <option value="$">Dollar</option>\n<option value="DKK">Kroner</option>
|
10
|
+
#
|
11
|
+
# html_options([ "VISA", "Mastercard" ], "Mastercard")
|
12
|
+
# <option>VISA</option>\n<option selected>Mastercard</option>
|
13
|
+
#
|
14
|
+
# html_options({ "Basic" => "$20", "Plus" => "$40" }, "$40")
|
15
|
+
# <option value="$20">Basic</option>\n<option value="$40" selected>Plus</option>
|
16
|
+
def html_options(container, selected = nil)
|
17
|
+
container = container.to_a if Hash === container
|
18
|
+
|
19
|
+
html_options = container.inject([]) do |options, element|
|
20
|
+
if element.respond_to?(:first) && element.respond_to?(:last)
|
21
|
+
if element.last != selected
|
22
|
+
options << "<option value=\"#{element.last}\">#{element.first}</option>"
|
23
|
+
else
|
24
|
+
options << "<option value=\"#{element.last}\" selected>#{element.first}</option>"
|
25
|
+
end
|
26
|
+
else
|
27
|
+
options << ((element != selected) ? "<option>#{element}</option>" : "<option selected>#{element}</option>")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
html_options.join("\n")
|
32
|
+
end
|
33
33
|
end
|
@@ -1,95 +1,97 @@
|
|
1
|
-
require 'webrick'
|
2
|
-
include WEBrick
|
3
|
-
|
4
|
-
# Terminology:
|
5
|
-
# * Static controller: Is a controller that has all it's show_* and do_* methods mounted by the server
|
6
|
-
# at server start, so the server will handle request rejection of invalid requests
|
7
|
-
# * Dynamic controller: Is a controller that's mounted with a responsibility to handle all the request mapping
|
8
|
-
# itself. Hence, the server will never reject a request that's below the controller in the path.
|
9
|
-
class WebControllerServer
|
10
|
-
STATIC_MOUNTING = 1
|
11
|
-
DYNAMIC_MOUNTING = 2
|
12
|
-
|
13
|
-
MOUNT_TYPE = DYNAMIC_MOUNTING
|
14
|
-
|
15
|
-
SERVER_TYPE = (RUBY_PLATFORM =~ /mswin/ ? SimpleServer : Daemon)
|
16
|
-
|
17
|
-
def WebControllerServer.the_active_server
|
18
|
-
@the_active_server
|
19
|
-
end
|
20
|
-
def WebControllerServer.the_active_server= server
|
21
|
-
@the_active_server = server
|
22
|
-
end
|
23
|
-
|
24
|
-
def initialize(port, server_type, controller_path)
|
25
|
-
@server = WEBrick::HTTPServer::new(:Port => port, :ServerType => server_type || SERVER_TYPE)
|
26
|
-
WebControllerServer::the_active_server = @server
|
27
|
-
@server.logger.info "Your WEBrick server is now running on http://localhost:#{port}"
|
28
|
-
@controller_path = controller_path
|
29
|
-
mount_controllers
|
30
|
-
start_server
|
31
|
-
end
|
32
|
-
|
33
|
-
private
|
34
|
-
# Mounts all the controllers in the controller_path according to the mount type
|
35
|
-
def mount_controllers
|
36
|
-
require_controller_files
|
37
|
-
|
38
|
-
case MOUNT_TYPE
|
39
|
-
when STATIC_MOUNTING then controller_names.each { |name| mount_static_controller(name) }
|
40
|
-
when DYNAMIC_MOUNTING then controller_names.each { |name| mount_dynamic_controller(name) }
|
41
|
-
end
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
#
|
47
|
-
# If
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
#
|
56
|
-
#
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
1
|
+
require 'webrick'
|
2
|
+
include WEBrick
|
3
|
+
|
4
|
+
# Terminology:
|
5
|
+
# * Static controller: Is a controller that has all it's show_* and do_* methods mounted by the server
|
6
|
+
# at server start, so the server will handle request rejection of invalid requests
|
7
|
+
# * Dynamic controller: Is a controller that's mounted with a responsibility to handle all the request mapping
|
8
|
+
# itself. Hence, the server will never reject a request that's below the controller in the path.
|
9
|
+
class WebControllerServer
|
10
|
+
STATIC_MOUNTING = 1
|
11
|
+
DYNAMIC_MOUNTING = 2
|
12
|
+
|
13
|
+
MOUNT_TYPE = DYNAMIC_MOUNTING
|
14
|
+
|
15
|
+
SERVER_TYPE = (RUBY_PLATFORM =~ /mswin/ ? SimpleServer : Daemon)
|
16
|
+
|
17
|
+
def WebControllerServer.the_active_server
|
18
|
+
@the_active_server
|
19
|
+
end
|
20
|
+
def WebControllerServer.the_active_server= server
|
21
|
+
@the_active_server = server
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize(port, server_type, controller_path)
|
25
|
+
@server = WEBrick::HTTPServer::new(:Port => port, :ServerType => server_type || SERVER_TYPE)
|
26
|
+
WebControllerServer::the_active_server = @server
|
27
|
+
@server.logger.info "Your WEBrick server is now running on http://localhost:#{port}"
|
28
|
+
@controller_path = controller_path
|
29
|
+
mount_controllers
|
30
|
+
start_server
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
# Mounts all the controllers in the controller_path according to the mount type
|
35
|
+
def mount_controllers
|
36
|
+
require_controller_files
|
37
|
+
|
38
|
+
case MOUNT_TYPE
|
39
|
+
when STATIC_MOUNTING then controller_names.each { |name| mount_static_controller(name) }
|
40
|
+
when DYNAMIC_MOUNTING then controller_names.each { |name| mount_dynamic_controller(name) }
|
41
|
+
end
|
42
|
+
|
43
|
+
@server.mount('/favicon.ico', FavIconHandler)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Mounts the controller specified by <tt>controller_name</tt> to accept all requests below it's path.
|
47
|
+
# If more than one controller is mounted by this WebControllerServer, the controller is mounted by name,
|
48
|
+
# such that fx WikiController would get the requests of "/wiki/something" and "/wiki/some/thing/else".
|
49
|
+
# If only one controller is mounted, all requests to this WebControllerServer is handled by that controller
|
50
|
+
def mount_dynamic_controller(controller_name)
|
51
|
+
mount_path = mounting_multiple_controllers? ? "/#{controller_name}" : "/"
|
52
|
+
@server.mount(mount_path, controller_class(controller_name))
|
53
|
+
end
|
54
|
+
|
55
|
+
# Mount all public show_* and do_* methods as actions tied to the controller specified by <tt>controller_name</tt>.
|
56
|
+
# If more than one controller is mounted by this WebControllerServer, the actions are mounted below the controller
|
57
|
+
# in the path, such as "/wiki/page" or "/wiki/list". If only one controller is mounted, they're mounted directly on
|
58
|
+
# the root, such as "/page" or "/list"
|
59
|
+
def mount_static_controller(controller_name)
|
60
|
+
controller_class(controller_name).public_instance_methods(false).each { |method|
|
61
|
+
mount_path = (mounting_multiple_controllers? ? "/#{controller_name}" : "") + "/#{method}"
|
62
|
+
@server.mount(mount_path, controller_class(controller_name))
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# Requires all the controller files that are present in the controller_path
|
67
|
+
def require_controller_files
|
68
|
+
controller_names.each { |controller| require @controller_path + controller }
|
69
|
+
end
|
70
|
+
|
71
|
+
# Returns true if more than one controller exists in the controller_path
|
72
|
+
def mounting_multiple_controllers?
|
73
|
+
controller_names.length > 1
|
74
|
+
end
|
75
|
+
|
76
|
+
# Returns a list of controller names in lower-case from the controller path
|
77
|
+
def controller_names
|
78
|
+
Dir.entries(@controller_path).delete_if { |file| file !~ /rb$/ }.collect{ |c| c[0..-4] }
|
79
|
+
end
|
80
|
+
|
81
|
+
# Returns the class of the controller specified by the <tt>controller_name</tt>
|
82
|
+
def controller_class(controller_name)
|
83
|
+
eval(controller_name.capitalize + "Controller")
|
84
|
+
end
|
85
|
+
|
86
|
+
public
|
87
|
+
|
88
|
+
# Start accepting requests to the defined mount points
|
89
|
+
def start_server
|
90
|
+
@server.start
|
91
|
+
end
|
92
|
+
|
93
|
+
# Stops accepting requests to the defined mount points
|
94
|
+
def shutdown
|
95
|
+
@server.shutdown
|
96
|
+
end
|
95
97
|
end
|
data/pimki.rb
CHANGED
@@ -9,15 +9,18 @@ end
|
|
9
9
|
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), "libraries")
|
10
10
|
begin
|
11
11
|
require 'rubygems'
|
12
|
-
|
13
|
-
|
12
|
+
require 'madeleine'
|
13
|
+
require 'redcloth'
|
14
|
+
require 'bluecloth'
|
14
15
|
require_gem 'rubyzip'
|
16
|
+
require 'zip/zip'
|
15
17
|
|
16
18
|
rescue LoadError => detail
|
17
19
|
# no rubygems, so load from the libraries directory
|
18
20
|
p detail
|
19
21
|
require 'redcloth'
|
20
22
|
require 'bluecloth'
|
23
|
+
require 'zip/zip'
|
21
24
|
end
|
22
25
|
|
23
26
|
### RedCloth Modifications:
|
@@ -26,10 +29,48 @@ RedCloth::GLYPHS.delete_if { |glyph| glyph[1] =~ /class=\"caps\"/ }
|
|
26
29
|
# Fix missing hard_break
|
27
30
|
if RedCloth::VERSION == '3.0.0'
|
28
31
|
class RedCloth #{{{
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
32
|
+
def to_html( *rules )
|
33
|
+
rules = @rules if rules.empty?
|
34
|
+
# make our working copy
|
35
|
+
text = self.dup
|
36
|
+
|
37
|
+
@urlrefs = {}
|
38
|
+
@shelf = []
|
39
|
+
textile_rules = [:refs_textile, :block_textile_table, :block_textile_lists,
|
40
|
+
:block_textile_prefix, :inline_textile_image, :inline_textile_link,
|
41
|
+
:inline_textile_code, :inline_textile_span, :inline_textile_glyphs]
|
42
|
+
markdown_rules = [:refs_markdown, :block_markdown_setext, :block_markdown_atx, :block_markdown_rule,
|
43
|
+
:block_markdown_bq, :block_markdown_lists,
|
44
|
+
:inline_markdown_reflink, :inline_markdown_link]
|
45
|
+
@rules = rules.collect do |rule|
|
46
|
+
case rule
|
47
|
+
when :markdown
|
48
|
+
markdown_rules
|
49
|
+
when :textile
|
50
|
+
textile_rules
|
51
|
+
else
|
52
|
+
rule
|
53
|
+
end
|
54
|
+
end.flatten
|
55
|
+
|
56
|
+
# standard clean up
|
57
|
+
incoming_entities text
|
58
|
+
clean_white_space text
|
59
|
+
|
60
|
+
# start processor
|
61
|
+
pre_list = rip_offtags text
|
62
|
+
refs text
|
63
|
+
blocks text
|
64
|
+
inline text
|
65
|
+
smooth_offtags text, pre_list
|
66
|
+
|
67
|
+
retrieve text
|
68
|
+
hard_break text # PIMKI: this is the missing bit!
|
69
|
+
|
70
|
+
text.gsub!( /<\/?notextile>/, '' )
|
71
|
+
text.gsub!( /x%x%/, '&' )
|
72
|
+
text.strip!
|
73
|
+
text
|
33
74
|
end
|
34
75
|
end #}}}
|
35
76
|
else
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.4
|
3
3
|
specification_version: 1
|
4
4
|
name: Pimki
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.
|
7
|
-
date:
|
6
|
+
version: 1.4.092
|
7
|
+
date: 2005-01-16
|
8
8
|
summary: A Personal Information Manager (PIM) based on the Wiki technology of Instiki.
|
9
9
|
require_paths:
|
10
10
|
- libraries
|
@@ -30,6 +30,7 @@ files:
|
|
30
30
|
- pimki.rb
|
31
31
|
- README
|
32
32
|
- README-PIMKI
|
33
|
+
- favicon.png
|
33
34
|
- "./pimki.rb"
|
34
35
|
- app/controllers
|
35
36
|
- app/models
|
@@ -99,6 +100,7 @@ files:
|
|
99
100
|
- app/views/wiki/published.rhtml
|
100
101
|
- app/views/wiki/recently_revised.rhtml
|
101
102
|
- app/views/wiki/revision.rhtml
|
103
|
+
- app/views/wiki/rollback.rhtml
|
102
104
|
- app/views/wiki/rss_feed.rhtml
|
103
105
|
- app/views/wiki/search.rhtml
|
104
106
|
- app/views/wiki/tex.rhtml
|
@@ -120,6 +122,8 @@ files:
|
|
120
122
|
- libraries/diff/diff_test.rb
|
121
123
|
- libraries/madeleine/automatic.rb
|
122
124
|
- libraries/madeleine/clock.rb
|
125
|
+
- libraries/madeleine/files.rb
|
126
|
+
- libraries/madeleine/zmarshal.rb
|
123
127
|
test_files: []
|
124
128
|
rdoc_options: []
|
125
129
|
extra_rdoc_files: []
|
@@ -139,6 +143,16 @@ dependencies:
|
|
139
143
|
- !ruby/object:Gem::Version
|
140
144
|
version: 3.0.0
|
141
145
|
version:
|
146
|
+
- !ruby/object:Gem::Dependency
|
147
|
+
name: BlueCloth
|
148
|
+
version_requirement:
|
149
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
150
|
+
requirements:
|
151
|
+
-
|
152
|
+
- ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: 1.0.0
|
155
|
+
version:
|
142
156
|
- !ruby/object:Gem::Dependency
|
143
157
|
name: rubyzip
|
144
158
|
version_requirement:
|
@@ -157,5 +171,5 @@ dependencies:
|
|
157
171
|
-
|
158
172
|
- ">="
|
159
173
|
- !ruby/object:Gem::Version
|
160
|
-
version: 0.
|
174
|
+
version: 0.7.1
|
161
175
|
version:
|