public
Fork of sr/git-wiki
Description: A wiki engine that uses a Git repository as its data store.
Homepage: http://atonie.org/2008/02/git-wiki
Clone URL: git://github.com/al3x/git-wiki.git
git-wiki / environment.rb
100644 17 lines (13 sloc) 0.349 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'rubygems'
require 'extensions'
require 'page'
 
%w(git redcloth rubypants).each do |gem|
  require_gem_with_feedback gem
end
 
GIT_REPO = ENV['HOME'] + '/wiki'
HOMEPAGE = 'home'
 
unless File.exists?(GIT_REPO) && File.directory?(GIT_REPO)
  puts "Initializing repository in #{GIT_REPO}..."
  Git.init(GIT_REPO)
end
 
$repo = Git.open(GIT_REPO)