ruwiki 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.rubygems +86 -0
- data/Readme.tarfile +65 -0
- data/bin/ruwiki +58 -0
- data/bin/ruwiki.cgi +87 -0
- data/bin/ruwiki_convert +56 -0
- data/bin/ruwiki_service.rb +82 -0
- data/bin/ruwiki_servlet +53 -0
- data/contrib/enscript-token.rb +55 -0
- data/contrib/rublog_integrator.rb +68 -0
- data/data/Default/ProjectIndex.ruwiki +49 -0
- data/data/Ruwiki/Antispam.ruwiki +65 -0
- data/data/Ruwiki/BugTracking.ruwiki +33 -0
- data/data/Ruwiki/ChangeLog.ruwiki +102 -0
- data/data/Ruwiki/Configuring_Ruwiki.ruwiki +151 -0
- data/data/Ruwiki/Extending_Ruwiki.ruwiki +317 -0
- data/data/Ruwiki/LicenseAndAuthorInfo.ruwiki +30 -0
- data/data/Ruwiki/ProjectIndex.ruwiki +84 -0
- data/data/Ruwiki/Roadmap.ruwiki +225 -0
- data/data/Ruwiki/RuwikiTemplatingLibrary.ruwiki +156 -0
- data/data/Ruwiki/RuwikiUtilities.ruwiki +157 -0
- data/data/Ruwiki/SandBox.ruwiki +9 -0
- data/data/Ruwiki/To_Do.ruwiki +51 -0
- data/data/Ruwiki/TroubleShooting.ruwiki +33 -0
- data/data/Ruwiki/WikiFeatures.ruwiki +17 -0
- data/data/Ruwiki/WikiMarkup.ruwiki +261 -0
- data/data/Tutorial/AddingPages.ruwiki +16 -0
- data/data/Tutorial/AddingProjects.ruwiki +16 -0
- data/data/Tutorial/ProjectIndex.ruwiki +11 -0
- data/data/Tutorial/SandBox.ruwiki +9 -0
- data/data/agents.banned +60 -0
- data/data/agents.readonly +321 -0
- data/data/hostip.banned +30 -0
- data/data/hostip.readonly +28 -0
- data/lib/ruwiki.rb +622 -0
- data/lib/ruwiki/auth.rb +56 -0
- data/lib/ruwiki/auth/gforge.rb +73 -0
- data/lib/ruwiki/backend.rb +318 -0
- data/lib/ruwiki/backend/flatfiles.rb +217 -0
- data/lib/ruwiki/config.rb +244 -0
- data/lib/ruwiki/exportable.rb +192 -0
- data/lib/ruwiki/handler.rb +342 -0
- data/lib/ruwiki/lang/de.rb +339 -0
- data/lib/ruwiki/lang/en.rb +334 -0
- data/lib/ruwiki/lang/es.rb +339 -0
- data/lib/ruwiki/page.rb +262 -0
- data/lib/ruwiki/servlet.rb +38 -0
- data/lib/ruwiki/template.rb +553 -0
- data/lib/ruwiki/utils.rb +24 -0
- data/lib/ruwiki/utils/command.rb +102 -0
- data/lib/ruwiki/utils/converter.rb +297 -0
- data/lib/ruwiki/utils/manager.rb +639 -0
- data/lib/ruwiki/utils/servletrunner.rb +295 -0
- data/lib/ruwiki/wiki.rb +147 -0
- data/lib/ruwiki/wiki/tokens.rb +136 -0
- data/lib/ruwiki/wiki/tokens/00default.rb +211 -0
- data/lib/ruwiki/wiki/tokens/01wikilinks.rb +166 -0
- data/lib/ruwiki/wiki/tokens/02actions.rb +63 -0
- data/lib/ruwiki/wiki/tokens/abbreviations.rb +40 -0
- data/lib/ruwiki/wiki/tokens/calendar.rb +147 -0
- data/lib/ruwiki/wiki/tokens/headings.rb +43 -0
- data/lib/ruwiki/wiki/tokens/lists.rb +112 -0
- data/lib/ruwiki/wiki/tokens/rubylists.rb +48 -0
- data/ruwiki.conf +22 -0
- data/ruwiki.pkg +0 -0
- data/templates/default/body.tmpl +19 -0
- data/templates/default/content.tmpl +7 -0
- data/templates/default/controls.tmpl +23 -0
- data/templates/default/edit.tmpl +27 -0
- data/templates/default/error.tmpl +14 -0
- data/templates/default/footer.tmpl +23 -0
- data/templates/default/ruwiki.css +297 -0
- data/templates/default/save.tmpl +8 -0
- data/templates/sidebar/body.tmpl +19 -0
- data/templates/sidebar/content.tmpl +8 -0
- data/templates/sidebar/controls.tmpl +8 -0
- data/templates/sidebar/edit.tmpl +27 -0
- data/templates/sidebar/error.tmpl +13 -0
- data/templates/sidebar/footer.tmpl +22 -0
- data/templates/sidebar/ruwiki.css +347 -0
- data/templates/sidebar/save.tmpl +10 -0
- data/templates/simple/body.tmpl +13 -0
- data/templates/simple/content.tmpl +7 -0
- data/templates/simple/controls.tmpl +8 -0
- data/templates/simple/edit.tmpl +25 -0
- data/templates/simple/error.tmpl +10 -0
- data/templates/simple/footer.tmpl +10 -0
- data/templates/simple/ruwiki.css +192 -0
- data/templates/simple/save.tmpl +8 -0
- data/tests/harness.rb +52 -0
- data/tests/tc_backend_flatfile.rb +103 -0
- data/tests/tc_bugs.rb +74 -0
- data/tests/tc_exportable.rb +64 -0
- data/tests/tc_template.rb +145 -0
- data/tests/tc_tokens.rb +335 -0
- data/tests/testall.rb +20 -0
- metadata +182 -0
@@ -0,0 +1,55 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#--
|
3
|
+
# Ruwiki
|
4
|
+
# Copyright � 2002 - 2004, Digikata and HaloStatue
|
5
|
+
# Alan Chen (alan@digikata.com)
|
6
|
+
# Austin Ziegler (ruwiki@halostatue.ca)
|
7
|
+
#
|
8
|
+
# This token by Javier Fontan <jfontan@pc3d.cesga.es>.
|
9
|
+
#
|
10
|
+
# Licensed under the same terms as Ruby.
|
11
|
+
#
|
12
|
+
# $Id: enscript-token.rb,v 1.3 2004/09/27 04:48:27 austin Exp $
|
13
|
+
#++
|
14
|
+
|
15
|
+
require "open3"
|
16
|
+
|
17
|
+
class Ruwiki::Wiki::CodeColor < Ruwiki::Wiki::Token
|
18
|
+
def self.rank
|
19
|
+
0
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.regexp
|
23
|
+
%r<\{\{\{(?::(\w+)\b)?(.*?)\}\}\}>m
|
24
|
+
end
|
25
|
+
|
26
|
+
def replace
|
27
|
+
cap = @match.captures
|
28
|
+
|
29
|
+
if cap[0].nil?
|
30
|
+
language = "ruby"
|
31
|
+
else
|
32
|
+
language = cap[0]
|
33
|
+
end
|
34
|
+
|
35
|
+
text = cap[1]
|
36
|
+
|
37
|
+
i, o, e = Open3.popen3("enscript -B --color=emacs -Whtml -E#{language} -o -")
|
38
|
+
i.print text
|
39
|
+
i.close
|
40
|
+
|
41
|
+
re_script = %r{(<pre>.*?</pre>)}mio
|
42
|
+
c = o.readlines[1..-1].join("\n")
|
43
|
+
re_script.match(c).captures[0]
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.post_replace(content)
|
47
|
+
content.gsub!(%r{<pre>\n}im, '<pre class="rwtk_CodeColor>')
|
48
|
+
content.gsub!(%r{\n</pre>}im, '</pre>')
|
49
|
+
content.gsub!(%r{<font color="(.+?)">}im, '<span style="color: \1">')
|
50
|
+
content.gsub!(%r{</font>}im, '</span>')
|
51
|
+
content.gsub!(%r{<B>}i, '<b>')
|
52
|
+
content.gsub!(%r{</B}i, '</b>')
|
53
|
+
content
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
#--
|
2
|
+
# Ruwiki
|
3
|
+
# Copyright � 2002 - 2003, Digikata and HaloStatue
|
4
|
+
# Alan Chen (alan@digikata.com)
|
5
|
+
# Austin Ziegler (ruwiki@halostatue.ca)
|
6
|
+
#
|
7
|
+
# Licensed under the same terms as Ruby.
|
8
|
+
#
|
9
|
+
# This integrator based on work by Chad Fowler.
|
10
|
+
#
|
11
|
+
# $Id: rublog_integrator.rb,v 1.3 2004/09/27 04:48:27 austin Exp $
|
12
|
+
#++
|
13
|
+
|
14
|
+
# NOTE: This is not currently compatible with Ruwiki 0.8.0
|
15
|
+
#
|
16
|
+
# require 'ruwiki/wiki/handler'
|
17
|
+
|
18
|
+
class Ruwiki::RubLogHandler < Ruwiki::Wiki::Handler
|
19
|
+
def initialize(entries)
|
20
|
+
@entries = entries
|
21
|
+
end
|
22
|
+
|
23
|
+
def page_exists?(page, project)
|
24
|
+
# puts "pP: #{page}, #{project}"
|
25
|
+
matches = @entries.find_entries_with_root_name(page)
|
26
|
+
matches.each { |entry| return true if(entry.dir_name =~ /#{project}/) }
|
27
|
+
false
|
28
|
+
end
|
29
|
+
|
30
|
+
def project_exists?(project)
|
31
|
+
true
|
32
|
+
end
|
33
|
+
|
34
|
+
def script_url
|
35
|
+
# request.environment['SCRIPT_NAME']
|
36
|
+
# !!SMELL!!
|
37
|
+
ENV['SCRIPT_NAME']
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# An experimental convertor for Ruwiki
|
42
|
+
class RuwikiConvertor < BaseConvertor
|
43
|
+
handles "wiki"
|
44
|
+
|
45
|
+
def get_title(f)
|
46
|
+
title = "---Untitled---"
|
47
|
+
loop do
|
48
|
+
line = f.gets
|
49
|
+
if(line =~ /^topic: (\S+)/) then
|
50
|
+
title = $1
|
51
|
+
elsif(line =~ /^\#EHDR/) then
|
52
|
+
return title
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def convert_html(file_entry, f, all_entries)
|
58
|
+
title = get_title(f)
|
59
|
+
markup = Ruwiki::Wiki.new('Default', Ruwiki::RubLogHandler.new(all_entries))
|
60
|
+
body = markup.parse(f.readlines.join("\n"), file_entry.dir_name)
|
61
|
+
HTMLEntry.new(title, body, self)
|
62
|
+
end
|
63
|
+
|
64
|
+
# FIXME: Need to check this one
|
65
|
+
def convert_plain(file_name, f, all_entries)
|
66
|
+
f.read
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
page!content: = Ruwiki
|
2
|
+
Ruwiki is a simple, extensible Wiki written in Ruby. It supports both
|
3
|
+
CGI and \WEBrick interfaces, templates, and CSS formatting.
|
4
|
+
Additionally, it supports project namespaces, so that two pages can be
|
5
|
+
named the same for differing projects without colliding or odd naming
|
6
|
+
conventions. Please see the ::Ruwiki project for more information.
|
7
|
+
|
8
|
+
Ruwiki is also an internationalised Wiki, although more testing,
|
9
|
+
especially testing with multibyte character encodings and Unicode
|
10
|
+
(UTF-8) is required. There are German and Spanish localisations of the
|
11
|
+
messages included with the Ruwiki distribution.
|
12
|
+
|
13
|
+
The current version is 0.9.0. Enhancements and changes include:
|
14
|
+
* a deployment system, whereby Ruwiki deployments can be installed from a package manager like that used for RPA (rpa-base) or \RubyGems (see Ruwiki::RuwikiUtilities);
|
15
|
+
* support for Ruwiki as a Windows service on NT, 2000, XP, and 2003 systems;
|
16
|
+
* demotion of YAML and Marshal storage types to formats of the Flatfiles storage type;
|
17
|
+
* external user authentication (currently to \RubyForge only);
|
18
|
+
* antispam efforts including robot and IP exclusion and URL redirection (see Ruwiki::[[Antispam]]); and
|
19
|
+
* protection against cross-site scripting (XSS) attacks with HTML and CSS cleaning.
|
20
|
+
The full list of changes can be found in Ruwiki::ChangeLog, with
|
21
|
+
discussions of various features in Ruwiki::WikiMarkup,
|
22
|
+
Ruwiki::Configuring_Ruwiki, and Ruwiki::Extending_Ruwiki.
|
23
|
+
|
24
|
+
If you are upgrading from a version of Ruwiki older than 0.8.0, please
|
25
|
+
read Ruwiki::RuwikiUtilities.
|
26
|
+
|
27
|
+
Certain Ruwiki \APIs are considered stable at this point, others will
|
28
|
+
be changing leading up to 1.0. Some of this is discussed in
|
29
|
+
Ruwiki::To_Do, with further architectural discussions in
|
30
|
+
Ruwiki::[[Roadmap]].
|
31
|
+
|
32
|
+
%projects()
|
33
|
+
|
34
|
+
Please review ::Tutorial and ::Ruwiki if you are unfamiliar with the
|
35
|
+
concept of Wikis in general. If you want to play with \WikiFormatting
|
36
|
+
for Ruwiki, use the Ruwiki::SandBox.
|
37
|
+
|
38
|
+
[http://rubyforge.org/projects/ruwiki Ruwiki development] is hosted at
|
39
|
+
[http://rubyforge.org RubyForge]. The current release of Ruwiki can
|
40
|
+
always be [http://rubyforge.org/frs/?group_id=84 downloaded] from
|
41
|
+
\RubyForge or the development (unstable) version can be obtained from
|
42
|
+
CVS.
|
43
|
+
properties!project: Default
|
44
|
+
properties!title: ProjectIndex
|
45
|
+
properties!topic: ProjectIndex
|
46
|
+
properties!version: 1
|
47
|
+
ruwiki!content-version: 2
|
48
|
+
ruwiki!version: 0.9.0
|
49
|
+
properties!editable: false
|
@@ -0,0 +1,65 @@
|
|
1
|
+
page!content: = Ruwiki 0.9.0 Antispam
|
2
|
+
Wiki-spam, like email spam, is a major problem. Ruwiki is going to have
|
3
|
+
extensive configurable tools for fighting spam. As it is, there are
|
4
|
+
several tools built into Ruwiki to assist in the fight against these
|
5
|
+
pond scum, but the tool development is certainly not complete.
|
6
|
+
|
7
|
+
== External URI Redirection
|
8
|
+
Although this will not greatly assist in the reduction of wiki spam,
|
9
|
+
all external \URIs are redirected through an URI on Google that is
|
10
|
+
designed specifically to remove \PageRank from links. The mechanism
|
11
|
+
currently works on all manually-specified external \URIs and is not
|
12
|
+
configurable without changing the URI tokenisation code. Thus, links
|
13
|
+
that are generated by \[ruby-talk:12345] will not be redirected through
|
14
|
+
Google, but direct links will be.
|
15
|
+
|
16
|
+
In future versions of Ruwiki, it will be possible to configure \URIs to
|
17
|
+
be excluded from the redirect code, but it is not possible to do so at
|
18
|
+
this time.
|
19
|
+
|
20
|
+
As noted, this will not necessarily reduce wiki spam, but it will deny
|
21
|
+
spammers the entire benefit of spamming a wiki implemented with Ruwiki.
|
22
|
+
|
23
|
+
== Reacting to Spammers and Robots
|
24
|
+
Ruwiki 0.9.0 includes the ability to present alternative versions of
|
25
|
+
itself to certain user agents and/or IP addresses based on a list. In
|
26
|
+
the future, both the lists and the faces presented will be configurable
|
27
|
+
(highly configurable, at that -- watch this space), but in this version
|
28
|
+
of Ruwiki, there are three possible versions to be displayed:
|
29
|
+
# Normal Ruwiki. This is a normally displayable and editable wiki.
|
30
|
+
# Read-only Ruwiki. This is displayed to benign robots and users who have demonstrated that they cannot be trusted with edit access. The primary effect is to make command pages neither indexable, archivable, nor link-followable, and to remove certain links from visibility for these user agents.
|
31
|
+
# Forbidden Ruwiki. The user gets an HTTP response of 403 Forbidden. This is displayed to malign (email-collecting) robots and users who have demonstrated that they are malicious and bent upon defacing the wiki.
|
32
|
+
|
33
|
+
While Ruwiki provides these lists, and provides an extensive list of
|
34
|
+
both malign and benign robots, it is up to the administrators of the
|
35
|
+
wiki to ensure that they are kept up to date.
|
36
|
+
|
37
|
+
The lists themselves are “extended” Ruby regular
|
38
|
+
expressions, one optional expression to a line. Spaces are not
|
39
|
+
significant and comments are allowed. If you want to recognise a space
|
40
|
+
in your regular expression, do so either with a character class ([ ]) or
|
41
|
+
the whitespace meta-character (\s). Hash marks must be escaped (\#) or
|
42
|
+
they will be treated as comment markers. Blank or comment-only lines are
|
43
|
+
ignored. All other lines will be joined together.
|
44
|
+
|
45
|
+
foo
|
46
|
+
bar
|
47
|
+
|
48
|
+
becomes:
|
49
|
+
|
50
|
+
%r{foo|bar}x
|
51
|
+
|
52
|
+
The file are stored in the data directory for the running instance of
|
53
|
+
Ruwiki (e.g., <tt>./data</tt>):
|
54
|
+
|
55
|
+
./data/agents.banned
|
56
|
+
./data/agents.readonly
|
57
|
+
./data/hostip.banned
|
58
|
+
./data/hostip.readonly
|
59
|
+
properties!project: Ruwiki
|
60
|
+
properties!title: Antispam
|
61
|
+
properties!topic: Antispam
|
62
|
+
properties!version: 1
|
63
|
+
ruwiki!content-version: 2
|
64
|
+
ruwiki!version: 0.9.0
|
65
|
+
properties!editable: false
|
@@ -0,0 +1,33 @@
|
|
1
|
+
page!content: = Ruwiki 0.9.0 Bug Tracking
|
2
|
+
This page is for tracking bugs in Ruwiki. Only bugs from recent
|
3
|
+
distributions are tracked. In addition to this source-based bug
|
4
|
+
tracking, there is the [http://rubyforge.org RubyForge]
|
5
|
+
[http://rubyforge.org/tracker/?atid=407&group_id=84&func=browse bug
|
6
|
+
tracker] for Ruwiki.
|
7
|
+
|
8
|
+
Those interested in Ruwiki development may also find the Ruwiki::To_Do
|
9
|
+
list and the Ruwiki::[[Roadmap]] useful. The format of the bug list is
|
10
|
+
“version: description”.
|
11
|
+
|
12
|
+
== Open Bugs
|
13
|
+
The version number is the version in which the bug was first reported.
|
14
|
+
* 0.6.2: Not all formatting is applied consistently. The token rankings may need adjusting. Eivind Eklund has suggested a scheme that may help with this, but it will require architectural adjustment and will probably slow things down.
|
15
|
+
|
16
|
+
----
|
17
|
+
== Closed Bugs
|
18
|
+
The version number is the version in which the bug was fixed.
|
19
|
+
* 0.9.0: Fixed a problem with old page edits being applied inappropriately.
|
20
|
+
* 0.8.0: [http://rubyforge.org/tracker/index.php?func=detail&aid=707&group_id=84&atid=407 Sub-Numbered bullets don’t increment]. Fixed a list numbering problem. I think that lists are a bit slower now, but they are completely accurate.
|
21
|
+
* 0.7.0: Fixed a link detection problem in \[wikiword] format. Thanks to [mailto:eivind@FreeBSD.org Eivind Eklund] for the patch.
|
22
|
+
* 0.7.0: Fixed a problem with <pre> paragraph detection and generation.
|
23
|
+
* 0.7.0: Fixed a problem with <p> generation.
|
24
|
+
* 0.7.0: [http://rubyforge.org/tracker/index.php?func=detail&aid=197&group_id=84&atid=407 Run-away ruby on some links in default distribution]. This may be related to a runaway header problem that was reported to me on IRC some time back that I believe has been fixed. Please advise.
|
25
|
+
* 0.6.1: Projects aren’t created appropriately.
|
26
|
+
* 0.6.1: Saving without editing (or repost) appears to cause problems. A fix has been applied to attempt to address this. Pages that have not been changed will not be saved.
|
27
|
+
properties!project: Ruwiki
|
28
|
+
properties!title: BugTracking
|
29
|
+
properties!topic: BugTracking
|
30
|
+
properties!version: 1
|
31
|
+
ruwiki!content-version: 2
|
32
|
+
ruwiki!version: 0.9.0
|
33
|
+
properties!editable: false
|
@@ -0,0 +1,102 @@
|
|
1
|
+
page!content: = Ruwiki 0.9.0 ChangeLog
|
2
|
+
Uncompleted to-do items can be found in To_Do. Bugs in Ruwiki are
|
3
|
+
tracked in BugTracking.
|
4
|
+
|
5
|
+
== 0.9.0
|
6
|
+
* Created a Ruwiki deployment system. Various steps were required to accomplish this:
|
7
|
+
** Moved executable files to bin/ for better packaging; moved core servlet code and other utilities to Ruwiki::Utils namespace.
|
8
|
+
** Renamed bin/convert to bin/ruwiki_convert. This will ultimately be moved into the ruwiki command.
|
9
|
+
** Refactored Flatfile format (section!\item:<Tab>value) to Ruwiki::Exportable, loosened the format restrictions to allow for either section!\item:<Tab>value or section!\item:<Space>value.
|
10
|
+
** Incorporated Ruwiki::Exportable into Ruwiki::Config to allow for the saving of configuration files.
|
11
|
+
** Incorporated Ruwiki::Exportable into Ruwiki::\Utils::ServletRunner to allow for the saving of configuration files.
|
12
|
+
** Added Ruwiki manager code for installation and management of Ruwiki deployments.
|
13
|
+
** Added code for running the Ruwiki servlet as a Windows service on Win32. (Currently minimally tested and unworking.)
|
14
|
+
** Added --central to bin/ruwiki_servlet, to run a read-only instance of Ruwiki using the centralised data from RPA or \RubyGems.
|
15
|
+
* Removed YAML and Marshal storage types as separate classes and incorporated them as formats of the Flatfiles storage type. Added the 'format' option to the Flatfiles storage_options hash.
|
16
|
+
* Added draft \APIs for authentication, robot exclusion, IP exclusion, and HTML cleaning.
|
17
|
+
** Implemented initial authentication for \RubyForge. It verifies a user against their current \RubyForge cookie.
|
18
|
+
** Implemented known robot list. It may require further refinement. It contains two classes of robots:
|
19
|
+
*** Read-only: known to be good (like the Googlebot) or neutral (most other crawlers). They are permitted to read, index, and follow links on all non-command pages.
|
20
|
+
*** Banned: known to be bad, essentially spam-crawlers. These robots will uniformly get a 403 Forbidden result.
|
21
|
+
** Implemented IP exclusion list. It may require further refinement. It contains two classes of IPs:
|
22
|
+
*** Read-only: IP addresses that are not permitted to edit the wiki. They will be treated as read-only robot exclusion.
|
23
|
+
*** Banned: known to be bad, essentially spam-crawlers. These IPs will uniformly get a 403 Forbidden result.
|
24
|
+
** HTML cleaning has been implemented.
|
25
|
+
*** HTML entities &, <, and > will be escaped.
|
26
|
+
*** Only HTML tags and attributes from a “known good” list will be passed through unchanged.
|
27
|
+
*** CSS properties display and visibility will be silently eliminated from embedded HTML.
|
28
|
+
*** Although (mostly) valid XHTML is generated, Ruwiki does not currently support tags or attributes in namespaces. If and when this is enabled, it will be enabled on a namespace-by-namespace basis.
|
29
|
+
* External URLs are redirected through a single point through the Google PageRank remover URI \http://www.google.com/url?sa=D&q=<em>uri</em>. There is no whitelisting for URIs at this point.
|
30
|
+
* Added a Rakefile for packaging. Currently incomplete.
|
31
|
+
* Modified the default template style to remove the bottom control bar, as it was blocking the last bit of text on some pages in lesser browsers.
|
32
|
+
* Updated more documentation.
|
33
|
+
* Added a message facility so that non-error messages can be communicated to the user.
|
34
|
+
* Fixed a bug with submitting an old version of the code with an expired lock reverting changes. The changed versions are now merged automatically and re-presented to the user. It's a simplistic merge, to be improved in a later version of Ruwiki. A message is displayed to the user.
|
35
|
+
* Modified searching for empty strings so that instead of throwing an error, a message is displayed to the user.
|
36
|
+
|
37
|
+
== 0.8.0
|
38
|
+
* AC: Added topic list (_topics) and project list (_projects) controls on templates and backend.
|
39
|
+
* AZ: Added %topics() and %projects() tokens. See WikiMarkup for details.
|
40
|
+
* AC: Added simple search on back-end (both project and global); search strings must be validated and cleansed before being sent to the back-end (the back-end must prepare the string for its own search mechanism). The back-end is wholly responsible for the searching of the pages.
|
41
|
+
* AC: Added \RecentChanges list to backend and controls.
|
42
|
+
* AZ: Changed default for Ruwiki::Config#storage_options[:flatfiles][:extension] to <tt>ruwiki</tt>.
|
43
|
+
* AZ: Topic backlink search: searches for mentions of the topic in the other topics of the project.
|
44
|
+
* AZ: New templating engine: The Rdoc templating engine has been greatly enhanced in preparation for some changes that will happen surrounding antispam capabilities.
|
45
|
+
* AZ: Multiple flatfile-based backend support: tagged file (“flatfiles”), YAML (“yaml”), and Marshal (“marshal”).
|
46
|
+
* AZ: A converter utility between backends.
|
47
|
+
* AZ: Defined a canonical, extensible page transport format.
|
48
|
+
* AZ: Defined a canonical, format-independent diff format.
|
49
|
+
* AZ: Fixed list numbering problem. Modified lists to allow for mixed lists. See WikiMarkup for restrictions.
|
50
|
+
* AZ: Removed automatic image conversion for \URIs that look like images. Now, images must be specified with the \[image:uri] format. See WikiMarkup for more details.
|
51
|
+
* AZ: Fixed minor bugs in several tokens.
|
52
|
+
* AZ: New look! Ruwiki now sports a new default look with CSS and template changes.
|
53
|
+
* AZ: New look! Ruwiki has a “simple” template set.
|
54
|
+
* AZ: New look! Ruwiki has a “sidebar” template set.
|
55
|
+
* AZ: Fixed a long-standing bug with code tokens.
|
56
|
+
|
57
|
+
== 0.7.0
|
58
|
+
* Changed the tokenization API so that the #post_replace call is made at the Token class level instead of the instance level.
|
59
|
+
* Improved HTML code generation.
|
60
|
+
* Added servlet runner batch files for Windows. They <strong>will</strong> require modification to run properly.
|
61
|
+
* Added %calendar(...) support. See WikiMarkup for more information.
|
62
|
+
|
63
|
+
== 0.6.2
|
64
|
+
* Removed dependencies on Ruwiki from a number of classes (Ruwiki::Backend, Ruwiki::Backend::Flatfiles, Ruwiki::Page, Ruwiki::Wiki, Ruwiki::Wiki::Tokens, and various tokens).
|
65
|
+
* Ruwiki now initializes a \Ruwiki::BackendDelegator, which creates the requisite Ruwiki::Backend instance with Ruwiki::Config#storage_options.
|
66
|
+
* Added German (Christian Neukirchen <cneukirchin@yahoo.de>) and Spanish translations (Mauricio Fern�ndez <batsman.geo@yahoo.com>).
|
67
|
+
|
68
|
+
== 0.6.1
|
69
|
+
* Changed Ruwiki::Config#data_path to Ruwiki::Config#storage_options[:flatfiles][:data_path]. This represents a generalisation of storage type options so that the Ruwiki::Config object is not polluted with storage type options. Ruwiki::Config#storage_options keys should be the same Ruby Symbol as is used in Ruwiki::Config#storage_type.
|
70
|
+
* Added Ruwiki::Config#storage_options[:flatfiles][:extension], based on a request by Chad Fowler. This allows you to have Project/\TopicFile actually stored as Project/\TopicFile.wiki if Ruwiki::Config#storage_options[:flatfiles][:extension] is set to <tt>wiki</tt>. The default for Ruwiki::Config#storage_options[:flatfiles][:extension] is <tt>nil</tt>.
|
71
|
+
* Fixed incorrect references. I had been incorrectly attributing [http://sourceforge.net/projects/rdoc-wiki RDoc Wiki] to Dave Thomas. \RDoc Wiki is by Michael Neumann. However, the project I pulled from <strong>is</strong> by Dave Thomas, but it’s [http://sourceforge.net/projects/rublog RubLog]. Apologies to both developers.
|
72
|
+
* Added RuwikiTemplatingLibrary documentation.
|
73
|
+
* Internationalized messages, except for the templating library.
|
74
|
+
* Added configuration API for future work surrounding features. The existing wiki is mostly feature complete. Additional features (such as access controls) will be added through the feature interface.
|
75
|
+
* Fixed project creation.
|
76
|
+
* Fixed problems with \WikiWord links.
|
77
|
+
* Added Wikipedia-style Wiki links (\[[list of words]]).
|
78
|
+
* Fixed a potential problem with re-posted data or saving without editing.
|
79
|
+
* Added the ability to put commands in the URL.
|
80
|
+
|
81
|
+
== 0.6.0
|
82
|
+
* Added Ruby mailing list reference support (e.g., \[ruby-talk:12345]).
|
83
|
+
* Reorganised the code (again) to better support alternative frontends. Based, in part, on [http://sourceforge.net/projects/rublog RubLog] by Dave Thomas. (Reference corrected in 0.6.1.)
|
84
|
+
* Added a [http://www.webrick.org WEBrick] servlet interface. Based, in part, on the \WEBrick servlet interface provided with \RubLog by Chad Fowler.
|
85
|
+
* Added templates, using the [http://rdoc.sourceforge.net RDoc] template.rb library.
|
86
|
+
* Changed the default topic to be \ProjectIndex instead of \DefaultProject.
|
87
|
+
* Added a new \WikiWord format, \Wiki_Word_with_Spaces.
|
88
|
+
* Completed lots of Ruwiki documentation.
|
89
|
+
* Updated the save page.
|
90
|
+
* Fixed a problem with the linking of project specific pages.
|
91
|
+
|
92
|
+
== 0.5.0
|
93
|
+
* Reorganized the code significantly to be easier to edit and extend.
|
94
|
+
* Added abbreviation capabilities.
|
95
|
+
* Cleaned up a lot of tokenizing code.
|
96
|
+
properties!project: Ruwiki
|
97
|
+
properties!title: ChangeLog
|
98
|
+
properties!topic: ChangeLog
|
99
|
+
properties!version: 1
|
100
|
+
ruwiki!content-version: 2
|
101
|
+
ruwiki!version: 0.9.0
|
102
|
+
properties!editable: false
|
@@ -0,0 +1,151 @@
|
|
1
|
+
page!content: = Configuring Ruwiki 0.9.0
|
2
|
+
Ruwiki is configured similarly as both a CGI and a \WEBrick servlet.
|
3
|
+
The biggest distinction is that because the Wiki servlet is created
|
4
|
+
after the \WEBrick server is created (during the dispatch to the
|
5
|
+
servlet), it is necessary to configure the wiki with a global
|
6
|
+
Ruwiki::Config object stored in Ruwiki::Servlet.config. This must be a
|
7
|
+
valid Ruwiki::Config object. In the examples below,
|
8
|
+
<em>wiki.config</em> may be simply considered a random Ruwiki::Config
|
9
|
+
object.
|
10
|
+
|
11
|
+
> This has changed in Ruwiki 0.9.0 from a global configuration object
|
12
|
+
> named $config.
|
13
|
+
|
14
|
+
: Additional configuration options will be added from time to time. The
|
15
|
+
: form for specifying configuration may be changed prior to 1.0.
|
16
|
+
|
17
|
+
If you are looking for discussion on templates, this has been moved to
|
18
|
+
Extending_Ruwiki.
|
19
|
+
|
20
|
+
== Ruwiki Configuration Options
|
21
|
+
=== wiki.config.title
|
22
|
+
This configuration option names the Wiki; by default this is
|
23
|
+
<tt>Ruwiki</tt>. This affects the display of the home link and the
|
24
|
+
<title> element of pages.
|
25
|
+
|
26
|
+
=== wiki.config.webmaster
|
27
|
+
The email address for the webmaster. This is used in generating error
|
28
|
+
reports that can be emailed to the wiki’s webmaster.
|
29
|
+
|
30
|
+
=== wiki.config.language
|
31
|
+
This sets the internationalisation mechanism. It must be one of the
|
32
|
+
known two-letter ISO language codes or a module under Ruwiki::Lang
|
33
|
+
matching that description. See Extending_Ruwiki for more information.
|
34
|
+
Ruwiki's default language is English ('en'), but there are translations
|
35
|
+
for Spanish ('es') and German ('de') included. Localization is
|
36
|
+
currently per wiki instance. In a servlet environment, this may mean
|
37
|
+
that only a single language is recognised.
|
38
|
+
|
39
|
+
=== wiki.config.default_page, wiki.config.default_project
|
40
|
+
These options indicate what will happen when the wiki’s URL is
|
41
|
+
specified without any parameters (the default page in the default
|
42
|
+
project is opened), when a topic is specified without a project (the
|
43
|
+
topic is opened in the default project), and when a project is
|
44
|
+
specified without a topic (the default page is opened in the project).
|
45
|
+
|
46
|
+
=== wiki.config.storage_type, wiki.config.storage_options
|
47
|
+
<tt>wiki.config.storage_type</tt> specifies the back-end storage
|
48
|
+
mechanism as a Ruby Symbol. Currently, <tt>'flatfiles'</tt>,
|
49
|
+
is supported. See Extending_Ruwiki for more information.
|
50
|
+
|
51
|
+
<tt>wiki.config.storage_options</tt> is a hash of option hashes for
|
52
|
+
each known storage type known to the Wiki. This must use the same
|
53
|
+
Symbol as <tt>wiki.config.storage_type</tt> as the top-level hash key.
|
54
|
+
|
55
|
+
==== ...storage_options['flatfiles']['data-path']
|
56
|
+
The directory in which the wiki files will be found. By default, this
|
57
|
+
is “<tt>./data/</tt>”.
|
58
|
+
|
59
|
+
==== ...storage_options['flatfiles']['format']
|
60
|
+
Specifies the storage format for the flatfiles backend. The default
|
61
|
+
format is 'exportable', but may be set to 'yaml' or 'marshal' as well.
|
62
|
+
The 'yaml' format will not work reliably with versions of Ruby before
|
63
|
+
1.8.2 preview 3.
|
64
|
+
|
65
|
+
==== ...storage_options['flatfiles']['extension']
|
66
|
+
The extension of the wiki files. By default, this is
|
67
|
+
“ruwiki”. For those upgrading from a version of Ruwiki
|
68
|
+
before 0.8.0, note that you must explicitly set this value to
|
69
|
+
<tt>nil</tt> if you wish to have no extension.
|
70
|
+
|
71
|
+
=== wiki.config.template_path
|
72
|
+
This specifies the paths where the Wiki templates will be found. The
|
73
|
+
process running the Wiki must have read access to the template_path.
|
74
|
+
|
75
|
+
=== wiki.config.template_set, wiki.config.css
|
76
|
+
These two options indicate which template set will be used. Three
|
77
|
+
template sets are provided in the release package:
|
78
|
+
“default”, “simple”, and “sidebar”.
|
79
|
+
The only CSS file used initially is “ruwiki.css”. Templates
|
80
|
+
work such that they will be found in
|
81
|
+
<em>template_path</em>/<em>template_set</em>. All CSS files are loaded
|
82
|
+
from the template set directory and emitted as part of the output
|
83
|
+
stream.
|
84
|
+
|
85
|
+
: The bad side of this is that the CSS never caches on the client side
|
86
|
+
: as it would if it were a separate file. However, as templates may not
|
87
|
+
: be in a web-accessible directory, this is necessary.
|
88
|
+
|
89
|
+
=== wiki.config.time_format, wiki.config.date_format, wiki.config.datetime_format
|
90
|
+
When the wiki displays date or time values, these formats are used.
|
91
|
+
They are not currently accessible by tokens.
|
92
|
+
|
93
|
+
=== wiki.config.debug
|
94
|
+
Adds additional information to the (rare) error reports. Defaults to
|
95
|
+
<tt>false</tt>.
|
96
|
+
|
97
|
+
=== wiki.config.logger
|
98
|
+
Sets or returns the logger. The logger, if set, must respond to the
|
99
|
+
same methods as WEBrick::Logger.
|
100
|
+
|
101
|
+
=== wiki.config.auth_mechanism
|
102
|
+
The authentication mechanism name as a String. Corresponds to a
|
103
|
+
filename that will be found in ruwiki/auth. The authenticator must have
|
104
|
+
a single class method, +authenticate+, which accepts the +request+, the
|
105
|
+
+response+, and the +auth_options+. This API is a draft API and is
|
106
|
+
likely to change in future versions of Ruwiki. In this version of
|
107
|
+
Ruwiki, only one authentication mechanism will be found -- for dealing
|
108
|
+
with authenticating users already logged into RubyForge.
|
109
|
+
|
110
|
+
=== wiki.config.auth_options
|
111
|
+
Options for the authentication mechanism as a Hash. This will be passed
|
112
|
+
to the authenticator defined in wiki.config.auth_mechanism. The
|
113
|
+
<tt>auth_options</tt> are a single-level hash. They may be stored in
|
114
|
+
the Ruwiki configuration file as:
|
115
|
+
|
116
|
+
ruwiki-config!auth-options: default!user: pgsqluser
|
117
|
+
default!pass: pgsqlpass
|
118
|
+
|
119
|
+
== Ruwiki Servlet Options
|
120
|
+
Most, if not all, of the configuration above can be achieved through
|
121
|
+
command-line options of the ruwiki servlet.
|
122
|
+
|
123
|
+
=== Servlet Command-Line Options
|
124
|
+
; -P, --port <em>PORT</em> : Runs the Ruwiki servlet on the specified port. Default 8808.
|
125
|
+
; -A, --accept <em>ADDRESSES</em> : Restricts the Ruwiki servlet to accepting connections from the specified address or (comma-separated) addresses. May be specified multiple times. Defaults to all addresses.
|
126
|
+
; -L, --local : Restricts the Ruwiki servlet to accepting only local connections (127.0.0.1). Overrides any previous --accept addresses.
|
127
|
+
; -M, --mount <em>MOUNT_POINT</em> : The relative URI from which Ruwiki will be accessible. Defaults to “/”.
|
128
|
+
; --[no-]log : Log \WEBrick activity. Default is --log.
|
129
|
+
; --logfile <em>LOGFILE</em> : The file to which \WEBrick logs are written. Default is standard error.
|
130
|
+
; -T, --threads <em>THREADS</em> : Sets the \WEBrick threadcount.
|
131
|
+
|
132
|
+
=== Ruwiki Command-Line Options
|
133
|
+
; --language <em>LANGUAGE</em> : The interface language for Ruwiki. Defaults to “en”. May be “en”, “de”, or “es”.
|
134
|
+
; --webmaster <em>WEBMASTER</em> : The Ruwiki webmaster email address. Defaults to “webmaster@domain.com”.
|
135
|
+
; --[no-]debug : Turns on Ruwiki debugging. Defaults to --no-debug.
|
136
|
+
; --title <em>TITLE</em> : Provides the Ruwiki title. Default is “Ruwiki”.
|
137
|
+
; --default-page <em>PAGENAME</em> : An alternate default page. Default is “\ProjectIndex”.
|
138
|
+
; --default-project <em>PAGENAME</em> : An alternate default project. Default is “Default”.
|
139
|
+
; --template-path <em>TEMPLATE_PATH</em> : The location of Ruwiki templates. Default is “./templates”.
|
140
|
+
; --templates <em>TEMPLATES</em> : The name of the Ruwiki templates. Default is “default”.
|
141
|
+
; --css <em>CSS_NAME</em> : The name of the <acronym title="Cascading Style Sheets">CSS</acronym> file in the template path. Default is “ruwiki.css”.
|
142
|
+
; --storage-type <em>TYPE</em> : Select the storage type: flatfiles, yaml, marshal
|
143
|
+
; --flatfiles-data-path <em>PATH</em> : The path where data files are stored. Default is “./data”. <em>--flatfiles</em> is used even for <em>yaml</em> and <em>marshal</em> because they are all flatfile oriented systems.
|
144
|
+
; --flatfiles-extension <em>EXT</em> : The extension for data files. Default is “ruwiki”. <em>--flatfiles</em> is used even for <em>yaml</em> and <em>marshal</em> because they are all flatfile oriented systems.
|
145
|
+
properties!project: Ruwiki
|
146
|
+
properties!title: Configuring_Ruwiki
|
147
|
+
properties!topic: Configuring_Ruwiki
|
148
|
+
properties!version: 1
|
149
|
+
ruwiki!content-version: 2
|
150
|
+
ruwiki!version: 0.9.0
|
151
|
+
properties!editable: false
|