In Files

Hoe::Debug

Debug plugin for hoe.

Tasks Provided:

check_manifest

Verify the manifest.

config_hoe

Create a fresh ~/.hoerc file.

debug_gem

Show information about the gem.

Public Instance Methods

define_debug_tasks() click to toggle source

Define tasks for plugin.

    # File lib/hoe/debug.rb, line 30
30:   def define_debug_tasks
31:     desc 'Create a fresh ~/.hoerc file.'
32:     task :config_hoe do
33:       with_config do |config, path|
34:         File.open(path, "w") do |f|
35:           YAML.dump(Hoe::DEFAULT_CONFIG.merge(config), f)
36:         end
37: 
38:         editor = ENV['EDITOR'] || 'vi'
39:         system "#{editor} #{path}" if ENV['SHOW_EDITOR'] != 'no'
40:       end
41:     end
42: 
43:     desc 'Verify the manifest.'
44:     task :check_manifest => :clean do
45:       f = "Manifest.tmp"
46:       require 'find'
47:       files = []
48:       with_config do |config, _|
49:         exclusions = config["exclude"]
50:         abort "exclude entry missing from .hoerc. Run rake config_hoe." if
51:           exclusions.nil?
52: 
53:         Find.find '.' do |path|
54:           next unless File.file? path
55:           next if path =~ exclusions
56:           files << path[2..1]
57:         end
58:         files = files.sort.join "\n"
59:         File.open f, 'w' do |fp| fp.puts files end
60:         system "#{DIFF} -du Manifest.txt #{f}"
61:         rm f
62:       end
63:     end
64: 
65:     desc 'Show information about the gem.'
66:     task :debug_gem do
67:       puts spec.to_ruby
68:     end
69:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.