rspec-core 3.7.0 → 3.8.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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/Changelog.md +36 -2
  4. data/README.md +1 -1
  5. data/lib/rspec/core/bisect/coordinator.rb +26 -30
  6. data/lib/rspec/core/bisect/example_minimizer.rb +12 -8
  7. data/lib/rspec/core/bisect/fork_runner.rb +134 -0
  8. data/lib/rspec/core/bisect/server.rb +4 -13
  9. data/lib/rspec/core/bisect/{runner.rb → shell_command.rb} +27 -70
  10. data/lib/rspec/core/bisect/shell_runner.rb +73 -0
  11. data/lib/rspec/core/bisect/utilities.rb +58 -0
  12. data/lib/rspec/core/configuration.rb +163 -53
  13. data/lib/rspec/core/configuration_options.rb +41 -4
  14. data/lib/rspec/core/example.rb +4 -4
  15. data/lib/rspec/core/example_group.rb +1 -0
  16. data/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
  17. data/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
  18. data/lib/rspec/core/formatters/bisect_progress_formatter.rb +29 -16
  19. data/lib/rspec/core/formatters/deprecation_formatter.rb +3 -1
  20. data/lib/rspec/core/formatters/exception_presenter.rb +1 -0
  21. data/lib/rspec/core/formatters/html_printer.rb +0 -2
  22. data/lib/rspec/core/formatters/protocol.rb +17 -17
  23. data/lib/rspec/core/formatters/syntax_highlighter.rb +19 -19
  24. data/lib/rspec/core/formatters.rb +10 -6
  25. data/lib/rspec/core/hooks.rb +1 -3
  26. data/lib/rspec/core/invocations.rb +8 -6
  27. data/lib/rspec/core/memoized_helpers.rb +2 -2
  28. data/lib/rspec/core/profiler.rb +3 -1
  29. data/lib/rspec/core/reporter.rb +3 -6
  30. data/lib/rspec/core/runner.rb +20 -14
  31. data/lib/rspec/core/shared_example_group.rb +1 -3
  32. data/lib/rspec/core/shell_escape.rb +2 -2
  33. data/lib/rspec/core/version.rb +1 -1
  34. data/lib/rspec/core/world.rb +11 -0
  35. data.tar.gz.sig +0 -0
  36. metadata +12 -9
  37. metadata.gz.sig +0 -0
  38. data/lib/rspec/core/formatters/bisect_formatter.rb +0 -69
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Baker
@@ -46,7 +46,7 @@ cert_chain:
46
46
  ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
47
47
  F3MdtaDehhjC
48
48
  -----END CERTIFICATE-----
49
- date: 2017-10-17 00:00:00.000000000 Z
49
+ date: 2018-08-04 00:00:00.000000000 Z
50
50
  dependencies:
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: rspec-support
@@ -54,14 +54,14 @@ dependencies:
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: 3.7.0
57
+ version: 3.8.0
58
58
  type: :runtime
59
59
  prerelease: false
60
60
  version_requirements: !ruby/object:Gem::Requirement
61
61
  requirements:
62
62
  - - "~>"
63
63
  - !ruby/object:Gem::Version
64
- version: 3.7.0
64
+ version: 3.8.0
65
65
  - !ruby/object:Gem::Dependency
66
66
  name: cucumber
67
67
  requirement: !ruby/object:Gem::Requirement
@@ -192,8 +192,11 @@ files:
192
192
  - lib/rspec/core/backtrace_formatter.rb
193
193
  - lib/rspec/core/bisect/coordinator.rb
194
194
  - lib/rspec/core/bisect/example_minimizer.rb
195
- - lib/rspec/core/bisect/runner.rb
195
+ - lib/rspec/core/bisect/fork_runner.rb
196
196
  - lib/rspec/core/bisect/server.rb
