hoe 3.6.0 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- dAQ� oH׀��N%��ч�\&�8�x��2.���j��T�
1
+ -ܦ�6VFټ��?�^�N�_7f�/� gqyY����~�SĨ���@�jSr��y�����n��J%Ahf���ƨ�1�N�%��x��
2
+ ^6.wp�0eU|�X�V��>,¡���>��(HK��J>�����3
data/History.txt CHANGED
@@ -1,3 +1,10 @@
1
+ === 3.6.1 / 2013-05-10
2
+
3
+ * 2 bug fixes:
4
+
5
+ * Define a blank test task just in case nothing is found
6
+ * Fixed an ancient test to use capture_subprocess_io. More reliable.
7
+
1
8
  === 3.6.0 / 2013-04-18
2
9
 
3
10
  * 5 minor enhancements:
data/lib/hoe.rb CHANGED
@@ -91,7 +91,7 @@ class Hoe
91
91
  include Rake::DSL if defined?(Rake::DSL)
92
92
 
93
93
  # duh
94
- VERSION = "3.6.0"
94
+ VERSION = "3.6.1"
95
95
 
96
96
  @@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
97
97
  :publish, :gemcutter, :signing, :test]
@@ -555,6 +555,14 @@ class Hoe
555
555
  s.extra_rdoc_files += @extra_rdoc_files
556
556
  end
557
557
 
558
+ check_for_version
559
+
560
+ spec.licenses = licenses unless licenses.empty?
561
+
562
+ run_spec_extras
563
+ end
564
+
565
+ def check_for_version # :nodoc:
558
566
  unless self.version then
559
567
  version = nil
