hen 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 177356930491fcf2ccc9023fe0af2d921edb4a82
4
- data.tar.gz: f58d0f06959aa50b58c39bfad8c0c0e36e58dec6
3
+ metadata.gz: f4277e1da711a99134fc7f61aae6ee8eeb8fba09
4
+ data.tar.gz: f48f144b7c2e5300a001272a9e32035ddc26a6b0
5
5
  SHA512:
6
- metadata.gz: adb2725d6d88da4134bc2db0071f6040b5b222d8416d3657c660c17e27889fbf23d4b4a6444be8641bbd73679239af7781b2808d123992e9e930df5bc3bd2ccf
7
- data.tar.gz: bf93b94647fd1e4ad22587c96a514216e0eec745137688179191aae496a0a97cc74d66c4b3ea859d30a8fe620287c9c4e1395ae4500b9674fd88633c6739439a
6
+ metadata.gz: ee01d82270e0abfc6abf2c53f1a0f9238de59df751769a466acec43f76aa768081c6a5a30779886dec72a72b355ec6861a797883c7d4f6fe83ad992f56e69b25
7
+ data.tar.gz: c4926a79a6994151753cee20203d12e8a8399a515a44ee1cef8334679a8d7c5ca6cea05aee45bcb69255f2e3a217ef5e4442bf14720a990530cd1347da92a93c
data/ChangeLog CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  = Revision history for hen
4
4
 
5
+ == 0.6.0 [2014-04-14]
6
+
7
+ * Essential development dependencies are added automatically.
8
+ * New task 'gem:dependencies:install'.
9
+ * Dropped support for RubyForge (EOL on May 15th).
10
+ * New projects to require at least Ruby 1.9.3.
11
+ * Added .travis.yml to project skeleton.
12
+ * Use GitHub as default remote when creating a Git-backed project.
13
+ * Use SafeYAML when loading configuration files.
14
+
5
15
  == 0.5.1 [2014-03-31]
6
16
 
7
17
  * Improved extension name handling.
data/README CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to hen version 0.5.1
5
+ This documentation refers to hen version 0.6.0
6
6
 
7
7
 
8
8
  == DESCRIPTION
9
9
 