197
+ - lib/rspec/core/bisect/shell_command.rb
198
+ - lib/rspec/core/bisect/shell_runner.rb
199
+ - lib/rspec/core/bisect/utilities.rb
197
200
  - lib/rspec/core/configuration.rb
198
201
  - lib/rspec/core/configuration_options.rb
199
202
  - lib/rspec/core/drb.rb
@@ -204,9 +207,10 @@ files:
204
207
  - lib/rspec/core/filter_manager.rb
205
208
  - lib/rspec/core/flat_map.rb
206
209
  - lib/rspec/core/formatters.rb
210
+ - lib/rspec/core/formatters/base_bisect_formatter.rb
207
211
  - lib/rspec/core/formatters/base_formatter.rb
208
212
  - lib/rspec/core/formatters/base_text_formatter.rb
209
- - lib/rspec/core/formatters/bisect_formatter.rb
213
+ - lib/rspec/core/formatters/bisect_drb_formatter.rb
210
214
  - lib/rspec/core/formatters/bisect_progress_formatter.rb
211
215
  - lib/rspec/core/formatters/console_codes.rb
212
216
  - lib/rspec/core/formatters/deprecation_formatter.rb
@@ -277,9 +281,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
281
  version: '0'
278
282
  requirements: []
279
283
  rubyforge_project:
280
- rubygems_version: 2.6.14
284
+ rubygems_version: 2.6.13
281
285
  signing_key:
282
286
  specification_version: 4
283
- summary: rspec-core-3.7.0
287
+ summary: rspec-core-3.8.0
284
288
  test_files: []
285
- has_rdoc:
metadata.gz.sig CHANGED
Binary file
@@ -1,69 +0,0 @@
1
- require 'drb/drb'
2
-
3
- module RSpec
4
- module Core
5
- module Formatters
6
- # Used by `--bisect`. When it shells out and runs a portion of the suite, it uses
7
- # this formatter as a means to have the status reported back to it, via DRb.
8
- #
9
- # Note that since DRb calls carry considerable overhead compared to normal
10
- # method calls, we try to minimize the number of DRb calls for perf reasons,
11
- # opting to communicate only at the start and the end of the run, rather than
12
- # after each example.
13
- # @private
14
- class BisectFormatter
15
- Formatters.register self, :start, :start_dump, :example_started,
16
- :example_failed, :example_passed, :example_pending
17
-
18
- def initialize(_output)
19
- port = RSpec.configuration.drb_port
20
- drb_uri = "druby://localhost:#{port}"
21
- @all_example_ids = []
22
- @failed_example_ids = []
23
- @bisect_server = DRbObject.new_with_uri(drb_uri)
24
- @remaining_failures = []
25
- RSpec.configuration.files_or_directories_to_run = @bisect_server.files_or_directories_to_run
26
- end
27
-
28
- def start(_notification)
29
- @remaining_failures = Set.new(@bisect_server.expected_failures)
30
- end
31
-
32
- def example_started(notification)
33
- @all_example_ids << notification.example.id
34
- end
35
-
36
- def example_failed(notification)
37
- @failed_example_ids << notification.example.id
38
- example_finished(notification, :failed)
39
- end
40
-
41
- def example_passed(notification)
42
- example_finished(notification, :passed)
43
- end
44
-
45
- def example_pending(notification)
46
- example_finished(notification, :pending)
47
- end
48
-
49
- def start_dump(_notification)
50
- @bisect_server.latest_run_results = RunResults.new(
51
- @all_example_ids, @failed_example_ids
52
- )
53
- end
54
-
55
- RunResults = Struct.new(:all_example_ids, :failed_example_ids)
56
-
57
- private
58
-
59
- def example_finished(notification, status)
60
- return unless @remaining_failures.include?(notification.example.id)
61
- @remaining_failures.delete(notification.example.id)
62
-
63
- return if status == :failed && !@remaining_failures.empty?
64
- RSpec.world.wants_to_quit = true
65
- end
66
- end
67
- end
68
- end
69
- end