lib/geordi/commands/clean.rb in geordi-3.0.0 vs lib/geordi/commands/clean.rb in geordi-3.0.1

- old
+ new

@@ -1,14 +1,15 @@ desc 'clean', 'Remove unneeded files from the current directory' def clean - announce 'Removing tempfiles' - %w[webrat-* capybara-* tmp/webrat-* tmp/capybara-* tmp/rtex/* log/*.log].each do |pattern| - note pattern + + Interaction.announce 'Removing tempfiles' + for pattern in %w[ webrat-* capybara-* tmp/webrat-* tmp/capybara-* tmp/rtex/* log/*.log ] + Interaction.note pattern puts `rm -vfR #{pattern}` end - announce 'Finding recursively and removing backup files' + Interaction.announce 'Finding recursively and removing backup files' %w[*~].each do |pattern| - note pattern + Interaction.note pattern `find . -name #{pattern} -exec rm {} ';'` end end