hoe 2.5.0 → 2.6.0

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,21 @@
1
+ === 2.6.0 / 2010-03-27
2
+
3
+ * 6 minor enhancements:
4
+
5
+ * Added '.' to load path for (bad) 1.9.2 changes
6
+ * Added rdoc_locations array to the publish plugin to allow for
7
+ multiple arbitrary rdoc locations
8
+ * Refactored old rubyforge rdoc location to the rubyforge plugin.
9
+ * Added require_ruby_version and require_rubygems_version.
10
+ * Cleaned up dep tests
11
+ * Hoe now depends on rubygems 1.3.6 instead of the gemcutter gem.
12
+ * Remove ext from default_ruby_flags and require_paths. (luis)
13
+
14
+ * 2 bug fixes:
15
+
16
+ * Fixed test command to use '--' before filter args
17
+ * Tweaked .hoerc error to point to a fix.
18
+
1
19
  === 2.5.0 / 2010-01-06
2
20
 
3
21
  * 8 minor enhancements:
data/Rakefile CHANGED
@@ -14,6 +14,7 @@ Hoe.spec "hoe" do
14
14
  blog_categories << "Seattle.rb" << "Ruby"
15
15
 
16
16
  pluggable!
17
+ require_ruby_version '>= 1.3.6'
17
18
  end
18
19
 
19
20
  task :plugins 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.5.0'
61
+ VERSION = '2.6.0'
62
62
 
63
63
  @@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
64
64
  :publish, :rcov, :rubyforge, :gemcutter, :signing, :test]
@@ -68,7 +68,7 @@ class Hoe
68
68
 
69
69
  RUBY_DEBUG = ENV['RUBY_DEBUG']
70
70
 
71
- default_ruby_flags = "-w -I#{%w(lib ext bin test).join(File::PATH_SEPARATOR)}" +
71
+ default_ruby_flags = "-w -I#{%w(lib bin test .).join(File::PATH_SEPARATOR)}" +
72
72
  (RUBY_DEBUG ? " #{RUBY_DEBUG}" : '')
73
73
 
74
74
  ##
@@ -343,7 +343,7 @@ class Hoe
343
343
 
344
344
  def define_spec
345
345
  self.spec = Gem::Specification.new do |s|
346
- dirs = Dir['{lib,ext}']
346
+ dirs = Dir['lib']
347
347
 
348
348
  s.name = name
349
349
  s.version = version if version
@@ -552,10 +552,13 @@ class Hoe
552
552
 
553
553
  ##
554
554
  # Tell the world you're a pluggable package (ie you require rubygems 1.3.1+)
555
+ #
556
+ # This uses require_rubygems_version. Last one wins. Make sure you
557
+ # account for that.
555
558
 
556
559
  def pluggable!
557
560
  abort "update rubygems to >= 1.3.1" unless Gem.respond_to? :find_files
558
- spec_extras[:required_rubygems_version] = '>= 1.3.1'
561
+ require_rubygems_version '>= 1.3.1'
559
562
  end
560
563
 
561
564
  ##
@@ -569,6 +572,20 @@ class Hoe
569
572
  load_plugin_tasks
570
573
  end
571
574
 
575
+ ##
576
+ # Declare that your gem requires a specific rubygems version. Last one wins.
577
+
578
+ def require_rubygems_version version
579
+ spec_extras[:required_rubygems_version] = version
580
+ end
581
+
582
+ ##
583
+ # Declare that your gem requires a specific ruby version. Last one wins.
584
+
585
+ def require_ruby_version version
586
+ spec_extras[:required_ruby_version] = version
587
+ end
588
+
572
589
  ##
573
590
  # Provide a linear degrading value from n to m over start to finis dates.
574
591
 
@@ -47,7 +47,9 @@ module Hoe::Debug
47
47
  files = []
48
48
  with_config do |config, _|
49
49
  exclusions = config["exclude"]
50
- abort "exclude entry missing from .hoerc. Aborting." if exclusions.nil?
50
+ abort "exclude entry missing from .hoerc. Run rake config_hoe." if
51
+ exclusions.nil?
52
+
51
53
  Find.find '.' do |path|
52
54
  next unless File.file? path
53
55
  next if path =~ exclusions
@@ -1,12 +1,6 @@
1
1
  require 'rake'
2
- gem "gemcutter" # lame. gemcutter doesn't have a VERSION const.
3
2
 
