Sha256: 1dae254586ce7846a7232278e839f49eb38c36ab77f88bb9c42a7798d38e0ca5

Contents?: true

Size: 730 Bytes

Versions: 68

Compression:

Stored size: 730 Bytes

Contents

##
# Clean plugin for hoe.
#
# === Tasks Provided:
#
# clean::              Clean up all the extras.

module Hoe::Clean
  ##
  # Optional: An array of file patterns to delete on clean.

  attr_accessor :clean_globs

  ##
  # Initialize variables for plugin.

  def initialize_clean
    self.clean_globs ||= %w(diff diff.txt TAGS ri deps .source_index
                            *.gem **/*~ **/.*~ **/*.rbc coverage*)
  end

  ##
  # Define tasks for plugin.

  def define_clean_tasks
    desc 'Clean up all the extras.'
    task :clean => [ :clobber_docs, :clobber_package ] do
      clean_globs.each do |pattern|
        files = Dir[pattern]
        rm_rf files, :verbose => true unless files.empty?
      end
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
hoe-3.13.0 lib/hoe/clean.rb
hoe-3.12.0 lib/hoe/clean.rb
hoe-3.11.0 lib/hoe/clean.rb
hoe-3.10.0 lib/hoe/clean.rb
hoe-3.9.0 lib/hoe/clean.rb
hoe-3.8.1 lib/hoe/clean.rb
hoe-3.8.0 lib/hoe/clean.rb
hoe-3.7.4 lib/hoe/clean.rb
hoe-3.7.3 lib/hoe/clean.rb
hoe-3.7.2 lib/hoe/clean.rb
hoe-3.7.1 lib/hoe/clean.rb
hoe-3.7.0 lib/hoe/clean.rb
hoe-3.6.3 lib/hoe/clean.rb
hoe-3.6.2 lib/hoe/clean.rb
hoe-3.6.1 lib/hoe/clean.rb
hoe-3.6.0 lib/hoe/clean.rb
hoe-3.5.3 lib/hoe/clean.rb
hoe-3.5.2 lib/hoe/clean.rb
hoe-3.5.1 lib/hoe/clean.rb
hoe-3.5.0 lib/hoe/clean.rb