RTFMd 0.10301.14 → 0.10301.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/RTFMd.gemspec +1 -1
  2. data/config/rtfmd.ru +7 -5
  3. metadata +3 -3
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'RTFMd'
7
- s.version = '0.10301.14'
7
+ s.version = '0.10301.15'
8
8
  s.date = '2011-12-16'
9
9
 
10
10
  s.summary = "A simple, Markdown documentation helper."
@@ -2,11 +2,16 @@ require 'sinatra/base'
2
2
  require 'gollum/frontend/app'
3
3
  require 'gollum/frontend/indexapp'
4
4
 
5
- rtfm_root = "/"
5
+ rtfm_root = ENV['RTFM_ROOT'] || "/"
6
6
 
7
7
  Precious::App.set(:roots => {})
8
8
 
9
- ENV['RTFMd_WIKI'].split(/[\s*,]+/).zip(ENV['RTFMd_BASE_PATH'].split(/[\s*,]+/)).each do |wiki_path, base_path|
9
+ ENV['RTFM_REPOS'].split(/[\s,]+/).each do |repo|
10
+ wiki_path, base_path = repo.split(":")
11
+ unless base_path
12
+ base_path = File.basename(wiki_path)
13
+ end
14
+
10
15
  Precious::App.settings.roots[base_path] = {
11
16
  :gollum_path => wiki_path,
12
17
  :wiki_options => {
@@ -16,9 +21,6 @@ ENV['RTFMd_WIKI'].split(/[\s*,]+/).zip(ENV['RTFMd_BASE_PATH'].split(/[\s*,]+/)).
16
21
  }
17
22
  end
18
23
 
19
- require 'pp'
20
- pp Precious::App.settings.roots
21
-
22
24
  Precious::App.settings.roots.keys.each do |base_path|
23
25
  map "#{rtfm_root}/#{base_path}".gsub(/\/{2,}/, "/") do
24
26
  run Precious::App
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RTFMd
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41207
4
+ hash: 41205
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 10301
9
- - 14
10
- version: 0.10301.14
9
+ - 15
10
+ version: 0.10301.15
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tom Bombadil