hoe 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. data/History.txt +8 -0
  2. data/bin/sow +9 -2
  3. data/lib/hoe.rb +48 -32
  4. data/test/test_hoe.rb +1 -1
  5. metadata +5 -5
@@ -1,3 +1,11 @@
1
+ == 1.2.2 / 2007-07-23
2
+
3
+ * 2 minor enhancement:
4
+ * Added exclude parameter for check_manifest filtering to .hoerc.
5
+ * Documented .hoerc stuffs.
6
+ * 1 bug fix:
7
+ * Various (untested) fixes for windows compatibility.
8
+
1
9
  == 1.2.1 / 2007-05-21
2
10
 
3
11
  * 8 minor enhancements:
data/bin/sow CHANGED
@@ -67,5 +67,12 @@ Dir.chdir project do
67
67
  end
68
68
  end
69
69
 
70
- puts "... done, now go fix all occurances of '#{X}'"
71
- puts `find #{project} -type f | xargs grep -n #{X}`.gsub(/\A|\n/, "\n ")
70
+ WINDOZE = /win32/ =~ RUBY_PLATFORM
71
+
72
+ puts "... done, now go fix all occurrences of '#{X}'"
73
+ if WINDOZE then
74
+ puts `findstr /N /S /C:#{X} #{project}\\*`
75
+ else
76
+ puts `find #{project} -type f | xargs grep -n #{X}`.gsub(/\A|\n/, "\n ")
77
+ end
78
+
data/lib/hoe.rb CHANGED
@@ -33,31 +33,43 @@ require 'rubyforge'
33
33
  #
34
34
  # === Tasks Provided:
35
35
  #
36
- # * announce - Generate email announcement file and post to rubyforge.
37
- # * audit - Run ZenTest against the package
38
- # * check_manifest - Verify the manifest
39
- # * clean - Clean up all the extras
40
- # * config_hoe - Create a fresh ~/.hoerc file
41
- # * debug_gem - Show information about the gem.
42
- # * default - Run the default tasks
43
- # * docs - Build the docs HTML Files
44
- # * email - Generate email announcement file.
45
- # * gem - Build the gem file only.
46
- # * install - Install the package. Uses PREFIX and RUBYLIB
47
- # * install_gem - Install the package as a gem
48
- # * multi - Run the test suite using multiruby
49
- # * package - Build all the packages
50
- # * post_blog - Post announcement to blog.
51
- # * post_news - Post announcement to rubyforge.
52
- # * publish_docs - Publish RDoc to RubyForge
53
- # * release - Package and upload the release to rubyforge.
54
- # * ridocs - Generate ri locally for testing
55
- # * test - Run the test suite. Use FILTER to add to the command line.
56
- # * test_deps - Show which test files fail when run alone.
57
- # * uninstall - Uninstall the package.
36
+ # announce:: Generate email announcement file and post to rubyforge.
37
+ # audit:: Run ZenTest against the package
38
+ # check_manifest:: Verify the manifest
39
+ # clean:: Clean up all the extras
40
+ # config_hoe:: Create a fresh ~/.hoerc file
41
+ # debug_gem:: Show information about the gem.
42
+ # default:: Run the default tasks
43
+ # docs:: Build the docs HTML Files
44
+ # email:: Generate email announcement file.
45
+ # gem:: Build the gem file only.
46
+ # install:: Install the package. Uses PREFIX and RUBYLIB
47
+ # install_gem:: Install the package as a gem
48
+ # multi:: Run the test suite using multiruby
49
+ # package:: Build all the packages
50
+ # post_blog:: Post announcement to blog.
51
+ # post_news:: Post announcement to rubyforge.
52
+ # publish_docs:: Publish RDoc to RubyForge
53
+ # release:: Package and upload the release to rubyforge.
54
+ # ridocs:: Generate ri locally for testing
55
+ # test:: Run the test suite. Use FILTER to add to the command line.
56
+ # test_deps:: Show which test files fail when run alone.
57
+ # uninstall:: Uninstall the package.
58
+ #
59
+ # === Extra Configuration Options:
60
+ #
61
+ # Run +config_hoe+ to generate a new ~/.hoerc file. The file is a
62
+ # YAML formatted config file with the following settings:
63
+ #
64
+ # exclude:: A regular expression of files to exclude from
65
+ # +check_manifest+.
66
+ # publish_on_announce:: Run +publish_docs+ when you run +release+.
67
+ # blogs:: An array of hashes of blog settings.
68
+ #
69
+ # Run +config_hoe+ and see ~/.hoerc for examples.
58
70
  #
59
71
  class Hoe
60
- VERSION = '1.2.1'
72
+ VERSION = '1.2.2'
61
73
 
62
74
  ruby_prefix = Config::CONFIG['prefix']
63
75
  sitelibdir = Config::CONFIG['sitelibdir']
@@ -366,7 +378,7 @@ class Hoe
366
378
 
367
379
  desc 'Install the package as a gem'
368
380
  task :install_gem => [:clean, :package] do
369
- sh "sudo gem install pkg/*.gem"
381
+ sh "#{'sudo ' unless WINDOZE}gem install pkg/*.gem"
370
382
  end
371
383
 
372
384
  desc 'Uninstall the package.'
@@ -486,6 +498,7 @@ class Hoe
486
498
  task :config_hoe do
487
499
  with_config(:create) do |rc, path|
488
500
  blog = {
501
+ "exclude" => /tmp$|CVS|\.svn/,
489
502
  "publish_on_announce" => false,
490
503
  "blogs" => [ {
491
504
  "user" => "user",
@@ -569,15 +582,18 @@ class Hoe
569
582
  f = "Manifest.tmp"
570
583
  require 'find'
571
584
  files = []
572
- Find.find '.' do |path|
573
- next unless File.file? path
574
- next if path =~ /\.svn|tmp$|CVS/
575
- files << path[2..-1]
585
+ with_config do |config, _|
586
+ exclusions = config["exclude"] || /tmp$|CVS|\.svn/
587
+ Find.find '.' do |path|
588
+ next unless File.file? path
589
+ next if path =~ exclusions
590
+ files << path[2..-1]
591
+ end
592
+ files = files.sort.join "\n"
593
+ File.open f, 'w' do |fp| fp.puts files end
594
+ system "#{DIFF} -du Manifest.txt #{f}"
595
+ rm f
576
596
  end
577
- files = files.sort.join "\n"
578
- File.open f, 'w' do |fp| fp.puts files end
579
- system "#{DIFF} -du Manifest.txt #{f}"
580
- rm f
581
597
  end
582
598
 
583
599
  end # end define
@@ -14,7 +14,7 @@ class TestHoe < Test::Unit::TestCase
14
14
  # everything is forked out.
15
15
 
16
16
  def test_basics
17
- boring = %w(clobber_docs clobber_package redocs repackage)
17
+ boring = %w(clobber_docs clobber_package gem redocs repackage)
18
18
  expected = %w(audit
19
19
  announce
20
20
  check_manifest
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0.9
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: hoe
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.2.1
7
- date: 2007-05-21 00:00:00 -07:00
6
+ version: 1.2.2
7
+ date: 2007-07-23 00:00:00 -07:00
8
8
  summary: Hoe is a way to write Rakefiles much easier and cleaner.
9
9
  require_paths:
10
10
  - lib
@@ -59,7 +59,7 @@ dependencies:
59
59
  requirements:
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 0.4.1
62
+ version: 0.4.2
63
63
  version:
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: rake
@@ -68,5 +68,5 @@ dependencies:
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
- version: 0.7.2
71
+ version: 0.7.3
72
72
  version: