turbo_test 0.1.1 → 0.2.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
  SHA256:
3
- metadata.gz: 7f598fcd0bc09d2a885b3d0440eabbfa54c2718fae7f39d9f8b853fa37503474
4
- data.tar.gz: 348390cf74c0b7ba9c05d806eb2e84dd9571b3851cac2ae6dfd98898d2531a35
3
+ metadata.gz: 4152c4ff1cb3cf1750d3f63c5bdbf46af0de19f4951c89b29aac171c11548c03
4
+ data.tar.gz: c008bca2af563ea1822224916140dfdf31de857e16b39c8b894b03b2e58fef03
5
5
  SHA512:
6
- metadata.gz: 2afcc1b037df3aa41ba017861939fbfff7fe7ff9e861026f56aa3771504344e6b2de58b4eecccfa963e1bca9688e789d931c7a51c2949353526a99e6847017ad
7
- data.tar.gz: 4b1270405702e4f9ccdd736c6bdbcfd75e61fa02bcc0080b1317cc1c21d42f2152cc8fc1cd8cee3e3013538f54dbf2f369f281239739788e7ee3bac88fac74ec
6
+ metadata.gz: a4990fd05e927630503f4703ff1b1035999d84799e8c6e5937081ad88c0b6792da53462d0f8225e65698ff548f556e10e35d4bd3f84c3bea83a69894b99be54d
7
+ data.tar.gz: 94f7aad1bcade18ddc4de5e2250aa27fccf46e3f15f01f5973dfcfef3ee4e7e6b4899f335d28839a2480aadacbc213a0184880e1f8c944e07457097c29e3961f
checksums.yaml.gz.sig ADDED
Binary file
data/bin/turbo_test CHANGED
@@ -27,6 +27,6 @@ begin
27
27
  rescue Interrupt
28
28
  # Ignore.
29
29
  rescue => error
30
- Async.logger.error(TurboTest::Command) {error}
30
+ Console.logger.error(TurboTest::Command) {error}
31
31
  exit! 1
32
32
  end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2021-2022, by Samuel Williams.
5
+
6
+ require 'samovar'
7
+
8
+ require_relative '../server'
9
+ require_relative '../configuration'
10
+ require_relative '../rspec/job'
11
+
12
+ require 'bundler'
13
+
14
+ module TurboTest
15
+ module Command
16
+ class List < Samovar::Command
17
+ self.description = "List tests available to be run."
18
+
19
+ # The command line options.
20
+ # @attribute [Samovar::Options]
21
+ options do
22
+ option '-c/--configuration <path>', "The configuration path to use.", default: "turbo_test.rb"
23
+ end
24
+
25
+ # Prepare the environment and run the controller.
26
+ def call
27
+ path = @options[:configuration]
28
+ full_path = File.expand_path(path)
29
+
30
+ configuration = Configuration.new
31
+
32
+ if File.exist?(full_path)
33
+ configuration.load(full_path)
34
+ end
35
+
36
+ configuration.finalize!
37
+
38
+ configuration.jobs.each do |klass, path, **options|
39
+ if options&.any?
40
+ puts "#{klass}: #{path} #{options.inspect}"
41
+ else
42
+ puts "#{klass}: #{path}"
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2022, by Samuel Williams.
22
5
 
23
6
  require 'samovar'
24
7
 
@@ -38,24 +21,28 @@ module TurboTest
38
21
  options do
39
22
  option '-n/--count <count>', "Number of instances to start.", default: Async::Container.processor_count, type: Integer
40
23
 
41
- option '-c/--configuration', "The configuration path to use.", default: "turbo_test.rb"
24
+ option '-c/--configuration <path>', "The configuration path to use.", default: "turbo_test.rb"
42
25
  end
43
26
 
44
27
  many :paths, "The test paths to execute."
45
28
 
46
29
  # Prepare the environment and run the controller.
47
30
  def call
48
- Async.logger.info(self) do |buffer|
31
+ Console.logger.info(self) do |buffer|
49
32
  buffer.puts "TurboTest v#{VERSION} preparing for maximum thrust!"
50
33
  end
51
34
 
52
35
  path = @options[:configuration]
53
36
  full_path = File.expand_path(path)
54
37
 
38
+ configuration = Configuration.new
39
+
55
40
  if File.exist?(full_path)
56
- configuration = Configuration.load(full_path)
41
+ configuration.load(full_path)
57
42
  end
58
43
 
44
+ configuration.finalize!
45
+
59
46
  Bundler.require(:preload)
60
47
 
61
48
  if GC.respond_to?(:compact)
@@ -64,11 +51,17 @@ module TurboTest
64
51
 
65
52
  server = Server.new(configuration)
66
53
 
