hoe 1.2.0 → 1.2.1
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.
- data/History.txt +29 -15
- data/README.txt +5 -3
- data/Rakefile +1 -1
- data/bin/sow +1 -1
- data/lib/hoe.rb +196 -71
- metadata +13 -10
data/History.txt
CHANGED
@@ -1,11 +1,25 @@
|
|
1
|
-
|
1
|
+
== 1.2.1 / 2007-05-21
|
2
|
+
|
3
|
+
* 8 minor enhancements:
|
4
|
+
* Allow for spaces in filenames in manifest. Thanks to Aaron Patterson.
|
5
|
+
* Allow rsync flags to be set.
|
6
|
+
* Allow rdoc destination directory to be set.
|
7
|
+
* Deal with bad line-endings. Stupid windoze users... :(
|
8
|
+
* Added WINDOZE check for diff.exe and look for gdiff first.
|
9
|
+
* Use gdiff if available, diff otherwise. Allows to work on borked Solaris.
|
10
|
+
* Move RDoc to attr* from big 'ol chunk at the top of the class.
|
11
|
+
* Basic conversion of history/urls from rdoc to markdown.
|
12
|
+
* 1 bug fixes:
|
13
|
+
* Fixed executables regexp to /^bin/.
|
14
|
+
|
15
|
+
== 1.2.0 / 2007-02-13
|
2
16
|
|
3
17
|
* Added more support for ext dirs.
|
4
18
|
* Added a simple config file (yaml). Use 'rake config_hoe' to edit.
|
5
19
|
* Added post_blog task (thanks Aaron!), configured via config_hoe.
|
6
20
|
* Announce task now posts to your blogs and/or publishes API depending on config.
|
7
21
|
|
8
|
-
|
22
|
+
== 1.1.7 / 2007-01-10
|
9
23
|
|
10
24
|
* extra_deps is now self-healing, and ensures no (direct) cycles.
|
11
25
|
* cleans check_manifest for CVS projects.
|
@@ -13,22 +27,22 @@
|
|
13
27
|
* Now uses rsync for publish_docs. YAY for fast!
|
14
28
|
* Bug #7193 fix spelling of 'synopsys'. Submitted by Jacob Atzen.
|
15
29
|
|
16
|
-
|
30
|
+
== 1.1.6 / 2006-11-29
|
17
31
|
|
18
32
|
* Fix release to work correctly with need_zip and need_tar.
|
19
33
|
|
20
|
-
|
34
|
+
== 1.1.5 / 2006-11-29
|
21
35
|
|
22
36
|
* Reduced check_manifest dependencies to just diff for windows.
|
23
37
|
* Don't use default author in summary, description or changes.
|
24
38
|
|
25
|
-
|
39
|
+
== 1.1.4 / 2006-11-12
|
26
40
|
|
27
41
|
* Added need_tar and need_zip to customize package requirements. Stupid windoze.
|
28
42
|
* Extended spec_extras to take procs as values. Passes in named parameter.
|
29
43
|
* Removed test from require_paths. I thought I already parameterized this. :/
|
30
44
|
|
31
|
-
|
45
|
+
== 1.1.3 / 2006-11-09
|
32
46
|
|
33
47
|
* Added test_deps, now you can automatically discover test dependency ommisions.
|
34
48
|
* Added ext support! Build C extensions with hoe!
|
@@ -37,7 +51,7 @@
|
|
37
51
|
* Fixed doco and automated updating of it.
|
38
52
|
* Added rdoc_pattern. Go doco go!
|
39
53
|
|
40
|
-
|
54
|
+
== 1.1.2 / 2006-10-22
|
41
55
|
|
42
56
|
* Added -d and -t flags to sow to make dev or trunk subdirs for p4 and svn projects.
|
43
57
|
* Added install_gem to further test gem builds.
|
@@ -45,17 +59,17 @@
|
|
45
59
|
* Removed demo.rb from clean_globs. I'm torn on this one.
|
46
60
|
* Fixed bug in install rule.
|
47
61
|
|
48
|
-
|
62
|
+
== 1.1.1 / 2006-10-11
|
49
63
|
|
50
64
|
* Fixed minor problem with subject of email.
|
51
65
|
* Fixed problem in test.
|
52
66
|
|
53
|
-
|
67
|
+
== 1.1.0 / 2006-10-04
|
54
68
|
|
55
69
|
* Added sow, a command-line tool for quickly creating new projects.
|
56
70
|
* Added check_manifest task
|
57
71
|
|
58
|
-
|
72
|
+
== 1.0.5 / 2006-10-03
|
59
73
|
|
60
74
|
* Doco cleanup.
|
61
75
|
* Removed Manifest.txt from rdoc and added title.
|
@@ -66,11 +80,11 @@
|
|
66
80
|
* Added email and rubyforge news announcement tasks.
|
67
81
|
* Url attribute may now be an array of urls.
|
68
82
|
|
69
|
-
|
83
|
+
== 1.0.4 / 2006-09-23
|
70
84
|
|
71
85
|
* Damnit... I messed up. There is no rubygems gem to be dependent upon. Duh.
|
72
86
|
|
73
|
-
|
87
|
+
== 1.0.3 / 2006-09-23
|
74
88
|
|
75
89
|
* Added debug_gem rule.
|
76
90
|
* Added lots of doco.
|
@@ -83,12 +97,12 @@
|
|
83
97
|
* Renamed upload to publish_docs.
|
84
98
|
* publish_docs is now smart about subprojects and missing subdirectories.
|
85
99
|
|
86
|
-
|
100
|
+
== 1.0.2 / 2006-09-20
|
87
101
|
|
88
102
|
* Wee little tests.
|
89
103
|
* Fixed up gemspec's require_paths.
|
90
104
|
|
91
|
-
|
105
|
+
== 1.0.1 / 2006-09-20
|
92
106
|
|
93
107
|
* Finally got deployment straightened out. Maybe. Some might be on rubyforge.org.
|
94
108
|
* Added default description and summary.
|
@@ -96,6 +110,6 @@
|
|
96
110
|
* Improved gemspec debugging.
|
97
111
|
* Swapped gem with tgz in deploy... we'd rather screw up on tgz
|
98
112
|
|
99
|
-
|
113
|
+
== 1.0.0 / 2006-09-19
|
100
114
|
|
101
115
|
* Birthday!
|
data/README.txt
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
Hoe
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
|
3
|
+
* http://rubyforge.org/projects/seattlerb/
|
4
|
+
* http://seattlerb.rubyforge.org/hoe/
|
5
|
+
* mailto:ryand-ruby@zenspider.com
|
5
6
|
|
6
7
|
== DESCRIPTION:
|
7
8
|
|
@@ -20,6 +21,7 @@ Tasks Provided:
|
|
20
21
|
* default - Run the default tasks
|
21
22
|
* docs - Build the docs HTML Files
|
22
23
|
* email - Generate email announcement file.
|
24
|
+
* gem - Build the gem file only.
|
23
25
|
* install - Install the package. Uses PREFIX and RUBYLIB
|
24
26
|
* install_gem - Install the package as a gem
|
25
27
|
* multi - Run the test suite using multiruby
|
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ Hoe.new("hoe", Hoe::VERSION) do |p|
|
|
6
6
|
p.rubyforge_name = "seattlerb"
|
7
7
|
p.summary = "Hoe is a way to write Rakefiles much easier and cleaner."
|
8
8
|
p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
|
9
|
-
p.url = p.paragraphs_of('README.txt',
|
9
|
+
p.url = p.paragraphs_of('README.txt', 1).first.gsub(/^\* /, '').split(/\n/)
|
10
10
|
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
|
11
11
|
end
|
12
12
|
|
data/bin/sow
CHANGED
@@ -55,7 +55,7 @@ Dir.chdir project do
|
|
55
55
|
"bin/#{file_name}" => "",
|
56
56
|
"lib/#{file_name}.rb" => "class #{klass}\n VERSION = '1.0.0'\nend",
|
57
57
|
"test/test_#{file_name}.rb" => "",
|
58
|
-
"Rakefile" => "# -*- ruby -*-\n\nrequire 'rubygems'\nrequire 'hoe'\nrequire './lib/#{file_name}.rb'\n\nHoe.new('#{project}', #{klass}::VERSION) do |p|\n p.rubyforge_name = \'#{group}\'\n # p.summary = '#{X}'\n # p.description = p.paragraphs_of('README.txt', 2..5).join(\"\\n\\n\")\n # p.url = p.paragraphs_of('README.txt', 0).first.split(/\\n/)[1..-1]\n p.changes = p.paragraphs_of('History.txt', 0..1).join(\"\\n\\n\")\nend\n\n# vim: syntax=Ruby\n"
|
58
|
+
"Rakefile" => "# -*- ruby -*-\n\nrequire 'rubygems'\nrequire 'hoe'\nrequire './lib/#{file_name}.rb'\n\nHoe.new('#{project}', #{klass}::VERSION) do |p|\n p.rubyforge_name = \'#{group}\'\n # p.author = '#{X}'\n # p.email = '#{X}'\n # p.summary = '#{X}'\n # p.description = p.paragraphs_of('README.txt', 2..5).join(\"\\n\\n\")\n # p.url = p.paragraphs_of('README.txt', 0).first.split(/\\n/)[1..-1]\n p.changes = p.paragraphs_of('History.txt', 0..1).join(\"\\n\\n\")\nend\n\n# vim: syntax=Ruby\n"
|
59
59
|
}
|
60
60
|
|
61
61
|
files["Manifest.txt"] = files.keys.sort.join("\n")
|
data/lib/hoe.rb
CHANGED
@@ -42,6 +42,7 @@ require 'rubyforge'
|
|
42
42
|
# * default - Run the default tasks
|
43
43
|
# * docs - Build the docs HTML Files
|
44
44
|
# * email - Generate email announcement file.
|
45
|
+
# * gem - Build the gem file only.
|
45
46
|
# * install - Install the package. Uses PREFIX and RUBYLIB
|
46
47
|
# * install_gem - Install the package as a gem
|
47
48
|
# * multi - Run the test suite using multiruby
|
@@ -55,81 +56,189 @@ require 'rubyforge'
|
|
55
56
|
# * test_deps - Show which test files fail when run alone.
|
56
57
|
# * uninstall - Uninstall the package.
|
57
58
|
#
|
58
|
-
# === Attributes
|
59
|
-
#
|
60
|
-
# The attributes that you can provide inside the new block above are:
|
61
|
-
#
|
62
|
-
# ==== Mandatory
|
63
|
-
#
|
64
|
-
# * name - The name of the release.
|
65
|
-
# * version - The version. Don't hardcode! use a constant in the project.
|
66
|
-
#
|
67
|
-
# ==== Damn Good to Set
|
68
|
-
#
|
69
|
-
# * author - The author of the package. (can be array of authors)
|
70
|
-
# * changes - A description of the release's latest changes.
|
71
|
-
# * description - A description of the project.
|
72
|
-
# * email - The author's email address. (can be array of urls)
|
73
|
-
# * summary - A short summary of the project.
|
74
|
-
# * url - The url of the project.
|
75
|
-
#
|
76
|
-
# ==== Optional
|
77
|
-
#
|
78
|
-
# * clean_globs - An array of file patterns to delete on clean.
|
79
|
-
# * extra_deps - An array of rubygem dependencies.
|
80
|
-
# * need_tar - Should package create a tarball? [default: true]
|
81
|
-
# * need_zip - Should package create a zipfile? [default: false]
|
82
|
-
# * rdoc_pattern - A regexp to match documentation files against the manifest.
|
83
|
-
# * rubyforge_name - The name of the rubyforge project. [default: name.downcase]
|
84
|
-
# * spec_extras - A hash of extra values to set in the gemspec.
|
85
|
-
# * test_globs - An array of test file patterns [default: test/**/test_*.rb]
|
86
|
-
#
|
87
|
-
# === Environment Variables
|
88
|
-
#
|
89
|
-
# * FILTER - Used to add flags to test_unit (e.g., -n test_borked)
|
90
|
-
# * PREFIX - Used to specify a custom install location (for rake install).
|
91
|
-
# * RUBY_DEBUG - Used to add extra flags to RUBY_FLAGS.
|
92
|
-
# * RUBY_FLAGS - Used to specify flags to ruby [has smart default].
|
93
|
-
|
94
59
|
class Hoe
|
95
|
-
VERSION = '1.2.
|
60
|
+
VERSION = '1.2.1'
|
96
61
|
|
97
|
-
|
62
|
+
ruby_prefix = Config::CONFIG['prefix']
|
98
63
|
sitelibdir = Config::CONFIG['sitelibdir']
|
99
64
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
65
|
+
##
|
66
|
+
# Used to specify a custom install location (for rake install).
|
67
|
+
|
68
|
+
PREFIX = ENV['PREFIX'] || ruby_prefix
|
69
|
+
|
70
|
+
##
|
71
|
+
# Used to add extra flags to RUBY_FLAGS.
|
72
|
+
|
106
73
|
RUBY_DEBUG = ENV['RUBY_DEBUG']
|
107
|
-
|
108
|
-
|
74
|
+
|
75
|
+
default_ruby_flags = "-w -I#{%w(lib ext bin test).join(File::PATH_SEPARATOR)}" +
|
109
76
|
(RUBY_DEBUG ? " #{RUBY_DEBUG}" : '')
|
77
|
+
|
78
|
+
##
|
79
|
+
# Used to specify flags to ruby [has smart default].
|
80
|
+
|
81
|
+
RUBY_FLAGS = ENV['RUBY_FLAGS'] || default_ruby_flags
|
82
|
+
|
83
|
+
##
|
84
|
+
# Used to add flags to test_unit (e.g., -n test_borked).
|
85
|
+
|
110
86
|
FILTER = ENV['FILTER'] # for tests (eg FILTER="-n test_blah")
|
111
87
|
|
112
|
-
|
88
|
+
# :stopdoc:
|
89
|
+
|
90
|
+
RUBYLIB = if PREFIX == ruby_prefix then
|
91
|
+
sitelibdir
|
92
|
+
else
|
93
|
+
File.join(PREFIX, sitelibdir[ruby_prefix.size..-1])
|
94
|
+
end
|
95
|
+
|
96
|
+
WINDOZE = /win32/ =~ RUBY_PLATFORM unless defined? WINDOZE
|
97
|
+
|
98
|
+
DIFF = if WINDOZE
|
99
|
+
'diff.exe'
|
100
|
+
else
|
101
|
+
if system("gdiff", __FILE__, __FILE__)
|
102
|
+
'gdiff' # solaris and kin suck
|
103
|
+
else
|
104
|
+
'diff'
|
105
|
+
end
|
106
|
+
end unless defined? DIFF
|
107
|
+
|
108
|
+
# :startdoc:
|
109
|
+
|
110
|
+
##
|
111
|
+
# *Recommended*: The author(s) of the package. (can be array)
|
112
|
+
# Really. Set this or we'll tease you.
|
113
|
+
|
114
|
+
attr_accessor :author
|
115
|
+
|
116
|
+
##
|
117
|
+
# Populated automatically from the manifest. List of executables.
|
118
|
+
|
119
|
+
attr_accessor :bin_files # :nodoc:
|
120
|
+
|
121
|
+
##
|
122
|
+
# *Recommended*: A description of the release's latest changes.
|
123
|
+
|
124
|
+
attr_accessor :changes
|
125
|
+
|
126
|
+
##
|
127
|
+
# Optional: An array of file patterns to delete on clean.
|
128
|
+
|
129
|
+
attr_accessor :clean_globs
|
130
|
+
|
131
|
+
##
|
132
|
+
# *Recommended*: A description of the project.
|
133
|
+
|
134
|
+
attr_accessor :description
|
135
|
+
|
136
|
+
##
|
137
|
+
# *Recommended*: The author's email address(es). (can be array)
|
138
|
+
|
139
|
+
attr_accessor :email
|
140
|
+
|
141
|
+
##
|
142
|
+
# Optional: An array of rubygem dependencies.
|
143
|
+
|
144
|
+
attr_accessor :extra_deps
|
145
|
+
|
146
|
+
##
|
147
|
+
# Populated automatically from the manifest. List of library files.
|
148
|
+
|
149
|
+
attr_accessor :lib_files # :nodoc:
|
150
|
+
|
151
|
+
##
|
152
|
+
# *MANDATORY*: The name of the release.
|
153
|
+
|
154
|
+
attr_accessor :name
|
155
|
+
|
156
|
+
##
|
157
|
+
# Optional: Should package create a tarball? [default: true]
|
158
|
+
|
159
|
+
attr_accessor :need_tar
|
113
160
|
|
114
|
-
|
161
|
+
##
|
162
|
+
# Optional: Should package create a zipfile? [default: false]
|
163
|
+
|
164
|
+
attr_accessor :need_zip
|
165
|
+
|
166
|
+
##
|
167
|
+
# Optional: A regexp to match documentation files against the manifest.
|
168
|
+
|
169
|
+
attr_accessor :rdoc_pattern
|
170
|
+
|
171
|
+
##
|
172
|
+
# Optional: Name of RDoc destination directory on Rubyforge. [default: +name+]
|
173
|
+
|
174
|
+
attr_accessor :remote_rdoc_dir
|
175
|
+
|
176
|
+
##
|
177
|
+
# Optional: Flags for RDoc rsync. [default: "-av --delete"]
|
178
|
+
|
179
|
+
attr_accessor :rsync_args
|
180
|
+
|
181
|
+
##
|
182
|
+
# Optional: The name of the rubyforge project. [default: name.downcase]
|
183
|
+
|
184
|
+
attr_accessor :rubyforge_name
|
185
|
+
|
186
|
+
##
|
187
|
+
# The Gem::Specification.
|
188
|
+
|
189
|
+
attr_accessor :spec # :nodoc:
|
190
|
+
|
191
|
+
##
|
192
|
+
# Optional: A hash of extra values to set in the gemspec. Value may be a proc.
|
193
|
+
|
194
|
+
attr_accessor :spec_extras
|
195
|
+
|
196
|
+
##
|
197
|
+
# *Recommended*: A short summary of the project.
|
198
|
+
|
199
|
+
attr_accessor :summary
|
200
|
+
|
201
|
+
##
|
202
|
+
# Populated automatically from the manifest. List of tests.
|
203
|
+
|
204
|
+
attr_accessor :test_files # :nodoc:
|
205
|
+
|
206
|
+
##
|
207
|
+
# Optional: An array of test file patterns [default: test/**/test_*.rb]
|
208
|
+
|
209
|
+
attr_accessor :test_globs
|
210
|
+
|
211
|
+
##
|
212
|
+
# *Recommended*: The url(s) of the project. (can be array)
|
213
|
+
|
214
|
+
attr_accessor :url
|
215
|
+
|
216
|
+
##
|
217
|
+
# *MANDATORY*: The version. Don't hardcode! use a constant in the project.
|
218
|
+
|
219
|
+
attr_accessor :version
|
220
|
+
|
221
|
+
def initialize(name, version) # :nodoc:
|
115
222
|
self.name = name
|
116
223
|
self.version = version
|
117
224
|
|
118
225
|
# Defaults
|
119
|
-
self.rubyforge_name = name.downcase
|
120
|
-
self.url = "http://www.zenspider.com/ZSS/Products/#{name}/"
|
121
226
|
self.author = "Ryan Davis"
|
122
|
-
self.email = "ryand-ruby@zenspider.com"
|
123
|
-
self.clean_globs = %w(diff diff.txt email.txt ri *.gem **/*~)
|
124
|
-
self.test_globs = ['test/**/test_*.rb']
|
125
227
|
self.changes = "The author was too lazy to write a changeset"
|
228
|
+
self.clean_globs = %w(diff diff.txt email.txt ri *.gem **/*~)
|
126
229
|
self.description = "The author was too lazy to write a description"
|
127
|
-
self.
|
128
|
-
self.rdoc_pattern = /^(lib|bin)|txt$/
|
230
|
+
self.email = "ryand-ruby@zenspider.com"
|
129
231
|
self.extra_deps = []
|
130
|
-
self.spec_extras = {}
|
131
232
|
self.need_tar = true
|
132
233
|
self.need_zip = false
|
234
|
+
self.rdoc_pattern = /^(lib|bin)|txt$/
|
235
|
+
self.remote_rdoc_dir = name
|
236
|
+
self.rsync_args = '-av --delete'
|
237
|
+
self.rubyforge_name = name.downcase
|
238
|
+
self.spec_extras = {}
|
239
|
+
self.summary = "The author was too lazy to write a summary"
|
240
|
+
self.test_globs = ['test/**/test_*.rb']
|
241
|
+
self.url = "http://www.zenspider.com/ZSS/Products/#{name}/"
|
133
242
|
|
134
243
|
yield self if block_given?
|
135
244
|
|
@@ -152,7 +261,7 @@ class Hoe
|
|
152
261
|
define_tasks
|
153
262
|
end
|
154
263
|
|
155
|
-
def define_tasks
|
264
|
+
def define_tasks # :nodoc:
|
156
265
|
desc 'Run the default tasks'
|
157
266
|
task :default => :test
|
158
267
|
|
@@ -200,12 +309,15 @@ class Hoe
|
|
200
309
|
s.add_dependency(*dep)
|
201
310
|
end
|
202
311
|
|
203
|
-
s.files = File.read("Manifest.txt").split
|
204
|
-
s.executables = s.files.grep(
|
312
|
+
s.files = File.read("Manifest.txt").delete("\r").split(/\n/)
|
313
|
+
s.executables = s.files.grep(/^bin/) { |f| File.basename(f) }
|
205
314
|
|
206
315
|
s.bindir = "bin"
|
207
316
|
dirs = Dir['{lib,ext}']
|
208
317
|
s.require_paths = dirs unless dirs.empty?
|
318
|
+
|
319
|
+
s.rdoc_options = ['--main', 'README.txt']
|
320
|
+
s.extra_rdoc_files = s.files.grep(/txt$/)
|
209
321
|
s.has_rdoc = true
|
210
322
|
|
211
323
|
if test ?f, "test/test_all.rb" then
|
@@ -317,13 +429,15 @@ class Hoe
|
|
317
429
|
sh %q{ rdoc --ri -o ri . }
|
318
430
|
end
|
319
431
|
|
320
|
-
desc
|
432
|
+
desc "Publish RDoc to RubyForge"
|
321
433
|
task :publish_docs => [:clean, :docs] do
|
322
434
|
config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))
|
323
435
|
host = "#{config["username"]}@rubyforge.org"
|
324
|
-
|
436
|
+
|
437
|
+
remote_dir = "/var/www/gforge-projects/#{rubyforge_name}/#{remote_rdoc_dir}"
|
325
438
|
local_dir = 'doc'
|
326
|
-
|
439
|
+
|
440
|
+
sh %{rsync #{rsync_args} #{local_dir}/ #{host}:#{remote_dir}}
|
327
441
|
end
|
328
442
|
|
329
443
|
# no doco for this one
|
@@ -338,7 +452,7 @@ class Hoe
|
|
338
452
|
############################################################
|
339
453
|
# Misc/Maintenance:
|
340
454
|
|
341
|
-
def with_config(create=false)
|
455
|
+
def with_config(create=false) # :nodoc:
|
342
456
|
require 'yaml'
|
343
457
|
rc = File.expand_path("~/.hoerc")
|
344
458
|
|
@@ -419,6 +533,9 @@ class Hoe
|
|
419
533
|
|
420
534
|
with_config do |config, path|
|
421
535
|
subject, title, body, urls = announcement
|
536
|
+
|
537
|
+
body += "\n\n#{urls}"
|
538
|
+
|
422
539
|
config['blogs'].each do |site|
|
423
540
|
server = XMLRPC::Client.new2(site['url'])
|
424
541
|
content = site['extra_headers'].merge(:title => title,
|
@@ -459,18 +576,19 @@ class Hoe
|
|
459
576
|
end
|
460
577
|
files = files.sort.join "\n"
|
461
578
|
File.open f, 'w' do |fp| fp.puts files end
|
462
|
-
system "
|
579
|
+
system "#{DIFF} -du Manifest.txt #{f}"
|
463
580
|
rm f
|
464
581
|
end
|
465
582
|
|
466
583
|
end # end define
|
467
584
|
|
468
|
-
def announcement
|
469
|
-
|
585
|
+
def announcement # :nodoc:
|
586
|
+
changes = self.changes.rdoc_to_markdown
|
470
587
|
|
471
588
|
subject = "#{name} #{version} Released"
|
472
589
|
title = "#{name} version #{version} has been released!"
|
473
|
-
body = "#{description}\n\nChanges:\n\n#{changes}"
|
590
|
+
body = "#{description}\n\nChanges:\n\n#{changes}".rdoc_to_markdown
|
591
|
+
urls = Array(url).map { |s| "* <#{s.strip.rdoc_to_markdown}>" }.join("\n")
|
474
592
|
|
475
593
|
return subject, title, body, urls
|
476
594
|
end
|
@@ -489,21 +607,28 @@ class Hoe
|
|
489
607
|
end
|
490
608
|
|
491
609
|
##
|
492
|
-
# Reads a file at +path+ and spits out an array of the +paragraphs+ specified
|
610
|
+
# Reads a file at +path+ and spits out an array of the +paragraphs+ specified.
|
493
611
|
#
|
494
612
|
# changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
|
495
|
-
# summary, *description = p.paragraphs_of('
|
613
|
+
# summary, *description = p.paragraphs_of('README.txt', 3, 3..8)
|
496
614
|
|
497
615
|
def paragraphs_of(path, *paragraphs)
|
498
|
-
|
499
|
-
file.split(/\n\n+/).values_at(*paragraphs)
|
616
|
+
File.read(path).delete("\r").split(/\n\n+/).values_at(*paragraphs)
|
500
617
|
end
|
501
618
|
end
|
502
619
|
|
620
|
+
# :enddoc:
|
621
|
+
|
503
622
|
class ::Rake::SshDirPublisher # :nodoc:
|
504
623
|
attr_reader :host, :remote_dir, :local_dir
|
505
624
|
end
|
506
625
|
|
626
|
+
class String
|
627
|
+
def rdoc_to_markdown
|
628
|
+
self.gsub(/^mailto:/, '').gsub(/^(=+)/) { "#" * $1.size }
|
629
|
+
end
|
630
|
+
end
|
631
|
+
|
507
632
|
if $0 == __FILE__ then
|
508
633
|
out = `rake -T | egrep -v "redocs|repackage|clobber|trunk"`
|
509
634
|
puts out.gsub(/\#/, '-').gsub(/^rake /, '# * ')
|
metadata
CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.9.0.9
|
|
3
3
|
specification_version: 1
|
4
4
|
name: hoe
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.2.
|
7
|
-
date: 2007-
|
6
|
+
version: 1.2.1
|
7
|
+
date: 2007-05-21 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
|
11
11
|
email: ryand-ruby@zenspider.com
|
12
|
-
homepage:
|
12
|
+
homepage: http://rubyforge.org/projects/seattlerb/
|
13
13
|
rubyforge_project: seattlerb
|
14
|
-
description: "Hoe is a simple rake/rubygems helper for project Rakefiles. It generates all the usual tasks for projects including rdoc generation, testing, packaging, and deployment. Tasks Provided: * announce - Generate email announcement file and post to rubyforge. * audit - Run ZenTest against the package * check_manifest - Verify the manifest * clean - Clean up all the extras * config_hoe - Create a fresh ~/.hoerc file * debug_gem - Show information about the gem. * default - Run the default tasks * docs - Build the docs HTML Files * email - Generate email announcement file. * install - Install the package. Uses PREFIX and RUBYLIB * install_gem - Install the package as a gem * multi - Run the test suite using multiruby * package - Build all the packages * post_blog - Post announcement to blog. * post_news - Post announcement to rubyforge. * publish_docs - Publish RDoc to RubyForge * release - Package and upload the release to rubyforge. * ridocs - Generate ri locally for testing * test - Run the test suite. Use FILTER to add to the command line. * test_deps - Show which test files fail when run alone. * uninstall - Uninstall the package.
|
14
|
+
description: "== DESCRIPTION: Hoe is a simple rake/rubygems helper for project Rakefiles. It generates all the usual tasks for projects including rdoc generation, testing, packaging, and deployment. Tasks Provided: * announce - Generate email announcement file and post to rubyforge. * audit - Run ZenTest against the package * check_manifest - Verify the manifest * clean - Clean up all the extras * config_hoe - Create a fresh ~/.hoerc file * debug_gem - Show information about the gem. * default - Run the default tasks * docs - Build the docs HTML Files * email - Generate email announcement file. * gem - Build the gem file only. * install - Install the package. Uses PREFIX and RUBYLIB * install_gem - Install the package as a gem * multi - Run the test suite using multiruby * package - Build all the packages * post_blog - Post announcement to blog. * post_news - Post announcement to rubyforge. * publish_docs - Publish RDoc to RubyForge * release - Package and upload the release to rubyforge. * ridocs - Generate ri locally for testing * test - Run the test suite. Use FILTER to add to the command line. * test_deps - Show which test files fail when run alone. * uninstall - Uninstall the package."
|
15
15
|
autorequire:
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
@@ -38,10 +38,13 @@ files:
|
|
38
38
|
- test/test_hoe.rb
|
39
39
|
test_files:
|
40
40
|
- test/test_hoe.rb
|
41
|
-
rdoc_options:
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
rdoc_options:
|
42
|
+
- --main
|
43
|
+
- README.txt
|
44
|
+
extra_rdoc_files:
|
45
|
+
- History.txt
|
46
|
+
- Manifest.txt
|
47
|
+
- README.txt
|
45
48
|
executables:
|
46
49
|
- sow
|
47
50
|
extensions: []
|
@@ -56,7 +59,7 @@ dependencies:
|
|
56
59
|
requirements:
|
57
60
|
- - ">="
|
58
61
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.4.
|
62
|
+
version: 0.4.1
|
60
63
|
version:
|
61
64
|
- !ruby/object:Gem::Dependency
|
62
65
|
name: rake
|
@@ -65,5 +68,5 @@ dependencies:
|
|
65
68
|
requirements:
|
66
69
|
- - ">="
|
67
70
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.7.
|
71
|
+
version: 0.7.2
|
69
72
|
version:
|