olelo 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/{doc/LICENSE → LICENSE} +0 -0
- data/README.creole +127 -0
- data/Rakefile +2 -2
- data/bin/olelo +55 -2
- data/config.ru +21 -4
- data/config/aspects.rb +9 -7
- data/config/config.yml.default +1 -0
- data/lib/olelo.rb +1 -0
- data/lib/olelo/application.rb +25 -14
- data/lib/olelo/config.rb +1 -1
- data/lib/olelo/extensions.rb +0 -12
- data/lib/olelo/helper.rb +0 -4
- data/lib/olelo/initializer.rb +4 -7
- data/lib/olelo/locale.yml +0 -3
- data/lib/olelo/page.rb +1 -1
- data/lib/olelo/plugin.rb +5 -4
- data/lib/olelo/routing.rb +15 -12
- data/lib/olelo/user.rb +10 -24
- data/lib/olelo/util.rb +4 -11
- data/lib/olelo/version.rb +1 -1
- data/lib/olelo/virtualfs.rb +11 -19
- data/olelo.gemspec +5 -2
- data/plugins/aspects/locale.yml +5 -0
- data/plugins/aspects/main.rb +8 -4
- data/plugins/authentication/yamlfile.rb +1 -1
- data/plugins/blog/main.rb +5 -5
- data/plugins/editor/ace/init.js +17 -0
- data/plugins/editor/ace/main.rb +7 -0
- data/plugins/editor/markup/main.rb +1 -1
- data/plugins/editor/markup/script.js +8 -8
- data/plugins/editor/markup/script/init.js +3 -3
- data/plugins/editor/recaptcha.rb +2 -2
- data/plugins/filters/interwiki.rb +0 -1
- data/plugins/gallery/main.rb +1 -1
- data/plugins/login/persistent.rb +2 -2
- data/plugins/misc/fancybox/script.js +1 -1
- data/plugins/misc/fancybox/script/init.js +2 -2
- data/plugins/misc/variables.rb +2 -2
- data/plugins/tags/math.rb +6 -7
- data/plugins/tags/scripting.rb +1 -1
- data/plugins/tags/tabs.rb +1 -1
- data/plugins/treeview/script.js +2 -2
- data/plugins/treeview/script/init.js +26 -24
- data/plugins/utils/assets.rb +20 -14
- data/static/themes/atlantis/images/bg/header.jpg +0 -0
- data/static/themes/atlantis/images/bg/header_gray.jpg +0 -0
- data/views/layout.slim +0 -1
- data/views/login.slim +3 -2
- metadata +127 -34
- data/README.markdown +0 -104
- data/doc/AUTHORS +0 -7
- data/lib/rack/olelo_patches.rb +0 -33
- data/lib/yard/addons.rb +0 -1
- data/lib/yard/addons/hook_handler.rb +0 -25
- data/lib/yard/addons/override_tag.rb +0 -14
- data/lib/yard/addons/route_handler.rb +0 -33
- data/lib/yard/addons/sanitize_anchor.rb +0 -16
data/README.markdown
DELETED
@@ -1,104 +0,0 @@
|
|
1
|
-
README
|
2
|
-
======
|
3
|
-
|
4
|
-
Ōlelo is a wiki that stores pages in a [Git][] repository.
|
5
|
-
See the demo installation at <http://www.gitwiki.org/>.
|
6
|
-
|
7
|
-
Features
|
8
|
-
--------
|
9
|
-
|
10
|
-
A lot of the features are implemented as plugins.
|
11
|
-
|
12
|
-
- Edit, move or delete pages
|
13
|
-
- Support for hierarchical wikis (directory structure)
|
14
|
-
- Upload files
|
15
|
-
- History (also as RSS/Atom changelog)
|
16
|
-
- Access control lists
|
17
|
-
- Support for multiple text engines (Creole, Markdown, Textile, ...)
|
18
|
-
- Section editing for creole markup
|
19
|
-
- Embedded LaTeX/Graphviz graphics
|
20
|
-
- Syntax highlighting (embedded code blocks)
|
21
|
-
- Image resizing, SVG to bitmap conversion
|
22
|
-
- Auto-generated table of contents
|
23
|
-
- Templates via include-tag
|
24
|
-
- XML tag soup can be used to extend Wiki syntax
|
25
|
-
- View pages as S5 presentation
|
26
|
-
|
27
|
-
Installation
|
28
|
-
------------
|
29
|
-
|
30
|
-
The best way to install olelo is via `gem`:
|
31
|
-
|
32
|
-
$ gem install olelo
|
33
|
-
|
34
|
-
If you run olelo from source you can use Bundler to install the dependencies.
|
35
|
-
|
36
|
-
$ bundle install
|
37
|
-
|
38
|
-
Running
|
39
|
-
-------
|
40
|
-
|
41
|
-
If you installed via gem, go to a git repository via command line and execute:
|
42
|
-
|
43
|
-
$ olelo
|
44
|
-
|
45
|
-
If you installed from source you can run the rackup configuration from the olelo application directory:
|
46
|
-
|
47
|
-
$ unicorn
|
48
|
-
|
49
|
-
Point your web browser at <http://localhost:8080>.
|
50
|
-
|
51
|
-
For production purposes, I recommend that you deploy the wiki with Unicorn.
|
52
|
-
I tested other webservers like thin, rainbows, webrick and mongrel.
|
53
|
-
|
54
|
-
Configuration
|
55
|
-
-------------
|
56
|
-
|
57
|
-
You might want to deploy the wiki on a server and want to tweak some settings.
|
58
|
-
Just copy the default configuration config/config.yml.default to config/config.yml.
|
59
|
-
You can specify a different configuration file via the environment variable WIKI_CONFIG.
|
60
|
-
|
61
|
-
export WIKI_CONFIG=/home/user/wiki_config.yml
|
62
|
-
|
63
|
-
Dependencies
|
64
|
-
------------
|
65
|
-
|
66
|
-
- [Nokogiri][]
|
67
|
-
- [Slim][]
|
68
|
-
- [Rugged][]
|
69
|
-
- [Rack][]
|
70
|
-
- [MimeMagic][]
|
71
|
-
|
72
|
-
### Optional Dependencies
|
73
|
-
|
74
|
-
- [Pygments][] for syntax highlighting
|
75
|
-
- [ImageMagick][] for image scaling and svg rendering
|
76
|
-
- [RubyPants][] to fix punctuation
|
77
|
-
|
78
|
-
### Dependencies for page rendering
|
79
|
-
|
80
|
-
At least one of these renderers should be installed:
|
81
|
-
|
82
|
-
- [creole][] for creole wikitext rendering
|
83
|
-
(`creole` Gem from [gemcutter][])
|
84
|
-
- [RedCarpet][] for Markdown rendering
|
85
|
-
- [RedCloth][] for Textile rendering
|
86
|
-
- [org-ruby][] for org-mode rendering
|
87
|
-
|
88
|
-
[creole]:http://github.com/minad/creole
|
89
|
-
[mimemagic]:http://github.com/minad/mimemagic
|
90
|
-
[Gem]:http://rubygems.org
|
91
|
-
[Git]:http://www.git-scm.org
|
92
|
-
[rack]:http://rack.rubyforge.org/
|
93
|
-
[org-ruby]:http://orgmode.org/worg/org-tutorials/org-ruby.php
|
94
|
-
[GraphViz]:http://www.graphviz.org
|
95
|
-
[SLIM]:http://github.com/stonean/slim
|
96
|
-
[nokogiri]:http://nokogiri.org/
|
97
|
-
[LaTeX]:www.latex-project.org
|
98
|
-
[pygments]:http://pygments.org/
|
99
|
-
[RedCarpet]:http://github.com/tanoku/redcarpet
|
100
|
-
[RedCloth]:http://redcloth.org/
|
101
|
-
[ImageMagick]:http://www.imagemagick.org/
|
102
|
-
[gitrb]:http://github.com/minad/gitrb/
|
103
|
-
[gemcutter]:http://gemcutter.org/
|
104
|
-
[RubyPants]:http://chneukirchen.org/blog/static/projects/rubypants.html
|
data/doc/AUTHORS
DELETED
data/lib/rack/olelo_patches.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
require 'rack'
|
2
|
-
require 'socket'
|
3
|
-
|
4
|
-
class Rack::Request
|
5
|
-
# Remote host name
|
6
|
-
def remote_host
|
7
|
-
@remote_host ||= Socket.gethostbyaddr(ip.split('.').map(&:to_i).pack('C*')).first rescue nil
|
8
|
-
end
|
9
|
-
|
10
|
-
# No caching for this request?
|
11
|
-
def no_cache?
|
12
|
-
env['HTTP_PRAGMA'] == 'no-cache' || env['HTTP_CACHE_CONTROL'].to_s.include?('no-cache')
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
# Rack::Lint injector
|
17
|
-
class Rack::Builder
|
18
|
-
module UseLint
|
19
|
-
def use(middleware, *args, &block)
|
20
|
-
super Rack::Lint if middleware != Rack::Lint
|
21
|
-
super
|
22
|
-
end
|
23
|
-
|
24
|
-
def run(app)
|
25
|
-
use Rack::Lint
|
26
|
-
super
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def use_lint
|
31
|
-
class << self; include UseLint; end
|
32
|
-
end
|
33
|
-
end
|
data/lib/yard/addons.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Dir[File.dirname(__FILE__) + '/addons/*.rb'].each {|file| require file }
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module YARD
|
2
|
-
module Handlers
|
3
|
-
class HookHandler < Ruby::Base
|
4
|
-
handles method_call(:hook)
|
5
|
-
handles method_call(:before)
|
6
|
-
handles method_call(:after)
|
7
|
-
|
8
|
-
def process
|
9
|
-
hook = statement.parameters.first.source
|
10
|
-
return if hook =~ /^"(BEFORE|AFTER)/
|
11
|
-
name = "#{statement.method_name(true).to_s.upcase} #{hook}"
|
12
|
-
route = register CodeObjects::MethodObject.new(namespace, name, :instance) do |o|
|
13
|
-
o.visibility = "public"
|
14
|
-
o.source = statement.source
|
15
|
-
o.signature = name
|
16
|
-
o.explicit = true
|
17
|
-
o.scope = scope
|
18
|
-
o.docstring = statement.comments
|
19
|
-
o.sanitize_anchor = true
|
20
|
-
o.add_file(parser.file, statement.line)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module YARD::Tags
|
2
|
-
class OverrideTag < Tag
|
3
|
-
def initialize(tag_name, text)
|
4
|
-
super(tag_name, text)
|
5
|
-
end
|
6
|
-
|
7
|
-
def text
|
8
|
-
"{#{object.namespace.superclass}##{object.name(false)}}"
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
Library.define_tag "Override", :override, OverrideTag
|
13
|
-
Library.visible_tags.place(:override).before(:return)
|
14
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
module YARD
|
2
|
-
module Handlers
|
3
|
-
class RouteHandler < Ruby::Base
|
4
|
-
handles method_call(:get)
|
5
|
-
handles method_call(:post)
|
6
|
-
handles method_call(:put)
|
7
|
-
handles method_call(:delete)
|
8
|
-
handles method_call(:head)
|
9
|
-
|
10
|
-
def register_route(name, explicit)
|
11
|
-
register CodeObjects::MethodObject.new(namespace, name, :instance) do |o|
|
12
|
-
o.visibility = "public"
|
13
|
-
o.source = statement.source
|
14
|
-
o.signature = name
|
15
|
-
o.explicit = explicit
|
16
|
-
o.scope = scope
|
17
|
-
o.docstring = statement.comments
|
18
|
-
o.sanitize_anchor = true
|
19
|
-
o.add_file(parser.file, statement.line)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def process
|
24
|
-
path = statement.parameters.first.source
|
25
|
-
if path =~ /'(.*)'/
|
26
|
-
verb = statement.method_name(true).to_s.upcase
|
27
|
-
register_route("HEAD #{$1}", false) if verb == 'GET'
|
28
|
-
register_route("#{verb} #{$1}", true)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module YARD
|
2
|
-
class CodeObjects::Base
|
3
|
-
attr_accessor :sanitize_anchor
|
4
|
-
end
|
5
|
-
|
6
|
-
module Templates::Helpers::HtmlHelper
|
7
|
-
alias anchor_for_without_sanitize anchor_for
|
8
|
-
def anchor_for(object)
|
9
|
-
if CodeObjects::Base === object && object.sanitize_anchor
|
10
|
-
anchor_for_without_sanitize(object).gsub(/[^\w_\-]/, '_')
|
11
|
-
else
|
12
|
-
anchor_for_without_sanitize(object)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|