rspec-support 3.12.1 → 3.13.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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Changelog.md +20 -3
- data/lib/rspec/support/caller_filter.rb +2 -0
- data/lib/rspec/support/comparable_version.rb +2 -0
- data/lib/rspec/support/differ.rb +2 -0
- data/lib/rspec/support/directory_maker.rb +2 -0
- data/lib/rspec/support/encoded_string.rb +2 -0
- data/lib/rspec/support/fuzzy_matcher.rb +2 -0
- data/lib/rspec/support/hunk_generator.rb +2 -0
- data/lib/rspec/support/matcher_definition.rb +2 -0
- data/lib/rspec/support/method_signature_verifier.rb +7 -3
- data/lib/rspec/support/mutex.rb +2 -0
- data/lib/rspec/support/object_formatter.rb +2 -0
- data/lib/rspec/support/recursive_const_methods.rb +2 -0
- data/lib/rspec/support/reentrant_mutex.rb +3 -1
- data/lib/rspec/support/ruby_features.rb +23 -0
- data/lib/rspec/support/source/location.rb +2 -0
- data/lib/rspec/support/source/node.rb +2 -0
- data/lib/rspec/support/source/token.rb +2 -0
- data/lib/rspec/support/source.rb +2 -0
- data/lib/rspec/support/spec/deprecation_helpers.rb +2 -0
- data/lib/rspec/support/spec/diff_helpers.rb +2 -0
- data/lib/rspec/support/spec/formatting_support.rb +2 -0
- data/lib/rspec/support/spec/in_sub_process.rb +6 -0
- data/lib/rspec/support/spec/library_wide_checks.rb +2 -0
- data/lib/rspec/support/spec/shell_out.rb +2 -0
- data/lib/rspec/support/spec/stderr_splitter.rb +2 -0
- data/lib/rspec/support/spec/string_matcher.rb +2 -0
- data/lib/rspec/support/spec/with_isolated_directory.rb +2 -0
- data/lib/rspec/support/spec/with_isolated_stderr.rb +2 -0
- data/lib/rspec/support/spec.rb +2 -0
- data/lib/rspec/support/version.rb +3 -1
- data/lib/rspec/support/warnings.rb +2 -0
- data/lib/rspec/support/with_keywords_when_needed.rb +2 -0
- data/lib/rspec/support.rb +2 -0
- data.tar.gz.sig +0 -0
- metadata +5 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 220efb5124746665a9d6edd89a312072ca68132e32a98f133d5f99763fed02d3
|
4
|
+
data.tar.gz: e7637055abcd4dd372d577af3bf67c0a653d6f4d62a2ea18f5737c1955057933
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b9830bc0bfe3b0012f63fd34fb84acd1b6bbce0aee62bd319ec96563279ef751b19649973446b7799d17812695ac47108624ab06e62f5ebe3574e8374635450
|
7
|
+
data.tar.gz: 2ce1f840dd991882eed89dbdf1fe820680933819ee49016f8acee350d0fb3295deed76d152cb73b9fb839154993cf901a0b743fc1558848e97668e3064d2bd4e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
### Development
|
2
|
-
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.13.0...main)
|
3
|
+
|
4
|
+
### 3.13.0 / 2024-02-04
|
5
|
+
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.12.2...v3.13.0)
|
6
|
+
|
7
|
+
Enchancements
|
8
|
+
|
9
|
+
* Add `RubyFeatures#supports_syntax_suggest?`. (Jon Rowe, #571)
|
10
|
+
|
11
|
+
### 3.12.2 / 2024-02-04
|
12
|
+
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.12.1...v3.12.2)
|
13
|
+
|
14
|
+
Bug Fixes:
|
15
|
+
|
16
|
+
* Properly surface errors from `in_sub_process`. (Jon Rowe, #575)
|
17
|
+
* Add magic comment for freezing string literals. (Josh Nichols, #586)
|
18
|
+
* Allow string keys for keyword arguments during verification of method
|
19
|
+
signatures, (but only on Ruby 3+). (@malcolmohare, #591)
|
3
20
|
|
4
21
|
### 3.12.1 / 2023-06-26
|
5
22
|
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.12.0...v3.12.1)
|
@@ -126,7 +143,7 @@ Bug Fixes:
|
|
126
143
|
Bug Fixes:
|
127
144
|
|
128
145
|
* Ensure that inspecting a `SimpleDelegator` based object works regardless of
|
129
|
-
|
146
|
+
visibility of the `__getobj__` method. (Jon Rowe, #369)
|
130
147
|
|
131
148
|
### 3.8.0 / 2018-08-04
|
132
149
|
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.7.1...v3.8.0)
|
@@ -234,7 +251,7 @@ Changes:
|
|
234
251
|
|
235
252
|
Enhancements:
|
236
253
|
|
237
|
-
* Improve formatting of `Delegator` based objects (e.g. `
|
254
|
+
* Improve formatting of `Delegator` based objects (e.g. `SimpleDelegator`) in
|
238
255
|
failure messages and diffs. (Andrew Horner, #215)
|
239
256
|
* Add `ComparableVersion`. (Yuji Nakayama, #245)
|
240
257
|
* Add `Ripper` support detection. (Yuji Nakayama, #245)
|
data/lib/rspec/support/differ.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rspec/support'
|
2
4
|
RSpec::Support.require_rspec_support "ruby_features"
|
3
5
|
RSpec::Support.require_rspec_support "matcher_definition"
|
@@ -82,7 +84,7 @@ module RSpec
|
|
82
84
|
def has_kw_args_in?(args)
|
83
85
|
Hash === args.last &&
|
84
86
|
could_contain_kw_args?(args) &&
|
85
|
-
(args.last.empty? || args.last.keys.any? { |x| x.is_a?(Symbol) })
|
87
|
+
(RubyFeatures.kw_arg_separation? || args.last.empty? || args.last.keys.any? { |x| x.is_a?(Symbol) })
|
86
88
|
end
|
87
89
|
|
88
90
|
# Without considering what the last arg is, could it
|
@@ -361,7 +363,7 @@ module RSpec
|
|
361
363
|
end
|
362
364
|
|
363
365
|
def split_args(*args)
|
364
|
-
kw_args = if @signature.has_kw_args_in?(args)
|
366
|
+
kw_args = if @signature.has_kw_args_in?(args) && !RubyFeatures.kw_arg_separation?
|
365
367
|
last = args.pop
|
366
368
|
non_kw_args = last.reject { |k, _| k.is_a?(Symbol) }
|
367
369
|
if non_kw_args.empty?
|
@@ -370,6 +372,8 @@ module RSpec
|
|
370
372
|
args << non_kw_args
|
371
373
|
last.select { |k, _| k.is_a?(Symbol) }.keys
|
372
374
|
end
|
375
|
+
elsif @signature.has_kw_args_in?(args) && RubyFeatures.kw_arg_separation?
|
376
|
+
args.pop.keys
|
373
377
|
else
|
374
378
|
[]
|
375
379
|
end
|
@@ -378,7 +382,7 @@ module RSpec
|
|
378
382
|
end
|
379
383
|
end
|
380
384
|
|
381
|
-
# Figures out
|
385
|
+
# Figures out whether a given method can accept various arguments.
|
382
386
|
# Surprisingly non-trivial.
|
383
387
|
#
|
384
388
|
# @private
|
data/lib/rspec/support/mutex.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module RSpec
|
2
4
|
module Support
|
3
5
|
# Allows a thread to lock out other threads from a critical section of code,
|
@@ -62,7 +64,7 @@ module RSpec
|
|
62
64
|
# On 1.9 and up, this is in core, so we just use the real one
|
63
65
|
class Mutex < ::Mutex
|
64
66
|
# If you mock Mutex.new you break our usage of Mutex, so
|
65
|
-
# instead we capture the original method to return
|
67
|
+
# instead we capture the original method to return Mutexes.
|
66
68
|
NEW_MUTEX_METHOD = Mutex.method(:new)
|
67
69
|
|
68
70
|
def self.new
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rbconfig'
|
2
4
|
RSpec::Support.require_rspec_support "comparable_version"
|
3
5
|
|
@@ -94,6 +96,27 @@ module RSpec
|
|
94
96
|
end
|
95
97
|
end
|
96
98
|
|
99
|
+
if RUBY_VERSION.to_f >= 3.2
|
100
|
+
def supports_syntax_suggest?
|
101
|
+
true
|
102
|
+
end
|
103
|
+
else
|
104
|
+
def supports_syntax_suggest?
|
105
|
+
false
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
if RUBY_VERSION.to_f >= 3.0
|
110
|
+
# https://rubyreferences.github.io/rubychanges/3.0.html#keyword-arguments-are-now-fully-separated-from-positional-arguments
|
111
|
+
def kw_arg_separation?
|
112
|
+
true
|
113
|
+
end
|
114
|
+
else
|
115
|
+
def kw_arg_separation?
|
116
|
+
false
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
97
120
|
if RUBY_VERSION.to_f >= 2.7
|
98
121
|
def supports_taint?
|
99
122
|
false
|
data/lib/rspec/support/source.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module RSpec
|
2
4
|
module Support
|
3
5
|
module InSubProcess
|
@@ -11,6 +13,10 @@ module RSpec
|
|
11
13
|
exception_reader, exception_writer = IO.pipe
|
12
14
|
result_reader, result_writer = IO.pipe
|
13
15
|
|
16
|
+
# Set binary mode to avoid errors surrounding ascii-8bit to utf-8 conversion
|
17
|
+
# this happens with warnings on rspec-rails for example
|
18
|
+
[exception_reader, exception_writer, result_reader, result_writer].each { |io| io.binmode }
|
19
|
+
|
14
20
|
pid = Process.fork do
|
15
21
|
warning_preventer = $stderr = RSpec::Support::StdErrSplitter.new($stderr)
|
16
22
|
|
data/lib/rspec/support/spec.rb
CHANGED
data/lib/rspec/support.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chelimsky
|
@@ -48,7 +48,7 @@ cert_chain:
|
|
48
48
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
49
49
|
F3MdtaDehhjC
|
50
50
|
-----END CERTIFICATE-----
|
51
|
-
date:
|
51
|
+
date: 2024-02-04 00:00:00.000000000 Z
|
52
52
|
dependencies:
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rake
|
@@ -125,7 +125,7 @@ licenses:
|
|
125
125
|
- MIT
|
126
126
|
metadata:
|
127
127
|
bug_tracker_uri: https://github.com/rspec/rspec-support/issues
|
128
|
-
changelog_uri: https://github.com/rspec/rspec-support/blob/v3.
|
128
|
+
changelog_uri: https://github.com/rspec/rspec-support/blob/v3.13.0/Changelog.md
|
129
129
|
documentation_uri: https://rspec.info/documentation/
|
130
130
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
131
131
|
source_code_uri: https://github.com/rspec/rspec-support
|
@@ -145,8 +145,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
|
-
rubygems_version: 3.4.
|
148
|
+
rubygems_version: 3.4.10
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
|
-
summary: rspec-support-3.
|
151
|
+
summary: rspec-support-3.13.0
|
152
152
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|