Soks 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. data/README.txt +2 -17
  2. data/lib/helpers/default-helpers.rb +42 -41
  3. data/lib/soks-utils.rb +7 -1
  4. data/lib/soks-view.rb +5 -2
  5. data/lib/soks.rb +2 -2
  6. data/templates/default/content/Author.textile +2 -1
  7. data/templates/default/content/{Automatic%20linking%20between%20pages.textile → Automatic%20linking.textile} +1 -1
  8. data/templates/default/content/Home%20Page.textile +2 -2
  9. data/templates/default/content/How%20to%20get%20the%20latest%20Soks%20from%20cvs.textile +33 -11
  10. data/templates/default/content/How%20to%20hack%20soks.textile +1 -1
  11. data/templates/default/content/List%20of%20changes.textile +5 -131
  12. data/templates/default/content/News%3A%20Version%201%2D0%2D1%20released.textile +1 -1
  13. data/templates/default/content/Pages%20to%20include%20in%20the%20distribution.textile +5 -2
  14. data/templates/default/content/Planned%20Features.textile +12 -2
  15. data/templates/default/content/README.textile +2 -17
  16. data/templates/default/content/Recent%20changes%20to%20this%20site.textile +150 -123
  17. data/templates/default/content/SOKS%20features.textile +8 -9
  18. data/templates/default/content/Sidebar%20Page.textile +3 -0
  19. data/templates/default/content/Site%20Index.textile +17 -2
  20. data/templates/default/content/{Soks%20Licence.textile → Soks%27s%20Licence.textile} +0 -0
  21. data/templates/default/version.txt +1 -1
  22. data/templates/default/views/frame.rhtml +2 -2
  23. data/test/test_counter-helper.rb +25 -21
  24. data/test/test_soks-helpers.rb +46 -5
  25. data/test/test_soks-view.rb +14 -2
  26. data/test/test_soks.rb +9 -0
  27. metadata +5 -5
  28. data/templates/default/content/How%20to%20use%20the%20keyboard%20shortcuts.textile +0 -17
data/README.txt CHANGED
@@ -2,7 +2,7 @@ h1. SOKS: Another Ruby Wiki
2
2
 
3
3
  * This application is a Wiki (a system to allow the easy and collaborative editing of web pages).
4
4
  * The project has been kindly hosted at http://rubyforge.org/projects/soks/
5
- * The project wiki/home page is at www.soks.org
5
+ * The project wiki/home page is at http://www.soks.org
6
6
 
7
7
  Quickstart:
8
8
  # gem install Soks
@@ -59,21 +59,6 @@ h2. FEATURES
59
59
 
60
60
  h2. BUGS
61
61
 
62
- I suspect there are many, as befits its version number. In particular it has:
63
- * Insert page commands are not inhibited by notextile, pre or code tags
64
- * Does not permit browsers to cache pages
65
- * Not user friendly in the way it handles simultaneous edits of a page (last person to save wins)
66
-
67
- See http://www.soks.org/wiki/KnownBugs for details.
68
-
69
- h2. RELEASES
70
-
71
- # 2005 Aug 09 - soks-1.0.1 - Seventh public release (beta)
72
- # 2005 July 24 - soks-1.0.0 - Sixth public release (beta)
73
- # 2005 Mar 21 - soks-0.0.7 - Fifth public release (alpha)
74
- # 2005 Mar 15 - soks-0.0.6 - Fourth public release (alpha)
75
- # 2005 Feb 12 - soks-0.0.5 - Third public release (alpha)
76
- # 2005 Jan 24 - soks-0.0.4 - Second public release (alpha)
77
- # 2005 Jan 11 - soks-0.0.2 - First public release (alpha)
62
+ I suspect there are many, see http://www.soks.org/wiki/KnownBugs for details.
78
63
 
79
64
  Tag: Include this page in the distribution
@@ -59,109 +59,110 @@ class AutomaticSummary
59
59
  :lines_to_include => 10,
60
60
  :sort_pages_by => :created_on, # Could be :revised_on or :score or :name or :name_for_index, or :author
61
61
  :reverse_sort => false,
62
- :event => :page_created, # Only summarises new pages. :page_revised would summarise changed pages
63
62
  :remove_deleted_pages => true, # If false will keep references to deleted pages
64
63
  :summarise_revisions => false, # If true will list revisions rather than pages
65
64
  :merge_revisions_within => false, # If set to a number, repeats with the same author within that many seconds will be merged
