hoe 1.11.0 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data.tar.gz.sig +0 -0
  2. data/History.txt +15 -0
  3. data/bin/sow +1 -1
  4. data/lib/hoe.rb +61 -12
  5. metadata +2 -2
  6. metadata.gz.sig +1 -2
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,18 @@
1
+ === 1.12.0 / 2009-03-31
2
+
3
+ * 6 minor enhancements:
4
+
5
+ * Added Rake.undo.
6
+ * Added from vlad: Rake.application.all_tasks and Rake.clear_tasks.
7
+ * Added log files to default excludes. (technonancy)
8
+ * Refactored gem install code and extended to work with jruby
9
+ * Refactored run_tests into make_test_cmd, enabling use in tasks. (jbarnette)
10
+ * Use RDoc::Task instead of Rake::RDocTask, if available.
11
+
12
+ * 1 bug fix:
13
+
14
+ * Fixed incorrect usage. (jmhodges)
15
+
1
16
  === 1.11.0 / 2009-03-16
2
17
 
3
18
  * 2 minor enhancements:
data/bin/sow CHANGED
@@ -10,7 +10,7 @@ require 'fileutils'
10
10
  require 'erb'
11
11
 
12
12
  if $h || ARGV.empty? || ($t && $d) then
13
- puts "usage: #{File.dirname $0} [-d|-t] project"
13
+ puts "usage: #{File.basename $0} [-d|-t] project"
14
14
  puts " -t = add project to subdir under 'trunk'"
15
15
  puts " -d = add project to subdir under 'dev'"
16
16
  exit
data/lib/hoe.rb CHANGED
@@ -3,7 +3,11 @@
3
3
  require 'rubygems'
4
4
  require 'rake'
5
5
  require 'rake/gempackagetask'
6
- require 'rake/rdoctask'
6
+ begin
7
+ require 'rdoc/task'
8
+ rescue LoadError
9
+ require 'rake/rdoctask'
10
+ end
7
11
  require 'rake/testtask'
8
12
  require 'rbconfig'
9
13
  require 'rubyforge'
@@ -130,7 +134,7 @@ end
130
134
  #
131
135
 
132
136
  class Hoe
133
- VERSION = '1.11.0'
137
+ VERSION = '1.12.0'
134
138
  GEMURL = URI.parse 'http://gems.rubyforge.org' # for namespace :deps below
135
139
 
136
140
  ruby_prefix = Config::CONFIG['prefix']
@@ -504,12 +508,12 @@ class Hoe
504
508
  if File.directory? "test" then
505
509
  desc 'Run the test suite. Use FILTER or TESTOPTS to add flags/args.'
506
510
  task :test do
507
- run_tests
511
+ ruby make_test_cmd
508
512
  end
509
513
 
510
514
  desc 'Run the test suite using multiruby.'
511
515
  task :multi do
512
- run_tests :multi
516
+ ruby make_test_cmd(:multi)
513
517
  end
514
518
 
515
519
  desc 'Show which test files fail when run alone.'
@@ -722,8 +726,7 @@ class Hoe
722
726
 
723
727
  desc 'Install the package as a gem.'
724
728
  task :install_gem => [:clean, :package, :check_extra_deps] do
725
- gem = Dir['pkg/*.gem'].first
726
- sh "#{'sudo ' unless WINDOZE}gem install --local #{gem}"
729
+ install_gem Dir['pkg/*.gem'].first
727
730
  end
728
731
 
729
732
  desc 'Package and upload the release to rubyforge.'
@@ -948,9 +951,7 @@ class Hoe
948
951
  begin
949
952
  gem(*dep)
950
953
  rescue Gem::LoadError
951
- dep_gem, dep_version = dep
952
- dep_version = "--version '#{dep_version}'" if dep_version
953
- sh "#{'sudo ' unless WINDOZE}gem install #{dep_gem} #{dep_version}"
954
+ install_gem(*dep)
954
955
  end
955
956
  end
956
957
  end
@@ -959,7 +960,7 @@ class Hoe
959
960
  task :config_hoe do
960
961
  with_config do |config, path|
