Requirements: A Mini RubyGems plugin
The .gemspec
file of a gem allows to specify requirements for that gem – but usually you do not get to see them. These five lines patch RubyGems, so that gem
displays the requirements of a gem after it has been installed:
1 2 3 4 5
Gem.post_install do |gem| gem.spec.requirements.each{ |req| puts "Please note, the #{gem.spec.name} gem requires: #{req}" } end
gem install requirements