Soks 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/README.txt +1 -0
  2. data/bin/soks-create-wiki.rb +9 -2
  3. data/lib/helpers/default-helpers.rb +1 -0
  4. data/lib/helpers/maintenance-helpers.rb +2 -2
  5. data/lib/soks-servlet.rb +1 -1
  6. data/lib/soks-view.rb +1 -1
  7. data/lib/soks.rb +2 -0
  8. data/templates/default/content/Api%20for%20classes%20to%20modify%20the%20wiki.textile +4 -0
  9. data/templates/default/content/Automatic%20counters.textile +22 -0
  10. data/templates/default/content/Automatic%20exporters.textile +23 -0
  11. data/templates/default/content/Automatic%20importers.textile +57 -0
  12. data/templates/default/content/Automatic%20maintenance%20helpers.textile +39 -0
  13. data/templates/default/content/Bug%3A%20Page%2Einserted%5Finto%20is%20never%20purged.textile +17 -0
  14. data/templates/default/content/How%20to%20hack%20soks.textile +9 -6
  15. data/templates/default/content/How%20to%20re%2Dbuild%20the%20page%20cache.textile +71 -0
  16. data/templates/default/content/How%20to%20upgrade%20soks.textile +10 -0
  17. data/templates/default/content/How%20to%20use%20the%20Automatic%20Helper%20classes.textile +12 -0
  18. data/templates/default/content/List%20of%20changes.textile +12 -1
  19. data/templates/default/content/News%3A%20Version%201%2D0%2D1%20released.textile +12 -0
  20. data/templates/default/content/Pages%20to%20include%20in%20the%20distribution.textile +9 -6
  21. data/templates/default/content/README.textile +1 -0
  22. data/templates/default/content/Recent%20changes%20to%20this%20site.textile +80 -83
  23. data/templates/default/content/Site%20Index.textile +16 -1
  24. data/templates/default/start.rb +3 -1
  25. data/templates/default/version.txt +1 -1
  26. data/templates/default/views/frame.rhtml +1 -1
  27. data/test/test_soks-servlet.rb +1 -1
  28. metadata +10 -13
  29. data/TODO.txt +0 -31
  30. data/lib/helpers/mail2wiki-test.rb +0 -15
  31. data/lib/soks-drb.rb +0 -20
  32. data/lib/soks-fcgi.rb +0 -127
  33. data/templates/default/attachment/blank.gif +0 -0
  34. data/templates/default/attachment/pngbehavior.htc +0 -86
  35. data/templates/default/attachment/tiny-logo thumb.bmp +0 -0
  36. data/templates/default/content/Bug%3A%20E%2Dmail%20addresses%20with%20hyphens%20not%20recognised.textile +0 -17
  37. data/test/stress_url_calls.rb +0 -33
  38. data/test/stress_urls.txt +0 -68
data/README.txt CHANGED
@@ -68,6 +68,7 @@ See http://www.soks.org/wiki/KnownBugs for details.
68
68
 
69
69
  h2. RELEASES
70
70
 
71
+ # 2005 Aug 09 - soks-1.0.1 - Seventh public release (beta)
71
72
  # 2005 July 24 - soks-1.0.0 - Sixth public release (beta)
72
73
  # 2005 Mar 21 - soks-0.0.7 - Fifth public release (alpha)
73
74
  # 2005 Mar 15 - soks-0.0.6 - Fourth public release (alpha)
@@ -158,8 +158,15 @@ if upgrade
158
158
  end
159
159
 
160
160
  old_start = IO.readlines( File.join(old_wiki,'start.rb')).join
