hen 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,5 +1,10 @@
1
1
  = Revision history for hen
2
2
 
3
+ == 0.3.3 [2011-02-15]
4
+
5
+ * Added <tt>release:tag</tt> task.
6
+ * Better default project name handling.
7
+
3
8
  == 0.3.2 [2011-02-11]
4
9
 
5
10
  * Fixed the (pseudo-)object eval stuff. So there's hope we finally have a
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to hen version 0.3.2
5
+ This documentation refers to hen version 0.3.3
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -50,6 +50,12 @@ class Hen
50
50
  }
51
51
  end
52
52
 
53
+ # Determine the project name from +gem_config+'s <tt>:name</tt>,
54
+ # or +rf_config+'s <tt>:package</tt> or <tt>:project</tt>.
55
+ def project_name(rf_config = {}, gem_config = {})
56
+ gem_config[:name] || rf_config[:package] || rf_config[:project]
57
+ end
58
+
53
59
  # Define task +t+, but overwrite any existing task of that name!
54
60
  # (Rake usually just adds them up.)
55
61
  def task!(t, *args)
@@ -57,6 +63,11 @@ class Hen
57
63
  task(t, *args, &block_given? ? Proc.new : nil)
58
64
  end
59
65
 
66
+ # Return true if task +t+ is defined, false otherwise.
67
+ def have_task?(t)
68
+ Rake.application.instance_variable_get(:@tasks).has_key?(t.to_s)
69
+ end
70
+
60
71
  # Find a command that is executable and run it. Intended for
61
72
  # platform-dependent alternatives (Command A is not available?
62
73
  # Then try B instead).
@@ -4,7 +4,7 @@ class Hen
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 3
7
- TINY = 2
7
+ TINY = 3
8
8
 
9
9
  class << self
10
10
 
@@ -35,7 +35,7 @@ Hen :gem => :rdoc do
35
35
 
36
36
  ### name
37
37
 
38
- gem_name = gem_options[:name] ||= rf_config[:package]
38
+ gem_name = gem_options[:name] ||= project_name(rf_config)
39
39
 
40
40
  abort 'Gem name missing' unless gem_name
41
41
 
@@ -138,6 +138,7 @@ Hen :gem => :rdoc do
138
138
  }
139
139
 
140
140
  release_desc = "Release #{pkg_task.name} version #{pkg_task.version}"
141
+ tag_desc = "Tag the #{pkg_task.name} release version #{pkg_task.version}"
141
142
 
142
143
  rubygems do |rg_pool|
143
144
 
@@ -184,4 +185,24 @@ Hen :gem => :rdoc do
184
185
 
185
186
  end
186
187
 
188
+ git do |git|
189
+
190
+ desc "#{tag_desc} (Git)"
191
+ task! 'release:tag' do
192
+ git.tag '-f', "v#{pkg_task.version}"
193
+ end
194
+
195
+ end
196
+
197
+ svn do |svn|
198
+
199
+ desc "#{tag_desc} (SVN)"
200
+ task! 'release:tag' do
201
+ svn.cp '-m', "v#{pkg_task.version}", '^/trunk', "^/tags/#{pkg_task.version}"
202
+ end
203
+
204
+ end
205
+
206
+ task :release => 'release:tag' if have_task?('release:tag')
207
+
187
208
  end
@@ -24,7 +24,7 @@ Hen :rdoc do
24
24
  rdoc_options[:title] ||= begin
25
25
  title = 'Application documentation'
26
26
 
27
- if name = config[:gem][:name] || config[:rubyforge][:package]
27
+ if name = project_name(*config.values_at(:rubyforge, :gem))
28
28
  title.insert(0, "#{name} ")
29
29
  end
30
30
 
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hen
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 21
4
5
  prerelease:
5
- version: 0.3.2
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 3
10
+ version: 0.3.3
6
11
  platform: ruby
7
12
  authors:
8
13
  - Jens Wille
@@ -10,7 +15,7 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2011-02-12 00:00:00 +01:00
18
+ date: 2011-02-15 00:00:00 +01:00
14
19
  default_executable:
15
20
  dependencies:
16
21
  - !ruby/object:Gem::Dependency
@@ -21,6 +26,11 @@ dependencies:
21
26
  requirements:
22
27
  - - ">="
23
28
  - !ruby/object:Gem::Version
29
+ hash: 21
30
+ segments:
31
+ - 0
32
+ - 6
33
+ - 9
24
34
  version: 0.6.9
25
35
  type: :runtime
26
36
  version_requirements: *id001
@@ -32,6 +42,9 @@ dependencies:
32
42
  requirements:
33
43
  - - ">="
34
44
  - !ruby/object:Gem::Version
45
+ hash: 3
46
+ segments:
47
+ - 0
35
48
  version: "0"
36
49
  type: :runtime
37
50
  version_requirements: *id002
@@ -46,43 +59,42 @@ extra_rdoc_files:
46
59
  - COPYING
47
60
  - ChangeLog
48
61
  files:
49
- - lib/hen/dsl.rb
50
- - lib/hen/version.rb
51
62
  - lib/hen/cli.rb
63
+ - lib/hen/version.rb
64
+ - lib/hen/dsl.rb
52
65
  - lib/hen.rb
53
66
  - bin/hen
67
+ - lib/hens/rdoc.rake
54
68
  - lib/hens/gem.rake
55
69
  - lib/hens/test.rake
56
70
  - lib/hens/spec.rake
57
- - lib/hens/rdoc.rake
58
- - COPYING
59
- - Rakefile
60
71
  - README
61
72
  - ChangeLog
73
+ - Rakefile
74
+ - COPYING
62
75
  - example/hens/sample.rake
63
76
  - example/_henrc
64
- - example/project/COPYING
65
- - example/project/Rakefile
66
- - example/project/_gitignore
67
77
  - example/project/README
68
78
  - example/project/ChangeLog
79
+ - example/project/Rakefile
69
80
  - example/project/lib/__progname__/version.rb
70
81
  - example/project/lib/__progname__.rb
82
+ - example/project/_gitignore
83
+ - example/project/COPYING
71
84
  has_rdoc: true
72
85
  homepage: http://prometheus.rubyforge.org/hen
73
86
  licenses: []
74
87
 
75
88
  post_install_message:
76
89
  rdoc_options:
77
- - --line-numbers
78
- - --inline-source
79
- - --main
80
- - README
81
90
  - --charset
82
91
  - UTF-8
83
- - --title
84
- - hen Application documentation (v0.3.2)
85
92
  - --all
93
+ - --main
94
+ - README
95
+ - --title
96
+ - hen Application documentation (v0.3.3)
97
+ - --line-numbers
86
98
  require_paths:
87
99
  - lib
88
100
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -90,17 +102,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
102
  requirements:
91
103
  - - ">="
92
104
  - !ruby/object:Gem::Version
105
+ hash: 3
106
+ segments:
107
+ - 0
93
108
  version: "0"
94
109
  required_rubygems_version: !ruby/object:Gem::Requirement
95
110
  none: false
96
111
  requirements:
97
112
  - - ">="
98
113
  - !ruby/object:Gem::Version
114
+ hash: 3
115
+ segments:
116
+ - 0
99
117
  version: "0"
100
118
  requirements: []
101
119
 
102
120
  rubyforge_project: prometheus
103
- rubygems_version: 1.4.2
121
+ rubygems_version: 1.5.2
104
122
  signing_key:
105
123
  specification_version: 3
106
124
  summary: Hoe or Echoe? No, thanks! Just a Rake helper that fits my own personal style.