junebug-wiki 0.0.25 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/Manifest.txt +6 -0
- data/RELEASE_NOTES.txt +15 -0
- data/Rakefile +0 -1
- data/deploy/config.yml +12 -4
- data/lib/junebug/controllers.rb +3 -1
- data/lib/junebug/ext/redcloth.rb +5 -0
- data/lib/junebug/ext/redcloth/all_formats.rb +4 -0
- data/lib/junebug/ext/redcloth/base.rb +674 -0
- data/lib/junebug/ext/redcloth/docbook.rb +1006 -0
- data/lib/junebug/ext/redcloth/markdown.rb +138 -0
- data/lib/junebug/ext/redcloth/textile.rb +449 -0
- data/lib/junebug/version.rb +1 -1
- data/lib/junebug/views.rb +34 -26
- metadata +8 -11
data/lib/junebug/version.rb
CHANGED
data/lib/junebug/views.rb
CHANGED
@@ -1,22 +1,26 @@
|
|
1
|
-
require 'redcloth'
|
1
|
+
require 'junebug/ext/redcloth'
|
2
2
|
|
3
3
|
module Junebug::Views
|
4
4
|
|
5
5
|
def layout
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
if @skip_layout
|
7
|
+
yield
|
8
|
+
else
|
9
|
+
html {
|
10
|
+
head {
|
11
|
+
title @page_title ? @page_title : @page.title
|
12
|
+
link :href=>'/style/yui/reset.css', :type=>'text/css', :rel=>'stylesheet'
|
13
|
+
link :href=>'/style/yui/fonts.css', :type=>'text/css', :rel=>'stylesheet'
|
14
|
+
link :href=>'/style/base.css', :type=>'text/css', :rel=>'stylesheet'
|
15
|
+
link :href=>Junebug.config['feed'], :rel => "alternate", :title => "Recently Updated Pages", :type => "application/atom+xml"
|
16
|
+
}
|
17
|
+
body {
|
18
|
+
div :id=>'doc' do
|
19
|
+
self << yield
|
20
|
+
end
|
21
|
+
}
|
18
22
|
}
|
19
|
-
|
23
|
+
end
|
20
24
|
end
|
21
25
|
|
22
26
|
|
@@ -223,7 +227,8 @@ module Junebug::Views
|
|
223
227
|
%Q{<span>#{title}<a href="#{self/R(Edit, page_url, 1)}">?</a></span>}
|
224
228
|
end
|
225
229
|
end
|
226
|
-
text RedCloth.new(auto_link_urls(txt), [ ]).to_html
|
230
|
+
#text RedCloth.new(auto_link_urls(txt), [ ]).to_html
|
231
|
+
text RedCloth.new(txt, [ ]).to_html
|
227
232
|
end
|
228
233
|
|
229
234
|
def _header type
|
@@ -282,32 +287,35 @@ module Junebug::Views
|
|
282
287
|
end
|
283
288
|
end
|
284
289
|
|
285
|
-
def
|
286
|
-
|
290
|
+
def feed
|
291
|
+
site_url = Junebug.config['site_url'] || "http://#{Junebug.config['host']}:#{Junebug.config['port']}"
|
292
|
+
site_domain = site_url.gsub(/^http:\/\//, '').gsub(/:/,'_')
|
293
|
+
feed_url = site_url + R(Feed)
|
294
|
+
|
295
|
+
xml = Builder::XmlMarkup.new(:target => self, :indent => 2)
|
287
296
|
|
288
297
|
xml.instruct!
|
289
298
|
xml.feed "xmlns"=>"http://www.w3.org/2005/Atom" do
|
290
299
|
|
291
300
|
xml.title Junebug.config['feedtitle'] || "Wiki Updates"
|
292
|
-
xml.id
|
293
|
-
xml.link "rel" => "self", "href" =>
|
301
|
+
xml.id site_url
|
302
|
+
xml.link "rel" => "self", "href" => feed_url
|
294
303
|
|
295
304
|
pages = Junebug::Models::Page.find(:all, :order => 'updated_at DESC', :limit => 20)
|
296
305
|
xml.updated pages.first.updated_at.xmlschema
|
297
|
-
|
306
|
+
|
298
307
|
pages.each do |page|
|
299
|
-
|
308
|
+
atom_id = "tag:#{site_domain},#{page.created_at.strftime("%Y-%m-%d")}:page/#{page.id}/#{page.version}"
|
300
309
|
xml.entry do
|
301
|
-
xml.id
|
310
|
+
xml.id atom_id
|
302
311
|
xml.title page.title
|
303
312
|
xml.updated page.updated_at.xmlschema
|
304
313
|
|
305
314
|
xml.author { xml.name page.user.username }
|
306
|
-
xml.link "rel" => "alternate", "href" =>
|
315
|
+
xml.link "rel" => "alternate", "href" => site_url + R(Show, page.title_url)
|
307
316
|
xml.summary :type=>'html' do
|
308
|
-
|
309
|
-
xml.text!
|
310
|
-
xml.text! %| (<a href="#{url}/#{page.version-1}/#{page.version}/diff">diff</a>)| if page.version > 1
|
317
|
+
xml.text! %|<a href="#{site_url + R(Show, page.title_url)}">#{page.title}</a> updated by #{page.user.username}|
|
318
|
+
xml.text! %| (<a href="#{site_url + R(Diff,page.title_url,page.version-1,page.version)}">diff</a>)| if page.version > 1
|
311
319
|
xml.text! "\n"
|
312
320
|
end
|
313
321
|
# xml.content do
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: junebug-wiki
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2006-12-
|
6
|
+
version: 0.0.26
|
7
|
+
date: 2006-12-18 00:00:00 -08:00
|
8
8
|
summary: Junebug is a minimalist ruby wiki running on Camping.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -50,6 +50,12 @@ files:
|
|
50
50
|
- lib/junebug/ext/acts_as_versioned.rb
|
51
51
|
- lib/junebug/ext/diff.rb
|
52
52
|
- lib/junebug/ext/mosquito.rb
|
53
|
+
- lib/junebug/ext/redcloth.rb
|
54
|
+
- lib/junebug/ext/redcloth/all_formats.rb
|
55
|
+
- lib/junebug/ext/redcloth/base.rb
|
56
|
+
- lib/junebug/ext/redcloth/docbook.rb
|
57
|
+
- lib/junebug/ext/redcloth/markdown.rb
|
58
|
+
- lib/junebug/ext/redcloth/textile.rb
|
53
59
|
- lib/junebug/generator.rb
|
54
60
|
- lib/junebug/helpers.rb
|
55
61
|
- lib/junebug/models.rb
|
@@ -95,15 +101,6 @@ dependencies:
|
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: "1.5"
|
97
103
|
version:
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: RedCloth
|
100
|
-
version_requirement:
|
101
|
-
version_requirements: !ruby/object:Gem::Version::Requirement
|
102
|
-
requirements:
|
103
|
-
- - ">="
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version: 3.0.4
|
106
|
-
version:
|
107
104
|
- !ruby/object:Gem::Dependency
|
108
105
|
name: daemons
|
109
106
|
version_requirement:
|