4
3
  module Hoe::Gemcutter
5
- def initialize_gemcutter
6
- version = Gem.loaded_specs['gemcutter'].version
7
- dependency_target << ['gemcutter', ">= #{version}"]
8
- end
9
-
10
4
  def define_gemcutter_tasks
11
5
  desc "Push gem to gemcutter."
12
6
  task :release_to_gemcutter => [:clean, :package, :release_sanity] do
@@ -47,6 +47,15 @@ module Hoe::Publish
47
47
 
48
48
  attr_accessor :need_rdoc
49
49
 
50
+ ##
51
+ # Optional: An array of remote (rsync) paths to copy rdoc to.
52
+ #
53
+ # eg:
54
+ #
55
+ # rdoc_locations << "user@server:Sites/rdoc/#{remote_rdoc_dir}"
56
+
57
+ attr_accessor :rdoc_locations
58
+
50
59
  ##
51
60
  # Optional: Name of RDoc destination directory on Rubyforge. [default: +name+]
52
61
 
@@ -77,6 +86,7 @@ module Hoe::Publish
77
86
  self.blog_categories ||= [self.name]
78
87
  self.local_rdoc_dir ||= 'doc'
79
88
  self.need_rdoc ||= true
89
+ self.rdoc_locations ||= []
80
90
  self.remote_rdoc_dir ||= self.name
81
91
  self.rsync_args ||= '-av --delete'
82
92
  end
@@ -117,16 +127,12 @@ module Hoe::Publish
117
127
  end
118
128
  end
119
129
 
120
- desc 'Publish RDoc to RubyForge.'
130
+ desc "Publish RDoc to wherever you want."
121
131
  task :publish_docs => [:clean, :docs] do
