Fix Windows assets and tests (#1425)

* Fix Windows assets and tests
* Update gemojione
This commit is contained in:
Dawa Ometto
2019-12-15 21:52:37 +01:00
committed by GitHub
parent 56e36df6bd
commit caf4da73e2
5 changed files with 14 additions and 18 deletions
+8 -8
View File
@@ -40,15 +40,15 @@ def testpath(path)
File.join(TEST_DIR, path)
end
def cloned_testpath(path)
def cloned_testpath(path, bare = false)
repo = File.expand_path(testpath(path))
path = File.dirname(repo)
cloned = File.join(path, self.class.name)
FileUtils.rm_rf(cloned)
Dir.chdir(path) do
%x{git clone #{File.basename(repo)} #{self.class.name} 2>/dev/null}
end
cloned
tmp = Tempfile.new(self.class.name)
path = tmp.path
bare = bare ? "--bare" : ""
tmp.close(true)
redirect = Gem.win_platform? ? '' : '2>/dev/null'
%x{git clone #{bare} #{repo} #{path} #{redirect}}
path
end
def commit_details