Fix Windows assets and tests (#1425)
* Fix Windows assets and tests * Update gemojione
This commit is contained in:
@@ -8,6 +8,6 @@ else
|
|||||||
end
|
end
|
||||||
|
|
||||||
gem 'gollum-lib', :git => 'https://github.com/gollum/gollum-lib.git', :branch => 'gollum-lib-5.x' # For development purposes
|
gem 'gollum-lib', :git => 'https://github.com/gollum/gollum-lib.git', :branch => 'gollum-lib-5.x' # For development purposes
|
||||||
|
gem 'therubyrhino', :platforms => :jruby
|
||||||
gemspec
|
gemspec
|
||||||
gem 'rake', '~> 11.2'
|
gem 'rake', '~> 11.2'
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
|
|||||||
s.add_dependency 'sinatra-contrib', '~> 2.0'
|
s.add_dependency 'sinatra-contrib', '~> 2.0'
|
||||||
s.add_dependency 'mustache', ['>= 0.99.5', '< 1.0.0']
|
s.add_dependency 'mustache', ['>= 0.99.5', '< 1.0.0']
|
||||||
s.add_dependency 'useragent', '~> 0.16.2'
|
s.add_dependency 'useragent', '~> 0.16.2'
|
||||||
s.add_dependency 'gemojione', '~> 3.2'
|
s.add_dependency 'gemojione', '~> 4.1'
|
||||||
s.add_dependency 'octicons', '~> 8.5'
|
s.add_dependency 'octicons', '~> 8.5'
|
||||||
s.add_dependency 'sprockets', '~> 3.7'
|
s.add_dependency 'sprockets', '~> 3.7'
|
||||||
s.add_dependency 'sass', '~> 3.5'
|
s.add_dependency 'sass', '~> 3.5'
|
||||||
|
|||||||
+8
-8
@@ -40,15 +40,15 @@ def testpath(path)
|
|||||||
File.join(TEST_DIR, path)
|
File.join(TEST_DIR, path)
|
||||||
end
|
end
|
||||||
|
|
||||||
def cloned_testpath(path)
|
def cloned_testpath(path, bare = false)
|
||||||
repo = File.expand_path(testpath(path))
|
repo = File.expand_path(testpath(path))
|
||||||
path = File.dirname(repo)
|
tmp = Tempfile.new(self.class.name)
|
||||||
cloned = File.join(path, self.class.name)
|
path = tmp.path
|
||||||
FileUtils.rm_rf(cloned)
|
bare = bare ? "--bare" : ""
|
||||||
Dir.chdir(path) do
|
tmp.close(true)
|
||||||
%x{git clone #{File.basename(repo)} #{self.class.name} 2>/dev/null}
|
redirect = Gem.win_platform? ? '' : '2>/dev/null'
|
||||||
end
|
%x{git clone #{bare} #{repo} #{path} #{redirect}}
|
||||||
cloned
|
path
|
||||||
end
|
end
|
||||||
|
|
||||||
def commit_details
|
def commit_details
|
||||||
|
|||||||
@@ -4,15 +4,13 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
|
|||||||
context "Precious::Views::Editing" do
|
context "Precious::Views::Editing" do
|
||||||
include Rack::Test::Methods
|
include Rack::Test::Methods
|
||||||
setup do
|
setup do
|
||||||
examples = testpath "examples"
|
@path = cloned_testpath('examples/revert.git')
|
||||||
@path = File.join(examples, "test.git")
|
|
||||||
Precious::App.set(:gollum_path, @path)
|
Precious::App.set(:gollum_path, @path)
|
||||||
FileUtils.cp_r File.join(examples, "revert.git"), @path, :remove_destination => true
|
|
||||||
@wiki = Gollum::Wiki.new(@path)
|
@wiki = Gollum::Wiki.new(@path)
|
||||||
end
|
end
|
||||||
|
|
||||||
teardown do
|
teardown do
|
||||||
FileUtils.rm_r(File.join(File.dirname(__FILE__), *%w[examples test.git]))
|
FileUtils.rm_rf(@path)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "creating page is blocked" do
|
test "creating page is blocked" do
|
||||||
|
|||||||
@@ -5,14 +5,12 @@ require File.expand_path '../../lib/gollum/views/page', __FILE__
|
|||||||
|
|
||||||
context "Precious::Views::Page" do
|
context "Precious::Views::Page" do
|
||||||
setup do
|
setup do
|
||||||
examples = testpath "examples"
|
@path = cloned_testpath('examples/empty.git')
|
||||||
@path = File.join(examples, "test.git")
|
|
||||||
FileUtils.cp_r File.join(examples, "empty.git"), @path, :remove_destination => true
|
|
||||||
@wiki = Gollum::Wiki.new(@path)
|
@wiki = Gollum::Wiki.new(@path)
|
||||||
end
|
end
|
||||||
|
|
||||||
teardown do
|
teardown do
|
||||||
FileUtils.rm_r(File.join(File.dirname(__FILE__), *%w[examples test.git]))
|
FileUtils.rm_rf(@path)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "h1 title sanitizes correctly" do
|
test "h1 title sanitizes correctly" do
|
||||||
|
|||||||
Reference in New Issue
Block a user