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.

Files changed (5) hide show
  1. data/README.md +1 -1
  2. data/bin/gollum +27 -1
  3. data/gollum.gemspec +1 -1
  4. data/lib/gollum.rb +1 -1
  5. 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
- Precious::App.run!(options)
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
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
5
5
  s.required_ruby_version = ">= 1.8.7"
6
6
 
7
7
  s.name = 'gollum'
8
- s.version = '2.2.7'
8
+ s.version = '2.2.8'
9
9
  s.date = '2012-10-14'
10
10
  s.rubyforge_project = 'gollum'
11
11
 
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.7'
26
+ VERSION = '2.2.8'
27
27
 
28
28
  def self.assets_path
29
29
  ::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gollum
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.7
4
+ version: 2.2.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: