Skip to content

Commit

Permalink
Janus tools/hammer: Fix the installation script for using find_gem in…
Browse files Browse the repository at this point in the history
…stead.
  • Loading branch information
kalbasit committed Nov 2, 2011
1 parent b236b1d commit 4887cba
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions janus-tools/tasks/hammer.rake
Expand Up @@ -2,14 +2,13 @@ namespace :plugins do
desc "Install the hammer plugin."
task :install_hammer do
begin
require 'rubygems'
if Gem.cache.find_name('github-markup').length == 0
if find_gem('github-markup').length == 0
sh "gem install github-markup"
end
if Gem.cache.find_name('redcarpet').length == 0
if find_gem('redcarpet').length == 0
sh "gem install redcarpet"
end
rescue LoadError
rescue Janus::RubyGemsNotFoundError
puts "Could not install github-markup and redcarpet, please install them manually."
puts "gem install github-markup redcarpet"
end
Expand Down

0 comments on commit 4887cba

Please sign in to comment.