66
65
  }
67
66
 
68
- attr_reader :name, :settings, :pages_in_summary
67
+ attr_reader :name, :settings, :summary, :wiki, :decision
69
68
 
70
69
  def initialize( wiki, name, settings = {}, &decision )
71
70
  @wiki, @name, @decision = wiki, name, decision
72
71
  @settings = DEFAULT_SETTINGS.merge( settings )
73
- @pages_in_summary = FiniteUniqueList.new( @settings[:max_pages_to_show], @settings[:reverse_sort], @settings[:sort_pages_by] )
74
- if @settings[:summarise_revisions]
75
- scan_revisions_allready_in_wiki
76
- else
77
- scan_pages_allready_in_wiki
78
- end
72
+ @summary = FiniteUniqueList.new( @settings[:max_pages_to_show], @settings[:reverse_sort], @settings[:sort_pages_by] )
73
+ add_existing_pages
79
74
  start_watching wiki
80
75
  end
81
-
82
- private
83
76
 
84
77
  def start_watching( wiki )
85
- wiki.watch_for( @settings[:event] ) do |event, page, revision|
86
- check_whether_to_add_page( @settings[:summarise_revisions] ? revision : page )
87
- end
88
- return unless @settings[:remove_deleted_pages]
89
- wiki.watch_for( :page_deleted ) do |event, page, revision|
90
- check_whether_to_remove_page( @settings[:summarise_revisions] ? revision : page )
78
+ wiki.watch_for( :page_revised ) do |event,page,revision|
79
+ thing = settings[:summarise_revisions ] ? revision : page
80
+ summary.include?( thing ) ? confirm_old(thing) : check_new(thing)
91
81
  end
92
82
  end
93
83
 
94
- def check_whether_to_add_page( page )
95
- return unless summarise?( page )
96
- remove_previous_revisions( page )
97
- @pages_in_summary.add( page )
84
+ def confirm_old(thing)
85
+ summary.remove(thing) unless summarise?( thing )
98
86
  render_summary_page
99
87
  end
100
88
 
101
- def check_whether_to_remove_page( page )
102
- render_summary_page if @pages_in_summary.remove( page )
89
+ def check_new(thing)
90
+ return unless summarise? thing
91
+ remove_previous_revisions thing
92
+ summary.add thing
93
+ render_summary_page
103
94
  end
104
95
 
105
- def summarise?( page )
106
- return false if page.name == @settings[:pagename]
107
- @decision.call( page )
96
+ def summarise?( thing )
97
+ return false if thing.name == name
98
+ return false if settings[:remove_deleted_pages] && thing.deleted?
99
+ decision.call( thing )
100
+ end
101
+
102
+ def add_existing_pages
103
+ if settings[:summarise_revisions]
104
+ scan_revisions_allready_in_wiki
105
+ else
106
+ scan_pages_allready_in_wiki
107
+ end
108
108
  end
109
109
 
110
110
  def scan_pages_allready_in_wiki
111
- @wiki.each( @settings[:remove_deleted_pages] ) do |name,page|
111
+ wiki.each( settings[:remove_deleted_pages] ) do |name,page|
112
112
  next unless summarise?(page)
113
- @pages_in_summary.add(page)
113
+ summary.add(page)
114
114
  end
115
115
  render_summary_page
116
116
  end
117
117
 
118
118
  def scan_revisions_allready_in_wiki
119
- @wiki.each( @settings[:remove_deleted_pages] ) do |name,page|
119
+ wiki.each( settings[:remove_deleted_pages] ) do |name,page|
120
120
  page.revisions.each do |revision|
121
121
  next unless summarise? revision
122
122
  remove_previous_revisions( revision )
123
- @pages_in_summary.add revision
123
+ summary.add revision
124
124
  end
125
125
  end
126
126
  render_summary_page
127
127
  end
128
128
 
129
129
  def remove_previous_revisions( revision )
130
- return unless @settings[:summarise_revisions]
131
- return unless @settings[:merge_revisions_within]
130
+ return unless settings[:summarise_revisions]
131
+ return unless settings[:merge_revisions_within]
132
132
  revision.number.downto(0) do |previous_number|
133
133
  previous_revision = revision.revisions.at( previous_number )
134
134
  break unless previous_revision.author == revision.author
