diff options
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -227,10 +227,21 @@ task :rubocop do sh("bin/rubocop --parallel") end -begin - require "ronn" +namespace :man do + ronn_dep = bundler_spec.development_dependencies.find do |dep| + dep.name == "ronn" + end + + ronn_requirement = ronn_dep.requirement.to_s - namespace :man do + begin + gem "ronn", ronn_requirement + + require "ronn" + rescue LoadError + task(:require) { abort "We couln't activate ronn (#{ronn_requirement}). Try `gem install ronn:'#{ronn_requirement}'` to be able to release!" } + task(:build) { warn "We couln't activate ronn (#{ronn_requirement}). Try `gem install ronn:'#{ronn_requirement}'` to be able to build the help pages" } + else directory "man" index = [] @@ -284,11 +295,6 @@ begin task(:require) {} end -rescue LoadError - namespace :man do - task(:require) { abort "Install the ronn gem to be able to release!" } - task(:build) { warn "Install the ronn gem to build the help pages" } - end end begin |