560
568
  version_re = /VERSION += +([\"\'])([\d][\w\.]+)\1/
@@ -574,11 +582,11 @@ class Hoe
574
582
  warn " or fix your Manifest.txt"
575
583
  end
576
584
  end
585
+ end
577
586
 
578
- spec.licenses = licenses unless licenses.empty?
579
-
587
+ def run_spec_extras # :nodoc:
580
588
  # Do any extra stuff the user wants
581
- spec_extras.each do |msg, val|
589
+ self.spec_extras.each do |msg, val|
582
590
  case val
583
591
  when Proc
584
592
  val.call spec.send(msg)
data/lib/hoe/deps.rb CHANGED
@@ -24,106 +24,122 @@ module Hoe::Deps
24
24
  namespace :deps do
25
25
  desc "List all the dependent gems of this gem"
26
26
  task :list do
27
- gems = self.get_gems_by_name
28
- gem = gems[self.name]
29
-
30
- abort "Couldn't find gem: #{self.name}" unless gem
31
-
32
- deps = self.dependent_upon self.name
33
- max = deps.map { |s| s.full_name.size }.max
34
-
35
- puts " dependents:"
36
- unless deps.empty? then
37
- deps.sort_by { |spec| spec.full_name }.each do |spec|
38
- vers = spec.dependencies.find {|s| s.name == name}.requirements_list
39
- puts " %-*s - %s" % [max, spec.full_name, vers.join(", ")]
40
- end
41
- else
42
- puts " none"
43
- end
27
+ deps_list_task
44
28
  end
45
29
 
46
30
  desc "Print a contact list for gems dependent on this gem"
47
31
  task :email do
48
- gems = self.get_gems_by_name
49
- gem = gems[self.name]
32
+ deps_email_task
33
+ end
50
34
 
51
- abort "Couldn't find gem: #{self.name}" unless gem
35
+ desc "Fetch all the dependent gems of this gem into tarballs"
36
+ task :fetch do
37
+ deps_fetch_task
38
+ end
39
+ end
52
40
 
53
- deps = self.dependent_upon self.name
54
- email = deps.map { |s| s.email }.compact.flatten.sort.uniq
55
- email = email.map { |s| s.split(/,\s*/) }.flatten.sort.uniq
41
+ desc 'Install missing dependencies.'
42
+ task :check_extra_deps do
43
+ check_extra_deps_task
44
+ end
56
45
 
57
- email.map! { |s| # don't you people realize how easy this is?
58
- s.gsub(/ at | _at_ |\s*(atmark|@nospam@|-at?-|@at?@|<at?>|\[at?\]|\(at?\))\s*/i, '@').gsub(/\s*(dot|\[d(ot)?\]|\.dot\.)\s*/i, '.').gsub(/\s+com$/, '.com')
59
- }
46
+ desc 'Install missing plugins.'
47
+ task :install_plugins do
48
+ install_missing_plugins
49
+ end
50
+ end
51
+
52
+ def check_extra_deps_task # :nodoc:
53
+ # extra_deps = [["rubyforge", ">= 1.0.0"], ["rake", ">= 0.8.1"]]
54
+ (extra_deps + extra_dev_deps).each do |dep|
55
+ begin
56
+ gem(*dep)
57
+ rescue Gem::LoadError
58
+ name, req, = dep
60
59
 
61
- bad, good = email.partition { |e| e !~ /^[\w.+-]+\@[\w.+-]+$/ }
60
+ install_gem name, req, false
61
+ end
62
+ end
63
+ end
62
64
 
63
- warn "Rejecting #{bad.size} email. I couldn't unmunge them." unless
64
- bad.empty?
65
+ def deps_list_task # :nodoc:
66
+ gems = self.get_gems_by_name
67
+ gem = gems[self.name]
65
68
 
66
- puts good.join(", ")
69
+ abort "Couldn't find gem: #{self.name}" unless gem
67
70
 
68
- warn "Warning: couldn't extract any email addresses" if good.empty?
71
+ deps = self.dependent_upon self.name
72
+ max = deps.map { |s| s.full_name.size }.max
73
+
74
+ puts " dependents:"
75
+ unless deps.empty? then
76
+ deps.sort_by { |spec| spec.full_name }.each do |spec|
77
+ vers = spec.dependencies.find {|s| s.name == name}.requirements_list
78
+ puts " %-*s - %s" % [max, spec.full_name, vers.join(", ")]
69
79
  end
80
+ else
81
+ puts " none"
82
+ end
83
+ end
70
84
 
71
- desc "Fetch all the dependent gems of this gem into tarballs"
72
- task :fetch do
73
- deps = self.dependent_upon self.name
85
+ def deps_email_task # :nodoc:
86
+ gems = self.get_gems_by_name
87
+ gem = gems[self.name]
88
+
89
+ abort "Couldn't find gem: #{self.name}" unless gem
90
+
91
+ deps = self.dependent_upon self.name
92
+ email = deps.map { |s| s.email }.compact.flatten.sort.uniq
93
+ email = email.map { |s| s.split(/,\s*/) }.flatten.sort.uniq
94
+
95
+ email.map! { |s| # don't you people realize how easy this is?
96
+ s.gsub(/ at | _at_ |\s*(atmark|@nospam@|-at?-|@at?@|<at?>|\[at?\]|\(at?\))\s*/i, '@').gsub(/\s*(dot|\[d(ot)?\]|\.dot\.)\s*/i, '.').gsub(/\s+com$/, '.com')
97
+ }
98
+
99
+ bad, good = email.partition { |e| e !~ /^[\w.+-]+\@[\w.+-]+$/ }
100
+
101
+ warn "Rejecting #{bad.size} email. I couldn't unmunge them." unless
102
+ bad.empty?
103
+
104
+ puts good.join(", ")
105
+
106
+ warn "Warning: couldn't extract any email addresses" if good.empty?
107
+ end
108
+
109
+ def deps_fetch_task # :nodoc:
110
+ deps = self.dependent_upon self.name
111
+
112
+ mkdir "deps" unless File.directory? "deps"
113
+ Dir.chdir "deps" do
114
+ begin
115
+ deps.sort_by { |spec| spec.full_name }.each do |spec|
116
+ full_name = spec.full_name
117
+ tgz_name = "#{full_name}.tgz"
118
+ gem_name = "#{full_name}.gem"
119
+
120
+ next if File.exist? tgz_name
121
+ FileUtils.rm_rf [full_name, gem_name]
74
122
 
75
- mkdir "deps" unless File.directory? "deps"
76
- Dir.chdir "deps" do
77
123
  begin
78
- deps.sort_by { |spec| spec.full_name }.each do |spec|
79
- full_name = spec.full_name
80
- tgz_name = "#{full_name}.tgz"
81
- gem_name = "#{full_name}.gem"
82
-
83
- next if File.exist? tgz_name
84
- FileUtils.rm_rf [full_name, gem_name]
85
-
86
- begin
87
- warn "downloading #{full_name}"
88
- Gem::RemoteFetcher.fetcher.download(spec, GEMURL, Dir.pwd)
89
- FileUtils.mv "cache/#{gem_name}", '.'
90
- rescue Gem::RemoteFetcher::FetchError
91
- warn " failed"
92
- next
93
- end
94
-
95
- warn "converting #{gem_name} to tarball"
96
-
97
- system "gem unpack #{gem_name} 2> /dev/null"
98
- system "gem spec -l #{gem_name} > #{full_name}/gemspec.rb"
99
- system "tar zmcf #{tgz_name} #{full_name}"
100
- FileUtils.rm_rf [full_name, gem_name, "cache"]
101
- end
102
- ensure
103
- FileUtils.rm_rf "cache"
124
+ warn "downloading #{full_name}"
125
+ Gem::RemoteFetcher.fetcher.download(spec, GEMURL, Dir.pwd)
126
+ FileUtils.mv "cache/#{gem_name}", '.'
127
+ rescue Gem::RemoteFetcher::FetchError
128
+ warn " failed"
129
+ next
104
130
  end
105
- end
106
- end
107
- end
108
131
 
109
- desc 'Install missing dependencies.'
110
- task :check_extra_deps do
111
- # extra_deps = [["rubyforge", ">= 1.0.0"], ["rake", ">= 0.8.1"]]
112
- (extra_deps + extra_dev_deps).each do |dep|
113
- begin
114
- gem(*dep)
115
- rescue Gem::LoadError
116
- name, req, = dep
117
-
118
- install_gem name, req, false
132
+ warn "converting #{gem_name} to tarball"
133
+
134
+ system "gem unpack #{gem_name} 2> /dev/null"
135
+ system "gem spec -l #{gem_name} > #{full_name}/gemspec.rb"
136
+ system "tar zmcf #{tgz_name} #{full_name}"
137
+ FileUtils.rm_rf [full_name, gem_name, "cache"]
119
138
  end
139
+ ensure
140
+ FileUtils.rm_rf "cache"
120
141
  end
121
142
  end
122
-
123
- desc 'Install missing plugins.'
124
- task :install_plugins do
125
- install_missing_plugins
126
- end
127
143
  end
128
144
 
129
145
  ##
data/lib/hoe/publish.rb CHANGED
@@ -136,17 +136,12 @@ module Hoe::Publish
136
136
 
137
137
  desc "Publish RDoc to wherever you want."
138
138
  task :publish_docs => [:clean, :docs] do
139
- warn "no rdoc_location values" if rdoc_locations.empty?
140
- self.rdoc_locations.each do |dest|
141
- sh %{rsync #{rsync_args} #{local_rdoc_dir}/ #{dest}}
142
- end
139
+ publish_docs_task
143
140
  end
144
141
 
145
142
  # no doco for this one
146
143
  task :publish_on_announce do
147
- with_config do |config, _|
148
- Rake::Task['publish_docs'].invoke if config["publish_on_announce"]
149
- end
144
+ publish_on_announce_task
150
145
  end
151
146
 
152
147
  desc 'Generate email announcement file.'
@@ -156,40 +151,57 @@ module Hoe::Publish
156
151
 
157
152
  desc 'Post announcement to blog. Uses the "blogs" array in your hoerc.'
158
153
  task :post_blog do
159
- with_config do |config, path|
160
- break unless config['blogs']
161
-
162
- config['blogs'].each do |site|
163
- if site['path'] then
164
- msg = "post_blog_#{site['type']}"
165
- send msg, site
166
- system site["cmd"] if site["cmd"]
167
- else
168
- require 'xmlrpc/client'
169
-
170
- _, title, body, urls = announcement
171
- body += "\n\n#{urls}"
172
-
173
- server = XMLRPC::Client.new2(site['url'])
174
- content = site['extra_headers'].merge(:title => title,
175
- :description => body,
176
- :categories => blog_categories)
177
-
178
- server.call('metaWeblog.newPost',
179
- site['blog_id'],
180
- site['user'],
181
- site['password'],
182
- content,
183
- true)
184
- end
185
- end
186
- end
154
+ post_blog_task
187
155
  end
188
156
 
189
157
  desc 'Announce your release.'
190
158
  task :announce => [:post_blog, :publish_on_announce ]
191
159
  end
192
160
 
161
+ def publish_docs_task # :nodoc:
162
+ warn "no rdoc_location values" if rdoc_locations.empty?
163
+ self.rdoc_locations.each do |dest|
164
+ sh %{rsync #{rsync_args} #{local_rdoc_dir}/ #{dest}}
165
+ end
166
+ end
167
+
168
+ def publish_on_announce_task # :nodoc:
169
+ with_config do |config, _|
170
+ Rake::Task['publish_docs'].invoke if config["publish_on_announce"]
171
+ end
172
+ end
173
+
174
+ def post_blog_task # :nodoc:
175
+ with_config do |config, path|
176
+ break unless config['blogs']
177
+
178
+ config['blogs'].each do |site|
179
+ if site['path'] then
180
+ msg = "post_blog_#{site['type']}"
181
+ send msg, site
182
+ system site["cmd"] if site["cmd"]
183
+ else
184
+ require 'xmlrpc/client'
185
+
186
+ _, title, body, urls = announcement
187
+ body += "\n\n#{urls}"
188
+
189
+ server = XMLRPC::Client.new2(site['url'])
190
+ content = site['extra_headers'].merge(:title => title,
191
+ :description => body,
192
+ :categories => blog_categories)
193
+
194
+ server.call('metaWeblog.newPost',
195
+ site['blog_id'],
196
+ site['user'],
197
+ site['password'],
198
+ content,
199
+ true)
200
+ end
201
+ end
202
+ end
203
+ end
204
+
193
205
  def make_rdoc_cmd(*extra_args) # :nodoc:
194
206
  title = "#{name}-#{version} Documentation"
195
207
  title = "#{group_name}'s #{title}" if group_name != name
data/lib/hoe/signing.rb CHANGED
@@ -44,6 +44,15 @@ module Hoe::Signing
44
44
  # Define tasks for plugin.
45
45
 
46
46
  def define_signing_tasks
47
+ set_up_signing
48
+
49
+ desc 'Generate a key for signing your gems.'
50
+ task :generate_key do
51
+ generate_key_task
52
+ end
53
+ end
54
+
55
+ def set_up_signing # :nodoc:
47
56
  signing_key = nil
48
57
  cert_chain = []
49
58
 
@@ -60,60 +69,59 @@ module Hoe::Signing
60
69
  spec.signing_key = signing_key
61
70
  spec.cert_chain = cert_chain
62
71
  end
72
+ end
63
73
 
64
- desc 'Generate a key for signing your gems.'
65
- task :generate_key do
66
- email = Array(spec.email)
67
- abort "No email in your gemspec" if email.nil? or email.empty?
74
+ def generate_key_task # :nodoc:
75
+ email = Array(spec.email)
76
+ abort "No email in your gemspec" if email.nil? or email.empty?
68
77
 
69
- key_file = with_config { |config, _| config['signing_key_file'] }
70
- cert_file = with_config { |config, _| config['signing_cert_file'] }
78
+ key_file = with_config { |config, _| config['signing_key_file'] }
79
+ cert_file = with_config { |config, _| config['signing_cert_file'] }
71
80
 
72
- if key_file.nil? or cert_file.nil? then
73
- ENV['SHOW_EDITOR'] ||= 'no'
74
- Rake::Task['config_hoe'].invoke
81
+ if key_file.nil? or cert_file.nil? then
82
+ ENV['SHOW_EDITOR'] ||= 'no'
83
+ Rake::Task['config_hoe'].invoke
75
84
 
76
- key_file = with_config { |config, _| config['signing_key_file'] }
77
- cert_file = with_config { |config, _| config['signing_cert_file'] }
78
- end
85
+ key_file = with_config { |config, _| config['signing_key_file'] }
86
+ cert_file = with_config { |config, _| config['signing_cert_file'] }
87
+ end
79
88
 
80
- key_file = File.expand_path key_file
81
- cert_file = File.expand_path cert_file
89
+ key_file = File.expand_path key_file
90
+ cert_file = File.expand_path cert_file
82
91
 
83
- unless File.exist? key_file then
84
- puts "Generating certificate"
92
+ unless File.exist? key_file then
93
+ puts "Generating certificate"
85
94
 
86
- if File.exist? key_file then
87
- abort "Have #{key_file} but no #{cert_file}, aborting as a precaution"
88
- end
95
+ if File.exist? key_file then
96
+ abort "Have #{key_file} but no #{cert_file}, aborting as a precaution"
97
+ end
89
98
 
90
- warn "NOTICE: using #{email.first} for certificate" if email.size > 1
99
+ warn "NOTICE: using #{email.first} for certificate" if email.size > 1
91
100
 
92
- sh "gem cert --build #{email.first}"
93
- mv "gem-private_key.pem", key_file, :verbose => true
94
- mv "gem-public_cert.pem", cert_file, :verbose => true
101
+ sh "gem cert --build #{email.first}"
102
+ mv "gem-private_key.pem", key_file, :verbose => true
103
+ mv "gem-public_cert.pem", cert_file, :verbose => true
95
104
 
96
- puts "Installed key and certificate."
97
- end
105
+ puts "Installed key and certificate."
106
+ end
98
107
 
99
- rf = RubyForge.new.configure
100
- rf.login
108
+ rf = RubyForge.new.configure
109
+ rf.login
101
110
 
102
- cert_package = "#{rubyforge_name}-certificates"
111
+ cert_package = "#{rubyforge_name}-certificates"
103
112
 
104
- begin
105
- rf.lookup 'package', cert_package
106
- rescue
107
- rf.create_package rubyforge_name, cert_package
108
- end
113
+ begin
114
+ rf.lookup 'package', cert_package
115
+ rescue
116
+ rf.create_package rubyforge_name, cert_package
117
+ end
109
118
 
110
- unless rf.lookup('release', cert_package)['certificates'] then
111
- rf.add_release rubyforge_name, cert_package, 'certificates', cert_file
112
- puts "Uploaded certificates to release \"certificates\" in package #{cert_package}"
113
- else
114
- puts '"certificates" release exists, adding file anyway (will not overwrite)'
115
- rf.add_file rubyforge_name, cert_package, 'certificates', cert_file
116
- end
119
+ unless rf.lookup('release', cert_package)['certificates'] then
120
+ rf.add_release rubyforge_name, cert_package, 'certificates', cert_file
121
+ puts "Uploaded certificates to release \"certificates\" in package #{cert_package}"
122
+ else
123
+ puts '"certificates" release exists, adding file anyway (will not overwrite)'
124
+ rf.add_file rubyforge_name, cert_package, 'certificates', cert_file
117
125
  end
118
126
  end
119
127
  end
data/lib/hoe/test.rb CHANGED
@@ -69,6 +69,8 @@ module Hoe::Test
69
69
  def define_test_tasks
70
70
  default_tasks = []
71
71
 
72
+ task :test
73
+
72
74
  if File.directory? "test" then
73
75
  desc 'Run the test suite. Use FILTER or TESTOPTS to add flags/args.'
74
76
  task :test do
data/test/test_hoe.rb CHANGED
@@ -78,9 +78,7 @@ class TestHoe < MiniTest::Unit::TestCase
78
78
  EOM
79
79
  end
80
80
 
81
- open File.join(path, '.hoerc'), 'w' do |io|
82
- io.write YAML.dump('plugins' => %w[hoerc])
83
- end
81
+ write_hoerc path, 'plugins' => %w[hoerc]
84
82
 
85
83
  methods = hoe.methods.grep(/^initialize/).map { |s| s.to_s }
86
84
 
@@ -88,40 +86,7 @@ class TestHoe < MiniTest::Unit::TestCase
88
86
  assert_includes Hoe.plugins, :hoerc
89
87
  end
90
88
  ensure
91
- Hoe.instance_variable_get(:@loaded).delete :hoerc
92
- Hoe.plugins.delete :hoerc
93
- Hoe.send :remove_const, :Hoerc
94
- $LOAD_PATH.replace load_path
95
- ENV['HOME'] = home
96
- end
97
-
98
- def test_perproject_hoerc
99
- overrides = {
100
- 'exclude' => Regexp.union( Hoe::DEFAULT_CONFIG["exclude"], /\.hg/ ),
101
- 'plugins' => ['tweedledee', 'tweedledum']
102
- }
103
- overrides_rcfile = File.join(Dir.pwd, '.hoerc')
104
-
105
- home = ENV['HOME']
106
- Hoe.files = nil
107
-
108
- Dir.mktmpdir do |path|
109
- ENV['HOME'] = path
110
-
111
- open File.join(path, '.hoerc'), 'w' do |io|
112
- io.write YAML.dump( Hoe::DEFAULT_CONFIG )
113
- end
114
- open overrides_rcfile, File::CREAT|File::EXCL|File::WRONLY do |io|
115
- io.write YAML.dump( overrides )
116
- end
117
-
118
- hoeconfig = hoe.with_config {|config, _| config }
119
-
120
- assert_equal Hoe::DEFAULT_CONFIG.merge(overrides), hoeconfig
121
- end
122
- ensure
123
- File.delete overrides_rcfile if File.exist?( overrides_rcfile )
124
- ENV['HOME'] = home
89
+ reset_hoe load_path, home
125
90
  end
126
91
 
127
92
  def test_have_gem_eh
@@ -148,9 +113,7 @@ class TestHoe < MiniTest::Unit::TestCase
148
113
  EOM
149
114
  end
150
115
 
151
- open File.join(path, '.hoerc'), 'w' do |io|
152
- io.write YAML.dump('plugins' => %w[hoerc])
153
- end
116
+ write_hoerc path, 'plugins' => %w[hoerc]
154
117
 
155
118
  methods = hoe.instance_variables.map(&:to_s)
156
119
  assert_includes(methods, '@hoerc_plugin_initialized',
@@ -158,6 +121,16 @@ class TestHoe < MiniTest::Unit::TestCase
158
121
  assert_includes Hoe.plugins, :hoerc
159
122
  end
160
123
  ensure
124
+ reset_hoe load_path, home
125
+ end
126
+
127
+ def write_hoerc path, data
128
+ open File.join(path, '.hoerc'), 'w' do |io|
129
+ io.write YAML.dump data
130
+ end
131
+ end
132
+
133
+ def reset_hoe load_path, home
161
134
  Hoe.instance_variable_get(:@loaded).delete :hoerc
162
135
  Hoe.plugins.delete :hoerc
163
136
  Hoe.send :remove_const, :Hoerc
@@ -443,9 +416,8 @@ class TestHoe < MiniTest::Unit::TestCase
443
416
  Dir.mktmpdir do |path|
444
417
  ENV['HOME'] = path
445
418
 
446
- open File.join(path, '.hoerc'), 'w' do |io|
447
- io.write YAML.dump( Hoe::DEFAULT_CONFIG )
448
- end
419
+ write_hoerc path, Hoe::DEFAULT_CONFIG
420
+
449
421
  open overrides_rcfile, File::CREAT|File::EXCL|File::WRONLY do |io|
450
422
  io.write YAML.dump( overrides )
451
423
  end
@@ -19,11 +19,20 @@ class TestHoeDebug < MiniTest::Unit::TestCase
19
19
  @generated_files = []
20
20
  end
21
21
 
22
+ def assert_subprocess_silent
23
+ out, err = capture_subprocess_io do
24
+ yield
25
+ end
26
+
27
+ assert_equal "", out
28
+ assert_equal "", err
29
+ end
30
+
22
31
  def test_check_manifest
23
32
  in_tmpdir do
24
33
  manifest
25
34
 
26
- assert_silent do
35
+ assert_subprocess_silent do
27
36
  check_manifest
28
37
  end
29
38
  end
@@ -35,7 +44,7 @@ class TestHoeDebug < MiniTest::Unit::TestCase
35
44
 
36
45
  open 'generated.rb', 'w' do |io| io.puts 'generated = true' end
37
46
 
38
- assert_silent do
47
+ assert_subprocess_silent do
39
48
  check_manifest
40
49
  end
41
50
  end
@@ -51,34 +60,18 @@ class TestHoeDebug < MiniTest::Unit::TestCase
51
60
 
52
61
  e = nil
53
62
 
54
- out = capture_STDOUT do
63
+ out, err = capture_subprocess_io do
55
64
  e = assert_raises RuntimeError do
56
65
  check_manifest
57
66
  end
58
67
  end
59
68
 
60
69
  assert_match %r%^Command failed with status%, e.message
61
-
62
70
  assert_match %r%^\+missing.rb%, out
71
+ assert_equal "", err
63
72
  end
64
73
  end
65
74
 
66
- def capture_STDOUT
67
- orig_STDOUT = STDOUT.dup
68
-
69
- Tempfile.open __name__ do |io|
70
- STDOUT.reopen io
71
-
72
- yield
73
-
74
- io.flush
75
-
76
- return File.read io.path
77
- end
78
- ensure
79
- STDOUT.reopen orig_STDOUT
80
- end
81
-
82
75
  def in_tmpdir
83
76
  old_LOAD_PATH = $LOAD_PATH.dup
84
77
  $LOAD_PATH.map! { |path| File.expand_path path }
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: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 6
9
- - 0
10
- version: 3.6.0
9
+ - 1
10
+ version: 3.6.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Davis
@@ -36,7 +36,7 @@ cert_chain:
36
36
  FBHgymkyj/AOSqKRIpXPhjC6
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2013-04-18 00:00:00 Z
39
+ date: 2013-05-10 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
@@ -68,11 +68,11 @@ dependencies:
68
68
  requirements:
69
69
  - - ~>
70
70
  - !ruby/object:Gem::Version
71
- hash: 21
71
+ hash: 31
72
72
  segments:
73
- - 4
74
- - 7
75
- version: "4.7"
73
+ - 5
74
+ - 0
75
+ version: "5.0"
76
76
  type: :development
77
77
  version_requirements: *id002
78
78
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file