Debug plugin for hoe.
check_manifest | Verify the manifest. |
config_hoe | Create a fresh ~/.hoerc file. |
debug_gem | Show information about the gem. |
Verifies your Manifest.txt against the files in your project.
# File lib/hoe/debug.rb, line 60 60: def check_manifest 61: f = "Manifest.tmp" 62: require 'find' 63: files = [] 64: with_config do |config, _| 65: exclusions = config["exclude"] 66: 67: Find.find '.' do |path| 68: next unless File.file? path 69: next if path =~ exclusions 70: files << path[2..1] 71: end 72: 73: files = files.sort.join "\n" 74: 75: File.open f, 'w' do |fp| fp.puts files end 76: 77: verbose = { :verbose => Rake.application.options.verbose } 78: 79: begin 80: sh "#{DIFF} -du Manifest.txt #{f}", verbose 81: ensure 82: rm f, verbose 83: end 84: end 85: end
Define tasks for plugin.
# File lib/hoe/debug.rb, line 33 33: def define_debug_tasks 34: desc 'Create a fresh ~/.hoerc file.' 35: task :config_hoe do 36: with_config do |config, path| 37: File.open(path, "w") do |f| 38: YAML.dump(Hoe::DEFAULT_CONFIG.merge(config), f) 39: end 40: 41: editor = ENV['EDITOR'] || 'vi' 42: system "#{editor} #{path}" if ENV['SHOW_EDITOR'] != 'no' 43: end 44: end 45: 46: desc 'Verify the manifest.' 47: task :check_manifest => :clean do 48: check_manifest 49: end 50: 51: desc 'Show information about the gem.' 52: task :debug_gem do 53: puts spec.to_ruby 54: end 55: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.