hoe 3.19.0 → 3.20.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -1
- data/History.rdoc +7 -0
- data/Rakefile +1 -1
- data/lib/hoe.rb +1 -1
- data/lib/minitest/test_task.rb +109 -33
- data/test/test_hoe.rb +2 -0
- data/test/test_hoe_package.rb +1 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fa81b70d7c1e4d69338c4ee609525317bb1e9226f6cf7cdd7939524f6aa3f1b
|
4
|
+
data.tar.gz: eab25d6cbf84c54bc19dab742701aebe73705ebf141b579adef59b7d4bbc7887
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b592a6202d60185d452036f10c7ef6e9febcfb9eaef67707ef221bb8cc988e8fce39911436b9b2219e5ba58b5437b999a4789243bd32b5d5eb7824493361f950
|
7
|
+
data.tar.gz: a3972c4b77340980ad5696a994e007fb9cd3646b9b8743f98cc137282498baa6bbe1b45ee5e647550eac78ce1e2100df55ba3457eff9014607d2c2c50e2f610e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
*���͟:�jl����}x(�B���G����o�������ћ������$�\*��.Z��<~��J�,�
|
2
|
+
��60��UR��KF�∣������]0[W�f�ú���C�r�h`}7�M�?�=Y-�v)��3��2��A�s�4�B�l��������-)�*����ظ����SZ��kˌߩ�.�n�6|�ŕv�@8��-�j"O�M�GiCE��`���/���?�h�:��+���C
|
data/History.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -19,7 +19,7 @@ Hoe.spec "hoe" do
|
|
19
19
|
pluggable!
|
20
20
|
require_rubygems_version ">= 1.4"
|
21
21
|
|
22
|
-
dependency "rake", [">= 0.8", "<
|
22
|
+
dependency "rake", [">= 0.8", "< 15.0"] # FIX: to force it to exist pre-isolate
|
23
23
|
end
|
24
24
|
|
25
25
|
task :plugins do
|
data/lib/hoe.rb
CHANGED
data/lib/minitest/test_task.rb
CHANGED
@@ -19,20 +19,19 @@ module Minitest # :nodoc:
|
|
19
19
|
#
|
20
20
|
# The most basic and default setup.
|
21
21
|
#
|
22
|
-
# Minitest::TestTask.create :
|
22
|
+
# Minitest::TestTask.create :my_tests
|
23
23
|
#
|
24
24
|
# The most basic/default setup, but with a custom name
|
25
25
|
#
|
26
|
-
# Minitest::TestTask.create :
|
27
|
-
# t.test_globs = ["
|
28
|
-
# t.
|
26
|
+
# Minitest::TestTask.create :unit do |t|
|
27
|
+
# t.test_globs = ["test/unit/**/*_test.rb"]
|
28
|
+
# t.warning = false
|
29
29
|
# end
|
30
30
|
#
|
31
|
-
# Customize the name
|
32
|
-
# of test.
|
31
|
+
# Customize the name and only run unit tests.
|
33
32
|
|
34
33
|
class TestTask < Rake::TaskLib
|
35
|
-
WINDOWS = RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ # :nodoc:
|
34
|
+
WINDOWS = RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ # :nodoc:
|
36
35
|
|
37
36
|
##
|
38
37
|
# Create several test-oriented tasks under +name+. Takes an
|
@@ -50,10 +49,11 @@ module Minitest # :nodoc:
|
|
50
49
|
# Extra arguments to pass to the tests. Defaults empty but gets
|
51
50
|
# populated by a number of enviroment variables:
|
52
51
|
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
52
|
+
# N (-n flag) :: a string or regexp of tests to run.
|
53
|
+
# X (-e flag) :: a string or regexp of tests to exclude.
|
54
|
+
# A (arg) :: quick way to inject an arbitrary argument (eg A=--help).
|
55
|
+
#
|
56
|
+
# See #process_env
|
57
57
|
|
58
58
|
attr_accessor :extra_args
|
59
59
|
|
@@ -94,11 +94,14 @@ module Minitest # :nodoc:
|
|
94
94
|
attr_accessor :test_prelude
|
95
95
|
|
96
96
|
##
|
97
|
-
# Print out commands as they run. Defaults to Rake's trace (-t
|
97
|
+
# Print out commands as they run. Defaults to Rake's +trace+ (-t
|
98
98
|
# flag) option.
|
99
99
|
|
100
100
|
attr_accessor :verbose
|
101
101
|
|
102
|
+
##
|
103
|
+
# Use TestTask.create instead.
|
104
|
+
|
102
105
|
def initialize name = :test # :nodoc:
|
103
106
|
self.extra_args = []
|
104
107
|
self.framework = %(require "minitest/autorun")
|
@@ -113,20 +116,20 @@ module Minitest # :nodoc:
|
|
113
116
|
|
114
117
|
##
|
115
118
|
# Extract variables from the environment and convert them to
|
116
|
-
# command line arguments. See
|
119
|
+
# command line arguments. See #extra_args.
|
117
120
|
#
|
118
121
|
# Environment Variables:
|
119
122
|
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
123
|
-
#
|
123
|
+
# MT_LIB_EXTRAS :: Extra libs to dynamically override/inject for custom runs.
|
124
|
+
# N :: Tests to run (string or /regexp/).
|
125
|
+
# X :: Tests to exclude (string or /regexp/).
|
126
|
+
# A :: Any extra arguments. Honors shell quoting.
|
124
127
|
#
|
125
128
|
# Deprecated:
|
126
129
|
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
+
# TESTOPTS :: For argument passing, use +A+.
|
131
|
+
# N :: For parallel testing, use +MT_CPU+.
|
132
|
+
# FILTER :: Same as +TESTOPTS+.
|
130
133
|
|
131
134
|
def process_env
|
132
135
|
warn "TESTOPTS is deprecated in Minitest::TestTask. Use A instead" if
|
@@ -153,10 +156,7 @@ module Minitest # :nodoc:
|
|
153
156
|
extra_args.compact!
|
154
157
|
end
|
155
158
|
|
156
|
-
|
157
|
-
# Create the tasks.
|
158
|
-
|
159
|
-
def define
|
159
|
+
def define # :nodoc:
|
160
160
|
default_tasks = []
|
161
161
|
|
162
162
|
desc "Run the test suite. Use N, X, A, and TESTOPTS to add flags/args."
|
@@ -169,24 +169,73 @@ module Minitest # :nodoc:
|
|
169
169
|
puts "ruby #{make_test_cmd}"
|
170
170
|
end
|
171
171
|
|
172
|
-
desc "Show which test files fail when run
|
173
|
-
task "#{name}:
|
172
|
+
desc "Show which test files fail when run in isolation."
|
173
|
+
task "#{name}:isolated" do
|
174
174
|
tests = Dir[*self.test_globs].uniq
|
175
175
|
|
176
|
-
|
176
|
+
# 3 seems to be the magic number... (tho not by that much)
|
177
|
+
bad, good, n = {}, [], (ENV.delete("K") || 3).to_i
|
178
|
+
path = ENV.delete("F")
|
179
|
+
times = {}
|
180
|
+
|
181
|
+
tt0 = Time.now
|
177
182
|
|
178
|
-
tests.
|
179
|
-
|
183
|
+
n.threads_do tests.sort do |path|
|
184
|
+
t0 = Time.now
|
185
|
+
output = `#{Gem.ruby} #{make_test_cmd path} 2>&1`
|
186
|
+
t1 = Time.now - t0
|
180
187
|
|
181
|
-
|
182
|
-
|
188
|
+
times[path] = t1
|
189
|
+
|
190
|
+
if $?.success?
|
191
|
+
$stderr.print "."
|
192
|
+
good << path
|
183
193
|
else
|
184
|
-
|
185
|
-
|
194
|
+
$stderr.print "x"
|
195
|
+
bad[path] = output
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
puts "done"
|
200
|
+
puts "Ran in %.2f seconds" % [ Time.now - tt0 ]
|
201
|
+
|
202
|
+
if path then
|
203
|
+
require "json"
|
204
|
+
File.open path, "w" do |io|
|
205
|
+
io.write JSON.pretty_generate times
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
unless good.empty?
|
210
|
+
puts
|
211
|
+
puts "# Good tests:"
|
212
|
+
puts
|
213
|
+
good.sort.each do |path|
|
214
|
+
puts "%.2fs: %s" % [times[path], path]
|
186
215
|
end
|
187
216
|
end
|
217
|
+
|
218
|
+
unless bad.empty?
|
219
|
+
puts
|
220
|
+
puts "# Bad tests:"
|
221
|
+
puts
|
222
|
+
bad.keys.sort.each do |path|
|
223
|
+
puts "%.2fs: %s" % [times[path], path]
|
224
|
+
end
|
225
|
+
puts
|
226
|
+
puts "# Bad Test Output:"
|
227
|
+
puts
|
228
|
+
bad.sort.each do |path, output|
|
229
|
+
puts
|
230
|
+
puts "# #{path}:"
|
231
|
+
puts output
|
232
|
+
end
|
233
|
+
exit 1
|
234
|
+
end
|
188
235
|
end
|
189
236
|
|
237
|
+
task "#{name}:deps" => "#{name}:isolated" # now just an alias
|
238
|
+
|
190
239
|
desc "Show bottom 25 tests wrt time."
|
191
240
|
task "#{name}:slow" do
|
192
241
|
sh ["rake #{name} TESTOPTS=-v",
|
@@ -227,3 +276,30 @@ module Minitest # :nodoc:
|
|
227
276
|
end
|
228
277
|
end
|
229
278
|
end
|
279
|
+
|
280
|
+
class Work < Queue
|
281
|
+
def initialize jobs = []
|
282
|
+
super()
|
283
|
+
|
284
|
+
jobs.each do |job|
|
285
|
+
self << job
|
286
|
+
end
|
287
|
+
|
288
|
+
close
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
class Integer
|
293
|
+
def threads_do(jobs) # :nodoc:
|
294
|
+
require "thread"
|
295
|
+
q = Work.new jobs
|
296
|
+
|
297
|
+
self.times.map {
|
298
|
+
Thread.new do
|
299
|
+
while job = q.pop # go until quit value
|
300
|
+
yield job
|
301
|
+
end
|
302
|
+
end
|
303
|
+
}.each(&:join)
|
304
|
+
end
|
305
|
+
end
|
data/test/test_hoe.rb
CHANGED
@@ -391,6 +391,8 @@ class TestHoe < Minitest::Test
|
|
391
391
|
end
|
392
392
|
|
393
393
|
def test_with_config_overrides
|
394
|
+
require "hoe/debug" # modifies Hoe::DEFAULT_CONFIG["exclude"]
|
395
|
+
|
394
396
|
overrides = {
|
395
397
|
"exclude" => Regexp.union( Hoe::DEFAULT_CONFIG["exclude"], /\.hg/ ),
|
396
398
|
"plugins" => %w[tweedledee tweedledum],
|
data/test/test_hoe_package.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
Em82dBUFsipwMLCYj39kcyHWAxyl6Ae1Cn9r/ItVBCxoeFdrHjfavnrIEoXUt4bU
|
30
30
|
UfBugfLD19bu3nvL+zTAGx/U
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2019-
|
32
|
+
date: 2019-11-09 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rake
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
version: '0.8'
|
41
41
|
- - "<"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
43
|
+
version: '15.0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
version: '0.8'
|
51
51
|
- - "<"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '15.0'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: rdoc
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|