Permalink
Browse files

Create archives of git fixture repos.

  • Loading branch information...
alloy committed Sep 14, 2011
1 parent ff706d0 commit e636acd8cbc187b17715fc2c409aee5615d7510d
Submodule banana-lib deleted from 0d0675
Binary file not shown.
Submodule master-spec-repo.git deleted from c807c4
Binary file not shown.
@@ -7,6 +7,10 @@
extend SpecHelper::Log
extend SpecHelper::TemporaryDirectory
+ before do
+ fixture('master-spec-repo.git') # ensure the archive is unpacked
+ end
+
it "creates the local spec-repos directory and creates a clone of the `master' repo" do
command = Pod::Command.parse('setup')
def command.master_repo_url; SpecHelper.fixture('master-spec-repo.git'); end
@@ -7,7 +7,14 @@ module Fixture
ROOT = ::ROOT + 'spec/fixtures'
def fixture(name)
- ROOT + name
+ file = ROOT + name
+ unless file.exist?
+ archive = Pathname.new(file.to_s + '.tar.gz')
+ if archive.exist?
+ system "cd '#{archive.dirname}' && tar -zxvf '#{archive}' > /dev/null 2>&1"
+ end
+ end
+ file
end
module_function :fixture
end

0 comments on commit e636acd

Please sign in to comment.