flatware-rspec 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flatware/rspec.rb +28 -0
- data/lib/flatware/rspec/job_builder.rb +5 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a2796efde9648f14e67263880f8b882c83b0a4abc7c1216bc72653656bf2602
|
4
|
+
data.tar.gz: c56a0bcf090b321ecc4c61f39434d82c5d8d0bd64948732a4c6f8486f63452b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 393b882ed325b4ac152f3f7c4850b98b9705fe38fcb99f5582cdf32ec4976b3222bbc0bd3432173d259fa6dcb3384c406ff5f0e64de0b3e9f950345bae052dd3
|
7
|
+
data.tar.gz: 351ea03efe3feec52e9fd4dc5e8ac563b8e210e862e064f208e10960d07cd4edbd325812eeefb3be165d2f0cabf5db29e90638b9b720641474d0bf579b983c03
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rspec/core'
|
4
|
+
require 'rspec/expectations'
|
5
|
+
require 'flatware/rspec/cli'
|
6
|
+
|
7
|
+
module Flatware
|
8
|
+
module RSpec
|
9
|
+
require 'flatware/rspec/formatters/console'
|
10
|
+
require 'flatware/rspec/formatter'
|
11
|
+
require 'flatware/rspec/job_builder'
|
12
|
+
|
13
|
+
def self.extract_jobs_from_args(args, workers:)
|
14
|
+
JobBuilder.new(args, workers: workers).jobs
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.run(job, _options = {})
|
18
|
+
runner = ::RSpec::Core::Runner
|
19
|
+
def runner.trap_interrupt() end
|
20
|
+
|
21
|
+
args = %w[
|
22
|
+
--format Flatware::RSpec::Formatter
|
23
|
+
] + Array(job)
|
24
|
+
|
25
|
+
runner.run(args, $stderr, $stdout)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'forwardable'
|
4
|
+
|
3
5
|
module Flatware
|
4
6
|
module RSpec
|
5
7
|
# groups spec files into one job per worker.
|
@@ -8,6 +10,7 @@ module Flatware
|
|
8
10
|
class JobBuilder
|
9
11
|
extend Forwardable
|
10
12
|
attr_reader :args, :workers, :configuration
|
13
|
+
|
11
14
|
def_delegators(
|
12
15
|
:configuration,
|
13
16
|
:files_to_run,
|
@@ -38,9 +41,9 @@ module Flatware
|
|
38
41
|
[[], []]
|
39
42
|
) do |(timed, untimed), file|
|
40
43
|
if (time = seconds_per_file[file])
|
41
|
-
[timed.
|
44
|
+
[timed.push([file, time]), untimed]
|
42
45
|
else
|
43
|
-
[timed, untimed.
|
46
|
+
[timed, untimed.push(file)]
|
44
47
|
end
|
45
48
|
end
|
46
49
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flatware-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Dunn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flatware
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- LICENSE.txt
|
50
50
|
- README.md
|
51
51
|
- lib/flatware-rspec.rb
|
52
|
+
- lib/flatware/rspec.rb
|
52
53
|
- lib/flatware/rspec/checkpoint.rb
|
53
54
|
- lib/flatware/rspec/cli.rb
|
54
55
|
- lib/flatware/rspec/example_notification.rb
|
@@ -76,8 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
77
|
- !ruby/object:Gem::Version
|
77
78
|
version: '0'
|
78
79
|
requirements: []
|
79
|
-
|
80
|
-
rubygems_version: 2.7.6
|
80
|
+
rubygems_version: 3.0.3
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: A distributed rspec runner
|