Merge pull request #734 from repotag/no_grit

No grit
This commit is contained in:
bootstraponline
2013-08-11 08:07:33 -07:00
5 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -146,7 +146,7 @@ if options['irb']
begin
require 'gollum-lib'
wiki = Gollum::Wiki.new(gollum_path, wiki_options)
if !wiki.exist? then raise Grit::InvalidGitRepositoryError end
if !wiki.exist? then raise Gollum::InvalidGitRepositoryError end
puts "Loaded Gollum wiki at #{File.expand_path(gollum_path).inspect}."
puts
puts %( page = wiki.page('page-name'))
@@ -160,7 +160,7 @@ if options['irb']
puts
puts "Check out the Gollum README for more."
IRB.start_session(binding)
rescue Grit::InvalidGitRepositoryError, Grit::NoSuchPathError
rescue Gollum::InvalidGitRepositoryError, Gollum::NoSuchPathError
puts "Invalid Gollum wiki at #{File.expand_path(gollum_path).inspect}"
exit 0
end
-1
View File
@@ -5,7 +5,6 @@ require 'digest/sha1'
require 'ostruct'
# external
require 'grit'
require 'github/markup'
require 'sanitize'
+2 -2
View File
@@ -14,8 +14,8 @@ require 'gollum/views/has_page'
require File.expand_path '../helpers', __FILE__
#required to upload bigger binary files
Grit::Git.git_timeout = 120 # timeout in secs
Grit::Git.git_max_size = 190 * 10**6 # size in bytes (10^6=1 MB)
Gollum::set_git_timeout(120)
Gollum::set_git_max_filesize(190 * 10**6)
# Fix to_url
class String
+3 -2
View File
@@ -1,7 +1,8 @@
class WikiFactory
def self.create p
path = testpath "examples/test.git"
Grit::Repo.init_bare(@path)
examples = testpath "examples"
path = File.join(examples, "test.git")
FileUtils.cp_r File.join(examples, "empty.git"), path, :remove_destination => true
Gollum::Wiki.default_options = {:universal_toc => false}
cleanup = Proc.new { FileUtils.rm_r File.join(File.dirname(__FILE__), *%w[examples test.git]) }
Gollum::Wiki.new(@path), @path, cleanup
+4 -4
View File
@@ -4,9 +4,9 @@ require File.expand_path '../../lib/gollum/views/page', __FILE__
context "Precious::Views::Page" do
setup do
@path = testpath("examples/test.git")
FileUtils.rm_rf(@path)
@repo = Grit::Repo.init_bare(@path)
examples = testpath "examples"
@path = File.join(examples, "test.git")
FileUtils.cp_r File.join(examples, "empty.git"), @path, :remove_destination => true
@wiki = Gollum::Wiki.new(@path)
end
@@ -43,4 +43,4 @@ context "Precious::Views::Page" do
actual = @view.title
assert_equal 'H1', title
end
end
end