puppetlabs/puppet-dashboard — pull request #179 by haus (2013-03-06 01:23:25+00:00)
Title: (maint) Make rails gems optional for rake tasks

Previously running rake -T without certain gems installed would trigger an
error such as "Could not find test-unit (= 1.2.3) amongst [facter-1.6.16,
json-1.7.5, json2graphite-0.0.7, munin-ruby-0.2.3, netaddr-1.5.0,
yam2g-0.0.1]". This gem (and others), shouldn't be necessary to run the
rakefile, list the tasks, or build packages. This commit addresses that by
iterating over the troublesome requires, rescuing any LoadErrors, and then
printing a message if the dependency could not be loaded.
This also removes a require on 'ftools' in the plugins raketask, as all of the
ftools methods have been moved to FileUtils, which is loaded with rake.