135
- break unless (revision.revised_on - previous_revision.revised_on) < @settings[:merge_revisions_within]
136
- @pages_in_summary.remove( previous_revision )
135
+ break unless (revision.revised_on - previous_revision.revised_on) < settings[:merge_revisions_within]
136
+ summary.remove( previous_revision )
137
137
  end
138
138
  end
139
139
 
140
140
  # These methods relate to how the summary is shown.
141
141
 
142
142
  def render_summary_page
143
- @wiki.page( name ).content =~ /(.*?<automaticsummary.*?>).*?(<\/automaticsummary>.*)/mi
144
- @wiki.revise( name, ($1 || new_top) + "\n\n" + render_summary + "\n\n" + ($2 || new_tail), @settings[:author] )
143
+ wiki.page( name ).content =~ /(.*?<automaticsummary.*?>).*?(<\/automaticsummary>.*)/mi
144
+ wiki.revise( name, ($1 || new_top) + "\n\n" + render_summary + "\n\n" + ($2 || new_tail), @settings[:author] )
145
145
  end
146
146
 
147
147
  def render_summary
148
- return "No pages found to summarise" if @pages_in_summary.empty?
149
- @pages_in_summary.map { |page| render_summary_of_page(page) }.to_s
148
+ return "No pages found to summarise" if @summary.empty?
149
+ summary.map { |page| render_summary_of_page(page) }.to_s
150
150
  end
151
151
 
152
152
  def render_summary_of_page( page )
153
- page.is_inserted_into(@wiki.page( name ))
153
+ page.is_inserted_into(wiki.page( name ))
154
154
  content = "<div class='subpage'>"
155
155
  content << "[[ #{page.name} ]]<br />\n\n"
156
156
  if page.is_a? UploadPage
157
157
  content << "[[ insert #{page.name} ]]"
158
158
  else
159
- content << page.content.first_lines( @settings[:lines_to_include] ).close_unmatched_html
159
+ content << page.content.first_lines( settings[:lines_to_include] ).close_unmatched_html
160
160
  end
161
161
  content << "\n\np(more). [[(more) => #{page.name}]]\n\n</div>\n"
162
162
  end
163
163
 
164
164
  def new_top
165
+ (wiki.page(name).empty? ? "" : "#{wiki.page(name).content}\n\n" ) +
165
166
  "h2. #{name}
166
167
 
167
168
  p{font-size: x-small;}. #{@settings[:description]}
@@ -180,7 +181,7 @@ end
180
181
  class AutomaticList < AutomaticSummary
181
182
 
182
183
  def render_summary
183
- @pages_in_summary.map { |page| render_list_item(page) }.to_s
184
+ summary.map { |page| render_list_item(page) }.to_s
184
185
  end
185
186
 
186
187
  def render_list_item( page )
@@ -216,7 +217,7 @@ class AutomaticRecentChanges < AutomaticSummary
216
217
  def render_summary
217
218
  content = "<div class='recentchanges'>\n\nh2. Today\n\n"
218
219
  previous_time = Time.now
219
- @pages_in_summary.each do |revision|
220
+ @summary.each do |revision|
220
221
  unless revision.revised_on.same_day?( previous_time )
221
222
  content << "\nh2. #{revision.revised_on.relative_day}\n\n"
222
223
  previous_time = revision.revised_on
data/lib/soks-utils.rb CHANGED
@@ -48,7 +48,7 @@ class EventQueue
48
48
  end
49
49
 
50
50
  def empty?
51
- @queue.empty?
51
+ @queue.empty? && !@notifying_flag
52
52
  end
53
53
 
54
54
  private
@@ -72,6 +72,7 @@ class EventQueue
72
72
  end
73
73
 
74
74
  def notify( event, *messages)
75
+ @notifying_flag = true
75
76
  watchers_for( event ).each { |action_block|
76
77
  begin
77
78
  action_block.call(event, *messages)
@@ -80,6 +81,7 @@ class EventQueue
80
81
  err.backtrace.each { |s| $stderr.puts s }
81
82
  end
82
83
  }
84
+ @notifying_flag = false
83
85
  end
84
86
 
85
87
  def watchers_for( event )
@@ -215,6 +217,10 @@ class FiniteUniqueList
215
217
 
216
218
  def empty?; @list.empty? end
217
219
 
220
+ def include?( item )
221
+ @list.include?( item )
222
+ end
223
+
218
224
  private
219
225
 
220
226
  def remove_excess_items
