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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9bb148032e3c3ed766e2668a83e98c8e5b7df40a1d5b3e42223200c37c447c5b
4
- data.tar.gz: 228ab78a0c4a012fde9bf6844f833b838a469d77a094aff6dc65e57b5f66b07d
3
+ metadata.gz: 9a2796efde9648f14e67263880f8b882c83b0a4abc7c1216bc72653656bf2602
4
+ data.tar.gz: c56a0bcf090b321ecc4c61f39434d82c5d8d0bd64948732a4c6f8486f63452b4
5
5
  SHA512:
6
- metadata.gz: a4f4bc00cfb5c4547716c9598aeeec3c0a64bb38e5d97788f32172bfdbac804420bb5536aa3279f312cc6543006ed6d30acf010488156c7a1eb8649eeca0b389
7
- data.tar.gz: 966ec25180fdbaf3a16b401beb3b17bf02396aa889079fbaf58cb7777974033b27aaac1153a1b602fe93c32e18614bbb765f9b5af6dd0b7760e85a3b7d6b5600
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.append([file, time]), untimed]
44
+ [timed.push([file, time]), untimed]
42
45
  else
43
- [timed, untimed.append(file)]
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.1.0
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-06-01 00:00:00.000000000 Z
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.1.0
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.1.0
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
- rubyforge_project:
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