hoe 2.9.4 → 2.9.5
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 +13 -0
- data/bin/sow +18 -6
- data/lib/hoe.rb +38 -19
- data/lib/hoe/compiler.rb +1 -1
- data/lib/hoe/deps.rb +0 -2
- data/lib/hoe/gemcutter.rb +2 -0
- data/lib/hoe/inline.rb +6 -2
- data/lib/hoe/publish.rb +7 -7
- data/lib/hoe/racc.rb +1 -1
- data/template/Manifest.txt.erb +3 -3
- data/test/test_hoe.rb +7 -7
- metadata +9 -11
- metadata.gz.sig +1 -3
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
=== 2.9.5 / 2011-06-21
|
2
|
+
|
3
|
+
* 2 minor enhancements:
|
4
|
+
|
5
|
+
* Extended #dependency to work post-spec creation in case a task wants to add a dep.
|
6
|
+
|
7
|
+
* 4 bug fixes:
|
8
|
+
|
9
|
+
* Fixed dependency for :inline plugin.
|
10
|
+
* Fixed minor 1.9.3 warnings.
|
11
|
+
* Fixed sow to obey gem naming conventions. It no longer munges - to _.
|
12
|
+
* Switched hoe deps from >= to ~>.
|
13
|
+
|
1
14
|
=== 2.9.4 / 2011-04-01
|
2
15
|
|
3
16
|
* 1 minor enhancement:
|
data/bin/sow
CHANGED
@@ -20,7 +20,7 @@ def check_subdir option
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
|
23
|
+
op = OptionParser.new do |opts|
|
24
24
|
opts.banner = "Usage: sow [options] project_name"
|
25
25
|
|
26
26
|
opts.separator "Standard options:"
|
@@ -45,7 +45,7 @@ opts = OptionParser.new do |opts|
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
|
48
|
+
op.parse!
|
49
49
|
|
50
50
|
include FileUtils::Verbose
|
51
51
|
|
@@ -76,10 +76,10 @@ end
|
|
76
76
|
|
77
77
|
project = ARGV.shift
|
78
78
|
|
79
|
-
abort
|
79
|
+
abort op.to_s unless project
|
80
80
|
abort "Project #{project} seems to exist" if test ?d, project
|
81
81
|
|
82
|
-
|
82
|
+
_, file_name, klass = Hoe.normalize_names project
|
83
83
|
|
84
84
|
FileUtils.cp_r template_path, project
|
85
85
|
|
@@ -95,13 +95,25 @@ Dir.chdir project do
|
|
95
95
|
|
96
96
|
warn "erb: #{path}"
|
97
97
|
|
98
|
-
File.open path, "w" do |
|
99
|
-
|
98
|
+
File.open path, "w" do |io|
|
99
|
+
erb = ERB.new file
|
100
|
+
erb.filename = path
|
101
|
+
io.puts erb.result(binding)
|
100
102
|
end
|
101
103
|
end
|
102
104
|
|
103
105
|
paths.grep(/file_name|\.erb$/).each do |file|
|
104
106
|
new_file = file.sub(/file_name/, file_name).sub(/\.erb$/, '')
|
107
|
+
|
108
|
+
# TODO change template to separate a flat filename from a directory
|
109
|
+
# filename
|
110
|
+
if file =~ /^(bin|test)/ then
|
111
|
+
dir, *rest = new_file.split File::SEPARATOR
|
112
|
+
|
113
|
+
new_file = File.join dir, rest.join('_')
|
114
|
+
end
|
115
|
+
|
116
|
+
FileUtils.mkdir_p File.dirname new_file
|
105
117
|
FileUtils.mv file, new_file
|
106
118
|
end
|
107
119
|
end
|
data/lib/hoe.rb
CHANGED
@@ -67,7 +67,7 @@ class Hoe
|
|
67
67
|
include Rake::DSL if defined?(Rake::DSL)
|
68
68
|
|
69
69
|
# duh
|
70
|
-
VERSION = '2.9.
|
70
|
+
VERSION = '2.9.5'
|
71
71
|
|
72
72
|
@@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
|
73
73
|
:publish, :rcov, :gemcutter, :signing, :test]
|
@@ -261,14 +261,22 @@ class Hoe
|
|
261
261
|
end
|
262
262
|
|
263
263
|
##
|
264
|
-
# Normalize a project name into the project, file, and klass
|
264
|
+
# Normalize a project name into the project, file, and klass names that
|
265
|
+
# follow Ruby package naming guidelines.
|
265
266
|
#
|
266
|
-
#
|
267
|
+
# Project names are lowercase with _ separating package parts and -
|
268
|
+
# separating extension parts.
|
269
|
+
#
|
270
|
+
# File names are lowercase with _ separating pacagke parts and / separating
|
271
|
+
# extension parts. net-http-persistent becomes net/http/persistent.
|
272
|
+
#
|
273
|
+
# Klass names are CamelCase with :: separating extension parts.
|
267
274
|
|
268
275
|
def self.normalize_names project # :nodoc:
|
269
|
-
project = project.
|
276
|
+
project = project.gsub(/([A-Z])/, '_\1').downcase.sub(/^_/, '')
|
270
277
|
klass = project.gsub(/(?:^|_)([a-z])/) { $1.upcase }
|
271
|
-
|
278
|
+
klass = klass. gsub(/(?:^|-)([a-z])/) { "::#{$1.upcase}" }
|
279
|
+
file_name = project.gsub(/-/, '/')
|
272
280
|
|
273
281
|
return project, file_name, klass
|
274
282
|
end
|
@@ -345,15 +353,27 @@ class Hoe
|
|
345
353
|
# +type+ for developer dependencies.
|
346
354
|
|
347
355
|
def dependency name, version, type = :runtime
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
356
|
+
raise "Unknown dependency type: #{type}" unless
|
357
|
+
[:runtime, :dev, :development, :developer].include? type
|
358
|
+
|
359
|
+
# spec has already been defined. A task wants to add a dependency after.
|
360
|
+
if spec then
|
361
|
+
msg = if type == :runtime then
|
362
|
+
:add_dependency
|
363
|
+
else
|
364
|
+
:add_development_dependency
|
365
|
+
end
|
366
|
+
|
367
|
+
spec.send msg, name, version
|
368
|
+
else
|
369
|
+
ary = if type == :runtime then
|
370
|
+
extra_deps
|
371
|
+
else
|
372
|
+
extra_dev_deps
|
373
|
+
end
|
374
|
+
|
375
|
+
ary << [name, version]
|
376
|
+
end
|
357
377
|
end
|
358
378
|
|
359
379
|
##
|
@@ -365,11 +385,11 @@ class Hoe
|
|
365
385
|
|
366
386
|
case name
|
367
387
|
when 'hoe' then
|
368
|
-
|
369
|
-
when '
|
388
|
+
dependency "rake", "~> #{RAKEVERSION}"
|
389
|
+
when 'rake', 'minitest' then
|
370
390
|
# avoid circular dependencies for hoe's (potentially) hoe'd dependencies
|
371
391
|
else
|
372
|
-
|
392
|
+
dependency "hoe", "~> #{VERSION}", :development
|
373
393
|
end
|
374
394
|
end
|
375
395
|
|
@@ -422,7 +442,6 @@ class Hoe
|
|
422
442
|
s.extra_rdoc_files += s.files.grep(/txt$/)
|
423
443
|
s.extra_rdoc_files.reject! { |f| f =~ %r%^(test|spec|vendor|template|data|tmp)/% }
|
424
444
|
s.extra_rdoc_files += @extra_rdoc_files
|
425
|
-
|
426
445
|
end
|
427
446
|
|
428
447
|
unless self.version then
|
@@ -546,7 +565,7 @@ class Hoe
|
|
546
565
|
|
547
566
|
begin
|
548
567
|
send "define_#{plugin}_tasks"
|
549
|
-
rescue NoMethodError
|
568
|
+
rescue NoMethodError
|
550
569
|
warn "warning: couldn't activate the #{plugin} plugin, skipping" if
|
551
570
|
Rake.application.options.trace or $DEBUG
|
552
571
|
|
data/lib/hoe/compiler.rb
CHANGED
data/lib/hoe/deps.rb
CHANGED
data/lib/hoe/gemcutter.rb
CHANGED
data/lib/hoe/inline.rb
CHANGED
@@ -18,12 +18,16 @@ require 'rbconfig'
|
|
18
18
|
# +FORCE_PLATFORM+ (instead of default Gem::Platform::CURRENT)
|
19
19
|
|
20
20
|
module Hoe::Inline
|
21
|
+
def initialize_inline
|
22
|
+
dependency "RubyInline", "~> 3.9"
|
23
|
+
|
24
|
+
clean_globs << File.expand_path("~/.ruby_inline")
|
25
|
+
end
|
26
|
+
|
21
27
|
##
|
22
28
|
# Define tasks for plugin.
|
23
29
|
|
24
30
|
def define_inline_tasks
|
25
|
-
extra_deps << ['RubyInline', "~> 3.8.4"]
|
26
|
-
clean_globs << File.expand_path("~/.ruby_inline")
|
27
31
|
task :test => :clean
|
28
32
|
|
29
33
|
if ENV['INLINE'] then
|
data/lib/hoe/publish.rb
CHANGED
@@ -154,7 +154,7 @@ module Hoe::Publish
|
|
154
154
|
with_config do |config, path|
|
155
155
|
break unless config['blogs']
|
156
156
|
|
157
|
-
|
157
|
+
_, title, body, urls = announcement
|
158
158
|
body += "\n\n#{urls}"
|
159
159
|
|
160
160
|
config['blogs'].each do |site|
|
@@ -163,12 +163,12 @@ module Hoe::Publish
|
|
163
163
|
:description => body,
|
164
164
|
:categories => blog_categories)
|
165
165
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
166
|
+
server.call('metaWeblog.newPost',
|
167
|
+
site['blog_id'],
|
168
|
+
site['user'],
|
169
|
+
site['password'],
|
170
|
+
content,
|
171
|
+
true)
|
172
172
|
end
|
173
173
|
end
|
174
174
|
end
|
data/lib/hoe/racc.rb
CHANGED
data/template/Manifest.txt.erb
CHANGED
data/test/test_hoe.rb
CHANGED
@@ -147,7 +147,7 @@ class TestHoe < MiniTest::Unit::TestCase
|
|
147
147
|
|
148
148
|
deps = spec.dependencies.sort_by { |dep| dep.name }
|
149
149
|
|
150
|
-
expected = [["hoe", :development, "
|
150
|
+
expected = [["hoe", :development, "~> #{Hoe::VERSION}"]]
|
151
151
|
|
152
152
|
expected << ["rubyforge", :development, ">= #{::RubyForge::VERSION}"] if
|
153
153
|
defined? ::RubyForge
|
@@ -170,12 +170,12 @@ class TestHoe < MiniTest::Unit::TestCase
|
|
170
170
|
def test_rename
|
171
171
|
# project, file_name, klass = Hoe.normalize_names 'project_name'
|
172
172
|
|
173
|
-
assert_equal %w( word word Word),
|
174
|
-
assert_equal %w( word word Word),
|
175
|
-
assert_equal %w(two_words two_words TwoWords),
|
176
|
-
assert_equal %w(two_words two_words TwoWords),
|
177
|
-
assert_equal %w(
|
178
|
-
assert_equal %w(two_words two_words TwoWords),
|
173
|
+
assert_equal %w( word word Word), Hoe.normalize_names('word')
|
174
|
+
assert_equal %w( word word Word), Hoe.normalize_names('Word')
|
175
|
+
assert_equal %w(two_words two_words TwoWords), Hoe.normalize_names('TwoWords')
|
176
|
+
assert_equal %w(two_words two_words TwoWords), Hoe.normalize_names('twoWords')
|
177
|
+
assert_equal %w(two-words two/words Two::Words), Hoe.normalize_names('two-words')
|
178
|
+
assert_equal %w(two_words two_words TwoWords), Hoe.normalize_names('two_words')
|
179
179
|
end
|
180
180
|
|
181
181
|
def test_nosudo
|
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: 33
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 2.9.
|
9
|
+
- 5
|
10
|
+
version: 2.9.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -36,8 +36,7 @@ cert_chain:
|
|
36
36
|
FBHgymkyj/AOSqKRIpXPhjC6
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2011-
|
40
|
-
default_executable:
|
39
|
+
date: 2011-06-22 00:00:00 Z
|
41
40
|
dependencies:
|
42
41
|
- !ruby/object:Gem::Dependency
|
43
42
|
name: rake
|
@@ -45,7 +44,7 @@ dependencies:
|
|
45
44
|
requirement: &id001 !ruby/object:Gem::Requirement
|
46
45
|
none: false
|
47
46
|
requirements:
|
48
|
-
- -
|
47
|
+
- - ~>
|
49
48
|
- !ruby/object:Gem::Version
|
50
49
|
hash: 49
|
51
50
|
segments:
|
@@ -63,12 +62,12 @@ dependencies:
|
|
63
62
|
requirements:
|
64
63
|
- - ">="
|
65
64
|
- !ruby/object:Gem::Version
|
66
|
-
hash:
|
65
|
+
hash: 3
|
67
66
|
segments:
|
68
67
|
- 2
|
68
|
+
- 3
|
69
69
|
- 0
|
70
|
-
|
71
|
-
version: 2.0.2
|
70
|
+
version: 2.3.0
|
72
71
|
type: :development
|
73
72
|
version_requirements: *id002
|
74
73
|
description: |-
|
@@ -131,7 +130,6 @@ files:
|
|
131
130
|
- test/test_hoe_gemcutter.rb
|
132
131
|
- test/test_hoe_test.rb
|
133
132
|
- .gemtest
|
134
|
-
has_rdoc: true
|
135
133
|
homepage: http://rubyforge.org/projects/seattlerb/
|
136
134
|
licenses: []
|
137
135
|
|
@@ -163,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
161
|
requirements: []
|
164
162
|
|
165
163
|
rubyforge_project: seattlerb
|
166
|
-
rubygems_version: 1.
|
164
|
+
rubygems_version: 1.8.2
|
167
165
|
signing_key:
|
168
166
|
specification_version: 3
|
169
167
|
summary: Hoe is a rake/rubygems helper for project Rakefiles
|
metadata.gz.sig
CHANGED