67
- queue = paths.map do |path|
68
- [RSpec::Job, path]
54
+ queue = configuration.queue(
55
+ paths&.map{|path| File.expand_path(path)}
56
+ )
57
+
58
+ results = server.run(queue)
59
+
60
+ if results[:failed].zero?
61
+ puts "All tests passed!"
69
62
  end
70
63
 
71
- return server.run(queue)
64
+ return results
72
65
  end
73
66
  end
74
67
  end
@@ -1,26 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2022, by Samuel Williams.
22
5
 
23
6
  require_relative 'run'
7
+ require_relative 'list'
24
8
  require_relative '../version'
25
9
 
26
10
  require 'samovar'
@@ -43,6 +27,7 @@ module TurboTest
43
27
  # @attribute [Command]
44
28
  nested :command, {
45
29
  'run' => Run,
30
+ 'list' => List,
46
31
  }, default: 'run'
47
32
 
48
33
  # Prepare the environment and invoke the sub-command.
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2022, by Samuel Williams.
22
5
 
23
6
  require_relative 'command/top'
24
7
 
@@ -1,50 +1,82 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2022, by Samuel Williams.
5
+
6
+ require_relative 'rspec/job'
22
7
 
23
8
  module TurboTest
24
9
  class Configuration
25
10
  def initialize
11
+ @loaded = false
26
12
  @worker = nil
13
+ @jobs = []
27
14
  end
28
15
 
16
+ attr_accessor :loaded
29
17
  attr_accessor :worker
18
+ attr_accessor :jobs
30
19
 
31
- def self.load(path)
32
- configuration = self.new
20
+ def load(path)
21
+ loader = Loader.new(self, File.dirname(path))
33
22
 
34
- loader = Loader.new(configuration)
35
23
  loader.instance_eval(File.read(path), path.to_s)
36
24
 
37
- return configuration
25
+ return loader
26
+ end
27
+
28
+ def finalize!
29
+ unless @loaded
30
+ self.defaults!
31
+ end
32
+ end
33
+
34
+ def queue(matching)
35
+ if matching.nil? or matching.empty?
36
+ # No filtering required, return all jobs:
37
+ return @jobs.dup
38
+ else
39
+ return @jobs.select{|klass, path| matching.include?(path)}
40
+ end
41
+ end
42
+
43
+ DEFAULT_JOB_CLASSES = [RSpec::Job]
44
+
45
+ def defaults!(pwd = Dir.pwd)
46
+ loader = Loader.new(self, pwd)
47
+
48
+ loader.defaults!
49
+
50
+ return loader
38
51
  end
39
52
 
40
53
  class Loader
41
- def initialize(configuration)
54
+ def initialize(configuration, base)
42
55
  @configuration = configuration
56
+ @base = base
43
57
  end
44
58
 
59
+ attr :path
60
+
45
61
  def worker(&block)
46
62
  @configuration.worker = block
47
63
  end
64
+
65
+ def add_jobs_matching(klass, pattern: klass::PATTERN, **options)
66
+ # This indicates that someone has added jobs:
67
+ @configuration.loaded = true
68
+
69
+ Dir.glob(pattern, base: @base) do |path|
70
+ path = File.expand_path(path, @base)
71
+ @configuration.jobs << [klass, path, **options]
72
+ end
73
+ end
74
+
75
+ def defaults!
76
+ DEFAULT_JOB_CLASSES.each do |klass|
77
+ add_jobs_matching(klass)
78
+ end
79
+ end
48
80
  end
49
81
  end
50
82
  end
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2022, by Samuel Williams.
22
5
 
23
6
  require 'rspec/support'
24
7
  require 'rspec/core/formatters'
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2022, by Samuel Williams.
22
5
 
23
6
  require 'rspec/core'
24
7
 
@@ -45,7 +28,9 @@ module TurboTest
45
28
  end
46
29
 
47
30
  class Job
48
- def initialize(path)
31
+ PATTERN = "spec/**/*_spec.rb"
32
+
33
+ def initialize(path, **options)
49
34
  @path = path
50
35
  end
51
36
 
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2022, by Samuel Williams.
22
5
 
23
6
  require 'async'
24
7
  require 'async/container'
@@ -223,6 +206,10 @@ module TurboTest
223
206
 
224
207
  # Read the results from the host:
225
208
  return results.read
209
+ ensure
210
+ if path = @endpoint.path and File.exist?(path)
211
+ File.unlink(path)
212
+ end
226
213
  end
227
214
  end
228
215
  end
@@ -1,25 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2022, by Samuel Williams.
22
5
 
23
6
  module TurboTest
24
- VERSION = "0.1.1"
7
+ VERSION = "0.2.0"
25
8
  end
