summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Rakefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Rakefile b/Rakefile
index 6f08086731..ff73441bd4 100644
--- a/Rakefile
+++ b/Rakefile
@@ -47,10 +47,17 @@ namespace :spec do
deps.delete("rdiscount")
end
- gem_install_command = "install --no-ri --no-rdoc --conservative " + deps.sort_by {|name, _| name }.map do |name, version|
- "'#{name}:#{version}'"
- end.join(" ")
- sh %(#{Gem.ruby} -S gem #{gem_install_command})
+ if Gem::VERSION < "2.0.0"
+ deps.sort_by {|name, _| name }.map do |name, version|
+ gem_install_command = "install --no-ri --no-rdoc --conservative #{name} -v '#{version}'"
+ sh %(#{Gem.ruby} -S gem #{gem_install_command})
+ end
+ else
+ gem_install_command = "install --no-ri --no-rdoc --conservative " + deps.sort_by {|name, _| name }.map do |name, version|
+ "'#{name}:#{version}'"
+ end.join(" ")
+ sh %(#{Gem.ruby} -S gem #{gem_install_command})
+ end
# Download and install gems used inside tests
$LOAD_PATH.unshift("./spec")