gitlabhq/db/fixtures/test/001_repo.rb

16 lines
431 B
Ruby
Raw Normal View History

2011-11-15 14:51:43 +01:00
# create tmp dir if not exist
tmp_dir = File.join(Rails.root, "tmp")
Dir.mkdir(tmp_dir) unless File.exists?(tmp_dir)
2011-10-09 21:55:06 +02:00
# Create dir for test repo
repo_dir = File.join(Rails.root, "tmp", "tests")
Dir.mkdir(repo_dir) unless File.exists?(repo_dir)
`cp spec/seed_project.tar.gz tmp/tests/`
Dir.chdir(repo_dir)
2011-10-08 23:36:38 +02:00
`tar -xf seed_project.tar.gz`
3.times do |i|
2011-10-09 21:55:06 +02:00
`cp -r legit/ legit_#{i}/`
puts "Unpacked seed repo - tmp/tests/legit_#{i}"
2011-10-08 23:36:38 +02:00
end