hen 0.3.6 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to hen version 0.3.6
5
+ This documentation refers to hen version 0.3.9
6
6
 
7
7
 
8
8
  == DESCRIPTION
data/lib/hen/dsl.rb CHANGED
@@ -36,6 +36,7 @@ class Hen
36
36
  module DSL
37
37
 
38
38
  extend self
39
+ extend Rake::DSL if Rake.const_defined?(:DSL)
39
40
 
40
41
  # The Hen configuration.
41
42
  def config
@@ -243,7 +244,7 @@ class Hen
243
244
  options = args.last.is_a?(Hash) ? args.pop : {}
244
245
  options[:verbose] = Hen.verbose unless options.has_key?(:verbose)
245
246
 
246
- sh('git', cmd.to_s.tr('_', '-'), *args << options)
247
+ DSL.send(:sh, 'git', cmd.to_s.tr('_', '-'), *args << options)
247
248
  end
248
249
 
249
250
  def run(cmd, *args) # :nodoc:
@@ -288,7 +289,7 @@ class Hen
288
289
  options = args.last.is_a?(Hash) ? args.pop : {}
289
290
  options[:verbose] = Hen.verbose unless options.has_key?(:verbose)
290
291
 
291
- sh('svn', cmd.to_s.tr('_', '-'), *args << options)
292
+ DSL.send(:sh, 'svn', cmd.to_s.tr('_', '-'), *args << options)
292
293
  end
293
294
 
294
295
  def run(cmd, *args) # :nodoc:
data/lib/hen/version.rb CHANGED
@@ -4,7 +4,7 @@ class Hen
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 3
7
- TINY = 6
7
+ TINY = 9
8
8
 
9
9
  class << self
10
10
 
data/lib/hens/gem.rake CHANGED
@@ -2,8 +2,6 @@ Hen :gem => :rdoc do
2
2
  # Dependencies:
3
3
  # * rdoc -- Uses RDOC_OPTIONS and 'doc:publish' task
4
4
 
5
- require 'rake/gempackagetask'
6
-
7
5
  gem_options = config[:gem].merge(
8
6
  :files => FileList[
9
7
  'lib/**/*.rb',
@@ -22,6 +20,16 @@ Hen :gem => :rdoc do
22
20
  :require_path => 'lib'
23
21
  )
24
22
 
23
+ gem_klass = begin
24
+ raise LoadError if gem_options.delete(:legacy)
25
+
26
+ require 'rubygems/package_task'
27
+ Gem::PackageTask
28
+ rescue LoadError
29
+ require 'rake/gempackagetask'
30
+ Rake::GemPackageTask
31
+ end
32
+
25
33
  rf_config = config[:rubyforge]
26
34
 
27
35
  if Object.const_defined?(:RDOC_OPTIONS)
@@ -134,7 +142,7 @@ Hen :gem => :rdoc do
134
142
  puts "#{action} #{file}"
135
143
  end
136
144
 
137
- pkg_task = Rake::GemPackageTask.new(gem_spec) { |pkg|
145
+ pkg_task = gem_klass.new(gem_spec) { |pkg|
138
146
  pkg.need_tar_gz = true
139
147
  pkg.need_zip = true
140
148
 
@@ -144,12 +152,12 @@ Hen :gem => :rdoc do
144
152
  end
145
153
  }
146
154
 
147
- release_desc = "Release #{pkg_task.name} version #{pkg_task.version}"
148
- tag_desc = "Tag the #{pkg_task.name} release version #{pkg_task.version}"
155
+ release_desc = "Release #{gem_spec.name} version #{gem_spec.version}"
156
+ tag_desc = "Tag the #{gem_spec.name} release version #{gem_spec.version}"
149
157
 
150
158
  rubygems do |rg_pool|
151
159
 
152
- gem_path = File.join(pkg_task.package_dir, pkg_task.gem_file)
160
+ gem_path = File.join(pkg_task.package_dir, gem_spec.file_name)
153
161
 
154
162
  desc "Create the gem and install it"
155
163
  task 'gem:install' => :gem do
@@ -174,7 +182,7 @@ Hen :gem => :rdoc do
174
182
  abort 'Nothing to release!' if files.empty?
175
183
 
176
184
  # shorten to (at most) three digits
177
- version = pkg_task.version.to_s.split(/([.])/)[0..4].join
185
+ version = gem_spec.version.to_s.split(/([.])/)[0..4].join
178
186
 
179
187
  rf = rf_pool.call
180
188
 
@@ -184,7 +192,7 @@ Hen :gem => :rdoc do
184
192
  #uc['release_changes'] = changes if changes
185
193
  #uc['preformatted'] = true
186
194
 
187
- rf.add_release(rf_config[:project], pkg_task.name, version, *files)
195
+ rf.add_release(rf_config[:project], gem_spec.name, version, *files)
188
196
  end
189
197
 
190
198
  desc release_desc
@@ -196,7 +204,7 @@ Hen :gem => :rdoc do
196
204
 
197
205
  desc "#{tag_desc} (Git)"
198
206
  task! 'release:tag' do
199
- git.tag '-f', "v#{pkg_task.version}"
207
+ git.tag '-f', "v#{gem_spec.version}"
200
208
  end
201
209
 
202
210
  end
@@ -205,7 +213,7 @@ Hen :gem => :rdoc do
205
213
 
206
214
  desc "#{tag_desc} (SVN)"
207
215
  task! 'release:tag' do
208
- svn.cp '-m', "v#{pkg_task.version}", '^/trunk', "^/tags/#{pkg_task.version}"
216
+ svn.cp '-m', "v#{gem_spec.version}", '^/trunk', "^/tags/#{gem_spec.version}"
209
217
  end
210
218
 
211
219
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hen
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 6
10
- version: 0.3.6
9
+ - 9
10
+ version: 0.3.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jens Wille
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-29 00:00:00 Z
18
+ date: 2011-05-24 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: ruby-nuggets
@@ -85,12 +85,12 @@ licenses: []
85
85
 
86
86
  post_install_message:
87
87
  rdoc_options:
88
- - --main
89
- - README
90
88
  - --charset
91
89
  - UTF-8
92
90
  - --title
93
- - hen Application documentation (v0.3.6)
91
+ - hen Application documentation (v0.3.9)
92
+ - --main
93
+ - README
94
94
  - --line-numbers
95
95
  - --all
96
96
  require_paths:
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  requirements: []
117
117
 
118
118
  rubyforge_project: prometheus
119
- rubygems_version: 1.7.2
119
+ rubygems_version: 1.8.3
120
120
  signing_key:
121
121
  specification_version: 3
122
122
  summary: Hoe or Echoe? No, thanks! Just a Rake helper that fits my own personal style.