rspec-support 3.9.2 → 3.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +10 -0
- data/lib/rspec/support/reentrant_mutex.rb +9 -1
- data/lib/rspec/support/ruby_features.rb +7 -2
- data/lib/rspec/support/spec/stderr_splitter.rb +8 -0
- data/lib/rspec/support/version.rb +1 -1
- data/lib/rspec/support/with_keywords_when_needed.rb +33 -0
- metadata +7 -6
- 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: 9f561f278914c539fc9babd8c48285401c81f060a739c84b4cab642eb38b33af
|
4
|
+
data.tar.gz: 8037220124b5c39df3fe2b68cf771f6c5bfcabf74a2fe6cd81d59657c4210afe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc9aef51132154fe8574dd1500b8ebfc76062476875f6b49d1d8556fa112b1f327b73bcb0e68a19e9b0da3d13281ca9625855f22c45df84030b2caca973e3a81
|
7
|
+
data.tar.gz: a7699d54e238b3bf20d77944f8ed6e13bb7e51daaca0937676c7261d98b36b7bcfd2b38af25b687d8d1a52991f06aad9499908f9fdc6b5f7eac5539162db45b2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
### 3.9.3 / 2020-05-02
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.9.2...v3.9.3)
|
3
|
+
|
4
|
+
Bug Fixes:
|
5
|
+
|
6
|
+
* Mark ripper as unsupported on Truffle Ruby. (Brandon Fish, #395)
|
7
|
+
* Mark ripper as unsupported on JRuby 9.2.0.0. (Brian Hawley, #400)
|
8
|
+
* Capture `Mutex.new` for our `RSpec::Support:Mutex` in order to
|
9
|
+
allow stubbing `Mutex.new`. (Jon Rowe, #411)
|
10
|
+
|
1
11
|
### 3.9.2 / 2019-12-30
|
2
12
|
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.9.1...v3.9.2)
|
3
13
|
|
@@ -43,7 +43,15 @@ module RSpec
|
|
43
43
|
|
44
44
|
if defined? ::Mutex
|
45
45
|
# On 1.9 and up, this is in core, so we just use the real one
|
46
|
-
Mutex
|
46
|
+
class Mutex < ::Mutex
|
47
|
+
# If you mock Mutex.new you break our usage of Mutex, so
|
48
|
+
# instead we capture the original method to return Mutexs.
|
49
|
+
NEW_MUTEX_METHOD = Mutex.method(:new)
|
50
|
+
|
51
|
+
def self.new
|
52
|
+
NEW_MUTEX_METHOD.call
|
53
|
+
end
|
54
|
+
end
|
47
55
|
else # For 1.8.7
|
48
56
|
# :nocov:
|
49
57
|
RSpec::Support.require_rspec_support "mutex"
|
@@ -47,6 +47,10 @@ module RSpec
|
|
47
47
|
def mri?
|
48
48
|
!defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby'
|
49
49
|
end
|
50
|
+
|
51
|
+
def truffleruby?
|
52
|
+
defined?(RUBY_ENGINE) && RUBY_ENGINE == 'truffleruby'
|
53
|
+
end
|
50
54
|
end
|
51
55
|
|
52
56
|
# @api private
|
@@ -101,13 +105,14 @@ module RSpec
|
|
101
105
|
end
|
102
106
|
ripper_requirements = [ComparableVersion.new(RUBY_VERSION) >= '1.9.2']
|
103
107
|
|
104
|
-
ripper_requirements.push(false) if Ruby.rbx?
|
108
|
+
ripper_requirements.push(false) if Ruby.rbx? || Ruby.truffleruby?
|
105
109
|
|
106
110
|
if Ruby.jruby?
|
107
111
|
ripper_requirements.push(Ruby.jruby_version >= '1.7.5')
|
108
112
|
# Ripper on JRuby 9.0.0.0.rc1 - 9.1.8.0 reports wrong line number
|
109
113
|
# or cannot parse source including `:if`.
|
110
|
-
|
114
|
+
# Ripper on JRuby 9.x.x.x < 9.2.1.0 can't handle keyword arguments.
|
115
|
+
ripper_requirements.push(!Ruby.jruby_version.between?('9.0.0.0.rc1', '9.2.0.0'))
|
111
116
|
end
|
112
117
|
|
113
118
|
if ripper_requirements.all?
|
@@ -6,6 +6,7 @@ module RSpec
|
|
6
6
|
def initialize(original)
|
7
7
|
@orig_stderr = original
|
8
8
|
@output_tracker = ::StringIO.new
|
9
|
+
@last_line = nil
|
9
10
|
end
|
10
11
|
|
11
12
|
respond_to_name = (::RUBY_VERSION.to_f < 1.9) ? :respond_to? : :respond_to_missing?
|
@@ -38,12 +39,19 @@ module RSpec
|
|
38
39
|
def write(line)
|
39
40
|
return if line =~ %r{^\S+/gems/\S+:\d+: warning:} # http://rubular.com/r/kqeUIZOfPG
|
40
41
|
|
42
|
+
# Ruby 2.7.0 warnings from keyword argments span multiple lines, extend check above
|
43
|
+
# to look for the next line.
|
44
|
+
return if @last_line =~ %r{^\S+/gems/\S+:\d+: warning:} &&
|
45
|
+
line =~ %r{warning: The called method .* is defined here}
|
46
|
+
|
41
47
|
# Ruby 2.7.0 complains about hashes used in place of keyword arguments
|
42
48
|
# Aruba 0.14.2 uses this internally triggering that here
|
43
49
|
return if line =~ %r{lib/ruby/2\.7\.0/fileutils\.rb:622: warning:}
|
44
50
|
|
45
51
|
@orig_stderr.write(line)
|
46
52
|
@output_tracker.write(line)
|
53
|
+
ensure
|
54
|
+
@last_line = line
|
47
55
|
end
|
48
56
|
|
49
57
|
def has_output?
|
@@ -0,0 +1,33 @@
|
|
1
|
+
RSpec::Support.require_rspec_support("method_signature_verifier")
|
2
|
+
|
3
|
+
module RSpec
|
4
|
+
module Support
|
5
|
+
module WithKeywordsWhenNeeded
|
6
|
+
# This module adds keyword sensitive support for core ruby methods
|
7
|
+
# where we cannot use `ruby2_keywords` directly.
|
8
|
+
|
9
|
+
module_function
|
10
|
+
|
11
|
+
if RSpec::Support::RubyFeatures.kw_args_supported?
|
12
|
+
# Remove this in RSpec 4 in favour of explictly passed in kwargs where
|
13
|
+
# this is used. Works around a warning in Ruby 2.7
|
14
|
+
|
15
|
+
def class_exec(klass, *args, &block)
|
16
|
+
if MethodSignature.new(block).has_kw_args_in?(args)
|
17
|
+
binding.eval(<<-CODE, __FILE__, __LINE__)
|
18
|
+
kwargs = args.pop
|
19
|
+
klass.class_exec(*args, **kwargs, &block)
|
20
|
+
CODE
|
21
|
+
else
|
22
|
+
klass.class_exec(*args, &block)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
ruby2_keywords :class_exec if respond_to?(:ruby2_keywords, true)
|
26
|
+
else
|
27
|
+
def class_exec(klass, *args, &block)
|
28
|
+
klass.class_exec(*args, &block)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
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.9.
|
4
|
+
version: 3.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chelimsky
|
@@ -48,20 +48,20 @@ cert_chain:
|
|
48
48
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
49
49
|
F3MdtaDehhjC
|
50
50
|
-----END CERTIFICATE-----
|
51
|
-
date:
|
51
|
+
date: 2020-05-02 00:00:00.000000000 Z
|
52
52
|
dependencies:
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rake
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- - "
|
57
|
+
- - ">"
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 10.0.0
|
60
60
|
type: :development
|
61
61
|
prerelease: false
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- - "
|
64
|
+
- - ">"
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: 10.0.0
|
67
67
|
- !ruby/object:Gem::Dependency
|
@@ -118,12 +118,13 @@ files:
|
|
118
118
|
- lib/rspec/support/spec/with_isolated_stderr.rb
|
119
119
|
- lib/rspec/support/version.rb
|
120
120
|
- lib/rspec/support/warnings.rb
|
121
|
+
- lib/rspec/support/with_keywords_when_needed.rb
|
121
122
|
homepage: https://github.com/rspec/rspec-support
|
122
123
|
licenses:
|
123
124
|
- MIT
|
124
125
|
metadata:
|
125
126
|
bug_tracker_uri: https://github.com/rspec/rspec-support/issues
|
126
|
-
changelog_uri: https://github.com/rspec/rspec-support/blob/v3.9.
|
127
|
+
changelog_uri: https://github.com/rspec/rspec-support/blob/v3.9.3/Changelog.md
|
127
128
|
documentation_uri: https://rspec.info/documentation/
|
128
129
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
129
130
|
source_code_uri: https://github.com/rspec/rspec-support
|
@@ -146,5 +147,5 @@ requirements: []
|
|
146
147
|
rubygems_version: 3.1.2
|
147
148
|
signing_key:
|
148
149
|
specification_version: 4
|
149
|
-
summary: rspec-support-3.9.
|
150
|
+
summary: rspec-support-3.9.3
|
150
151
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|