gollum 2.2.7 → 2.2.8
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gollum might be problematic. Click here for more details.
- data/README.md +1 -1
- data/bin/gollum +27 -1
- data/gollum.gemspec +1 -1
- data/lib/gollum.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -413,7 +413,7 @@ By default, internal wiki links are all absolute from the root. To specify a dif
|
|
413
413
|
|
414
414
|
wiki = Gollum::Wiki.new("my-gollum-repo.git", :base_path => "/wiki")
|
415
415
|
|
416
|
-
Note that base_path just modifies the links. To map gollum to a non-root location, use `map` in config.ru. See [#532](https://github.com/github/gollum/issues/532).
|
416
|
+
Note that base_path just modifies the links. To map gollum to a non-root location, use `map` in config.ru. See [#532](https://github.com/github/gollum/issues/532). `bin/gollum` now includes a simple map based on base path.
|
417
417
|
|
418
418
|
> :base_path - String base path for all Wiki links.
|
419
419
|
>
|
data/bin/gollum
CHANGED
@@ -141,5 +141,31 @@ else
|
|
141
141
|
require cfg
|
142
142
|
end
|
143
143
|
|
144
|
-
|
144
|
+
base_path = wiki_options[:base_path]
|
145
|
+
|
146
|
+
if wiki_options[:base_path].nil?
|
147
|
+
Precious::App.run!(options)
|
148
|
+
else
|
149
|
+
require 'rack'
|
150
|
+
|
151
|
+
class MapGollum
|
152
|
+
def initialize base_path
|
153
|
+
@mg = Rack::Builder.new do
|
154
|
+
map '/' do
|
155
|
+
run Proc.new { [ 302, {'Location'=> "/#{base_path}" }, [] ] }
|
156
|
+
end
|
157
|
+
|
158
|
+
map "/#{base_path}" do
|
159
|
+
run Precious::App
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
def call(env)
|
165
|
+
@mg.call(env)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
# Rack::Handler does not work with Ctrl + C. Use Rack::Server instead.
|
169
|
+
Rack::Server.new(:app => MapGollum.new(base_path), :Port => options['port']).start
|
170
|
+
end
|
145
171
|
end
|
data/gollum.gemspec
CHANGED
data/lib/gollum.rb
CHANGED
@@ -23,7 +23,7 @@ require File.expand_path('../gollum/web_sequence_diagram', __FILE__)
|
|
23
23
|
require File.expand_path('../gollum/frontend/uri_encode_component', __FILE__)
|
24
24
|
|
25
25
|
module Gollum
|
26
|
-
VERSION = '2.2.
|
26
|
+
VERSION = '2.2.8'
|
27
27
|
|
28
28
|
def self.assets_path
|
29
29
|
::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
|