961
962
  default_config = {
962
- "exclude" => /tmp$|CVS|\.svn/,
963
+ "exclude" => /tmp$|CVS|\.svn|\.log$/,
963
964
  "publish_on_announce" => false,
964
965
  "signing_key_file" => "~/.gem/gem-private_key.pem",
965
966
  "signing_cert_file" => "~/.gem/gem-public_cert.pem",
@@ -1115,7 +1116,15 @@ class Hoe
1115
1116
  end
1116
1117
  end # end define
1117
1118
 
1118
- def run_tests(multi=false) # :nodoc:
1119
+ def install_gem name, version = nil
1120
+ gem_cmd = Gem.default_exec_format % 'gem'
1121
+ sudo = 'sudo ' unless WINDOZE
1122
+ local = '--local' unless version
1123
+ version = "--version '#{version}'" if version
1124
+ sh "#{sudo}#{gem_cmd} install #{local} #{name} #{version}"
1125
+ end
1126
+
1127
+ def make_test_cmd multi = false # :nodoc:
1119
1128
  framework = SUPPORTED_TEST_FRAMEWORKS[testlib]
1120
1129
  raise "unsupported test framework #{testlib}" unless framework
1121
1130
 
@@ -1130,7 +1139,7 @@ class Hoe
1130
1139
  cmd = "-S multiruby #{cmd}"
1131
1140
  end
1132
1141
 
1133
- ruby cmd
1142
+ cmd
1134
1143
  end
1135
1144
 
1136
1145
  def announcement # :nodoc:
@@ -1154,6 +1163,46 @@ class Hoe
1154
1163
  end
1155
1164
  end
1156
1165
 
1166
+ module Rake
1167
+ module TaskManager
1168
+ ##
1169
+ # This gives us access to the tasks already defined in rake.
1170
+ def all_tasks
1171
+ @tasks
1172
+ end
1173
+ end
1174
+
1175
+ ##
1176
+ # Hooks into rake and allows us to clear out a task by name or
1177
+ # regexp. Use this if you want to completely override a task instead
1178
+ # of extend it.
1179
+ def self.clear_tasks(*tasks)
1180
+ tasks.flatten.each do |name|
1181
+ case name
1182
+ when Regexp then
1183
+ Rake.application.all_tasks.delete_if { |k,_| k =~ name }
1184
+ else
1185
+ Rake.application.all_tasks.delete(name)
1186
+ end
1187
+ end
1188
+ end
1189
+
1190
+ ##
1191
+ # Removes the last action added to a task. Use this when two
1192
+ # libraries define the same task and you only want one of the
1193
+ # actions.
1194
+ #
1195
+ # require 'hoe'
1196
+ # require 'tasks/rails'
1197
+ # Rake.undo("test") # rolls out rails' test task
1198
+
1199
+ def self.undo(*names)
1200
+ names.each do |name|
1201
+ all_tasks[name].actions.delete_at(-1)
1202
+ end
1203
+ end
1204
+ end
1205
+
1157
1206
  # :enddoc:
1158
1207
 
1159
1208
  class ::Rake::SshDirPublisher # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 1.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -30,7 +30,7 @@ cert_chain:
30
30
  FBHgymkyj/AOSqKRIpXPhjC6
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2009-03-16 00:00:00 -07:00
33
+ date: 2009-03-31 00:00:00 -07:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
@@ -1,2 +1 @@
1
- )��P1��o<UVKoG�ge��×cf��վ�A{��"�|�>�o9>�+�/*��~�-�$QΪ�aO˾�2-0��s&t� ���Z�"wNcSݬ.����9i�C���}^,X��z��yOy���i����d����_��>��@ ����<2Ew���!<�9�4��%/̝�;9 Z�
2
- �<�"{��<j��������~ʓ������\k��x�S�����]J=y1Ć-���ZmyEA�$�
1
+ v������((B�������:�B�����_��e+tVx&�qBf i��Е�/������"k�#���VOn}[H_p�(�+����N�`���ܿ;�l�*E��餺ʨ���d���R~@��3f��L���;GE�3��!�am��P���3}�i������be��+�ߟ�S+?�'�(E���F�����[M� qV��R�� LkJK �\��e"�>�U�4���%���8��a��Ѫ�����y��