data/lib/turbo_test.rb CHANGED
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2022, by Samuel Williams.
22
5
 
23
6
  require_relative 'turbo_test/version'
24
7
 
data/license.md ADDED
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright, 2020-2022, by Samuel Williams.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/readme.md ADDED
@@ -0,0 +1,39 @@
1
+ # TurboTest
2
+
3
+ [![Development Status](https://github.com/ioquatix/turbo_test/workflows/Test/badge.svg)](https://github.com/ioquatix/turbo_test/actions?workflow=Test)
4
+
5
+ ## Proposal
6
+
7
+ Discourse contains two tools (highly recommend you try them out for context)
8
+
9
+ - `bin/turbo_rspec` a parallel runner with non interleaving forking model. (leverages some of `parallel_test` … `rake parallel:create` / `migrate` to prep the dbs.
10
+ - `bin/rake autospec` an automatic spec runner, which focuses on failed specs, like guard except that unlike guard it is interruptible.
11
+
12
+ Enter `turbo_test` (name TBD, suggestions welcome).
13
+
14
+ `turbo_test` will be a slot in replacement for the 2 tools Discourse use in a dedicated gem.
15
+
16
+ `turbo_test` is to first be fully functional with rspec runners but longer term should also work with `minitest`.
17
+
18
+ Features of the `turbo_test` gem:
19
+
20
+ - MIT license, standard Rails code of conduct
21
+ - Pull based model for forked test runners. Master process manages a queue of tests, forked processes pull from the queue. Transport long term is agnostic though I would recommend initial implementation uses pipes.
22
+ - Pull model ensures that all the workers are running tests at all times. The parallel\_test model of splitting up the tests upfront means that workers are often idle for long periods of time.
23
+ - Rake tasks for administration of partitioned test environments turbo\_test:create / migrate / drop
24
+ - Non interleaved results (like `bin/turbo_rspec`)
25
+ - While `turbo_rspec` is running, if you hit a specific key you can see right away information about the current tests that failed without halting the test process.
26
+ - Documentation about how to handle custom sharding (memcached / redis) and so on.
27
+ - Minimal changes required to Rails projects that decide to use this.
28
+ - A key goal is deprecation of `bin/turbo_rspec` in Discourse.
29
+ - Minimal dependencies (no explicit `rspec`, `minitest`, `redis`, `pg` dependencies)
30
+ - Stretch goal, once this is all done … extract `bin/rake autospec` into this gem as well. (I will do a mini specification if we get there)
31
+ - Extra long term stretch goal, pull these concepts back into Rails proper.
32
+
33
+ ### Why not guard?
34
+
35
+ Guard at the moment does not support interruptible tests, this is a must have feature for `turbo_test`.
36
+
37
+ ### Why not parallel\_test?
38
+
39
+ It does not support a pull model so it would be close to a ground up re-write.
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,14 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbo_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2021-03-01 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
14
+ ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
15
+ CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
16
+ MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
17
+ MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
18
+ bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
19
+ igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
20
+ 9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
21
+ sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
22
+ e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
23
+ XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
24
+ RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
25
+ tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
26
+ zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
27
+ xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
28
+ BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
29
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
30
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
31
+ cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
32
+ xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
33
+ c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
34
+ 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
35
+ JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
36
+ eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
37
+ Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
38
+ voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
39
+ -----END CERTIFICATE-----
40
+ date: 2022-12-08 00:00:00.000000000 Z
12
41
  dependencies:
13
42
  - !ruby/object:Gem::Dependency
14
43
  name: async-container
@@ -90,6 +119,7 @@ files:
90
119
  - bin/turbo_test
91
120
  - lib/turbo_test.rb
92
121
  - lib/turbo_test/command.rb
122
+ - lib/turbo_test/command/list.rb
93
123
  - lib/turbo_test/command/run.rb
94
124
  - lib/turbo_test/command/top.rb
95
125
  - lib/turbo_test/configuration.rb
@@ -97,6 +127,8 @@ files:
97
127
  - lib/turbo_test/rspec/job.rb
98
128
  - lib/turbo_test/server.rb
99
129
  - lib/turbo_test/version.rb
130
+ - license.md
131
+ - readme.md
100
132
  homepage: https://github.com/ioquatix/turbo_test
101
133
  licenses:
102
134
  - MIT
@@ -117,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
149
  - !ruby/object:Gem::Version
118
150
  version: '0'
119
151
  requirements: []
120
- rubygems_version: 3.2.3
152
+ rubygems_version: 3.3.7
121
153
  signing_key:
122
154
  specification_version: 4
123
155
  summary: Press the turbo button... for your tests.
metadata.gz.sig ADDED
@@ -0,0 +1 @@
1
+ b�n�]͛D