diff options
| author | Jack Nagel | 2014-06-15 21:14:37 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-18 20:34:10 -0500 |
| commit | 480e3ec855ae00ebad972a41b21f8a2a5f729c7d (patch) | |
| tree | 67d45eb88cddf8f16786ddd55b6058039f2d110c /Library/Homebrew | |
| parent | 66ffc46aba1b45366850d42a50c723dfb732f0ae (diff) | |
| download | brew-480e3ec855ae00ebad972a41b21f8a2a5f729c7d.tar.bz2 | |
Make sure compatible gem versions are installed
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/test/Rakefile | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Library/Homebrew/test/Rakefile b/Library/Homebrew/test/Rakefile index ea61abef8..1f919aab2 100644 --- a/Library/Homebrew/test/Rakefile +++ b/Library/Homebrew/test/Rakefile @@ -3,15 +3,19 @@ require 'rake/testtask' TEST_DIRECTORY = File.dirname(File.expand_path(__FILE__)) TEST_FILES = Dir["#{TEST_DIRECTORY}/test_*.rb"] -GEM_DEPS = %w[mocha minitest] +GEM_DEPS = { + "mocha" => "~> 1.1", + "minitest" => "~> 5.3", + "rake" => "~> 10.3", +} task :default => :test task :deps do - GEM_DEPS.each do |dep| - `gem list --installed #{dep}` + GEM_DEPS.each do |dep, version| + `gem list --installed #{dep} -v '#{version}'` next if $?.success? - sh 'gem', 'install', '--no-ri', '--no-rdoc', '--user-install', dep + sh "gem", "install", "--no-ri", "--no-rdoc", "--user-install", dep, "-v", version end end |