122
- path = File.expand_path("~/.rubyforge/user-config.yml")
123
- config = YAML.load(File.read(path))
124
- host = "#{config["username"]}@rubyforge.org"
125
-
126
- remote_dir = "/var/www/gforge-projects/#{rubyforge_name}/#{remote_rdoc_dir}"
127
- local_dir = local_rdoc_dir
128
-
129
- sh %{rsync #{rsync_args} #{local_dir}/ #{host}:#{remote_dir}}
132
+ warn "no rdoc_location values" if rdoc_locations.empty?
133
+ self.rdoc_locations.each do |dest|
134
+ sh %{rsync #{rsync_args} #{local_rdoc_dir}/ #{dest}}
135
+ end
130
136
  end
131
137
 
132
138
  # no doco for this one
@@ -38,5 +38,14 @@ module Hoe::RubyForge
38
38
  puts "Releasing #{name} v. #{version}"
39
39
  rf.add_release rubyforge_name, name, version, *files
40
40
  end
41
+
42
+ if Hoe.plugins.include? :publish then
43
+ path = File.expand_path("~/.rubyforge/user-config.yml")
44
+ config = YAML.load(File.read(path))
45
+ base = "/var/www/gforge-projects"
46
+ dir = "#{base}/#{rubyforge_name}/#{remote_rdoc_dir}"
47
+
48
+ rdoc_locations << "#{config["username"]}@rubyforge.org:#{dir}"
49
+ end
41
50
  end
42
51
  end
@@ -126,7 +126,7 @@ module Hoe::Test
126
126
  test_globs.map { |g| Dir.glob(g) }.flatten
127
127
  tests.map! {|f| %(require "#{f}")}
128
128
 
129
- cmd = "#{Hoe::RUBY_FLAGS} -e '#{tests.join("; ")}' #{FILTER}"
129
+ cmd = "#{Hoe::RUBY_FLAGS} -e '#{tests.join("; ")}' -- #{FILTER}"
130
130
 
131
131
  if multi then
132
132
  ENV['EXCLUDED_VERSIONS'] = multiruby_skip.join ":"
@@ -53,23 +53,12 @@ class TestHoe < MiniTest::Unit::TestCase
53
53
 
54
54
  deps = spec.dependencies.sort_by { |dep| dep.name }
55
55
 
56
- assert_equal %w(gemcutter hoe rubyforge), deps.map { |dep| dep.name }
56
+ expected = [["hoe", :development, ">= #{Hoe::VERSION}"],
57
+ ["rubyforge", :development, ">= #{::RubyForge::VERSION}"]]
57
58
 
58
- dep = deps.shift
59
- assert_equal 'gemcutter', dep.name
60
- assert_equal :development, dep.type
61
- version = Gem.loaded_specs['gemcutter'].version
62
- assert_equal ">= #{version}", dep.version_requirements.to_s
63
-
64
- dep = deps.shift
65
- assert_equal 'hoe', dep.name
66
- assert_equal :development, dep.type
67
- assert_equal ">= #{Hoe::VERSION}", dep.version_requirements.to_s
68
-
69
- dep = deps.shift
70
- assert_equal 'rubyforge', dep.name
71
- assert_equal :development, dep.type
72
- assert_equal ">= #{::RubyForge::VERSION}", dep.version_requirements.to_s
59
+ assert_equal expected, deps.map { |dep|
60
+ [dep.name, dep.type, dep.requirement.to_s]
61
+ }
73
62
  end
74
63
 
75
64
  def test_plugins
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoe
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ prerelease: false
5
+ segments:
6
+ - 2
7
+ - 6
8
+ - 0
9
+ version: 2.6.0
5
10
  platform: ruby
6
11
  authors:
7
12
  - Ryan Davis
@@ -30,49 +35,51 @@ cert_chain:
30
35
  FBHgymkyj/AOSqKRIpXPhjC6
31
36
  -----END CERTIFICATE-----
32
37
 
33
- date: 2010-01-06 00:00:00 -08:00
38
+ date: 2010-03-27 00:00:00 -07:00
34
39
  default_executable:
35
40
  dependencies:
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: rubyforge
38
- type: :runtime
39
- version_requirement:
40
- version_requirements: !ruby/object:Gem::Requirement
43
+ prerelease: false
44
+ requirement: &id001 !ruby/object:Gem::Requirement
41
45
  requirements:
42
46
  - - ">="
43
47
  - !ruby/object:Gem::Version
48
+ segments:
49
+ - 2
50
+ - 0
51
+ - 3
44
52
  version: 2.0.3
45
- version:
46
- - !ruby/object:Gem::Dependency
47
- name: gemcutter
48
53
  type: :runtime
49
- version_requirement:
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 0.2.1
55
- version:
54
+ version_requirements: *id001
56
55
  - !ruby/object:Gem::Dependency
57
56
  name: rake
58
- type: :runtime
59
- version_requirement:
60
- version_requirements: !ruby/object:Gem::Requirement
57
+ prerelease: false
58
+ requirement: &id002 !ruby/object:Gem::Requirement
61
59
  requirements:
62
60
  - - ">="
63
61
  - !ruby/object:Gem::Version
62
+ segments:
63
+ - 0
64
+ - 8
65
+ - 7
64
66
  version: 0.8.7
65
- version:
67
+ type: :runtime
68
+ version_requirements: *id002
66
69
  - !ruby/object:Gem::Dependency
67
70
  name: minitest
68
- type: :development
69
- version_requirement:
70
- version_requirements: !ruby/object:Gem::Requirement
71
+ prerelease: false
72
+ requirement: &id003 !ruby/object:Gem::Requirement
71
73
  requirements:
72
74
  - - ">="
73
75
  - !ruby/object:Gem::Version
74
- version: 1.4.2
75
- version:
76
+ segments:
77
+ - 1
78
+ - 5
79
+ - 0
80
+ version: 1.5.0
81
+ type: :development
82
+ version_requirements: *id003
76
83
  description: |-
77
84
  Hoe is a rake/rubygems helper for project Rakefiles. It helps you
78
85
  manage and maintain, and release your project and includes a dynamic
@@ -142,18 +149,24 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
149
  requirements:
143
150
  - - ">="
144
151
  - !ruby/object:Gem::Version
145
- version: "0"
146
- version:
152
+ segments:
153
+ - 1
154
+ - 3
155
+ - 6
156
+ version: 1.3.6
147
157
  required_rubygems_version: !ruby/object:Gem::Requirement
148
158
  requirements:
149
159
  - - ">="
150
160
  - !ruby/object:Gem::Version
161
+ segments:
162
+ - 1
163
+ - 3
164
+ - 1
151
165
  version: 1.3.1
152
- version:
153
166
  requirements: []
154
167
 
155
168
  rubyforge_project: seattlerb
156
- rubygems_version: 1.3.5
169
+ rubygems_version: 1.3.6
157
170
  signing_key:
158
171
  specification_version: 3
159
172
  summary: Hoe is a rake/rubygems helper for project Rakefiles
metadata.gz.sig CHANGED
Binary file