zeus 0.15.1 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zeus (0.15.1)
4
+ zeus (0.15.2)
5
5
  method_source (>= 0.6.7)
6
6
 
7
7
  GEM
Binary file
Binary file
Binary file
Binary file
@@ -196,7 +196,10 @@ module Zeus
196
196
 
197
197
  # directly run the tests from here and exit with the status of the tests passing or failing
198
198
  case framework
199
- when :minitest
199
+ when :minitest5
200
+ nerf_test_unit_autorunner
201
+ exit(Minitest.run(test_arguments) ? 0 : 1)
202
+ when :minitest_old
200
203
  nerf_test_unit_autorunner
201
204
  exit(MiniTest::Unit.runner.run(test_arguments).to_i)
202
205
  when :testunit1, :testunit2
@@ -226,8 +229,7 @@ module Zeus
226
229
  elsif user_specified_name?
227
230
  abort_with_no_test_found_by_name unless tests.contains?(@test_name)
228
231
 
229
- test_names = test_name_to_s
230
- ["-n", test_names]
232
+ ["-n", test_name_to_s]
231
233
  else
232
234
  []
233
235
  end
@@ -254,7 +256,7 @@ module Zeus
254
256
  end
255
257
 
256
258
  def test_name_to_s
257
- @test_name.is_a?(Regexp)? "/#{Regexp.escape(@test_name.source)}/" : Regexp.escape(@test_name)
259
+ @test_name.is_a?(Regexp)? "/#{@test_name.source}/" : @test_name
258
260
  end
259
261
 
260
262
  def user_specified_name?
@@ -263,8 +265,10 @@ module Zeus
263
265
 
264
266
  def framework
265
267
  @framework ||= begin
266
- if defined?(MiniTest)
267
- :minitest
268
+ if defined?(Minitest::Runnable)
269
+ :minitest5
270
+ elsif defined?(MiniTest)
271
+ :minitest_old
268
272
  elsif defined?(Test)
269
273
  if Test::Unit::TestCase.respond_to?(:test_suites)
270
274
  :testunit2
@@ -305,7 +309,9 @@ module Zeus
305
309
 
306
310
  # Figure out what test framework we're using
307
311
  case framework
308
- when :minitest
312
+ when :minitest5
313
+ suites = Minitest::Runnable.runnables
314
+ when :minitest_old
309
315
  suites = MiniTest::Unit::TestCase.test_suites
310
316
  when :testunit1, :testunit2
311
317
  suites = Test::Unit::TestCase.test_suites
@@ -316,7 +322,13 @@ module Zeus
316
322
  # Use some janky internal APIs to group test methods by test suite.
317
323
  suites.inject({}) do |suites, suite_class|
318
324
  # End up with a hash of suite class name to an array of test methods, so we can later find them and ignore empty test suites
319
- suites[suite_class] = suite_class.test_methods if suite_class.test_methods.size > 0
325
+ test_methods = case framework
326
+ when :minitest5
327
+ suite_class.runnable_methods
328
+ else
329
+ suite_class.test_methods
330
+ end
331
+ suites[suite_class] = test_methods if test_methods.size > 0
320
332
  suites
321
333
  end
322
334
  end
@@ -177,7 +177,13 @@ module Zeus
177
177
  # don't let minitest setup another exit hook
178
178
  begin
179
179
  require 'minitest/unit'
180
- MiniTest::Unit.class_variable_set("@@installed_at_exit", true)
180
+ if defined?(Minitest::Runnable)
181
+ # Minitest 5
182
+ MiniTest.class_variable_set('@@installed_at_exit', true)
183
+ elsif defined?(MiniTest)
184
+ # Old versions of Minitest
185
+ MiniTest::Unit.class_variable_set("@@installed_at_exit", true)
186
+ end
181
187
  rescue LoadError
182
188
  # noop
183
189
  end
@@ -1,3 +1,3 @@
1
1
  module Zeus
2
- VERSION = "0.15.1"
2
+ VERSION = "0.15.2"
3
3
  end
@@ -1,13 +1,13 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "ZEUS" "1" "April 2014" "" ""
4
+ .TH "ZEUS" "1" "September 2014" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBzeus\fR \- boot rails in under a second
8
8
  .
9
9
  .SH "SYNOPSIS"
10
- \fBzeus\fR [\-\-no\-color] [\-\-log FILE] [\-\-file\-change\-delay TIME] COMMAND [ARGS]
10
+ \fBzeus\fR [\-\-no\-color] [\-\-log FILE] [\-\-file\-change\-delay TIME] [\-\-config PATH] COMMAND [ARGS]
11
11
  .
12
12
  .SH "DESCRIPTION"
13
13
  Zeus makes working with large codebases much less painful\.
@@ -53,6 +53,10 @@ Prints process tree state details to the log file specified\.
53
53
  \fB\-\-file\-change\-delay\fR delay
54
54
  Collect all file changes that happen within the specified delay time and restart processes only after this deadline expires\. The argument must be parseable by time\.ParseDuration\. The default delay is 300ms\.
55
55
  .
56
+ .TP
57
+ \fB\-\-config\fR path
58
+ Read from the given JSON config file\. Defaults to \fBzeus\.json\fR\.
59
+ .
56
60
  .SH "BUILTIN COMMANDS"
57
61
  .
58
62
  .TP
@@ -6,8 +6,8 @@ NAME
6
6
  zeus - boot rails in under a second
7
7
 
8
8
  SYNOPSIS
9
- zeus [--no-color] [--log FILE] [--file-change-delay TIME] COMMAND
10
- [ARGS]
9
+ zeus [--no-color] [--log FILE] [--file-change-delay TIME] [--config
10
+ PATH] COMMAND [ARGS]
11
11
 
12
12
  DESCRIPTION
13
13
  Zeus makes working with large codebases much less painful.
@@ -59,6 +59,9 @@ OPTIONS
59
59
  argument must be parseable by time.ParseDuration. The default
60
60
  delay is 300ms.
61
61
 
62
+ --config path
63
+ Read from the given JSON config file. Defaults to zeus.json.
64
+
62
65
  BUILTIN COMMANDS
63
66
  zeus start(1) zeus-start.1.html
64
67
  Start a zeus server in the current directory using zeus.json
@@ -72,4 +75,4 @@ BUILTIN COMMANDS
72
75
 
73
76
 
74
77
 
75
- April 2014 ZEUS(1)
78
+ September 2014 ZEUS(1)
@@ -18,10 +18,10 @@ module Zeus::M
18
18
  lambda { Runner.new(argv).run }.should exit_with_code(0)
19
19
  end
20
20
 
21
- it "escapes the question mark from explicit names" do
21
+ it "does not escape regex on explicit names" do
22
22
  argv = ["path/to/file.rb", "--name", fake_special_characters_test_method]
23
23
 
24
- fake_runner.should_receive(:run).with(["-n", "test_my_test_method\\?"])
24
+ fake_runner.should_receive(:run).with(["-n", "test_my_test_method?"])
25
25
 
26
26
  lambda { Runner.new(argv).run }.should exit_with_code(0)
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.15.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-22 00:00:00.000000000 Z
12
+ date: 2014-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -134,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
134
  version: '0'
135
135
  segments:
136
136
  - 0
137
- hash: 1802753142957645001
137
+ hash: 1370880474585093317
138
138
  required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  segments:
145
145
  - 0
146
- hash: 1802753142957645001
146
+ hash: 1370880474585093317
147
147
  requirements: []
148
148
  rubyforge_project:
149
149
  rubygems_version: 1.8.23