data/lib/soks-view.rb CHANGED
@@ -30,6 +30,7 @@ module ErbHelper
30
30
  attr_accessor :author_to_email_conversion
31
31
 
32
32
  def url( name, view = 'view', query = '' )
33
+ return unless name
33
34
  "#{root_url}/#{view}/#{url_name_for_page_name(name)}#{query}"
34
35
  end
35
36
 
@@ -106,8 +107,10 @@ class BruteMatch
106
107
  update_titles
107
108
  end
108
109
 
109
- def match( text )
110
+ def match( text, do_not_match = [] )
111
+ do_not_match = do_not_match.map { |title| lower_case(title) }
110
112
  @titles.each do |title,regexp,page|
113
+ next if do_not_match.include? title
111
114
  text.gsub!( regexp ) { |match| "#{$1}#{yield $2, page}#{$3}" }
112
115
  end
113
116
  text
@@ -241,7 +244,7 @@ class WikiRedCloth < RedCloth
241
244
  end
242
245
 
243
246
  def inline_soks_automatic_link( text )
244
- @wiki.rollingmatch.match( text ) do |title, page|
247
+ @wiki.rollingmatch.match( text, [@page.name] ) do |title, page|
245
248
  @internal_links_from_page << page
246
249
  link( @view.url(page.name), title, 'automatic' )
247
250
  end
data/lib/soks.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/local/bin/ruby
2
2
 
3
- SOKS_VERSION = '1.0.1'
3
+ SOKS_VERSION = '1.0.2'
4
4
 
5
5
  require 'webrick'
6
6
  require 'erb'
@@ -24,4 +24,4 @@ require 'helpers/maintenance-helpers'
24
24
  require 'helpers/counter-helpers'
25
25
 
26
26
  Thread.abort_on_exception = true
27
- Socket.do_not_reverse_lookup = true
27
+ Socket.do_not_reverse_lookup = true
@@ -7,7 +7,8 @@ h2. Thanks to
7
7
  * Pavel Sykora for a fix to the print stylesheet.
8
8
  * Bil Kleb for new page categories, meta page improvements and many other suggestsions.
9
9
  * Sebastien Clediere for a patch to fix uploads on windows and other bugfixes
10
- * Giovanni Ferro for a patch to allow soks to be used from a memory stick
10
+ * Giovanni Ferro for a patch to allow soks to be used from a memory stick
11
+ * Guillaume Marcais for table of contents code for RedCloth
11
12
  * _why for the RedCloth library
12
13
  * Austin Ziegler for the Diff:LCS library
13
14
  * Matz and ruby-core for the ruby language
@@ -1,4 +1,4 @@
1
- h1. Automatic linking between pages
1
+ h1. Automatic linking
2
2
 
3
3
  Any reference to the title of another page in the wiki will be automatically linked. e.g. home page is linked to the home page. The longest possible links are made first.
4
4
 
@@ -1,8 +1,8 @@
1
1
  h1. Congratulations, you have installed SOKS
2
2
 
3
- Welcome to Soks. It is yet another wiki, written in ruby. Please bear in mind that it is beta. Feel free to use and adapt, the soks licence is free and liberal (although if you feel like contributing towards a new mac for the author that would be apreciated).
3
+ Soks is a wiki engine, written in the Ruby programming language. Soks's licence is the free and liberal Ruby licence, so please feel free to use and modify it (though the author would appreciate donations, to be used for a new mac).
4
4
 
5
- p{background:yellow;padding:10px;}. A limited selection of help and bug reports are included here. For more information, and to share experiences, please visit http://www.soks.org. If you are upgrading, you may wish to look at the list of changes.
5
+ p{background:yellow;padding:10px;}. A limited selection of help and bug reports are included here. For more information, and to share experiences, please visit http://www.soks.org.
6
6
 
7
7
  [[insert SOKS features]]
8
8
 
@@ -1,23 +1,45 @@
1
1
  h1. How to get the latest Soks from cvs
2
2
 
