diff options
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -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") |