rspec-core 3.10.1 → 3.10.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5031b8b372bc9b1fa3c64a43825b270ba9af98511dc5309a4aa8a0089e247e6e
4
- data.tar.gz: ad0d74a416bed7deeba63aa52c83729cee3f13f6914f53869c9a282f02576968
3
+ metadata.gz: 4c462ef57abbfae97ff1b4fa21937c229704f11d76d98f9d364cac49845421ad
4
+ data.tar.gz: 96a6cff188d2268a7c3ee96a64d5d12bbc3fca390e821b1f155d7e963745ea79
5
5
  SHA512:
6
- metadata.gz: 97f252e26aa47ebbffd427c93d91a3286a444c00db88d4ecfe3e01134a786e15c408082cb019df19babfb9fb4dba732c5bcc3cb29c46b12e570d2ce5f348c23c
7
- data.tar.gz: e5daef6dd940e5611c414225013fed21d99c015c71850b9b3f7522aff28334138316275eac5befcc3a87c8b8a928c7eaa208f70f738ea873aa5ea42427ffd1b5
6
+ metadata.gz: 62f270716ca47f5ee3388a95f89d71d4b0e9bdf0fd1f7c6806332af2a9191028c6694b38e9792e8ad1c791fb277161b29ba4f92486303eaf6c2b986ae7616b3b
7
+ data.tar.gz: 5eaf0e7f745c9885d9fba59bf26303588632a4294ea004131bca55496121a60185154848492e5b31eafc9186f19c7903365da829fbcf8334f043ad707263076c
checksums.yaml.gz.sig CHANGED
Binary file
data/Changelog.md CHANGED
@@ -1,7 +1,22 @@
1
+ ### Development
2
+ [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.10.2...3-10-maintenance)
3
+
4
+ ### 3.10.2 / 2022-01-27
5
+ [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.10.1...v3.10.2)
6
+
7
+ Bug fixes:
8
+
9
+ * Ensure bisect communication uses consistent encoding. (Mike Jarema, #2852)
10
+ * Fix exception presenter when the root cause exception has nil backtrace.
11
+ (Zinovyev Ivan, #2903)
12
+ * Fix `inspect` output of `RSpec::Core::Example::Procsy` to namespace correctly.
13
+ (Keiko Kaneko, #2915)
14
+ * Ensure formatters not exposing `#output` will not crash duplicate check.
15
+ (@niceking, #2916)
16
+
1
17
  ### 3.10.1 / 2020-12-27
2
18
  [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.10.0...v3.10.1)
3
19
 
4
-
5
20
  Bug fixes:
6
21
 
7
22
  * RSpec warning output was missing deprecations from Ruby, these are now included.
@@ -17,7 +32,7 @@ Enhancements:
17
32
  * Add configuration for an error exit code (to disambiguate errored builds from failed builds
18
33
  by exit status). (Dana Sherson, #2749)
19
34
 
20
- # 3.9.3 / 2020-09-30
35
+ ### 3.9.3 / 2020-09-30
21
36
  [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.9.2...v3.9.3)
22
37
 
23
38
  Bug Fixes:
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # rspec-core [![Build Status](https://secure.travis-ci.org/rspec/rspec-core.svg?branch=main)](http://travis-ci.org/rspec/rspec-core) [![Code Climate](https://codeclimate.com/github/rspec/rspec-core.svg)](https://codeclimate.com/github/rspec/rspec-core)
1
+ # rspec-core [![Build Status](https://github.com/rspec/rspec-core/workflows/RSpec%20CI/badge.svg?branch=3-10-maintenance)](https://github.com/rspec/rspec-core/actions) [![Code Climate](https://codeclimate.com/github/rspec/rspec-core.svg)](https://codeclimate.com/github/rspec/rspec-core)
2
2
 
3
3
  rspec-core provides the structure for writing executable examples of how your
4
4
  code should behave, and an `rspec` command with tools to constrain which
@@ -29,11 +29,22 @@ module RSpec
29
29
  end
30
30
 
31
31
  # Wraps a pipe to support sending objects between a child and
32
- # parent process.
32
+ # parent process. Where supported, encoding is explicitly
33
+ # set to ensure binary data is able to pass from child to
34
+ # parent.
33
35
  # @private
34
36
  class Channel
37
+ if String.method_defined?(:encoding)
38
+ MARSHAL_DUMP_ENCODING = Marshal.dump("").encoding
39
+ end
40
+
35
41
  def initialize
36
42
  @read_io, @write_io = IO.pipe
43
+
44
+ if defined?(MARSHAL_DUMP_ENCODING) && IO.method_defined?(:set_encoding)
45
+ # Ensure the pipe can send any content produced by Marshal.dump
46
+ @write_io.set_encoding MARSHAL_DUMP_ENCODING
47
+ end
37
48
  end
38
49
 
39
50
  def send(message)
@@ -375,7 +375,7 @@ module RSpec
375
375
 
376
376
  # @private
377
377
  def inspect
378
- @example.inspect.gsub('Example', 'ExampleProcsy')
378
+ @example.inspect.gsub('Example', 'Example::Procsy')
379
379
  end
380
380
  end
381
381
 
@@ -701,6 +701,7 @@ module RSpec
701
701
  end
702
702
  end
703
703
 
704
+ # @private
704
705
  def initialize(inspect_output=nil)
705
706
  @__inspect_output = inspect_output || '(no description provided)'
706
707
  super() # no args get passed
@@ -782,6 +783,7 @@ module RSpec
782
783
  # @return [String] the location where the shared example was included
783
784
  attr_reader :inclusion_location
784
785
 
786
+ # @private
785
787
  def initialize(shared_group_name, inclusion_location)
786
788
  @shared_group_name = shared_group_name
787
789
  @inclusion_location = inclusion_location
@@ -55,7 +55,7 @@ module RSpec
55
55
  cause << " #{line}"
56
56
  end
57
57
 
58
- unless last_cause.backtrace.empty?
58
+ unless last_cause.backtrace.nil? || last_cause.backtrace.empty?
59
59
  cause << (" #{backtrace_formatter.format_backtrace(last_cause.backtrace, example.metadata).first}")
60
60
  end
61
61
  end
@@ -79,7 +79,7 @@ module RSpec::Core::Formatters
79
79
 
80
80
  # Register the formatter class
81
81
  # @param formatter_class [Class] formatter class to register
82
- # @param notifications [Symbol, ...] one or more notifications to be
82
+ # @param notifications [Array<Symbol>] one or more notifications to be
83
83
  # registered to the specified formatter
84
84
  #
85
85
  # @see RSpec::Core::Formatters::BaseFormatter
@@ -194,10 +194,16 @@ module RSpec::Core::Formatters
194
194
 
195
195
  def duplicate_formatter_exists?(new_formatter)
196
196
  @formatters.any? do |formatter|
197
- formatter.class == new_formatter.class && formatter.output == new_formatter.output
197
+ formatter.class == new_formatter.class &&
198
+ has_matching_output?(formatter, new_formatter)
198
199
  end
199
200
  end
200
201
 
202
+ def has_matching_output?(formatter, new_formatter)
203
+ return true unless formatter.respond_to?(:output) && new_formatter.respond_to?(:output)
204
+ formatter.output == new_formatter.output
205
+ end
206
+
201
207
  def existing_formatter_implements?(notification)
202
208
  @reporter.registered_listeners(notification).any?
203
209
  end
@@ -38,7 +38,7 @@ module RSpec
38
38
  # @param message [String] optional message to add to the summary report.
39
39
  #
40
40
  # @example
41
- # describe "an example" do
41
+ # describe "some behaviour" do
42
42
  # # reported as "Pending: no reason given"
43
43
  # it "is pending with no message" do
44
44
  # pending
@@ -52,21 +52,13 @@ module RSpec
52
52
  # end
53
53
  # end
54
54
  #
55
- # @note `before(:example)` hooks are eval'd when you use the `pending`
56
- # method within an example. If you want to declare an example `pending`
57
- # and bypass the `before` hooks as well, you can pass `:pending => true`
58
- # to the `it` method:
59
- #
60
- # it "does something", :pending => true do
61
- # # ...
62
- # end
63
- #
64
- # or pass `:pending => "something else getting finished"` to add a
65
- # message to the summary report:
66
- #
67
- # it "does something", :pending => "something else getting finished" do
68
- # # ...
69
- # end
55
+ # @note When using `pending` inside an example body using this method
56
+ # hooks, such as `before(:example)`, have already be run. This means that
57
+ # a failure from the code in the `before` hook will prevent the example
58
+ # from being considered pending, as the example body would not be
59
+ # executed. If you need to consider hooks as pending as well you can use
60
+ # the pending metadata as an alternative, e.g.
61
+ # `it "does something", pending: "message"`.
70
62
  def pending(message=nil)
71
63
  current_example = RSpec.current_example
72
64
 
@@ -12,7 +12,7 @@
12
12
  # the additional setup, and require it from the spec files that actually need
13
13
  # it.
14
14
  #
15
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
15
+ # See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
16
16
  RSpec.configure do |config|
17
17
  # rspec-expectations config goes here. You can use an alternate
18
18
  # assertion/expectation library such as wrong or the stdlib/minitest
@@ -61,9 +61,7 @@ RSpec.configure do |config|
61
61
 
62
62
  # Limits the available syntax to the non-monkey patched syntax that is
63
63
  # recommended. For more details, see:
64
- # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
65
- # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
66
- # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
64
+ # https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode
67
65
  config.disable_monkey_patching!
68
66
 
69
67
  # This setting enables warnings. It's recommended, but in some cases may
@@ -3,7 +3,7 @@ module RSpec
3
3
  # Version information for RSpec Core.
4
4
  module Version
5
5
  # Current version of RSpec Core, in semantic versioning format.
6
- STRING = '3.10.1'
6
+ STRING = '3.10.2'
7
7
  end
8
8
  end
9
9
  end
data.tar.gz.sig CHANGED
Binary file
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.10.1
4
+ version: 3.10.2
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: 2020-12-27 00:00:00.000000000 Z
49
+ date: 2022-01-27 00:00:00.000000000 Z
50
50
  dependencies:
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: rspec-support
@@ -267,7 +267,7 @@ licenses:
267
267
  - MIT
268
268
  metadata:
269
269
  bug_tracker_uri: https://github.com/rspec/rspec-core/issues
270
- changelog_uri: https://github.com/rspec/rspec-core/blob/v3.10.1/Changelog.md
270
+ changelog_uri: https://github.com/rspec/rspec-core/blob/v3.10.2/Changelog.md
271
271
  documentation_uri: https://rspec.info/documentation/
272
272
  mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
273
273
  source_code_uri: https://github.com/rspec/rspec-core
@@ -287,8 +287,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
287
287
  - !ruby/object:Gem::Version
288
288
  version: '0'
289
289
  requirements: []
290
- rubygems_version: 3.2.3
290
+ rubygems_version: 3.3.3
291
291
  signing_key:
292
292
  specification_version: 4
293
- summary: rspec-core-3.10.1
293
+ summary: rspec-core-3.10.2
294
294
  test_files: []
metadata.gz.sig CHANGED
Binary file