hoe 2.9.0 → 2.9.1.b.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,15 @@
1
+ === 2.9.1 / 2011-02-05
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Sow now creates all template directories before dealing with anything else
6
+
7
+ * 3 bug fixes:
8
+
9
+ * Fixed dependency order bug with prereleases [erikh]
10
+ * Fixed sanity check for prereleases.
11
+ * Fixed sow when passed no args. [erikh]
12
+
1
13
  === 2.9.0 / 2011-01-31
2
14
 
3
15
  * 11 minor enhancements:
data/bin/sow CHANGED
@@ -6,6 +6,8 @@ require 'hoe'
6
6
  require 'fileutils'
7
7
  require 'erb'
8
8
 
9
+ XIF = 'FI' + 'X' # prevents extra hits on my TAG reporter
10
+
9
11
  option = {
10
12
  :style => "default",
11
13
  :subdir => nil,
@@ -18,7 +20,9 @@ def check_subdir
18
20
  end
19
21
  end
20
22
 
21
- OptionParser.new do |opts|
23
+ opts = OptionParser.new do |opts|
24
+ opts.banner = "Usage: sow [options] project_name"
25
+
22
26
  opts.separator "Standard options:"
23
27
 
24
28
  opts.on("-t", "--trunk", "Add project to subdir under 'trunk'.") do
@@ -39,25 +43,20 @@ OptionParser.new do |opts|
39
43
  puts opts
40
44
  exit
41
45
  end
42
- end.parse!
46
+ end
47
+
48
+ opts.parse!
43
49
 
44
50
  # TODO: fail if both dev and trunk
45
51
 
46
52
  include FileUtils::Verbose
47
53
 
48
- project = ARGV.shift
49
-
50
- abort "Project #{project} seems to exist" if test ?d, project
51
-
52
54
  # variables for erb:
53
- XIF = 'FI' + 'X' # prevents extra hits on my TAG reporter
54
- project, file_name, klass = Hoe.normalize_names project
55
- template_dir = File.expand_path("~/.hoe_template")
56
- template_path = File.join template_dir, option[:style]
57
- source_path = File.join(File.dirname(File.dirname(__FILE__)),
58
- "template")
55
+ template_dir = File.expand_path("~/.hoe_template")
56
+ template_path = File.join template_dir, option[:style]
57
+ source_path = File.join(File.dirname(File.dirname(__FILE__)), "template")
58
+ default_dir = File.join template_dir, "default"
59
59
 
60
- default_dir = File.join template_dir, "default"
61
60
  if File.directory? template_dir and not File.directory? default_dir then
62
61
  warn "Detected old #{template_dir}"
63
62
  warn "Moving to #{default_dir}"
@@ -69,6 +68,7 @@ end
69
68
 
70
69
  unless File.directory? template_path then
71
70
  warn "Creating missing #{option[:style]} template."
71
+ FileUtils.mkdir_p File.dirname(template_path)
72
72
  FileUtils.cp_r source_path, template_path
73
73
  paths = (Dir["#{template_path}/**/*"] +
74
74
  Dir["#{template_path}/**/.*"]).select { |f| File.file? f }
@@ -76,6 +76,13 @@ unless File.directory? template_path then
76
76
  FileUtils.chmod 0755, paths.grep(/bin\//)
77
77
  end
78
78
 
79
+ project = ARGV.shift
80
+
81
+ abort opts.to_s unless project
82
+ abort "Project #{project} seems to exist" if test ?d, project
83
+
84
+ project, file_name, klass = Hoe.normalize_names project
85
+
79
86
  FileUtils.cp_r template_path, project
80
87
 
81
88
  Dir.chdir project do
data/lib/hoe.rb CHANGED
@@ -58,7 +58,7 @@ require 'hoe/rake'
58
58
 
59
59
  class Hoe
60
60
  # duh
61
- VERSION = '2.9.0'
61
+ VERSION = '2.9.1'
62
62
 
63
63
  @@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
64
64
  :publish, :rcov, :gemcutter, :signing, :test]
@@ -37,9 +37,9 @@ module Hoe::Package
37
37
  # Define tasks for plugin.
38
38
 
39
39
  def define_package_tasks
40
- Gem::PackageTask.new spec do |pkg|
41
- prerelease_version
40
+ prerelease_version
42
41
 
42
+ Gem::PackageTask.new spec do |pkg|
43
43
  pkg.need_tar = @need_tar
44
44
  pkg.need_zip = @need_zip
45
45
  end
@@ -54,8 +54,6 @@ module Hoe::Package
54
54
 
55
55
  # no doco, invisible hook
56
56
  task :prerelease do
57
- prerelease_version
58
-
59
57
  abort "Fix your version before you release" if spec.version =~ /borked/
60
58
  end
61
59
 
@@ -68,6 +66,10 @@ module Hoe::Package
68
66
  desc "Sanity checks for release"
69
67
  task :release_sanity do
70
68
  v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
69
+
70
+ pre = ENV['PRERELEASE'] || ENV['PRE']
71
+ v += ".#{pre}" if pre
72
+
71
73
  abort "Versions don't match #{v} vs #{version}" if v != version
72
74
  end
73
75
  end
@@ -22,7 +22,7 @@ class TestHoe < MiniTest::Unit::TestCase
22
22
  developer 'author', 'email'
23
23
  end
24
24
 
25
- initializers = hoe.methods.grep(/^initialize/)
25
+ initializers = hoe.methods.grep(/^initialize/).map { |s| s.to_s }
26
26
 
27
27
  assert_includes initializers, 'initialize_clean'
28
28
  assert_includes initializers, 'initialize_flay'
@@ -53,7 +53,9 @@ class TestHoe < MiniTest::Unit::TestCase
53
53
  developer 'author', 'email'
54
54
  end
55
55
 
56
- assert_includes spec.methods.grep(/^initialize/), 'initialize_hoerc'
56
+ methods = spec.methods.grep(/^initialize/).map { |s| s.to_s }
57
+
58
+ assert_includes methods, 'initialize_hoerc'
57
59
  end
58
60
  ensure
59
61
  Hoe.instance_variable_get(:@loaded).delete :hoerc
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoe
3
3
  version: !ruby/object:Gem::Version
4
- hash: 43
4
+ hash: 171
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 9
9
- - 0
10
- version: 2.9.0
9
+ - 1
10
+ - b
11
+ - 2
12
+ version: 2.9.1.b.2
11
13
  platform: ruby
12
14
  authors:
13
15
  - Ryan Davis
@@ -36,7 +38,7 @@ cert_chain:
36
38
  FBHgymkyj/AOSqKRIpXPhjC6
37
39
  -----END CERTIFICATE-----
38
40
 
39
- date: 2011-01-31 00:00:00 -08:00
41
+ date: 2011-02-05 00:00:00 -08:00
40
42
  default_executable:
41
43
  dependencies:
42
44
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file