hoe 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/.autotest +1 -1
- data/History.txt +18 -0
- data/README.txt +212 -17
- data/Rakefile +6 -0
- data/lib/hoe.rb +34 -16
- data/lib/hoe/gemcutter.rb +20 -16
- data/lib/hoe/inline.rb +1 -1
- data/lib/hoe/publish.rb +4 -3
- data/lib/hoe/rcov.rb +1 -0
- data/lib/hoe/rubyforge.rb +4 -1
- data/test/test_hoe.rb +13 -4
- metadata +31 -10
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/.autotest
CHANGED
data/History.txt
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
=== 2.5.0 / 2010-01-06
|
2
|
+
|
3
|
+
* 8 minor enhancements:
|
4
|
+
|
5
|
+
* Add extra dirs to rcov include path if needed.
|
6
|
+
* Added Hoe#dependency_target to make dependencies easier to declare.
|
7
|
+
* Added extra doco to describe how auto-population works.
|
8
|
+
* Added more doco to readme.
|
9
|
+
* Don't bother posting news to rubyforge.
|
10
|
+
* Hoe::Inline plugin now deals with X::Y by flattening the name.
|
11
|
+
* Merged some of Hoe.pdf to README.txt and further improved doco.
|
12
|
+
* Pushed gemcutter & rubyforge dependencies down to the plugins.
|
13
|
+
|
14
|
+
* 2 bug fixes:
|
15
|
+
|
16
|
+
* Fix perms on Hoe.pdf after copying.
|
17
|
+
* Fixed Hoe rdoc problem caused by gemcutter plugin.
|
18
|
+
|
1
19
|
=== 2.4.0 / 2009-12-08
|
2
20
|
|
3
21
|
* 6 minor enhancements:
|
data/README.txt
CHANGED
@@ -7,15 +7,16 @@
|
|
7
7
|
|
8
8
|
== DESCRIPTION:
|
9
9
|
|
10
|
-
Hoe is a rake/rubygems helper for project Rakefiles. It helps
|
11
|
-
|
12
|
-
extensibility. Hoe ships with
|
13
|
-
tasks including rdoc generation,
|
10
|
+
Hoe is a rake/rubygems helper for project Rakefiles. It helps you
|
11
|
+
manage and maintain, and release your project and includes a dynamic
|
12
|
+
plug-in system allowing for easy extensibility. Hoe ships with
|
13
|
+
plug-ins for all your usual project tasks including rdoc generation,
|
14
|
+
testing, packaging, and deployment.
|
14
15
|
|
15
16
|
See class rdoc for help. Hint: `ri Hoe` or any of the plugins listed
|
16
17
|
below.
|
17
18
|
|
18
|
-
|
19
|
+
For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf
|
19
20
|
|
20
21
|
== FEATURES/PROBLEMS:
|
21
22
|
|
@@ -26,6 +27,126 @@ See Also: http://seattlerb.rubyforge.org/hoe/Hoe.pdf
|
|
26
27
|
* Sow uses a simple ERB templating system allowing you to capture your
|
27
28
|
project patterns.
|
28
29
|
|
30
|
+
== SYNOPSIS:
|
31
|
+
|
32
|
+
% sow [group] project
|
33
|
+
|
34
|
+
(you can edit a project template in ~/.hoe_template after running sow
|
35
|
+
for the first time)
|
36
|
+
|
37
|
+
or:
|
38
|
+
|
39
|
+
require 'hoe'
|
40
|
+
|
41
|
+
Hoe.spec projectname do
|
42
|
+
# ... project specific data ...
|
43
|
+
end
|
44
|
+
|
45
|
+
# ... project specific tasks ...
|
46
|
+
|
47
|
+
== Deployment, the DRY way
|
48
|
+
|
49
|
+
Hoe focuses on keeping everything in its place in a useful form and
|
50
|
+
intelligently extracting what it needs. As a result, there are no
|
51
|
+
extra YAML files, config directories, ruby files, or any other
|
52
|
+
artifacts in your release that you wouldn't already have.
|
53
|
+
|
54
|
+
=== Structure Overview
|
55
|
+
|
56
|
+
project_dir/
|
57
|
+
History.txt
|
58
|
+
Manifest.txt
|
59
|
+
README.txt
|
60
|
+
Rakefile
|
61
|
+
bin/...
|
62
|
+
lib/...
|
63
|
+
test/...
|
64
|
+
|
65
|
+
=== README.txt
|
66
|
+
|
67
|
+
Most projects have a readme file of some kind that describes the
|
68
|
+
project. Hoe projects are no different, but we take them one step
|
69
|
+
further. The readme file points the reader towards all the information
|
70
|
+
they need to know to get started including a description, relevant
|
71
|
+
urls, code synopsis, license, etc. Hoe knows how to read a basic rdoc
|
72
|
+
formatted file to pull out the description (and summary by extension),
|
73
|
+
urls, and extra paragraphs of info you may want to provide in
|
74
|
+
news/blog posts.
|
75
|
+
|
76
|
+
=== History.txt
|
77
|
+
|
78
|
+
Every project should have a document describing changes over time. Hoe
|
79
|
+
can read this file (also in rdoc) and include the latest changes in
|
80
|
+
your announcements.
|
81
|
+
|
82
|
+
=== Manifest.txt
|
83
|
+
|
84
|
+
<em><strong>manifest [noun]</strong> a document giving comprehensive
|
85
|
+
details of a ship and its cargo and other contents, passengers, and
|
86
|
+
crew for the use of customs officers.</em>
|
87
|
+
|
88
|
+
Every project should know what it is shipping. This is done via an
|
89
|
+
explicit list of everything that goes out in a release. Hoe uses this
|
90
|
+
during packaging so that nothing embarrassing is picked up.
|
91
|
+
|
92
|
+
Imagine, you're a customs inspector at the Los Angeles Port, the
|
93
|
+
world's largest import/export port. A large ship filled to the brim
|
94
|
+
pulls up to the pier ready for inspection. You walk up to the captain
|
95
|
+
and his crew and ask "what is the contents of this fine ship today"
|
96
|
+
and the captain answers "oh... whatever is inside". The mind boggles.
|
97
|
+
There is no way in the world that a professionally run ship would ever
|
98
|
+
run this way and there is no way that you should either.
|
99
|
+
|
100
|
+
Professional software releases know _exactly_ what is in them, amateur
|
101
|
+
releases _do not_. "Write better globs" is the response I often hear.
|
102
|
+
I consider myself and the people I work with to be rather smart people
|
103
|
+
and if we get them wrong, chances are you will too. How many times
|
104
|
+
have you peered under the covers and seen .DS_Store, emacs backup~
|
105
|
+
files, vim vm files and other files completely unrelated to the
|
106
|
+
package? I have far more times than I'd like.
|
107
|
+
|
108
|
+
=== VERSION
|
109
|
+
|
110
|
+
Releases have versions and I've found it best for the version to be
|
111
|
+
part of the code. You can use this during runtime in a multitude of
|
112
|
+
ways. Hoe finds your version and uses it automatically during
|
113
|
+
packaging.
|
114
|
+
|
115
|
+
=== Releasing in 1 easy step
|
116
|
+
|
117
|
+
% rake release VERSION=x.y.z
|
118
|
+
|
119
|
+
That really is all there is to it. Behind the scenes it:
|
120
|
+
|
121
|
+
* Branches the release in our perforce server. (via hoe-seattlerb plugin)
|
122
|
+
* Performs sanity checks to ensure the release has integrity. (hoe-seattlerb)
|
123
|
+
* Packages into gem and tarballs.
|
124
|
+
* Uploads the packages to rubyforge.
|
125
|
+
* Posts news of the release to rubyforge and my blog.
|
126
|
+
* Sends an announcement email. (hoe-seattlerb)
|
127
|
+
|
128
|
+
That `VERSION=x.y.z` is there as a last-chance sanity check that you
|
129
|
+
know what you're releasing. You'd be surprised how blurry eyed/brained
|
130
|
+
you get at 3AM. This check helps a lot more than it should.
|
131
|
+
|
132
|
+
== Plugins:
|
133
|
+
|
134
|
+
Hoe has a flexible plugin system that allows you to activate and
|
135
|
+
deactivate what tasks are available on a given project. Hoe has been
|
136
|
+
broken up into plugins partially to make maintenance easier but also
|
137
|
+
to make it easier to turn off or replace code you don't want.
|
138
|
+
|
139
|
+
* To activate a plugin, add the following to your Rakefile above your
|
140
|
+
Hoe spec:
|
141
|
+
|
142
|
+
Hoe.plugin :plugin_name
|
143
|
+
|
144
|
+
* To deactivate a plugin, remove its name from the plugins array:
|
145
|
+
|
146
|
+
Hoe.plugins.delete :plugin_name
|
147
|
+
|
148
|
+
Again, this must be done before the Hoe spec, or it won't be useful.
|
149
|
+
|
29
150
|
=== Plug-ins Provided:
|
30
151
|
|
31
152
|
* Hoe::Clean
|
@@ -33,6 +154,7 @@ See Also: http://seattlerb.rubyforge.org/hoe/Hoe.pdf
|
|
33
154
|
* Hoe::Deps
|
34
155
|
* Hoe::Flay
|
35
156
|
* Hoe::Flog
|
157
|
+
* Hoe::Gemcutter
|
36
158
|
* Hoe::Inline
|
37
159
|
* Hoe::Newb
|
38
160
|
* Hoe::Package
|
@@ -44,27 +166,100 @@ See Also: http://seattlerb.rubyforge.org/hoe/Hoe.pdf
|
|
44
166
|
|
45
167
|
=== Known 3rd-Party Plugins:
|
46
168
|
|
47
|
-
* Hoe::Seattlerb - email announcements & perforce branching/validation on release.
|
169
|
+
* Hoe::Seattlerb - minitest support, email announcements & perforce branching/validation on release.
|
48
170
|
* Hoe::Git - git tagging on release, changelogs, and manifest creation.
|
49
171
|
* Hoe::Doofus - release checklist.
|
50
172
|
* Hoe::Debugging - for extensions, run your tests with GDB and Valgrind
|
51
173
|
|
52
|
-
|
174
|
+
=== Writing Plugins:
|
53
175
|
|
54
|
-
|
176
|
+
A plugin can be as simple as:
|
177
|
+
|
178
|
+
module Hoe::Thingy
|
179
|
+
attr_accessor :thingy
|
55
180
|
|
56
|
-
|
57
|
-
|
181
|
+
def initialize_thingy # optional
|
182
|
+
self.thingy = 42
|
183
|
+
end
|
58
184
|
|
59
|
-
|
185
|
+
def define_thingy_tasks
|
186
|
+
task :thingy do
|
187
|
+
puts thingy
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
Not terribly useful, but you get the idea. This example exercises both
|
193
|
+
plugin methods (initialize_#{plugin} and define_#{plugin}_tasks and
|
194
|
+
adds an accessor method to the Hoe instance.
|
60
195
|
|
61
|
-
|
62
|
-
|
63
|
-
Hoe.spec projectname do
|
64
|
-
# ... project specific data ...
|
65
|
-
end
|
196
|
+
=== How Plugins Work
|
66
197
|
|
67
|
-
|
198
|
+
Hoe plugins are made to be as simple as possible, but no simpler. They are
|
199
|
+
modules defined in the `Hoe` namespace and have only one required method
|
200
|
+
(`define_#{plugin}_tasks`) and one optional method (`initialize_#{plugin}`).
|
201
|
+
Plugins can also define their own methods and they'll be available as instance
|
202
|
+
methods to your hoe-spec. Plugins have 4 simple phases:
|
203
|
+
|
204
|
+
==== Loading
|
205
|
+
|
206
|
+
When Hoe is loaded the last thing it does is to ask rubygems for all of its
|
207
|
+
plugins. Plugins are found by finding all files matching "hoe/*.rb" via
|
208
|
+
installed gems or `$LOAD_PATH`. All found files are then loaded.
|
209
|
+
|
210
|
+
==== Activation
|
211
|
+
|
212
|
+
All of the plugins that ship with hoe are activated by default. This is
|
213
|
+
because they're providing the same functionality that the previous Hoe was and
|
214
|
+
without them, it'd be rather useless. Other plugins should be "opt-in" and are
|
215
|
+
activated by:
|
216
|
+
|
217
|
+
Hoe::plugin :thingy
|
218
|
+
|
219
|
+
Put this _above_ your hoe-spec. All it does is add `:thingy` to `Hoe.plugins`.
|
220
|
+
You could also deactivate a plugin by removing it from `Hoe.plugins` although
|
221
|
+
that shouldn't be necessary for the most part.
|
222
|
+
|
223
|
+
Please note that it is **not** a good idea to have a plugin you're writing
|
224
|
+
activate itself. Let developers opt-in, not opt-out. Just because someone
|
225
|
+
needs the `:thingy` plugin on one project doesn't mean they need them on _all_
|
226
|
+
their projects.
|
227
|
+
|
228
|
+
==== Initialization
|
229
|
+
|
230
|
+
When your hoe-spec is instantiated, it extends itself all known plugin
|
231
|
+
modules. This adds the method bodies to the hoe-spec and allows for the plugin
|
232
|
+
to work as part of the spec itself. Once that is over, activated plugins have
|
233
|
+
their **optional** define `initialize_#{plugin}` methods called. This lets
|
234
|
+
them set needed instance variables to default values. Finally, the hoe-spec
|
235
|
+
block is evaluated so that project specific values can override the defaults.
|
236
|
+
|
237
|
+
==== Task Definition
|
238
|
+
|
239
|
+
Finally, once the user's hoe-spec has been evaluated, all activated plugins
|
240
|
+
have their `define_#{plugin}_tasks` method called. This method must be defined
|
241
|
+
and it is here that you'll define all your tasks.
|
242
|
+
|
243
|
+
== HOW TO CONTRIBUTE OR GET SUPPORT:
|
244
|
+
|
245
|
+
=== Mailing List
|
246
|
+
|
247
|
+
A mailing list for hoe is hosted at: http://rubyforge.org/projects/seattlerb
|
248
|
+
|
249
|
+
=== Bugs & Feature Requests:
|
250
|
+
|
251
|
+
We use the bug trackers hosted at: http://rubyforge.org/projects/seattlerb
|
252
|
+
|
253
|
+
=== Patches:
|
254
|
+
|
255
|
+
* If you have a bug fix or enhancement to hoe that you'd like to
|
256
|
+
contribute, please provide a unified diff and file it in a ticket in
|
257
|
+
the bug tracker listed above.
|
258
|
+
* You can check out hoe:
|
259
|
+
* With git via github: http://github.com/seattlerb/hoe
|
260
|
+
* With svn via rubyforge: http://rubyforge.org/projects/seattlerb
|
261
|
+
* Or via perforce if you'd like to directly contribute:
|
262
|
+
http://www.zenspider.com/ZSS/Process/Perforce.html
|
68
263
|
|
69
264
|
== REQUIREMENTS:
|
70
265
|
|
data/Rakefile
CHANGED
@@ -16,9 +16,15 @@ Hoe.spec "hoe" do
|
|
16
16
|
pluggable!
|
17
17
|
end
|
18
18
|
|
19
|
+
task :plugins do
|
20
|
+
puts `find lib/hoe -name \*.rb | xargs grep -h module.Hoe::`.
|
21
|
+
gsub(/module/, '*')
|
22
|
+
end
|
23
|
+
|
19
24
|
[:redocs, :docs].each do |t|
|
20
25
|
task t do
|
21
26
|
cp "Hoe.pdf", "doc"
|
27
|
+
sh "chmod u+w doc/Hoe.pdf"
|
22
28
|
end
|
23
29
|
end
|
24
30
|
|
data/lib/hoe.rb
CHANGED
@@ -58,7 +58,7 @@ require 'hoe/rake'
|
|
58
58
|
|
59
59
|
class Hoe
|
60
60
|
# duh
|
61
|
-
VERSION = '2.
|
61
|
+
VERSION = '2.5.0'
|
62
62
|
|
63
63
|
@@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
|
64
64
|
:publish, :rcov, :rubyforge, :gemcutter, :signing, :test]
|
@@ -97,12 +97,16 @@ class Hoe
|
|
97
97
|
attr_accessor :author
|
98
98
|
|
99
99
|
##
|
100
|
-
# Optional: A description of the release's latest changes.
|
100
|
+
# Optional: A description of the release's latest changes.
|
101
|
+
# Auto-populates to the top entry of History.txt.
|
101
102
|
|
102
103
|
attr_accessor :changes
|
103
104
|
|
104
105
|
##
|
105
|
-
# Optional: A description of the project. Auto-populates
|
106
|
+
# Optional: A description of the project. Auto-populates from the
|
107
|
+
# first paragraph of the DESCRIPTION section of README.txt.
|
108
|
+
#
|
109
|
+
# See also: Hoe#summary and Hoe.paragraphs_of.
|
106
110
|
|
107
111
|
attr_accessor :description
|
108
112
|
|
@@ -180,7 +184,10 @@ class Hoe
|
|
180
184
|
attr_accessor :spec_extras
|
181
185
|
|
182
186
|
##
|
183
|
-
# Optional: A short summary of the project. Auto-populates
|
187
|
+
# Optional: A short summary of the project. Auto-populates from the
|
188
|
+
# first sentence of the description.
|
189
|
+
#
|
190
|
+
# See also: Hoe#description and Hoe.paragraphs_of.
|
184
191
|
|
185
192
|
attr_accessor :summary
|
186
193
|
|
@@ -195,7 +202,9 @@ class Hoe
|
|
195
202
|
attr_accessor :test_globs
|
196
203
|
|
197
204
|
##
|
198
|
-
# Optional: The url(s) of the project. (can be array).
|
205
|
+
# Optional: The url(s) of the project. (can be array).
|
206
|
+
# Auto-populates to a list of urls read from the beginning of
|
207
|
+
# README.txt.
|
199
208
|
|
200
209
|
attr_accessor :url
|
201
210
|
|
@@ -267,7 +276,13 @@ class Hoe
|
|
267
276
|
end
|
268
277
|
|
269
278
|
##
|
270
|
-
#
|
279
|
+
# Execute the Hoe DSL to define your project's Hoe specification
|
280
|
+
# (which interally creates a gem specification). All hoe attributes
|
281
|
+
# and methods are available within +block+. Eg:
|
282
|
+
#
|
283
|
+
# Hoe.spec name do
|
284
|
+
# # ... project specific data ...
|
285
|
+
# end
|
271
286
|
|
272
287
|
def self.spec name, &block
|
273
288
|
Hoe.load_plugins
|
@@ -303,23 +318,26 @@ class Hoe
|
|
303
318
|
# Add standard and user defined dependencies to the spec.
|
304
319
|
|
305
320
|
def add_dependencies
|
306
|
-
hoe_deps = {
|
307
|
-
'rake' => ">= #{RAKEVERSION}",
|
308
|
-
'rubyforge' => ">= #{::RubyForge::VERSION}", # TODO: push down
|
309
|
-
}
|
310
|
-
|
311
321
|
self.extra_deps = normalize_deps extra_deps
|
312
322
|
self.extra_dev_deps = normalize_deps extra_dev_deps
|
313
323
|
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
324
|
+
case name
|
325
|
+
when 'hoe' then
|
326
|
+
extra_deps << ['rake', ">= #{RAKEVERSION}"]
|
327
|
+
when 'rubyforge', 'rake', 'gemcutter' then
|
328
|
+
# avoid circular dependencies for hoe's (potentially) hoe'd dependencies
|
318
329
|
else
|
319
|
-
extra_dev_deps << ['hoe', ">= #{VERSION}"]
|
330
|
+
extra_dev_deps << ['hoe', ">= #{VERSION}"]
|
320
331
|
end
|
321
332
|
end
|
322
333
|
|
334
|
+
##
|
335
|
+
# Returns the proper dependency list for the thingy.
|
336
|
+
|
337
|
+
def dependency_target
|
338
|
+
self.name == 'hoe' ? extra_deps : extra_dev_deps
|
339
|
+
end
|
340
|
+
|
323
341
|
##
|
324
342
|
# Define the Gem::Specification.
|
325
343
|
|
data/lib/hoe/gemcutter.rb
CHANGED
@@ -1,20 +1,24 @@
|
|
1
1
|
require 'rake'
|
2
|
+
gem "gemcutter" # lame. gemcutter doesn't have a VERSION const.
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
pkg = "pkg/#{spec.name}-#{spec.version}"
|
9
|
-
gems = Dir["#{pkg}*.gem"]
|
10
|
-
gems.each do |g|
|
11
|
-
# TODO - once gemcutter supports command invocation, use it.
|
12
|
-
# We could still fail here due to --format executable
|
13
|
-
sh Gem.ruby, "-S", "gem", "push", g
|
14
|
-
end
|
15
|
-
end
|
4
|
+
module Hoe::Gemcutter
|
5
|
+
def initialize_gemcutter
|
6
|
+
version = Gem.loaded_specs['gemcutter'].version
|
7
|
+
dependency_target << ['gemcutter', ">= #{version}"]
|
8
|
+
end
|
16
9
|
|
17
|
-
|
10
|
+
def define_gemcutter_tasks
|
11
|
+
desc "Push gem to gemcutter."
|
12
|
+
task :release_to_gemcutter => [:clean, :package, :release_sanity] do
|
13
|
+
pkg = "pkg/#{spec.name}-#{spec.version}"
|
14
|
+
gems = Dir["#{pkg}*.gem"]
|
15
|
+
gems.each do |g|
|
16
|
+
# TODO - once gemcutter supports command invocation, use it.
|
17
|
+
# We could still fail here due to --format executable
|
18
|
+
sh Gem.ruby, "-S", "gem", "push", g
|
19
|
+
end
|
18
20
|
end
|
19
|
-
|
20
|
-
|
21
|
+
|
22
|
+
task :release_to => :release_to_gemcutter
|
23
|
+
end
|
24
|
+
end unless defined? Hoe::Gemcutter
|
data/lib/hoe/inline.rb
CHANGED
@@ -36,7 +36,7 @@ module Hoe::Inline
|
|
36
36
|
dlext = Config::CONFIG['DLEXT']
|
37
37
|
|
38
38
|
Inline.registered_inline_classes.each do |cls|
|
39
|
-
name = cls.name
|
39
|
+
name = cls.name.gsub(/::/, '')
|
40
40
|
# name of the extension is CamelCase
|
41
41
|
alternate_name = if name =~ /[A-Z]/ then
|
42
42
|
name.gsub(/([A-Z])/, '_\1').downcase.sub(/^_/, '')
|
data/lib/hoe/publish.rb
CHANGED
@@ -100,7 +100,7 @@ module Hoe::Publish
|
|
100
100
|
if title then
|
101
101
|
rd.options << title
|
102
102
|
|
103
|
-
unless title =~
|
103
|
+
unless title =~ /\=/ then # for ['-t', 'title here']
|
104
104
|
title_index = spec.rdoc_options.index(title)
|
105
105
|
rd.options << spec.rdoc_options[title_index + 1]
|
106
106
|
end
|
@@ -119,7 +119,8 @@ module Hoe::Publish
|
|
119
119
|
|
120
120
|
desc 'Publish RDoc to RubyForge.'
|
121
121
|
task :publish_docs => [:clean, :docs] do
|
122
|
-
|
122
|
+
path = File.expand_path("~/.rubyforge/user-config.yml")
|
123
|
+
config = YAML.load(File.read(path))
|
123
124
|
host = "#{config["username"]}@rubyforge.org"
|
124
125
|
|
125
126
|
remote_dir = "/var/www/gforge-projects/#{rubyforge_name}/#{remote_rdoc_dir}"
|
@@ -178,7 +179,7 @@ module Hoe::Publish
|
|
178
179
|
end
|
179
180
|
|
180
181
|
desc 'Announce your release.'
|
181
|
-
task :announce => [:
|
182
|
+
task :announce => [:post_blog, :publish_on_announce ]
|
182
183
|
end
|
183
184
|
|
184
185
|
def generate_email full = nil
|
data/lib/hoe/rcov.rb
CHANGED
data/lib/hoe/rubyforge.rb
CHANGED
@@ -11,8 +11,11 @@ require 'rubyforge'
|
|
11
11
|
# release_to_rubyforge:: Release to rubyforge when release task is run.
|
12
12
|
|
13
13
|
module Hoe::RubyForge
|
14
|
-
def
|
14
|
+
def initialize_rubyforge
|
15
|
+
dependency_target << ['rubyforge', ">= #{::RubyForge::VERSION}"]
|
16
|
+
end
|
15
17
|
|
18
|
+
def define_rubyforge_tasks # :nodoc:
|
16
19
|
# no doco, invisible hook
|
17
20
|
task :release_to => :release_to_rubyforge
|
18
21
|
|
data/test/test_hoe.rb
CHANGED
@@ -51,15 +51,25 @@ class TestHoe < MiniTest::Unit::TestCase
|
|
51
51
|
assert_match(/^Hoe.*Rakefiles$/, spec.summary)
|
52
52
|
assert_equal files.grep(/^test/), spec.test_files
|
53
53
|
|
54
|
-
deps = spec.dependencies
|
54
|
+
deps = spec.dependencies.sort_by { |dep| dep.name }
|
55
55
|
|
56
|
-
assert_equal
|
56
|
+
assert_equal %w(gemcutter hoe rubyforge), deps.map { |dep| dep.name }
|
57
57
|
|
58
|
-
dep = deps.
|
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
|
59
63
|
|
64
|
+
dep = deps.shift
|
60
65
|
assert_equal 'hoe', dep.name
|
61
66
|
assert_equal :development, dep.type
|
62
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
|
63
73
|
end
|
64
74
|
|
65
75
|
def test_plugins
|
@@ -69,7 +79,6 @@ class TestHoe < MiniTest::Unit::TestCase
|
|
69
79
|
Hoe.plugin :first, :second
|
70
80
|
assert_equal before + [:first, :second], Hoe.plugins
|
71
81
|
ensure
|
72
|
-
# FIX: maybe add Hoe.reset
|
73
82
|
Hoe.plugins.replace before
|
74
83
|
end
|
75
84
|
|
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: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -30,9 +30,29 @@ cert_chain:
|
|
30
30
|
FBHgymkyj/AOSqKRIpXPhjC6
|
31
31
|
-----END CERTIFICATE-----
|
32
32
|
|
33
|
-
date:
|
33
|
+
date: 2010-01-06 00:00:00 -08:00
|
34
34
|
default_executable:
|
35
35
|
dependencies:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rubyforge
|
38
|
+
type: :runtime
|
39
|
+
version_requirement:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 2.0.3
|
45
|
+
version:
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: gemcutter
|
48
|
+
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:
|
36
56
|
- !ruby/object:Gem::Dependency
|
37
57
|
name: rake
|
38
58
|
type: :runtime
|
@@ -44,25 +64,26 @@ dependencies:
|
|
44
64
|
version: 0.8.7
|
45
65
|
version:
|
46
66
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
48
|
-
type: :
|
67
|
+
name: minitest
|
68
|
+
type: :development
|
49
69
|
version_requirement:
|
50
70
|
version_requirements: !ruby/object:Gem::Requirement
|
51
71
|
requirements:
|
52
72
|
- - ">="
|
53
73
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
74
|
+
version: 1.4.2
|
55
75
|
version:
|
56
76
|
description: |-
|
57
|
-
Hoe is a rake/rubygems helper for project Rakefiles. It helps
|
58
|
-
|
59
|
-
extensibility. Hoe ships with
|
60
|
-
tasks including rdoc generation,
|
77
|
+
Hoe is a rake/rubygems helper for project Rakefiles. It helps you
|
78
|
+
manage and maintain, and release your project and includes a dynamic
|
79
|
+
plug-in system allowing for easy extensibility. Hoe ships with
|
80
|
+
plug-ins for all your usual project tasks including rdoc generation,
|
81
|
+
testing, packaging, and deployment.
|
61
82
|
|
62
83
|
See class rdoc for help. Hint: `ri Hoe` or any of the plugins listed
|
63
84
|
below.
|
64
85
|
|
65
|
-
|
86
|
+
For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf
|
66
87
|
email:
|
67
88
|
- ryand-ruby@zenspider.com
|
68
89
|
executables:
|
metadata.gz.sig
CHANGED
Binary file
|