hoe 2.16.1 → 3.0.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/History.txt +19 -0
- data/README.txt +10 -5
- data/lib/hoe.rb +53 -29
- data/lib/hoe/compiler.rb +3 -0
- data/lib/hoe/inline.rb +4 -2
- data/lib/hoe/publish.rb +18 -16
- data/lib/hoe/racc.rb +6 -2
- data/lib/hoe/rcov.rb +1 -1
- data/test/test_hoe.rb +0 -1
- metadata +7 -7
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
=== 3.0.0 / 2012-03-20
|
2
|
+
|
3
|
+
* 3 major enhancements:
|
4
|
+
|
5
|
+
* Added activate_plugin_deps phase to plugin loading.
|
6
|
+
* Removed long deprecated Hoe.new { block }.
|
7
|
+
* Removed long deprecated handling of improper dependencies.
|
8
|
+
|
9
|
+
* 3 minor enhancements:
|
10
|
+
|
11
|
+
* Added deprecation warnings to Hoe#url and Hoe#url=. Already deprecated for 9 mo.
|
12
|
+
* Reworked all the plugins to use activate_XXX_deps, as necessary.
|
13
|
+
* Switched internal usage of #url to #urls.
|
14
|
+
|
15
|
+
* 2 bug fixes:
|
16
|
+
|
17
|
+
* Fixed failures in the publish_docs task when remote directory times cannot be changed (such as on rubyforge).
|
18
|
+
* Fixed isolate setup for the racc plugin
|
19
|
+
|
1
20
|
=== 2.16.1 / 2012-03-13
|
2
21
|
|
3
22
|
* 2 bug fixes:
|
data/README.txt
CHANGED
@@ -249,11 +249,16 @@ their projects.
|
|
249
249
|
==== Initialization
|
250
250
|
|
251
251
|
When your hoe-spec is instantiated, it extends itself all known plugin
|
252
|
-
modules. This adds the method bodies to the hoe-spec and allows for
|
253
|
-
to work as part of the spec itself. Once that is over,
|
254
|
-
their **optional**
|
255
|
-
|
256
|
-
|
252
|
+
modules. This adds the method bodies to the hoe-spec and allows for
|
253
|
+
the plugin to work as part of the spec itself. Once that is over,
|
254
|
+
activated plugins have their **optional** `initialize_#{plugin}`
|
255
|
+
methods called followed by their **optional**
|
256
|
+
`activate_#{plugin}_deps` methods called. This lets them set needed
|
257
|
+
instance variables to default values and declare any gem dependencies
|
258
|
+
needed.. Finally, the hoe-spec block is evaluated so that project
|
259
|
+
specific values can override the defaults.
|
260
|
+
|
261
|
+
See "Hoe Plugin Loading Sequence" in hoe.rb for full details.
|
257
262
|
|
258
263
|
==== Task Definition
|
259
264
|
|
data/lib/hoe.rb
CHANGED
@@ -68,13 +68,30 @@ require 'hoe/rake'
|
|
68
68
|
# # ...
|
69
69
|
# end
|
70
70
|
# end
|
71
|
+
#
|
72
|
+
# === Hoe Plugin Loading Sequence
|
73
|
+
#
|
74
|
+
# Hoe.spec
|
75
|
+
# Hoe.load_plugins
|
76
|
+
# require
|
77
|
+
# activate_plugins
|
78
|
+
# extend plugin_module
|
79
|
+
# initialize_plugins
|
80
|
+
# initialize_XXX
|
81
|
+
# activate_plugin_deps
|
82
|
+
# activate_XXX_deps
|
83
|
+
# yield spec
|
84
|
+
# post_initialize
|
85
|
+
# define_spec # gemspec, not hoespec
|
86
|
+
# load_plugin_tasks
|
87
|
+
# add_dependencies
|
71
88
|
|
72
89
|
class Hoe
|
73
90
|
|
74
91
|
include Rake::DSL if defined?(Rake::DSL)
|
75
92
|
|
76
93
|
# duh
|
77
|
-
VERSION = '
|
94
|
+
VERSION = '3.0.0'
|
78
95
|
|
79
96
|
@@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
|
80
97
|
:publish, :gemcutter, :signing, :test]
|
@@ -227,6 +244,11 @@ class Hoe
|
|
227
244
|
|
228
245
|
attr_accessor :url
|
229
246
|
|
247
|
+
require 'rubygems/deprecate'
|
248
|
+
extend Gem::Deprecate
|
249
|
+
deprecate :url, :urls, 2012, 6
|
250
|
+
deprecate :url=, :urls=, 2012, 6
|
251
|
+
|
230
252
|
##
|
231
253
|
# Optional: The urls of the project. This can be an array or
|
232
254
|
# (preferably) a hash. Auto-populates to the urls read from the
|
@@ -375,6 +397,11 @@ class Hoe
|
|
375
397
|
self.extend Hoe.const_get(name)
|
376
398
|
end
|
377
399
|
|
400
|
+
initialize_plugins
|
401
|
+
activate_plugin_deps
|
402
|
+
end
|
403
|
+
|
404
|
+
def initialize_plugins
|
378
405
|
Hoe.plugins.each do |plugin|
|
379
406
|
msg = "initialize_#{plugin}"
|
380
407
|
warn msg if $DEBUG
|
@@ -382,6 +409,14 @@ class Hoe
|
|
382
409
|
end
|
383
410
|
end
|
384
411
|
|
412
|
+
def activate_plugin_deps
|
413
|
+
Hoe.plugins.each do |plugin|
|
414
|
+
msg = "activate_#{plugin}_deps"
|
415
|
+
warn msg if $DEBUG
|
416
|
+
send msg if self.respond_to? msg
|
417
|
+
end
|
418
|
+
end
|
419
|
+
|
385
420
|
##
|
386
421
|
# Add a dependency declaration to your spec. Pass :dev to
|
387
422
|
# +type+ for developer dependencies.
|
@@ -458,7 +493,14 @@ class Hoe
|
|
458
493
|
s.version = version if version
|
459
494
|
s.summary = summary
|
460
495
|
s.email = email
|
461
|
-
s.homepage =
|
496
|
+
s.homepage = case urls
|
497
|
+
when Hash then
|
498
|
+
urls["home"] || urls.values.first
|
499
|
+
when Array then
|
500
|
+
urls
|
501
|
+
else
|
502
|
+
raise "unknown urls format: #{urls.inspect}"
|
503
|
+
end
|
462
504
|
s.rubyforge_project = rubyforge_name
|
463
505
|
s.description = description
|
464
506
|
s.files = manifest
|
@@ -532,9 +574,7 @@ class Hoe
|
|
532
574
|
end
|
533
575
|
|
534
576
|
##
|
535
|
-
# Create a newly initialized hoe spec.
|
536
|
-
# it and finish post_initialize steps. This is deprecated behavior
|
537
|
-
# and should be switched from Hoe.new to Hoe.spec.
|
577
|
+
# Create a newly initialized hoe spec.
|
538
578
|
|
539
579
|
def initialize name, version = nil # :nodoc:
|
540
580
|
self.name = name
|
@@ -555,7 +595,6 @@ class Hoe
|
|
555
595
|
self.summary = nil
|
556
596
|
self.summary_sentences = 1
|
557
597
|
self.test_globs = ['test/**/test_*.rb']
|
558
|
-
self.url = nil
|
559
598
|
|
560
599
|
if manifest = read_manifest then
|
561
600
|
self.readme_file = manifest.grep(/^README\./).first
|
@@ -565,13 +604,7 @@ class Hoe
|
|
565
604
|
self.history_file ||= "History.txt"
|
566
605
|
self.readme_file ||= "README.txt"
|
567
606
|
|
568
|
-
if block_given?
|
569
|
-
warn "Hoe.new {...} deprecated. Switch to Hoe.spec."
|
570
|
-
Hoe.load_plugins
|
571
|
-
self.activate_plugins
|
572
|
-
yield self
|
573
|
-
post_initialize
|
574
|
-
end
|
607
|
+
abort "Hoe.new {...} removed. Switch to Hoe.spec." if block_given?
|
575
608
|
end
|
576
609
|
|
577
610
|
##
|
@@ -592,14 +625,6 @@ class Hoe
|
|
592
625
|
self.urls ||= urls
|
593
626
|
self.description ||= desc
|
594
627
|
self.summary ||= summ
|
595
|
-
self.url ||= case urls
|
596
|
-
when Hash then
|
597
|
-
urls["home"] || urls["repo"] || urls.values.first
|
598
|
-
when Array then
|
599
|
-
urls
|
600
|
-
else
|
601
|
-
raise "unknown urls format: #{urls.inspect}"
|
602
|
-
end
|
603
628
|
else
|
604
629
|
missing readme_file
|
605
630
|
end
|
@@ -681,14 +706,13 @@ class Hoe
|
|
681
706
|
# Normalize the dependencies.
|
682
707
|
|
683
708
|
def normalize_deps deps
|
684
|
-
Array(deps)
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
}
|
709
|
+
deps = Array(deps)
|
710
|
+
|
711
|
+
deps.each do |o|
|
712
|
+
abort "ERROR: Add '~> x.y' to the '#{o}' dependency." if String === o
|
713
|
+
end
|
714
|
+
|
715
|
+
deps
|
692
716
|
end
|
693
717
|
|
694
718
|
##
|
data/lib/hoe/compiler.rb
CHANGED
@@ -27,8 +27,11 @@ module Hoe::Compiler
|
|
27
27
|
self.spec_extras = { :extensions => ["ext/#{self.name}/extconf.rb"] }
|
28
28
|
|
29
29
|
clean_globs << "lib/#{self.name}/*.{so,bundle,dll}"
|
30
|
+
end
|
30
31
|
|
32
|
+
def activate_compiler_deps
|
31
33
|
dependency "rake-compiler", "~> 0.7", :development
|
34
|
+
gem "rake-compiler", "~> 0.7"
|
32
35
|
end
|
33
36
|
|
34
37
|
##
|
data/lib/hoe/inline.rb
CHANGED
@@ -19,11 +19,13 @@ require 'rbconfig'
|
|
19
19
|
|
20
20
|
module Hoe::Inline
|
21
21
|
def initialize_inline
|
22
|
-
dependency "RubyInline", "~> 3.9"
|
23
|
-
|
24
22
|
clean_globs << File.expand_path("~/.ruby_inline")
|
25
23
|
end
|
26
24
|
|
25
|
+
def activate_inline_deps
|
26
|
+
dependency "RubyInline", "~> 3.9"
|
27
|
+
end
|
28
|
+
|
27
29
|
##
|
28
30
|
# Define tasks for plugin.
|
29
31
|
|
data/lib/hoe/publish.rb
CHANGED
@@ -93,22 +93,11 @@ module Hoe::Publish
|
|
93
93
|
self.need_rdoc ||= true
|
94
94
|
self.rdoc_locations ||= []
|
95
95
|
self.remote_rdoc_dir ||= self.name
|
96
|
-
self.rsync_args ||= '-av --delete'
|
96
|
+
self.rsync_args ||= '-av -O --delete'
|
97
97
|
end
|
98
98
|
|
99
|
-
def
|
100
|
-
|
101
|
-
title = "#{rubyforge_name}'s #{title}" if rubyforge_name != name
|
102
|
-
rdoc = Gem.bin_wrapper "rdoc"
|
103
|
-
|
104
|
-
%W[#{rdoc}
|
105
|
-
--title #{title}
|
106
|
-
-o #{local_rdoc_dir}
|
107
|
-
] +
|
108
|
-
spec.rdoc_options +
|
109
|
-
extra_args +
|
110
|
-
spec.require_paths +
|
111
|
-
spec.extra_rdoc_files
|
99
|
+
def activate_publish_deps
|
100
|
+
dependency "rdoc", "~> 3.10", :developer if need_rdoc
|
112
101
|
end
|
113
102
|
|
114
103
|
##
|
@@ -116,8 +105,6 @@ module Hoe::Publish
|
|
116
105
|
|
117
106
|
def define_publish_tasks
|
118
107
|
if need_rdoc then
|
119
|
-
dependency "rdoc", "~> 3.10", :developer
|
120
|
-
|
121
108
|
task :isolate # ensure it exists
|
122
109
|
|
123
110
|
desc "Generate rdoc"
|
@@ -198,6 +185,21 @@ module Hoe::Publish
|
|
198
185
|
task :announce => [:post_blog, :publish_on_announce ]
|
199
186
|
end
|
200
187
|
|
188
|
+
def make_rdoc_cmd(*extra_args)
|
189
|
+
title = "#{name}-#{version} Documentation"
|
190
|
+
title = "#{rubyforge_name}'s #{title}" if rubyforge_name != name
|
191
|
+
rdoc = Gem.bin_wrapper "rdoc"
|
192
|
+
|
193
|
+
%W[#{rdoc}
|
194
|
+
--title #{title}
|
195
|
+
-o #{local_rdoc_dir}
|
196
|
+
] +
|
197
|
+
spec.rdoc_options +
|
198
|
+
extra_args +
|
199
|
+
spec.require_paths +
|
200
|
+
spec.extra_rdoc_files
|
201
|
+
end
|
202
|
+
|
201
203
|
def post_blog_zenweb site
|
202
204
|
dir = site["path"]
|
203
205
|
|
data/lib/hoe/racc.rb
CHANGED
@@ -42,7 +42,9 @@ module Hoe::Racc
|
|
42
42
|
# -l = no-line-convert (they don't ever line up anyhow)
|
43
43
|
self.racc_flags ||= "-v -l"
|
44
44
|
self.rex_flags ||= "--independent"
|
45
|
+
end
|
45
46
|
|
47
|
+
def define_racc_deps
|
46
48
|
dependency 'racc', '~> 1.4.6', :development
|
47
49
|
end
|
48
50
|
|
@@ -75,11 +77,13 @@ module Hoe::Racc
|
|
75
77
|
end
|
76
78
|
end
|
77
79
|
|
80
|
+
task :isolate # stub task
|
81
|
+
|
78
82
|
desc "build the parser" unless parser_files.empty?
|
79
|
-
task :parser
|
83
|
+
task :parser => :isolate
|
80
84
|
|
81
85
|
desc "build the lexer" unless lexer_files.empty?
|
82
|
-
task :lexer
|
86
|
+
task :lexer => :isolate
|
83
87
|
|
84
88
|
task :parser => parser_files
|
85
89
|
task :lexer => lexer_files
|
data/lib/hoe/rcov.rb
CHANGED
data/test/test_hoe.rb
CHANGED
@@ -279,7 +279,6 @@ class TestHoe < MiniTest::Unit::TestCase
|
|
279
279
|
"other" => "http://github.com/jbarnette/hoe-plugin-examples",
|
280
280
|
}
|
281
281
|
|
282
|
-
assert_equal urls["home"], hoe.url
|
283
282
|
assert_equal urls, hoe.urls
|
284
283
|
|
285
284
|
text_files = files.grep(/txt$/).reject { |f| f =~ /template/ }
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
|
-
-
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version:
|
7
|
+
- 3
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 3.0.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
FBHgymkyj/AOSqKRIpXPhjC6
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2012-03-
|
39
|
+
date: 2012-03-20 00:00:00 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
176
|
requirements: []
|
177
177
|
|
178
178
|
rubyforge_project: seattlerb
|
179
|
-
rubygems_version: 1.8.
|
179
|
+
rubygems_version: 1.8.17
|
180
180
|
signing_key:
|
181
181
|
specification_version: 3
|
182
182
|
summary: Hoe is a rake/rubygems helper for project Rakefiles
|
metadata.gz.sig
CHANGED
Binary file
|