161
- old_url = old_start[/:url\s*=>\s*('|")(.*?)('|"),/,2]
162
- old_port = old_start[/:port\s*=>\s*(\d*),/,1]
161
+
162
+ case wiki_version
163
+ when '0.0.0'..'0.9.9'
164
+ old_url = old_start[/:url\s*=>\s*('|")(.*?)('|"),/,2]
165
+ old_port = old_start[/:port\s*=>\s*(\d*),/,1]
166
+ else
167
+ old_url = old_start[/View\.new\(.*?,\s*('|")(.*?)('|")\s*,/i,2]
168
+ old_port = old_start[/:port\s*=>\s*(\d*)/i,1]
169
+ end
163
170
 
164
171
  if interactive
165
172
  old_url = prompt.ask("What url will this wiki be accessed from (include the port)?",old_url)
@@ -150,6 +150,7 @@ class AutomaticSummary
150
150
  end
151
151
 
152
152
  def render_summary_of_page( page )
153
+ page.is_inserted_into(@wiki.page( name ))
153
154
  content = "<div class='subpage'>"
154
155
  content << "[[ #{page.name} ]]<br />\n\n"
155
156
  if page.is_a? UploadPage
@@ -29,10 +29,10 @@ class DeleteOldRevisionsHelper
29
29
  AUTHOR = 'Automatic Revision Remover'
30
30
 
31
31
  # Default wakes up each day at midnight and wipes all revisions more than 100 days old if there are more than 20 revisions in the page
32
- def initialize( wiki, event_to_check_on = :day, age_to_wipe_at = 60*60*24*365, maximum_revisions = 20 )
32
+ def initialize( wiki, event_to_check_on = :day, age_to_wipe_at = 60*60*24*365, minimum_revisions = 20 )
33
33
  @wiki = wiki
34
34
  @age_to_wipe_at = age_to_wipe_at
35
- @maximum_revisions = maximum_revisions
35
+ @maximum_revisions = minimum_revisions
36
36
  @wiki.watch_for(event_to_check_on) { check_and_delete_revisions }
37
37
  end
38
38
 
data/lib/soks-servlet.rb CHANGED
@@ -55,7 +55,7 @@ class WikiServlet < WEBrick::HTTPServlet::AbstractServlet
55
55
  when /\/(\w+?)\/(.+)/; wiki_service( request, response, $1.capitalize, $2 )
56
56
 
57
57
  # If request of the form /pagename then redirect to /view/pagename
58
- when /\/(.+)/ ; redirect( response, $1, settings.default_view )
58
+ when /\/(.+)/ ; response.set_redirect( WEBrick::HTTPStatus::Found, "#{settings.url}/#{settings.default_view}/#{$1}" )
59
59
 
60
60
  # If request of the form / then redirect to /view/home%20page
61
61
  when "/" ; redirect( response, settings.home_page, settings.default_view )
data/lib/soks-view.rb CHANGED
@@ -204,7 +204,7 @@ class WikiRedCloth < RedCloth
204
204
  text.gsub!(/http:\/\/\S*\w\/?/i) { |m| link m }
205
205
  text.gsub!(/https:\/\/\S*\w\/?/i) { |m| link m }
206
206
  text.gsub!(/www\.\S*\w\/?/i) { |m| link( "http://#{m}", m) }
207
- text.gsub!(/[A-Za-z0-9.]+?@[A-Za-z0-9.]*[A-Za-z]/) { |m| link( "mailto:#{m}", m) }
207
+ text.gsub!(/[A-Za-z0-9.-]+?@[A-Za-z0-9.-]*[A-Za-z]/) { |m| link( "mailto:#{m}", m) }
208
208
  end
209
209
 
210
210
  def refs_soks_bracketed_link( text )
data/lib/soks.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/usr/local/bin/ruby
2
2
 
3
+ SOKS_VERSION = '1.0.1'
4
+
3
5
  require 'webrick'
4
6
  require 'erb'
5
7
  require 'redcloth-3.0.3'
@@ -4,9 +4,13 @@ There is a very simple API for classes to modify the wiki.
4
4
 
5
5
  Any class can register to be notified of changes to the wiki by:
6
6
 
7
+ * @@wiki.watch_for( :start ) { |event, wiki, view| do whatever you want }@
7
8
  * @@wiki.watch_for( :page_created ) { |event, page, revision| do whatever you want }@
8
9
  * @@wiki.watch_for( :page_revised ) { |event, page, revision| do whatever you want }@
9
10
  * @@wiki.watch_for( :page_deleted ) { |event, page, revision| do whatever you want }@
11
+ * @@wiki.watch_for( :page_viewed ) { |event,page,view,author| do whatever you want }@
12
+ * @@wiki.watch_for( :shutdown ) { |event| do whatever you want }@
13
+
10
14
 
11
15
  These notifications are sent by a separate low priority thread from the one that is interacting with the user. Using these notifications a class can make changes to the wiki by calling:
12
16
 
@@ -0,0 +1,22 @@
1
+ h1. Automatic Counters
2
+
3
+ There are three automatic counter classes:
4
+ # ViewCountHelper - Counts what is looked on the page 'Popular Pages'
5
+ # ViewerCountHelper - Counts who looks on the page 'Prolific Viewers'
6
+ # AuthorCountHelper - Counts who edits on the page 'Principal Authors'
7
+
8
+ By default the results tables are updated once an hour, and show the top 20.
9
+
10
+ The simplest way to use them is to put the following in your start.rb file:
11
+ <pre>
12
+ <code>
13
+ require 'counter-helpers'
14
+ ViewCountHelper.new( wiki ) # Counts which are the most popular pages
15
+ ViewerCountHelper.new( wiki ) # Counts who visits the wiki most
16
+ AuthorCountHelper.new(wiki)
17
+ </code>
18
+ </pre>
19
+
20
+ They can take extra arguments to adjust their settings: @new( page_name = 'Principal Authors', update_page_every = :hour, show_top = 20, cache_name = 'authorcount' )@
21
+
22
+ Tag: Include this page in the distribution
@@ -0,0 +1,23 @@
1
+ h1. Automatic Exporters
2
+
3
+ There is currently a single class that can keep a static html mirror of a wiki. See how to export a site from this wiki for more occasional exports.
4
+
5
+ h2. Wiki 2 Html
6
+
7
+ This class watches for changes to the wiki, and when they occur, writes an html version of the page into a specificed directory.
8
+
9
+ To use put the following in your start.rb file:
10
+ <pre>
11
+ <code>
12
+ require 'wiki2html'
13
+ Wiki2Html.new(wiki,view,
14
+ :views_to_copy => ['view','meta','rss'], # This is what views of the page to copy accross
15
+ :extension => '.html', # this is the extension to put on the files
16
+ :destination_dir => '/Users/tamc2/Sites', # This is the folder where the html is put
17
+ :destination_url => 'http://localhost/~tamc2') # Where relevant, urls will be rewritten to start with this
18
+ </code>
19
+ </pre>
20
+
21
+ Note, this doesn't copy accross uploads or other static files. You will need to point whatever server you are using to view these files to the attachment directory in the wiki as well.
22
+
23
+ Tag: Include this page in the distribution
@@ -0,0 +1,57 @@
1
+ h1. Automatic Importers
2
+
3
+ There are currently two automatic importers. (You can also manually import data, see how to import data).
4
+
5
+ h2. Mail2WikiHelper
6
+
7
+ The mail to wiki helper periodically scans an email folder on an imap server, and copies messages across to the wiki. Each message is appended to a page with the same name as the email subject and uses the email from address as the author name.
8
+
9
+ *NOTE* This helper ignores the contents of the authenticators array in your start.rb file.
10
+
11
+ To use, put the following in your start.rb file:
12
+
13
+ # @require 'mail2wiki-helper'@
14
+ # @Mail2WikiHelper.new( wiki, :server => 'imap.server', :username => 'user', :password => 'password', :mailbox => 'test')@
15
+
16
+ This will by default scan the mailbox every hour. Once a message has been imported into the wiki it is tagged with a 'PutInWiki' keyword that prevents subsequent re-insertions. To get the message to be re-inserted you must either change the keyword that soks looks for (see below) or unset the keyword using your email program.
17
+
18
+ There are a few other settings you can change:
19
+ <pre>
20
+ <code>
21
+ DEFAULT_SETTINGS = {
22
+ :server => 'imap.hermes.cam.ac.uk',
23
+ :username => 'tamc2',
24
+ :password => 'missing_a_password',
25
+ :mailbox => 'test',
26
+ :check_event => :hour,
27
+ :subject_regexp => /.*/,
28
+ :keyword => 'PutInWiki'
29
+ }
30
+ </code>
31
+ </pre>
32
+
33
+
34
+ h2. RSS2WikiHelper
35
+
36
+ The rss to wiki helper periodically downloads an rss feed and copies it onto a specified page as a series of links.
37
+
38
+ To use, put the following in your start.rb file:
39
+
40
+ # @require 'rss2wiki-helper'@
41
+ # @RSS2WikiHelper.new( wiki, :url => 'url of rss feed' )@
42
+
43
+ By default it will check once an hour, and write the feed to a page with the same name as the feed title.
44
+
45
+ There are a few other settings you can change:
46
+ <pre>
47
+ <code>
48
+ DEFAULT_SETTINGS = {
49
+ :url => 'http://localhost:8000/rss/recent%20changes%20to%20this%20site',
50
+ :pagename => nil, # If nil, uses channel title,
51
+ :update_on_event => :hour,
52
+ :author => 'AutomaticRSS2Wiki',
53
+ }
54
+ </code>
55
+ </pre>
56
+
57
+ Tag: Include this page in the distribution
@@ -0,0 +1,39 @@
1
+ h1. Automatic Maintenance Helpers
2
+
3
+ These help with some basic wiki maintenance tasks:
4
+
5
+ h2. Delete Old Pages Helper
6
+
7
+ This permanently deletes deleted pages.
8
+
9
+ To use, put the following in your start.rb file:
10
+ # @require 'maintenance-helpers'@
11
+ # @DeleteOldPagesHelper.new(wiki)@
12
+
13
+ This will by default scan the wiki once per day and permanently delete pages that have been marked for deletiob for more than 100 days.
14
+
15
+ It has two optional parameters: @DeleteOldPagesHelper( event_to_check_on, age_to_wipe_at)@, the first can be :min, :hour, :day, ;month, :year and the age is in seconds.
16
+
17
+ h2. Delete Old Revisions Helper
18
+
19
+ This permanently deletes old revisions.
20
+
21
+ To use, put the following in your start.rb file:
22
+ # @require 'maintenance-helpers'@
23
+ # @DeleteOldRevisionsHelper.new(wiki)@
24
+
25
+ This will by default scan the wiki once per day and permanenty delete revisions that are more than a hundred days old, being sure to leave at least 20 revisions on a page.
26
+
27
+ It has three optional parameters @DeleteOldRevisionsHelper(( wiki, event_to_check_on = :day, age_to_wipe_at = 60*60*24*365, minimum_revisions = 20 )@ the first can be :min, :hour, :day, ;month, :year and the age is in seconds.
28
+
29
+ h2. Merge Old Revisions Helper
30
+
31
+ By default this wakes up each hour and merges all revisions more than 24 hours old, by the same author, and that are created within an hour of each other.
32
+
33
+ To use, put the following in your start.rb file:
34
+ # @require 'maintenance-helpers'@
35
+ # @MergeOldRevisionsHelper.new(wiki)@
36
+
37
+ It has three optional parameters @DeleteOldRevisionsHelper(( wiki, eevent_to_check_on = :day, minimum_age_to_merge = 60*60*24*365, maximum_time_between_revisions_for_merge = 60*60 )@ the first can be :min, :hour, :day, ;month, :year and the age and time are in seconds.
38
+
39
+ Tag: Include this page in the distribution
@@ -0,0 +1,17 @@
1
+ h1. Page.inserted_into is never purged
2
+
3
+ * Your name: tamc
4
+ * Soks version: v1.0.0
5
+ * Your operating system:
6
+ * Your version of ruby:
7
+ * Your browser:
8
+
9
+ h2. And please describe the problem below:
10
+
11
+ If one page is inserted into another, then it is recorded in an array in the Page class. If a page is updated, this allows all the other pages that insert it to be refreshed to be up to date. Unfortunately there is no mechanism to remove this record should the page no longer be inserted. This isn't a big deal, but will result in unncessary refreshes.
12
+
13
+ h2. And if you have any suggestions for the cause or a fix, please put it below:
14
+
15
+ Working on it... (but low priority)
16
+
17
+ Tag: Include this page in the distribution
@@ -3,16 +3,19 @@ h1. How to hack soks
3
3
  Here are some pointers to help you figure out where to make whatever changes and improvements you desire. The soks licence is liberal, so please do whatever you want, but I would appreciate if you sent me any improvements you make ( tamc@rubyforge.com ).
4
4
 
5
5
  * bin - contains the soks-create-wiki.rb file
6
- * contrib - contains code from other people. Currently Redcloth and Diff:LCS
6
+ * contrib - contains code from other people. Currently Redcloth and Diff:LCS
7
+ ** _Could these dependencies be resolved directly by RubyGems in future Soks releases?_
8
+ ** They _could_, but I'd have to figure out how to make rake package the gem differently from the zip and tgz file, so it has seemed simpler just to include them for now.
7
9
  * lib - contains the soks code
8
10
  * template - contains the defaults used by soks-create-wiki.rb when creating a new wiki. This folder is copied over, and the show.rb template filled out.
9
11
 
10
12
  h2. template
11
13
 
12
- * show.rb - contains the default ruby file used by soks-create-wiki.rb, this is written using erb
14
+ * start.rb - contains the default ruby file used by soks-create-wiki.rb, this is written using erb
13
15
  * attachments - contains the stuff that will be statically loaded when running a wiki, such as images and stylesheets. In particular you may want to replace logo.png
14
16
  * views - contains the default templates see Improving the style of this wiki for a few notes on this
15
17
  * content - contains the initial content for the wiki. The .textile files are flatfile text files containing the textile for a page. The title of the page is the filename (and has usually been url_encoded). Any .yaml files in here contain arrays containing the change history of the page
18
+ * version - contains the version number of this wiki. Used by soks-create-wiki.rb to see if it needs upgrading.
16
19
 
17
20
  h2. lib
18
21
 
@@ -22,7 +25,7 @@ h2. lib
22
25
  * soks-model.rb - Contains the model of the wiki: Wiki, Page and Revision
23
26
  * soks-view.rb - Contains the classes that turn the wiki into html: View, WikiRedCloth, Links, RollingMatch
24
27
  * soks-servlet.rb - Contains the webrick server that passes commands to and from the View object
25
- * soks-helpers.rb - Contains optional classes that a Wiki can load to provide added functionality. These are called when changes are made to the site. They include: AutomaticUpdateCrossLinks, AutomaticRecentChanges, AutomaticOnePageIndex, AutomaticMultiPageIndex, AutomaticSummary, AutomaticCalendar and AutomaticUpcomingEvents.
28
+ * soks-default-helpers.rb - Contains optional classes that a Wiki can load to provide added functionality. These are called when changes are made to the site. They include: AutomaticUpdateCrossLinks, AutomaticRecentChanges, AutomaticOnePageIndex, AutomaticMultiPageIndex, AutomaticSummary, AutomaticCalendar and AutomaticUpcomingEvents.
26
29
  * authenticators.rb - Contains some extra authenticators to extend those already provided by Webrick. Namely NotAuthentication and OnePasswordAuthentication
27
30
 
28
31
  h3. soks-utils.rb
@@ -42,13 +45,13 @@ h3. soks-view.rb
42
45
 
43
46
  The View object does the business. It is called by the soks-servlet, and then proceeds to call an appropriate method on the Wiki model. It may then Notify any observing AutomaticHelpers of any changes, before proceeding to render the html. This rendering happens in two places: First the Page.textile is turned into html by WikiRedCloth. then an appropriate ERB file is loaded and called.
44
47
 
45
- The WikiRedCloth overrides the to_html method of redcloth to add a number of methods that do the automatic page insertion and automatic linking. The automatic linking is actually carried out in the RollingMatch class. A record of the links between pages is kept in the Links class and then written to each page object. Currently Redcloth 3.0.1 seems to have lots of stack overflows, so Redcloth 2.0.11 is used.
48
+ The WikiRedCloth overrides the to_html method of redcloth to add a number of methods that do the automatic page insertion and automatic linking. The automatic linking is actually carried out in the RollingMatch class. A record of the links between pages is kept in the Links class and then written to each page object.
46
49
 
47
50
  The ERB files are loaded from disk. The appropriate erb file is selected by looking for the pattern ClassName_viewname.rhtml (e.g. Page_edit.rhtml). If that page doesn't exist then the process is repeated with the Page's superclass. The ERB files are cached.
48
51
 
49
52
  h3. soks-servlet.rb
50
53
 
51
- This runs a Webrick server to interact with the user. There is a $SETTINGS global that contains most of the important settings, and a start_wiki method for setting them and triggering the server to start. The server can be stopped by sending an interupt (ctrl-c).
54
+ This runs a Webrick server to interact with the user. The server can be stopped by sending an interupt (ctrl-c).
52
55
 
53
56
  The server has two handlers, a WEBrick::HTTPServlet::FileHandler for doing the dynamic content (which is attached to any url starting in /attachment/) and a WikiServlet for the dynamic content.
54
57
 
@@ -56,7 +59,7 @@ The WikiServlet service method takes a look at the request url. If it is '/' it
56
59
 
57
60
  The WikiServlet deals with file uploads by separately writing the uploaded file to the 'attachments' directory and also asking the 'View' object to create or revise an ImagePage object whose content is the filename of the uploaded file.
58
61
 
59
- h4. soks-helpers.rb
62
+ h4. soks-default-helpers.rb
60
63
 
61
64
  These are a series of classes that may be optionally loaded by a wiki's start.rb script. They receive notifications of page changes from the View object and can use this information to update other pages in the wiki. See automatic summaries for a little more detail.
62
65
 
@@ -0,0 +1,71 @@
1
+ h1. How to re-build the page cache
2
+
3
+ If you upgrade, or something goes wrong, or you just delete the contents of the cache directory in your wiki, then it will be rebuilt automatically. Unfortunately this can take quite a long time for very large wikis (I have a 4,500 page wiki). I will try and improve this in a future version of soks, but in the mean time, you can write yourself a small script to rebuild the cache by duplicating the start.rb script in your wiki folder and modifying it to be something like this.
4
+
5
+ <pre>
6
+ <code>
7
+ #!/usr/local/bin/ruby
8
+
9
+ # This file is to rebuild the cache. Don't blindly copy, but make your start.rb look like this.
10
+
11
+ $LOG = Logger.new(STDOUT)
12
+ $LOG.level = Logger::DEBUG
13
+ $LOG.datetime_format = "%Y-%m-%d %H:%M:%S"
14
+
15
+ #Add the required libraries to the search path
16
+ begin
17
+ require 'rubygems'
18
+ require_gem 'Soks', '~> 1.0.0'
19
+ $LOG.info 'Loaded Soks 1.0.0 from gem'
20
+ rescue LoadError
21
+ $LOG.info "Soks Gem version 1.0.0 could not be found"
22
+ $:.push( "/usr/lib/ruby/gems/1.8/gems/Soks-1.0.0/lib","/usr/lib/ruby/gems/1.8/gems/Soks-1.0.0/lib/helpers","/usr/lib/ruby/gems/1.8/gems/Soks-1.0.0//contrib" )
23
+ require 'soks'
24
+ $LOG.info 'Loaded Soks libraries from /usr/lib/ruby/gems/1.8/gems/Soks-1.0.0/lib","/usr/lib/ruby/gems/1.8/gems/Soks-1.0.0/lib/helpers","/usr/lib/ruby/gems/1.8/gems/Soks-1.0.0//contrib'
25
+ end
26
+
27
+ root_directory = File.expand_path( File.dirname( __FILE__) )
28
+ $MESSAGES = YAML.load( IO.readlines("#{root_directory}/views/messages.yaml").join )
29
+ banned_titles = IO.readlines("#{root_directory}/banned_titles.txt").map { |title| title.strip }
30
+
31
+ module Notify
32
+ def notify( event, *messages)
33
+ #raise "Sorry! Shutting down..." if @shutting_down
34
+ #self.event_queue.event( event, messages )
35
+ end
36
+ end
37
+
38
+ class View
39
+ def shutdown
40
+ @wiki.save_cache(REDCLOTH_CACHE_NAME,@redcloth_cache)
41
+ end
42
+ end
43
+
44
+ wiki = Wiki.new( "#{root_directory}/content", "#{root_directory}/caches" )
45
+ wiki.load_all_pages
46
+ wiki.shutdown
47
+ $LOG.info "Written page cache"
48
+
49
+ view = View.new( wiki, "http://localhost:9999", "#{root_directory}/views" )
50
+ view.name = 'A Soks Wiki'
51
+ view.description = 'A Soks Wiki for you!'
52
+ view.reload_erb_each_request = false
53
+ view.dont_frame_views = ['print','rss','listrss','linksfromrss']
54
+ view.redcloth_hard_breaks = false
55
+ view.author_to_email_conversion = '@address-not-known.com'
56
+
57
+ wiki.each do |pagename, page|
58
+ view.rollingmatch[ page.name ] = page
59
+ end
60
+
61
+ wiki.each do |pagename, page|
62
+ view.redcloth( page )
63
+ end
64
+
65
+ wiki.shutdown
66
+ view.shutdown
67
+ $LOG.info "Written view cache"
68
+ </code>
69
+ </pre>
70
+
71
+ Tag: Include this page in the distribution
@@ -11,6 +11,8 @@ Alternatively
11
11
  # Unzip or untar it
12
12
  # Change into the soks directory
13
13
 
14
+ h2. This will always work...
15
+
14
16
  Then execute the command.
15
17
 
16
18
  # @soks-create-wiki.rb --destination-dir=path/to/your/wiki@ and it will guide you through the upgrade.
@@ -19,4 +21,12 @@ If you haven't touched your start.rb file, then you are good to go. Otherwise y
19
21
 
20
22
  Should anything go wrong, or you need to revert, a pristine copy of your wiki is created in YourWikiName-bak-0.
21
23
 
24
+ h2. But this is quicker if it is only a minor upgrade
25
+
26
+ If your wiki is v1-0-0 or above then I have changed the version numbering system, so that if the version you wish to upgrade to only changes the last digit, you don't need to go through the full upgrade.
27
+
28
+ If you use gems, then your wiki should automatically use the new version next time you start it. Otherwise edit start.rb in your wiki to point to the new version of soks that you downloaded.
29
+
30
+ Note that I may make minor improvements to the way the wiki looks, which will not appear in your wiki if you follow this method. If you want to make sure they do, copy the contents of the soks/templates/default/views directory to your soks-wiki/views directory.
31
+
22
32
  Tag: Include this page in the distribution
@@ -0,0 +1,12 @@
1
+ h1. Automatic Helpers
2
+
3
+ Soks has a range of helper classes:
4
+ * Automatic summaries - Scan for other wiki pages and create new pages that have lists of relevant pages (e.g. Known Bugs)
5
+ * Automatic counters - Watch for certain events and count them (e.g. most popular pages, most frequent visitor, most prolific author)
6
+ * Automatic importers - Look outside the wiki and do things like mirroring rss feeds, or the contents of an e-mail folder
7
+ * Automatic maintenance helpers - Prune old revisions, merge others, permanently remove deleted pages etc.
8
+ * Automatic exporters - Take data from the wiki and put it elsewhere.
9
+
10
+ The api for classes to modify the wiki is pretty simple, so you should be able to create what you want pretty quickly.
11
+
12
+ Tag: Include this page in the distribution
@@ -4,7 +4,18 @@ h2. Since v1-0-0
4
4
 
5
5
  *NOTE*: This has not been released yet, although anything listed here will be in the cvs (see how to get the latest Soks from cvs)
6
6
 
7
- No changes yet.
7
+ h2. Between v1-0-1 and v1-0-0
8
+
9
+ h3. User Features
10
+
11
+ * Now able to upgrade the start.rb format used in 1.0.0+ as well as the one used in 0.0.7 and below.
12
+
13
+ h3. Bug fixes
14
+
15
+ * Fixed bug: Wrong title in Result Search page
16
+ * Fixed bug: AutomaticSummary does not reflect changes to summarised pages
17
+ * Fixed bug: Does not redirect pages with no view
18
+ * Fixed bug: E-mail addresses with hyphens not recognised
8
19
 
9
20
  h2. Between v1-0-0 and v0-0-7
10
21
 
@@ -0,0 +1,12 @@
1
+ h1. Version 1-0-1 released
2
+
3
+ This is a minor bugfix release. See how to install soks, or how to upgrade soks for instructions. There is a full list of list of changes but in brief, this fixes:
4
+
5
+ * Fixed bug: Wrong title in Result Search page
6
+ * Fixed bug: AutomaticSummary does not reflect changes to summarised pages
7
+ * Fixed bug: Does not redirect pages with no view
8
+ * Fixed bug: E-mail addresses with hyphens not recognised
9
+
10
+ However, there are still plenty of known bugs, although none of them should cause much problem day to day.
11
+
12
+ Tag: Include this page in the distribution
@@ -20,10 +20,9 @@ This is a list of pages that will be included in the default soks distribution.
20
20
  * [[ List of changes ]]
21
21
  * [[ README ]]
22
22
  * [[ Recent changes to this site ]]
23
+ * [[ SOKS features ]]
23
24
  * [[ Site Index ]]
24
25
  * [[ Soks Licence ]]
25
- * [[ Latest News ]]
26
- * [[ All News ]]
27
26
  * [[ RSS feed ]]
28
27
  * [[ Bug: GEM limits title lengths ]]
29
28
  * [[ Planned Features ]]
@@ -36,16 +35,20 @@ This is a list of pages that will be included in the default soks distribution.
36
35
  * [[ How to password protect your wiki ]]
37
36
  * [[ Bug: Textile mishandles paragraphs ]]
38
37
  * [[ Bug: Competing edits ]]
39
- * [[ Bug: E-mail addresses with hyphens not recognised ]]
40
38
  * [[ Bug: Email adresses in page titles cause incorrect links ]]
41
39
  * [[ Bug: Memory leak ]]
42
- * [[ News: Next release due, so this site is being edited ]]
43
- * [[ Tag: Include this page in the distribution ]]
44
40
  * [[ Pages to include in the distribution ]]
45
41
  * [[ How to import data ]]
42
+ * [[ Tag: Include this page in the distribution ]]
46
43
  * [[ Bug: Pages that link here may not appear on restart ]]
47
- * [[ News: Version 1-0-0 released ]]
48
44
  * [[ How to upgrade soks ]]
45
+ * [[ News: Version 1-0-0 released ]]
46
+ * [[ Automatic importers ]]
47
+ * [[ Automatic maintenance helpers ]]
48
+ * [[ How to use the Automatic Helper classes ]]
49
+ * [[ Automatic counters ]]
50
+ * [[ Automatic exporters ]]
51
+ * [[ News: Version 1-0-1 released ]]
49
52
 
50
53
 
51
54
  </automaticsummary>
@@ -68,6 +68,7 @@ See http://www.soks.org/wiki/KnownBugs for details.
68
68
 
69
69
  h2. RELEASES
70
70
 
71
+ # 2005 Aug 09 - soks-1.0.1 - Seventh public release (beta)
71
72
  # 2005 July 24 - soks-1.0.0 - Sixth public release (beta)
72
73
  # 2005 Mar 21 - soks-0.0.7 - Fifth public release (alpha)
73
74
  # 2005 Mar 15 - soks-0.0.6 - Fourth public release (alpha)