hoe 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/History.txt +6 -0
  2. data/lib/hoe.rb +19 -8
  3. metadata +2 -3
@@ -1,3 +1,9 @@
1
+ = 1.1.4 2006-11-12
2
+
3
+ * Added need_tar and need_zip to customize package requirements. Stupid windoze.
4
+ * Extended spec_extras to take procs as values. Passes in named parameter.
5
+ * Removed test from require_paths. I thought I already parameterized this. :/
6
+
1
7
  = 1.1.3 2006-11-09
2
8
 
3
9
  * Added test_deps, now you can automatically discover test dependency ommisions.
data/lib/hoe.rb CHANGED
@@ -74,6 +74,8 @@ require 'rbconfig'
74
74
  #
75
75
  # * clean_globs - An array of file patterns to delete on clean.
76
76
  # * extra_deps - An array of rubygem dependencies.
77
+ # * need_tar - Should package create a tarball? [default: true]
78
+ # * need_zip - Should package create a zipfile? [default: false]
77
79
  # * rdoc_pattern - A regexp to match documentation files against the manifest.
78
80
  # * rubyforge_name - The name of the rubyforge project. [default: name.downcase]
79
81
  # * spec_extras - A hash of extra values to set in the gemspec.
@@ -87,7 +89,7 @@ require 'rbconfig'
87
89
  # * RUBY_FLAGS - Used to specify flags to ruby [has smart default].
88
90
 
89
91
  class Hoe
90
- VERSION = '1.1.3'
92
+ VERSION = '1.1.4'
91
93
 
92
94
  rubyprefix = Config::CONFIG['prefix']
93
95
  sitelibdir = Config::CONFIG['sitelibdir']
@@ -104,7 +106,7 @@ class Hoe
104
106
  (RUBY_DEBUG ? " #{RUBY_DEBUG}" : '')
105
107
  FILTER = ENV['FILTER'] # for tests (eg FILTER="-n test_blah")
106
108
 
107
- attr_accessor :author, :bin_files, :changes, :clean_globs, :description, :email, :extra_deps, :lib_files, :name, :rdoc_pattern, :rubyforge_name, :spec, :spec_extras, :summary, :test_files, :test_globs, :url, :version
109
+ attr_accessor :author, :bin_files, :changes, :clean_globs, :description, :email, :extra_deps, :lib_files, :name, :need_tar, :need_zip, :rdoc_pattern, :rubyforge_name, :spec, :spec_extras, :summary, :test_files, :test_globs, :url, :version
108
110
 
109
111
  def initialize(name, version)
110
112
  self.name = name
@@ -123,6 +125,8 @@ class Hoe
123
125
  self.rdoc_pattern = /^(lib|bin)|txt$/
124
126
  self.extra_deps = []
125
127
  self.spec_extras = {}
128
+ self.need_tar = true
129
+ self.need_zip = false
126
130
 
127
131
  if name == 'hoe' then
128
132
  extra_deps << ['rake']
@@ -184,15 +188,11 @@ class Hoe
184
188
  s.add_dependency(*dep)
185
189
  end
186
190
 
187
- spec_extras.each do |msg, val|
188
- s.send "#{msg}=", val
189
- end
190
-
191
191
  s.files = File.read("Manifest.txt").split
192
192
  s.executables = s.files.grep(/bin/) { |f| File.basename(f) }
193
193
 
194
194
  s.bindir = "bin"
195
- dirs = Dir['{lib,ext,test}']
195
+ dirs = Dir['{lib,ext}']
196
196
  s.require_paths = dirs unless dirs.empty?
197
197
  s.has_rdoc = true
198
198
 
@@ -201,6 +201,16 @@ class Hoe
201
201
  else
202
202
  s.test_files = Dir[*test_globs]
203
203
  end
204
+
205
+ # Do any extra stuff the user wants
206
+ spec_extras.each do |msg, val|
207
+ case val
208
+ when Proc
209
+ val.call(s.send(msg))
210
+ else
211
+ s.send "#{msg}=", val
212
+ end
213
+ end
204
214
  end
205
215
 
206
216
  desc 'Show information about the gem.'
@@ -213,7 +223,8 @@ class Hoe
213
223
  self.test_files = spec.files.grep(/^test/)
214
224
 
215
225
  Rake::GemPackageTask.new spec do |pkg|
216
- pkg.need_tar = true
226
+ pkg.need_tar = @need_tar
227
+ pkg.need_zip = @need_zip
217
228
  end
218
229
 
219
230
  desc 'Install the package. Uses PREFIX and RUBYLIB'
metadata CHANGED
@@ -3,12 +3,11 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: hoe
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.3
7
- date: 2006-11-09 00:00:00 -05:00
6
+ version: 1.1.4
7
+ date: 2006-11-13 00:00:00 -05:00
8
8
  summary: Hoe is a way to write Rakefiles much easier and cleaner.
9
9
  require_paths:
10
10
  - lib
11
- - test
12
11
  email: ryand-ruby@zenspider.com
13
12
  homepage: " http://rubyforge.org/projects/seattlerb/"
14
13
  rubyforge_project: seattlerb