3
- If you can't wait for the next release of Soks, then you can check a copy out of the cvs. Note that the cvs copy of Soks *{color:red}may have serious bugs*, so please don't try and upgrade a running site with it. It also contains an outdated set of default content in the templates.
3
+ Note. Soks now uses Darcs rather than CVS for development.
4
+
5
+ If you can't wait for the next release of Soks, then you can get a copy out of the source control system. Note that the cvs copy of Soks *{color:red}may have serious bugs*, so please don't try and upgrade a running site with it.
6
+
7
+ There are now three repositories:
8
+ * [[Soks-stable => changes to soks-stable]], that contains code that has been, or will shortly be, released.
9
+ * [[Soks-testing => changes to soks-stable]], that contians code that will probably make it to the next release. www.soks.org uses the code from here.
10
+ * [[Soks-development => changes to soks-development]], that contains ideas and experiments.
11
+
12
+ There is a repository browser at http://www.counsell.org/darcs.
4
13
 
5
14
  h2. Just download and go
6
15
 
7
- # Download a tarball from http://rubyforge.org/cgi-bin/viewcvs.cgi/soks/soks.tar.gz?tarball=1&cvsroot=soks
8
- # @tar -xvzf soks.tar.gzip@
9
- # @cd soks@ and play
16
+ I will try and maintain an up to date tar.gz copy of the repositories. Unfortunately, until I find a way to hook into Darcs to create this on every change, it may not be 100% up to date.
17
+
18
+ # @wget http://www.counsell.org/darcs/soks-stable/soks-stable.tar.gz@
19
+ # @tar -xvzf soks-stable.tar.gzip@
20
+ # @cd soks-stable@ and play
10
21
 
11
- h2. Using CVS
22
+ Substitute soks-development or soks-testing for soks-stable if you require a different version.
23
+
24
+ h2. Using Darcs
12
25
 
13
26
  Steps:
14
- # If you don't have a copy of cvs, get it from www.cvshome.org
27
+ # If you don't have a copy of darcs, get it from www.darcs.net
15
28
  # Go into a terminal
16
29
  # @cd wherever_you_want_to_download_soks_to@
17
- # @cvs -d:pserver:anonymous@rubyforge.org:/var/cvs/soks login@
18
- # Press enter when asked for a password
19
- # @cvs -z3 -d:pserver:anonymous@rubyforge.org:/var/cvs/soks checkout soks@
20
- # Soks will now download...
21
- # @cd soks@ and play.
30
+ # @darcs get http://www.counsell.org/darcs/soks-stable@
31
+ # @cd soks-stable@ and play.
32
+
33
+ To update a repository you allready have:
34
+ # @cd wherever_you_downloaded_soks@
35
+ # @darcs pull http://www.counsell.org/darcs/soks-stable@
36
+ # Note, you can use this to pull specific patches from different versions of soks.
37
+
38
+ To send me a patch:
39
+ # @cd wherever_you_downloaded_soks@
40
+ # @darcs record@ to save your changes to your local copy
41
+ # Send it to me:
42
+ ** @darcs send@ if your machine and firewall are configured so that sendmail works.
43
+ ** @darcs send -o=patch-file.txt@ then e-mail darcs@soks.org with the patch-file attached.
22
44
 
23
45
  Tag: Include this page in the distribution
@@ -1,6 +1,6 @@
1
1
  h1. How to hack soks
2
2
 
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 ).
3
+ Here are some pointers to help you figure out where to make whatever changes and improvements you desire. Soks's licence is liberal, so please do whatever you want, but I would appreciate any improvements you can send me ( tamc@rubyforge.com ).
4
4
 
5
5
  * bin - contains the soks-create-wiki.rb file
6
6
  * contrib - contains code from other people. Currently Redcloth and Diff:LCS
@@ -1,136 +1,10 @@
1
1
  h1. List of changes
2
2
 
