rspec-support 3.9.3 → 3.9.4
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 +8 -0
- data/README.md +2 -2
- data/lib/rspec/support/caller_filter.rb +1 -1
- data/lib/rspec/support/comparable_version.rb +1 -1
- data/lib/rspec/support/method_signature_verifier.rb +2 -2
- data/lib/rspec/support/ruby_features.rb +4 -4
- data/lib/rspec/support/source.rb +10 -0
- data/lib/rspec/support/spec.rb +1 -0
- data/lib/rspec/support/spec/diff_helpers.rb +31 -0
- data/lib/rspec/support/spec/in_sub_process.rb +1 -3
- data/lib/rspec/support/spec/shell_out.rb +19 -8
- data/lib/rspec/support/spec/string_matcher.rb +0 -1
- data/lib/rspec/support/version.rb +1 -1
- metadata +9 -8
- 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: 64e316f3b95a01e748a8957a75be69735a0a3c9946401b984f7b094ed5fe0e37
|
4
|
+
data.tar.gz: 776ca96daad03a186edf939fea14f0a93285fa645a2def1a9e743d4f4bcdbde8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e259bee137ece963b2e947202fff1034df10ac3b7a756367e8efa0859c6f8d1353af352bc38510e42e7c374df37a9ffb050e1e88530e4565f831bd0247656154
|
7
|
+
data.tar.gz: e5f790a898522f0578202439c19ef24a7938d04394f4e1649188279affc96ea11ae3b643a547750b867f970aaa0d2b27f53ce4faeb8beb1a9e049a44455e3666
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
### 3.9.4 / 2020-10-23
|
2
|
+
|
3
|
+
Bug Fixes:
|
4
|
+
|
5
|
+
* Flag ripper as supported on Truffle Ruby. (Brandon Fish, #427)
|
6
|
+
* Prevent stubbing `File.read` from breaking source extraction.
|
7
|
+
(Jon Rowe, #431)
|
8
|
+
|
1
9
|
### 3.9.3 / 2020-05-02
|
2
10
|
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.9.2...v3.9.3)
|
3
11
|
|
data/README.md
CHANGED
@@ -8,12 +8,12 @@ suitable for internal use only at this time.
|
|
8
8
|
|
9
9
|
Install one or more of the `RSpec` gems.
|
10
10
|
|
11
|
-
Want to run against the `
|
11
|
+
Want to run against the `main` branch? You'll need to include the dependent
|
12
12
|
RSpec repos as well. Add the following to your `Gemfile`:
|
13
13
|
|
14
14
|
```ruby
|
15
15
|
%w[rspec-core rspec-expectations rspec-mocks rspec-support].each do |lib|
|
16
|
-
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => '
|
16
|
+
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => 'main'
|
17
17
|
end
|
18
18
|
```
|
19
19
|
|
@@ -122,7 +122,7 @@ module RSpec
|
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
125
|
-
@max_non_kw_args = @min_non_kw_args
|
125
|
+
@max_non_kw_args = @min_non_kw_args + optional_non_kw_args
|
126
126
|
@allowed_kw_args = @required_kw_args + @optional_kw_args
|
127
127
|
end
|
128
128
|
else
|
@@ -285,7 +285,7 @@ module RSpec
|
|
285
285
|
@arbitrary_kw_args = @unlimited_args = false
|
286
286
|
end
|
287
287
|
|
288
|
-
def with_expectation(expectation) # rubocop:disable MethodLength
|
288
|
+
def with_expectation(expectation) # rubocop:disable MethodLength, Metrics/PerceivedComplexity
|
289
289
|
return self unless MethodSignatureExpectation === expectation
|
290
290
|
|
291
291
|
if expectation.empty?
|
@@ -7,7 +7,7 @@ module RSpec
|
|
7
7
|
#
|
8
8
|
# Provides query methods for different OS or OS features.
|
9
9
|
module OS
|
10
|
-
|
10
|
+
module_function
|
11
11
|
|
12
12
|
def windows?
|
13
13
|
!!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/)
|
@@ -22,7 +22,7 @@ module RSpec
|
|
22
22
|
#
|
23
23
|
# Provides query methods for different rubies
|
24
24
|
module Ruby
|
25
|
-
|
25
|
+
module_function
|
26
26
|
|
27
27
|
def jruby?
|
28
28
|
RUBY_PLATFORM == 'java'
|
@@ -58,7 +58,7 @@ module RSpec
|
|
58
58
|
# Provides query methods for ruby features that differ among
|
59
59
|
# implementations.
|
60
60
|
module RubyFeatures
|
61
|
-
|
61
|
+
module_function
|
62
62
|
|
63
63
|
if Ruby.jruby?
|
64
64
|
# On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true,
|
@@ -105,7 +105,7 @@ module RSpec
|
|
105
105
|
end
|
106
106
|
ripper_requirements = [ComparableVersion.new(RUBY_VERSION) >= '1.9.2']
|
107
107
|
|
108
|
-
ripper_requirements.push(false) if Ruby.rbx?
|
108
|
+
ripper_requirements.push(false) if Ruby.rbx?
|
109
109
|
|
110
110
|
if Ruby.jruby?
|
111
111
|
ripper_requirements.push(Ruby.jruby_version >= '1.7.5')
|
data/lib/rspec/support/source.rb
CHANGED
@@ -8,6 +8,16 @@ module RSpec
|
|
8
8
|
class Source
|
9
9
|
attr_reader :source, :path
|
10
10
|
|
11
|
+
# This class protects us against having File read and expand_path
|
12
|
+
# stubbed out within tests.
|
13
|
+
class File
|
14
|
+
class << self
|
15
|
+
[:read, :expand_path].each do |method_name|
|
16
|
+
define_method(method_name, &::File.method(method_name))
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
11
21
|
def self.from_file(path)
|
12
22
|
source = File.read(path)
|
13
23
|
new(source, path)
|
data/lib/rspec/support/spec.rb
CHANGED
@@ -2,6 +2,7 @@ require 'rspec/support'
|
|
2
2
|
require 'rspec/support/spec/in_sub_process'
|
3
3
|
|
4
4
|
RSpec::Support.require_rspec_support "spec/deprecation_helpers"
|
5
|
+
RSpec::Support.require_rspec_support "spec/diff_helpers"
|
5
6
|
RSpec::Support.require_rspec_support "spec/with_isolated_stderr"
|
6
7
|
RSpec::Support.require_rspec_support "spec/stderr_splitter"
|
7
8
|
RSpec::Support.require_rspec_support "spec/formatting_support"
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'diff/lcs'
|
2
|
+
|
3
|
+
module RSpec
|
4
|
+
module Support
|
5
|
+
module Spec
|
6
|
+
module DiffHelpers
|
7
|
+
# In the updated version of diff-lcs several diff headers change format slightly
|
8
|
+
# compensate for this and change minimum version in RSpec 4
|
9
|
+
if ::Diff::LCS::VERSION.to_f < 1.4
|
10
|
+
def one_line_header(line_number=2)
|
11
|
+
"-1,#{line_number} +1,#{line_number}"
|
12
|
+
end
|
13
|
+
else
|
14
|
+
def one_line_header(_=2)
|
15
|
+
"-1 +1"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
if Diff::LCS::VERSION.to_f < 1.4 || Diff::LCS::VERSION >= "1.4.4"
|
20
|
+
def removing_two_line_header
|
21
|
+
"-1,3 +1"
|
22
|
+
end
|
23
|
+
else
|
24
|
+
def removing_two_line_header
|
25
|
+
"-1,3 +1,5"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -7,8 +7,7 @@ module RSpec
|
|
7
7
|
|
8
8
|
# Useful as a way to isolate a global change to a subprocess.
|
9
9
|
|
10
|
-
# rubocop:disable MethodLength
|
11
|
-
def in_sub_process(prevent_warnings=true)
|
10
|
+
def in_sub_process(prevent_warnings=true) # rubocop:disable MethodLength, Metrics/AbcSize
|
12
11
|
exception_reader, exception_writer = IO.pipe
|
13
12
|
result_reader, result_writer = IO.pipe
|
14
13
|
|
@@ -46,7 +45,6 @@ module RSpec
|
|
46
45
|
result_reader.close
|
47
46
|
result
|
48
47
|
end
|
49
|
-
# rubocop:enable MethodLength
|
50
48
|
alias :in_sub_process_if_possible :in_sub_process
|
51
49
|
|
52
50
|
def marshal_dump_with_unmarshable_object_handling(object)
|
@@ -53,19 +53,30 @@ module RSpec
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
|
57
|
-
|
56
|
+
LINES_TO_IGNORE =
|
57
|
+
[
|
58
58
|
# Ignore bundler warning.
|
59
|
-
|
59
|
+
%r{bundler/source/rubygems},
|
60
60
|
# Ignore bundler + rubygems warning.
|
61
|
-
|
62
|
-
|
61
|
+
%r{site_ruby/\d\.\d\.\d/rubygems},
|
62
|
+
%r{jruby-\d\.\d\.\d\.\d/lib/ruby/stdlib/rubygems},
|
63
63
|
# This is required for windows for some reason
|
64
|
-
|
64
|
+
%r{lib/bundler/rubygems},
|
65
65
|
# This is a JRuby file that generates warnings on 9.0.3.0
|
66
|
-
|
66
|
+
%r{lib/ruby/stdlib/jar},
|
67
67
|
# This is a JRuby file that generates warnings on 9.1.7.0
|
68
|
-
|
68
|
+
%r{org/jruby/RubyKernel\.java},
|
69
|
+
# This is a JRuby gem that generates warnings on 9.1.7.0
|
70
|
+
%r{ffi-1\.13\.\d+-java},
|
71
|
+
%r{uninitialized constant FFI},
|
72
|
+
# These are related to the above, there is a warning about io from FFI
|
73
|
+
%r{jruby-\d\.\d\.\d\.\d/lib/ruby/stdlib/io},
|
74
|
+
%r{io/console on JRuby shells out to stty for most operations},
|
75
|
+
]
|
76
|
+
|
77
|
+
def strip_known_warnings(input)
|
78
|
+
input.split("\n").reject do |l|
|
79
|
+
LINES_TO_IGNORE.any? { |to_ignore| l =~ to_ignore } ||
|
69
80
|
# Remove blank lines
|
70
81
|
l == "" || l.nil?
|
71
82
|
end.join("\n")
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chelimsky
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
- Sam Phippen
|
11
11
|
- Xaviery Shay
|
12
12
|
- Bradley Schaefer
|
13
|
-
autorequire:
|
13
|
+
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain:
|
16
16
|
- |
|
@@ -48,7 +48,7 @@ cert_chain:
|
|
48
48
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
49
49
|
F3MdtaDehhjC
|
50
50
|
-----END CERTIFICATE-----
|
51
|
-
date: 2020-
|
51
|
+
date: 2020-10-23 00:00:00.000000000 Z
|
52
52
|
dependencies:
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rake
|
@@ -108,6 +108,7 @@ files:
|
|
108
108
|
- lib/rspec/support/source/token.rb
|
109
109
|
- lib/rspec/support/spec.rb
|
110
110
|
- lib/rspec/support/spec/deprecation_helpers.rb
|
111
|
+
- lib/rspec/support/spec/diff_helpers.rb
|
111
112
|
- lib/rspec/support/spec/formatting_support.rb
|
112
113
|
- lib/rspec/support/spec/in_sub_process.rb
|
113
114
|
- lib/rspec/support/spec/library_wide_checks.rb
|
@@ -124,11 +125,11 @@ licenses:
|
|
124
125
|
- MIT
|
125
126
|
metadata:
|
126
127
|
bug_tracker_uri: https://github.com/rspec/rspec-support/issues
|
127
|
-
changelog_uri: https://github.com/rspec/rspec-support/blob/v3.9.
|
128
|
+
changelog_uri: https://github.com/rspec/rspec-support/blob/v3.9.4/Changelog.md
|
128
129
|
documentation_uri: https://rspec.info/documentation/
|
129
130
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
130
131
|
source_code_uri: https://github.com/rspec/rspec-support
|
131
|
-
post_install_message:
|
132
|
+
post_install_message:
|
132
133
|
rdoc_options:
|
133
134
|
- "--charset=UTF-8"
|
134
135
|
require_paths:
|
@@ -144,8 +145,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
145
|
- !ruby/object:Gem::Version
|
145
146
|
version: '0'
|
146
147
|
requirements: []
|
147
|
-
rubygems_version: 3.1
|
148
|
-
signing_key:
|
148
|
+
rubygems_version: 3.2.0.rc.1
|
149
|
+
signing_key:
|
149
150
|
specification_version: 4
|
150
|
-
summary: rspec-support-3.9.
|
151
|
+
summary: rspec-support-3.9.4
|
151
152
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|