10
- Hen is a Rake helper framework, similar to Hoe[http://seattlerb.rubyforge.org/hoe/]
11
- or Echoe[http://fauna.github.com/fauna/echoe/]. It provides you with a set of
12
- common Rake tasks by placing a little snippet like the following in your Rakefile:
10
+ Hen is a Rake helper framework, similar to Hoe[http://docs.seattlerb.org/hoe/]
11
+ or Echoe[https://github.com/evan/echoe]. It provides you with a set of common
12
+ Rake tasks by placing a little snippet like the following in your Rakefile:
13
13
 
14
14
  require 'hen'
15
15
  require 'your/lib/version'
@@ -57,9 +57,9 @@ You can even extend Hen with your own tasks. More on that later. (TODO)
57
57
 
58
58
  == LINKS
59
59
 
60
- Documentation:: http://blackwinter.github.com/hen
61
- Source code:: http://github.com/blackwinter/hen
62
- RubyGem:: http://rubygems.org/gems/hen
60
+ Documentation:: https://blackwinter.github.io/hen/
61
+ Source code:: https://github.com/blackwinter/hen
62
+ RubyGem:: https://rubygems.org/gems/hen
63
63
 
64
64
 
65
65
  == AUTHORS
@@ -72,7 +72,7 @@ RubyGem:: http://rubygems.org/gems/hen
72
72
  Copyright (C) 2007-2012 University of Cologne,
73
73
  Albertus-Magnus-Platz, 50923 Cologne, Germany
74
74
 
75
- Copyright (C) 2013 Jens Wille
75
+ Copyright (C) 2013-2014 Jens Wille
76
76
 
77
77
  hen is free software: you can redistribute it and/or modify it under the
78
78
  terms of the GNU Affero General Public License as published by the Free
data/Rakefile CHANGED
@@ -13,6 +13,6 @@ Hen.lay! {{
13
13
  :license => %q{AGPL-3.0},
14
14
  :homepage => :blackwinter,
15
15
  :extra_files => FileList['lib/hens/*.rake'].to_a,
16
- :dependencies => [['ruby-nuggets', '>= 0.8.4'], 'highline']
16
+ :dependencies => %w[highline safe_yaml] << ['ruby-nuggets', '>= 0.8.4']
17
17
  }
18
18
  }}
data/example/_henrc CHANGED
@@ -4,4 +4,7 @@
4
4
  :author: <%= fullname %>
5
5
  :email: <%= emailaddress %>
6
6
 
7
+ :github:
8
+ :user: <%= githubuser %>
9
+
7
10
  # vim: syntax=yaml
@@ -2,6 +2,6 @@
2
2
 
3
3
  = Revision history for <%= progname %>
4
4
 
5
- == 0.0.1 [<%= Time.now.strftime('%Y-%m-%d') %>]
5
+ == 0.0.0 [<%= Time.now.strftime('%Y-%m-%d') %>]
6
6
 
7
7
  * Birthday :-)
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to <%= progname %> version 0.0.1
5
+ This documentation refers to <%= progname %> version 0.0.0
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -12,7 +12,9 @@ This documentation refers to <%= progname %> version 0.0.1
12
12
 
13
13
  == LINKS
14
14
 
15
- LABEL:: <### PLACE YOUR LINK(S) HERE ###>
15
+ Documentation:: https://<%= githubuser %>.github.io/<%= progname %>/
16
+ Source code:: https://github.com/<%= githubuser %>/<%= progname %>
17
+ RubyGem:: https://rubygems.org/gems/<%= progname %>
16
18
 
17
19
 
18
20
  == AUTHORS
@@ -4,14 +4,17 @@ begin
4
4
  require 'hen'
5
5
 
6
6
  Hen.lay! {{
7
- :gem => {
8
- :name => %q{<%= progname %>},
9
- :version => <%= classname %>::VERSION,
10
- :summary => %q{<%= progdesc %>},
11
- :author => %q{<%= fullname %>},
12
- :email => %q{<%= emailaddress %>},
13
- :license => %q{AGPL-3.0},
14
- :dependencies => %w[]
7
+ gem: {
8
+ name: %q{<%= progname %>},
9
+ version: <%= classname %>::VERSION,
10
+ summary: %q{<%= progdesc %>},
11
+ author: %q{<%= fullname %>},
12
+ email: %q{<%= emailaddress %>},
13
+ license: %q{AGPL-3.0},
14
+ homepage: :<%= githubuser %>,
15
+ dependencies: %w[],
16
+
17
+ required_ruby_version: '>= 1.9.3'
15
18
  }
16
19
  }}
17
20
  rescue LoadError => err
@@ -0,0 +1,31 @@
1
+ language:
2
+ ruby
3
+
4
+ rvm:
5
+ - '1.9.3'
6
+ - '2.0.0'
7
+ - '2.1.1'
8
+ - ruby-head
9
+ - jruby-19mode
10
+ - jruby-head
11
+ - rbx
12
+
13
+ matrix:
14
+ allow_failures:
15
+ - rvm: ruby-head
16
+ - rvm: jruby-head
17
+ - rvm: rbx
18
+
19
+ fast_finish:
20
+ true
21
+
22
+ script:
23
+ rake spec
24
+
25
+ install:
26
+ gem install --development <%= progname %>
27
+
28
+ ### PLACE YOUR EXTERNAL DEPENDENCIES HERE ###
29
+ #before_install:
30
+ # - sudo apt-get update -qq
31
+ # - sudo apt-get install -y XXX-dev
@@ -4,7 +4,7 @@ module <%= classname %>
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 0
7
- TINY = 1
7
+ TINY = 0
8
8
 
9
9
  class << self
10
10
 
data/lib/hen.rb CHANGED
@@ -7,7 +7,7 @@
7
7
  # Albertus-Magnus-Platz, #
8
8
  # 50923 Cologne, Germany #
9
9
  # #
10
- # Copyright (C) 2013 Jens Wille #
10
+ # Copyright (C) 2013-2014 Jens Wille #
11
11
  # #
12
12
  # Authors: #
13
13
  # Jens Wille <jens.wille@gmail.com> #
@@ -29,7 +29,7 @@
29
29
  #++
30
30
 
31
31
  require 'rake'
32
- require 'yaml'
32
+ require 'safe_yaml/load'
33
33
  require 'nuggets/env/user_home'
34
34
  require 'nuggets/hash/deep_merge'
35
35
  require 'nuggets/proc/bind'
@@ -182,7 +182,7 @@ class Hen
182
182
  hash = Hash.new { |h, k| h[k] = {} }
183
183
 
184
184
  henrc.each { |path|
185
- yaml = YAML.load_file(path)
185
+ yaml = SafeYAML.load_file(path, :deserialize_symbols => true)
186
186
  hash.deep_update(yaml) if yaml.is_a?(Hash)
187
187
  }
188
188
 
data/lib/hen/cli.rb CHANGED
@@ -55,7 +55,7 @@ class Hen
55
55
 
56
56
  if File.readable?(target)
57
57
  abort unless agree("Target file already exists: #{target}. Overwrite? ")
58
- FileUtils.cp(target, "#{target}.bak-#{Time.now.to_i}")
58
+ File.rename(target, "#{target}.bak-#{Time.now.to_i}")
59
59
  end
60
60
 
61
61
  content = ERB.new(File.read(sample)).result(binding)
@@ -79,6 +79,11 @@ class Hen
79
79
  ask!("Project's name", default)
80
80
  end
81
81
 
82
+ # A short one-line summary of the project's description. (Required)
83
+ def progdesc(default = nil)
84
+ ask!("Program's description summary", default)
85
+ end
86
+
82
87
  # The project's namespace. (Required)
83
88
  #
84
89
  # Namespaces SHOULD match the project name in SnakeCase.
@@ -96,35 +101,49 @@ class Hen
96
101
  ask('E-mail address', default)
97
102
  end
98
103
 
99
- # A short one-line summary of the project's description. (Required)
100
- def progdesc(default = nil)
101
- ask!("Program's description summary", default)
104
+ # The author's GitHub user name. (Optional)
105
+ def githubuser(default = default_githubuser)
106
+ ask('GitHub user name', default)
102
107
  end
103
108
 
104
109
  private
105
110
 
106
111
  # Determine a suitable default namespace from the project name.
107
112
  def default_classname
108
- pname = progname
109
- pname.gsub(/(?:\A|_)(.)/) { $1.upcase } if pname && !pname.empty?
113
+ name = progname
114
+ name.gsub(/(?:\A|_)(.)/) { $1.upcase } if name && !name.empty?
110
115
  end
111
116
 
112
- # Determine a default name from the global config or, if available,
113
- # from the {GECOS field}[http://en.wikipedia.org/wiki/Gecos_field]
117
+ # Determine a default name from the global config or from the Git config or,
118
+ # if available, from the {GECOS field}[http://en.wikipedia.org/wiki/Gecos_field]
114
119
  # in the <tt>/etc/passwd</tt> file.
115
120
  def default_fullname
116
- author = Hen.config('gem/author')
117
- return author if author && !author.empty?
118
-
119
- pwent = Etc.getpwuid(Process.euid)
120
- gecos = pwent.gecos if pwent
121
- gecos[/[^,]*/] if gecos && !gecos.empty?
121
+ henconfig(:gem, :author) || gitconfig(:user, :name) ||
122
+ (pwent = Etc.getpwuid(Process.euid) and pwent.gecos.to_s[/[^,]+/])
122
123
  end
123
124
 
124
- # Determine a default e-mail address from the global config.
125
+ # Determine a default e-mail address from the global config or from the Git
126
+ # config.
125
127
  def default_emailaddress
126
- email = Hen.config('gem/email')
127
- return email if email && !email.empty?
128
+ henconfig(:gem, :email) || gitconfig(:user, :email)
129
+ end
130
+
131
+ # Determine a default GitHub user name from the global config or from the
132
+ # Git config.
133
+ def default_githubuser
134
+ henconfig(:github, :user) || gitconfig(:github, :user)
135
+ end
136
+
137
+ # Find +key+ in the global config and return its non-empty value.
138
+ def henconfig(*key)
139
+ value = Hen.config(key.join('/'))
140
+ value if value && !value.empty?
141
+ end
142
+
143
+ # Find +key+ in the Git config and return its non-empty value.
144
+ def gitconfig(*key)
145
+ value = IO.popen(['git', 'config', key.join('.')]) { |io| io.read.chomp }
146
+ value if value && !value.empty?
128
147
  end
129
148
 
130
149
  alias_method :_hen_original_ask, :ask
data/lib/hen/commands.rb CHANGED
@@ -26,6 +26,7 @@
26
26
 
27
27
  # TODO: Implement 'list' command -- List available hens with their tasks (?)
28
28
 
29
+ require 'fileutils'
29
30
  require 'nuggets/argv/option'
30
31
  require 'nuggets/enumerable/minmax'
31
32
 
@@ -58,8 +59,6 @@ Usage: #{$0} {#{COMMANDS.keys.sort.join('|')}} [arguments] [options]
58
59
 
59
60
  SKELETON = File.expand_path('../../../example', __FILE__)
60
61
 
61
- GIT_RE = %r{(\A|/)[._](git[^/]+)\z}
62
-
63
62
  def [](arg)
64
63
  arg = arg.sub(/\A-+/, '')
65
64
  arg !~ /\W/ && public_method_defined?(arg) ? send(arg) : method_missing(arg)
@@ -135,20 +134,21 @@ Usage: #{$0} {#{COMMANDS.keys.sort.join('|')}} [arguments] [options]
135
134
  end
136
135
 
137
136
  def create_skel(path, skel, created, replace)
138
- git = create_git(path, created)
139
-
140
137
  progname = progname(File.basename(path))
141
138
 
139
+ git = create_git(path, created)
140
+
142
141
  Dir.chdir(skel) {
143
142
  Dir['**/*'].each { |sample|
144
- target = File.join(path, sample.gsub(/__progname__/, progname))
143
+ dir, name = File.split(sample.gsub('__progname__', progname))
144
+ name.sub!(/\A_/, '.')
145
145
 
146
- unless target.sub!(GIT_RE, '\1.\2') && !git
147
- created << target
146
+ next if name.start_with?('.git') unless git
148
147
 
149
- File.directory?(sample) ? FileUtils.mkdir_p(target) :
150
- replace[target] = render(sample, target).scan(/### .+ ###/)
151
- end
148
+ created << target = File.join(path, dir, name)
149
+
150
+ File.directory?(sample) ? FileUtils.mkdir_p(target) :
151
+ replace[target] = render(sample, target).scan(/### .+ ###/)
152
152
  }
153
153
  }
154
154
 
@@ -171,7 +171,11 @@ Usage: #{$0} {#{COMMANDS.keys.sort.join('|')}} [arguments] [options]
171
171
  if system('git', 'init')
172
172
  created << File.join(path, '.git')
173
173
 
174
- if remote
174
+ if remote.nil? && githubuser
175
+ remote = "git@github.com:#{githubuser}/#{progname}"
176
+ end
177
+
178
+ unless remote.nil? || remote.empty?
175
179
  url, label = remote.split('=', 2).reverse
176
180
  system('git', 'remote', 'add', label ||= 'origin', url)
177
181
 
data/lib/hen/dsl.rb CHANGED
@@ -53,12 +53,6 @@ class Hen
53
53
  }
54
54
  end
55
55
 
56
- # Determine the project name from +gem_config+'s <tt>:name</tt>,
57
- # or +rf_config+'s <tt>:package</tt> or <tt>:project</tt>.
58
- def project_name(rf_config = {}, gem_config = {})
59
- gem_config[:name] || rf_config[:package] || rf_config[:project]
60
- end
61
-
62
56
  # Define task +t+, but overwrite any existing task of that name!
63
57
  # (Rake usually just adds them up.)
64
58
  def task!(t, *args, &block)
@@ -141,25 +135,6 @@ class Hen
141
135
  }.compact.flatten
142
136
  end
143
137
 
144
- # Encapsulates tasks targeting at RubyForge, skipping those if no
145
- # RubyForge project is defined. Yields the RubyForge configuration
146
- # hash and, optionally, a proc to obtain RubyForge objects from (via
147
- # +call+; reaching out to #init_rubyforge).
148
- def rubyforge(&block)
149
- rf_config = config[:rubyforge]
150
- rf_project = rf_config[:project]
151
-
152
- if rf_project && !rf_project.empty? && have_rubyforge?
153
- rf_config[:package] ||= rf_project
154
-
155
- call_block(block, rf_config) { |*args|
156
- init_rubyforge(args.empty? || args.first)
157
- }
158
- else
159
- skipping 'RubyForge'
160
- end
161
- end
162
-
163
138
  # Encapsulates tasks targeting at RubyGems.org, skipping those if
164
139
  # RubyGem's 'push' command is not available. Yields an optional
165
140
  # proc to obtain RubyGems (pseudo-)objects from (via +call+;
@@ -204,15 +179,6 @@ class Hen
204
179
  false
205
180
  end
206
181
 
207
- # Loads the RubyForge library, giving a
208
- # nicer error message if it's not found.
209
- def have_rubyforge?
210
- require 'rubyforge'
211
- true
212
- rescue LoadError
213
- missing_lib 'rubyforge'
214
- end
215
-
216
182
  # Loads the RubyGems +push+ command, giving
217
183
  # a nicer error message if it's not found.
218
184
  def have_rubygems?
@@ -240,17 +206,6 @@ class Hen
240
206
  File.directory?('.svn')
241
207
  end
242
208
 
243
- # Prepare the use of RubyForge, optionally logging
244
- # in right away. Returns the RubyForge object.
245
- def init_rubyforge(login = true)
246
- return unless have_rubyforge?
247
-
248
- rf = RubyForge.new.configure
249
- rf.login if login
250
-
251
- rf
252
- end
253
-
254
209
  # Prepare the use of RubyGems.org. Returns the RubyGems
255
210
  # (pseudo-)object.
256
211
  def init_rubygems
data/lib/hen/version.rb CHANGED
@@ -3,8 +3,8 @@ class Hen
3
3
  module Version
4
4
 
5
5
  MAJOR = 0
6
- MINOR = 5
7
- TINY = 1
6
+ MINOR = 6
7
+ TINY = 0
8
8
 
9
9
  class << self
10
10
 
data/lib/hens/gem.rake CHANGED
@@ -30,8 +30,6 @@ Hen :gem => :rdoc do
30
30
  Rake::GemPackageTask
31
31
  end
32
32
 
33
- rf_config = config[:rubyforge]
34
-
35
33
  if Object.const_defined?(:RDOC_OPTIONS)
36
34
  rdoc_files = RDOC_OPTIONS[:rdoc_files]
37
35
  gem_options[:has_rdoc] = !rdoc_files.empty? if Gem::VERSION < '1.7'
@@ -43,8 +41,7 @@ Hen :gem => :rdoc do
43
41
 
44
42
  meta_gems, meta_gem_specs = Array(gem_options.delete(:meta)), []
45
43
 
46
- gem_name = gem_options[:name] ||= project_name(rf_config)
47
- abort 'Gem name missing' unless gem_name
44
+ abort 'Gem name missing' unless gem_name = gem_options[:name]
48
45
 
49
46
  gem_spec = Gem::Specification.new { |spec|
50
47
 
@@ -90,14 +87,7 @@ Hen :gem => :rdoc do
90
87
  else post_install_message
91
88
  end
92
89
 
93
- ### rubyforge project, homepage
94
-
95
- gem_options[:rubyforge_project] ||= rf_config[:project]
96
-
97
- if rf_project = gem_options[:rubyforge_project] and !rf_project.empty?
98
- rf_rdoc_dir = RDOC_OPTIONS[:rf_rdoc_dir] if Object.const_defined?(:RDOC_OPTIONS)
99
- gem_options[:homepage] ||= "#{rf_project}.rubyforge.org/#{rf_rdoc_dir}"
100
- end
90
+ ### homepage
101
91
 
102
92
  if homepage = gem_options[:homepage]
103
93
  homepage = "github.com/#{homepage}/#{gem_name}" if homepage.is_a?(Symbol)
@@ -132,11 +122,34 @@ Hen :gem => :rdoc do
132
122
 
133
123
  ### dependencies
134
124
 
135
- (gem_options.delete(:dependencies) || []).each { |dependency|
125
+ dependencies = Array(gem_options.delete(:dependencies))
126
+ development_dependencies = Array(gem_options.delete(:development_dependencies))
127
+
128
+ default_dependencies = %w[hen rake]
129
+
130
+ unless (test_files = gem_options[:files].grep(/\A(?:test|spec)s?\//)).empty?
131
+ test_dependency = case test_files.first.split(File::SEPARATOR).first
132
+ when 'test' then 'test-unit'
133
+ when 'spec' then 'rspec'
134
+ else if helper_file = test_files.grep(/_helper\.rb\z/).first
135
+ File.read(helper_file)[/^\s*require\s+(['"])(.*?)\1/, 2]
136
+ end
137
+ end
138
+
139
+ default_dependencies << test_dependency.tr('/', '-') if test_dependency
140
+ end
141
+
142
+ default_dependencies -= dependencies + development_dependencies + [gem_name]
143
+
144
+ dependencies.each { |dependency|
136
145
  spec.add_dependency(*dependency)
137
146
  }
138
147
 
139
- (gem_options.delete(:development_dependencies) || []).each { |dependency|
148
+ development_dependencies.each { |dependency|
149
+ spec.add_development_dependency(*dependency)
150
+ }
151
+
152
+ default_dependencies.each { |dependency|
140
153
  spec.add_development_dependency(*dependency)
141
154
  }
142
155
 
@@ -193,8 +206,8 @@ Hen :gem => :rdoc do
193
206
  ### inherit from original spec
194
207
 
195
208
  %w[
196
- name version authors email summary description
197
- rubyforge_project homepage
209
+ name version summary description
210
+ authors email license homepage
198
211
  ].each { |key|
199
212
  meta_gem_options[key = key.to_sym] ||= gem_options[key]
200
213
  }
@@ -333,6 +346,13 @@ Hen :gem => :rdoc do
333
346
  gem_base = pkg_task.package_dir
334
347
  gem_path = File.join(gem_base, gem_spec.file_name)
335
348
 
349
+ desc 'Install the gem dependencies'
350
+ task 'gem:dependencies:install' do
351
+ gem_spec.dependencies.each { |dependency|
352
+ rg_pool.call.install(dependency.name, '-v', dependency.requirement.to_s)
353
+ }
354
+ end
355
+
336
356
  desc 'Create the gem and install it'
337
357
  task 'gem:install' => :gem do
338
358
  rg_pool.call.install(gem_path)
@@ -379,32 +399,6 @@ Hen :gem => :rdoc do
379
399
 
380
400
  end
381
401
 
382
- rubyforge do |_, rf_pool|
383
-
384
- desc 'Package and upload the release to RubyForge'
385
- task 'release:rubyforge' => [:package, 'doc:publish:rubyforge'] do
386
- files = Dir[File.join(pkg_task.package_dir, "#{pkg_task.package_name}.*")]
387
- abort 'Nothing to release!' if files.empty?
388
-
389
- # shorten to (at most) three digits
390
- version = gem_spec.version.to_s.split(/([.])/)[0..4].join
391
-
392
- rf = rf_pool.call
393
-
394
- # TODO: Add release notes and changes.
395
- #uc = rf.userconfig
396
- #uc['release_notes'] = description if description
397
- #uc['release_changes'] = changes if changes
398
- #uc['preformatted'] = true
399
-
400
- rf.add_release(rf_config[:project], gem_name, version, *files)
401
- end
402
-
403
- desc release_desc
404
- task :release => 'release:rubyforge'
405
-
406
- end
407
-
408
402
  git do |git|
409
403
 
410
404
  desc "#{tag_desc} (Git)"
data/lib/hens/rdoc.rake CHANGED
@@ -23,7 +23,7 @@ Hen :rdoc do
23
23
  end
24
24
 
25
25
  info = {
26
- 'name' => project_name(*config.values_at(:rubyforge, :gem)),
26
+ 'name' => config[:gem][:name],
27
27
  'version' => config[:gem][:version],
28
28
  'date' => Date.today.to_s
29
29
  }
@@ -152,36 +152,4 @@ Hen :rdoc do
152
152
 
153
153
  end
154
154
 
155
- rubyforge do |rf_config|
156
-
157
- rf_project = rf_config[:project]
158
-
159
- rf_rdoc_dir, rf_package = rf_config.values_at(:rdoc_dir, :package)
160
- rf_rdoc_dir ||= :package if rf_package && rf_package != rf_project
161
- rf_rdoc_dir = rf_package if rf_package && rf_rdoc_dir == :package
162
-
163
- RDOC_OPTIONS[:rf_rdoc_dir] = rf_rdoc_dir
164
-
165
- desc 'Publish RDoc to RubyForge'
166
- task 'doc:publish:rubyforge' => :doc do
167
- rf_user = rf_config[:username]
168
- abort 'RubyForge user name missing' unless rf_user
169
-
170
- rf_host = "#{rf_user}@rubyforge.org"
171
-
172
- local_dir = rdoc_task.rdoc_dir
173
- remote_dir = "/var/www/gforge-projects/#{rf_project}"
174
- remote_dir = File.join(remote_dir, rf_rdoc_dir) if rf_rdoc_dir
175
-
176
- execute(
177
- "rsync -av --delete #{local_dir}/ #{rf_host}:#{remote_dir}/",
178
- "scp -r #{local_dir}/ #{rf_host}:#{remote_dir}/"
179
- )
180
- end
181
-
182
- desc publish_desc
183
- task 'doc:publish' => 'doc:publish:rubyforge'
184
-
185
- end
186
-
187
155
  end
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Wille
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-31 00:00:00.000000000 Z
11
+ date: 2014-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: highline
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: safe_yaml
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: ruby-nuggets
15
43
  requirement: !ruby/object:Gem::Requirement
@@ -25,13 +53,13 @@ dependencies:
25
53
  - !ruby/object:Gem::Version
26
54
  version: 0.8.4
27
55
  - !ruby/object:Gem::Dependency
28
- name: highline
56
+ name: rake
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
59
  - - ">="
32
60
  - !ruby/object:Gem::Version
33
61
  version: '0'
34
- type: :runtime
62
+ type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
@@ -61,6 +89,7 @@ files:
61
89
  - example/project/README
62
90
  - example/project/Rakefile
63
91
  - example/project/_gitignore
92
+ - example/project/_travis.yml
64
93
  - example/project/lib/__progname__.rb
65
94
  - example/project/lib/__progname__/version.rb
66
95
  - lib/hen.rb
@@ -78,15 +107,19 @@ licenses:
78
107
  metadata: {}
79
108
  post_install_message: |2+
80
109
 
81
- hen-0.5.1 [2014-03-31]:
110
+ hen-0.6.0 [2014-04-14]:
82
111
 
83
- * Improved extension name handling.
84
- * Only define 'gem:native' task when cross-compiling.
85
- * Avoid circular require.
112
+ * Essential development dependencies are added automatically.
113
+ * New task 'gem:dependencies:install'.
114
+ * Dropped support for RubyForge (EOL on May 15th).
115
+ * New projects to require at least Ruby 1.9.3.
116
+ * Added .travis.yml to project skeleton.
117
+ * Use GitHub as default remote when creating a Git-backed project.
118
+ * Use SafeYAML when loading configuration files.
86
119
 
87
120
  rdoc_options:
88
121
  - "--title"
89
- - hen Application documentation (v0.5.1)
122
+ - hen Application documentation (v0.6.0)
90
123
  - "--charset"
91
124
  - UTF-8
92
125
  - "--line-numbers"