3
- h2. Since v1-0-0
3
+ There are three list of changes pages, all created automatically from submissions to the darcs repository:
4
+ # Changes to soks-stable contains the changes that actually make it to a release.
5
+ # Changes to soks-testing gives a flavour of what (might) be coming in the next couple of releases.
6
+ # Changes to soks-development gives a sense of experiments with the code, some of which might make it to a release.
4
7
 
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
-
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
19
-
20
- h2. Between v1-0-0 and v0-0-7
21
-
22
- h3. User Features
23
-
24
- * Page titles can now have any punctuation, and the wiki urls look slightly prettier.
25
- ** The url for a page now excludes punctuation, so 'Bug: is this a bug?' has the url /view/BugIsThisABug
26
- ** Old urls still work (e.g. /view/home%20page )
27
- ** Pages that differ only in punctuation are permitted, and are given unique urls (e.g. 'A&B' and 'A+B' become 'AB' and 'AB-2'). Unfortunately I haven't figured out a way of ensuring that these urls are consistent across wiki restarts, which means that bookmarks of pages that differ only in punctuation may not always serve the expected page.
28
- ** If you have any authenticators that match specific pages, these will need to be changed to match the unpunctuated, WikiWord style page name.
29
- * Recent Changes now has a 'changes' link that shows just the changes made by that revision. I'd appreciate feedback on how best to lay this out.
30
- * Revisions pages now show only 10 revisions at a time (Should make things faster).
31
- * Two new RSS feeds, accessed by /listrrss/pagename or /linksfromrss/pagename
32
- ** listrss is aimed at the Recent Changes page and creates a feed that includes the edits made to each page
33
- ** linksfromrss is aimed at Known Bugs and other similar pages, and creates an RSS feed that includes the content of each page referred to by the original page.
34
- * Some basic page view counters
35
- ** ViewCountHelper maintains a page called 'Popular Pages' that has a ranked list of the number of times a page has been viewed.
36
- ** ViewerCountHelper can be configured to maintain pages like 'Prolific Viewers' or 'Prolific Editors' that provide a ranked list of the IPs (or usernames if they have given them) of those who visit or edit the wiki most often.
37
- ** AuthorCountHelper can be configured to maintain a page with a ranked list of the n people who have made the most revisions to the wiki
38
- * Can now save cache of page data and views when the wiki is shutdown. This makes starting the wiki again much faster.
39
-
40
- h3. Adminstrative Features
41
-
42
- * The way that all the settings are made has completely changed. See the template/default/start.rb class for details
43
- * The api for the AutomaticSummary class has changed. See the templates/default/start.rb file for example use.
44
- ** e.g. @AutomaticList.new( wiki, 'Instructions and Howtos' ) { |page| page.name =~ /^How to /i }@
45
- * Some maintenance helpers, that periodically slim the wiki (these are not enabled by default)
46
- ** DeleteOldPagesHelper operates (by default) once a day and wipes from disk any deleted pages that were deleted more than (by default) 100 days ago.
47
- ** DeleteOldRevisionsHelper operates (by default) once a day and deletes any revisions that are (by default) more than 365 days old and where (by default) there are more than 20 revisions for the page.
48
- ** MergeOldRevisionsHelper opeates (by default) each hour and merges all revisions more than (by default) 24 hours old, by the same author, and that are created (by default) within an hour of each other. Note this is pretty processesor intensive, so you may not wish to use it yet, but it should result in a significant reduction in the size of revision files.
49
- * Can now include several static file handlers by specifying them in a servlet.static_file_directories hash, e.g. @{ 'Attachment' => 'attachment', 'www' => '/var/www' }@
50
- * Of interest only to people delving under the hood:
51
- ** The contents of the url's query are now available in the templates
52
- ** Content-type for a particular view is now a setting (default is for text/html, RSS is application/xml, set in soks.rb)
53
- ** The wiki now notify's listeners of time passing using :year,:month,:hour and :minute events. Helper classes can use these if they need to make periodic changes to the wiki.
54
- ** The wiki now notify's listeners of a page view using a :page_viewed event. Helper classes can use this to track what pages people look at.
55
- ** The Wiki class now has a wipe_from_disk method to erase a deleted page
56
-
57
- h3. Refactoring
58
-
59
- * The way settings are handled has been completely re-organised, removing the $SETTINGS global.
60
- * Moved the changes_from method from the Page class to the String class
61
- * Moved page delete method to Wiki class from View class
62
- * Moved the add_to_index call from save method to mutate method in Wiki class
63
- * Took out the test mock objects and put them in a separate file
64
- * Refactored the find method out of the View class into the search results erb. (Why? Because it seems to me that it is more like a different view of the wiki, rather than something special, and this simplifies the View class).
65
- * Refactored to remove the dedicated RSS method in the servlet class. Content-type is now set according to the name of the view.
66
- * Refactored to replace all the extra threads that I was using to count days with listeners that wait for the periodic events (year,month,day,hour,min) sent out by the wiki. (in the calendar helper classes, and in the disk checking classes). This should increase the gracefulness of shutdowns and make sure that serving the user pages always takes priority.
67
- * Refactored some common code from Tests to a module in mock objects
68
- * Refactored the BruteMatch class to cache the title regexps. May be a little faster.
69
- * Added some tests for the soks-servlet.rb class in preparation for some refactoring.
70
- * Refactored all the mutating methods (revise,rollback,delete,move etc) out of the View class into the Wiki and Servlet classes so that View is strictly View only
71
-
72
- h3. Bugfixes
73
-
74
- * Added test for, and fixed bug: AutomaticPageMover still apears in RecentChanges
75
- * Added test for, and fixed bug: Template pages should not be moved. Now any page with 'type a title here' in its title cannot be moved.
76
- * Added test for, and partially fixed bug: Cannot change capitalization of a page title in that changes to the page title now work. However, they cannot be undone, and don't trigger recent changes or any automatic summaries to update.
77
- * Fixed bug: Print stylesheet does not hide menu or commands (thanks to Pavel Sykora)
78
- * Fixed bug: Recent changes today can be yesterday
79
- * Fixed bug in the Calendar automatic helper where the months wouldn't link to each other.
80
- * Fixed bug where refering to pages [ [ /edit/page name?something=somethingelse ]] would not correctly discern whether page name existed and colour the link accordingly.
81
- * Added test for and fixed Bug: automatic linking does not work with trailing punctuation
82
- * Added test and fixed Bug: pages names with single quotes
83
- * Added test and fixed bug: calendar does not appear
84
- * Fixed bug: viewing revisions requires authentification
85
- * Added test and fixed Bug: automatic linking does not work with trailing punctuation
86
- * Fixed Bug: RSS feed does not validate - Hopefully all fixed now. Usernames are now turned into (by default dummy) email addresses in order for the feed to officially validate, and the new page url system means the urls are more likely to be accepted as valid.
87
-
88
- h3. Bugs Remaining
89
-
90
- These bugs definitely remain:
91
- * Bug: Does not make use of if-modified-since request headers
92
- * Bug: GEM limits title lengths - This is a limit of file names on Windows OSs?
93
- * Bug: notextile does not prevent page inserts
94
- * Bug: Textile mishandles paragraphs
95
- * Bug: E-mail addresses with hyphens not recognised
96
- * Bug: Email adresses in page titles cause incorrect links
97
- * Bug: Memory leak
98
- * Bug: Pages that link here may not appear on restart
99
-
100
- These bugs are partially fixed / tricky to replicate
101
- * Bug: Unanticipated Rollbacks - Not yet been replicated
102
- * bug: competing edits - Does what I expect (last person to save, wins) so not a bug for me, but clearly not ideal so will work on something better.
103
-
104
-
105
- h2. Between v0-0-7 and v0-0-6
106
-
107
- h3. Features
108
-
109
- * AutomaticSummary now has new options to allow specified page title, author and page content regexps to be excluded from summary.
110
- * RecentChanges by default doesn't show changes by any of the Automatic wiki helpers (e.g. the site index maker, or the page mover, or the summariser). As part of this, users can no longer have a username starting with Automatic or containing troublesome punctuation (&{}[]?).
111
- * RecentChanges by default merges any runs of page revisions that have been done by the same author.
112
- * There is a new setting @:reload_erb_each_request@ If set to true, Soks will reload the relevant bits of the wiki view directory on each request. This is useful for developing/debugging the look of a wiki. Default if false, which makes the wiki faster.
113
-
114
- h3. Refactoring
115
-
116
- * Little bit of refactoring in the AutomaticSummary class
117
- * Uses Logger (placed in $LOG global) instead of writting messages to $STDERR
118
- * Moved to_unique_filename from Servlet to File class (added unit test)
119
- * Moved to_valid_pagename from Servlet to String class (added unit test)
120
-
121
- h3. Bugfixes
122
-
123
- * Fixed a bug where the import of new pages into a wiki could overwrite old.
124
- * Fixed a bug where existing pages could become inaccesible if they had un-permitted punctuation in their title.
125
- * Fixed Bug: Matching page titles in middle of words
126
- * Fixed bug: Multipage site index S
127
- * Fixed bug: trailing spaces in page names
128
- * Fixed Bug: Forward slashes in titles problematic
129
- * Fixed Bug: Internet Exploror 6.0 incompatibilities during page edits
130
- * Fixed Bug: LinuxFirefox1.0 scroll reset after cursor move
131
-
132
- h2. Before v0-0-6
133
-
134
- See list of changes for older versions
8
+ If you wish to see changes from before the switch to darcs (i.e. version 1.0.1 and before) please see the list of changes for older versions.
135
9
 
136
10
  Tag: Include this page in the distribution