rspec-support 3.9.0 → 3.9.1

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: 27ddd84c490aacfced87a3d772c93cf8391484030d28f78789ff5e9263811d42
4
- data.tar.gz: 515eecb4064c04ac636b6171ad1308532596a13d9b132ac4689893ab76f43bfe
3
+ metadata.gz: 5c8cd61c982e4ac70aa43e70803e06e76018107daa69d666eb489734ccf78e91
4
+ data.tar.gz: 68f0a5ab651d9adfb6c53708bbf0b694eb40fe2781da413afd795a375dabbb5f
5
5
  SHA512:
6
- metadata.gz: 3755a83a18dcd1326ac122e8250b0abbe0c50af2e630748478c8dfbf0c0f64f65d59725db3ae5370e382f49409b8f7d1639aa09a75c143d4186a8bfeda36a9e3
7
- data.tar.gz: 6a41a8e6f905e1c2a37a776a2438d461859aab8434b1cd20c0aa4ca50fb17d898465535710018c8c01c199fde6e179ffef35feb1cd118dc4b71894a0a12d960b
6
+ metadata.gz: 57f69f0570273c83d2eca2570a40e203afa78bc259591770e97b330b8ebac66884db77f906244916becfbcd5e13bbd1365db05833c1336b520f6d21c07345162
7
+ data.tar.gz: 76eb5e023bdce42de00e3194491530bb7c32819aae9975b95536734c064af676890f30d3618fb04a4d000e6934e3644af577593fd5708496c61ac9ae647bdac9
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,10 @@
1
+ ### 3.9.1 / 2019-12-28
2
+
3
+ Bug Fixes:
4
+
5
+ * Remove warning caused by keyword arguments on Ruby 2.7.0.
6
+ (Jon Rowe, #392)
7
+
1
8
  ### 3.9.0 / 2019-10-07
2
9
 
3
10
  *NO CHANGES*
@@ -112,11 +112,40 @@ module RSpec
112
112
  string = remove_invalid_bytes(string)
113
113
  string.encode(@encoding)
114
114
  rescue Encoding::UndefinedConversionError, Encoding::InvalidByteSequenceError
115
- string.encode(@encoding, ENCODE_UNCONVERTABLE_BYTES)
115
+ encode_unconvertable_bytes(string)
116
116
  rescue Encoding::ConverterNotFoundError
117
- string.dup.force_encoding(@encoding).encode(ENCODE_NO_CONVERTER)
117
+ encode_no_converter(string.dup.force_encoding(@encoding))
118
118
  end
119
119
 
120
+ private
121
+
122
+ # On Ruby 2.7.0 keyword arguments mixed with conventional cause a warning to
123
+ # be issued requiring us to be explicit by using a ** to pass the hash as
124
+ # keyword arguments. Any keyword argument supporting Ruby supports this.
125
+ if RubyFeatures.kw_args_supported?
126
+ # Note on non keyword supporting Ruby ** causes a syntax error hence
127
+ # we must use eval. To be removed in RSpec 4.
128
+ binding.eval(<<-CODE, __FILE__, __LINE__)
129
+ def encode_unconvertable_bytes(string)
130
+ string.encode(@encoding, **ENCODE_UNCONVERTABLE_BYTES)
131
+ end
132
+
133
+ def encode_no_converter(string)
134
+ string.encode(**ENCODE_NO_CONVERTER)
135
+ end
136
+ CODE
137
+ else
138
+ def encode_unconvertable_bytes(string)
139
+ string.encode(@encoding, ENCODE_UNCONVERTABLE_BYTES)
140
+ end
141
+
142
+ def encode_no_converter(string)
143
+ string.encode(ENCODE_NO_CONVERTER)
144
+ end
145
+ end
146
+
147
+ public
148
+
120
149
  # Prevents raising ArgumentError
121
150
  if String.method_defined?(:scrub)
122
151
  # https://github.com/ruby/ruby/blob/eeb05e8c11/doc/NEWS-2.1.0#L120-L123
@@ -90,6 +90,15 @@ module RSpec
90
90
  end
91
91
  end
92
92
 
93
+ if RUBY_VERSION.to_f >= 2.7
94
+ def supports_taint?
95
+ false
96
+ end
97
+ else
98
+ def supports_taint?
99
+ true
100
+ end
101
+ end
93
102
  ripper_requirements = [ComparableVersion.new(RUBY_VERSION) >= '1.9.2']
94
103
 
95
104
  ripper_requirements.push(false) if Ruby.rbx?
@@ -38,6 +38,10 @@ module RSpec
38
38
  def write(line)
39
39
  return if line =~ %r{^\S+/gems/\S+:\d+: warning:} # http://rubular.com/r/kqeUIZOfPG
40
40
 
41
+ # Ruby 2.7.0 complains about hashes used in place of keyword arguments
42
+ # Aruba 0.14.2 uses this internally triggering that here
43
+ return if line =~ %r{lib/ruby/2\.7\.0/fileutils\.rb:622: warning:}
44
+
41
45
  @orig_stderr.write(line)
42
46
  @output_tracker.write(line)
43
47
  end
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Support
3
3
  module Version
4
- STRING = '3.9.0'
4
+ STRING = '3.9.1'
5
5
  end
6
6
  end
7
7
  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.0
4
+ version: 3.9.1
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: 2019-10-07 00:00:00.000000000 Z
51
+ date: 2019-12-28 00:00:00.000000000 Z
52
52
  dependencies:
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: rake
@@ -123,7 +123,7 @@ licenses:
123
123
  - MIT
124
124
  metadata:
125
125
  bug_tracker_uri: https://github.com/rspec/rspec-support/issues
126
- changelog_uri: https://github.com/rspec/rspec-support/blob/v3.9.0/Changelog.md
126
+ changelog_uri: https://github.com/rspec/rspec-support/blob/v3.9.1/Changelog.md
127
127
  documentation_uri: https://rspec.info/documentation/
128
128
  mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
129
129
  source_code_uri: https://github.com/rspec/rspec-support
@@ -143,8 +143,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubygems_version: 3.0.6
146
+ rubygems_version: 3.1.2
147
147
  signing_key:
148
148
  specification_version: 4
149
- summary: rspec-support-3.9.0
149
+ summary: rspec-support-3.9.1
150
150
  test_files: []
metadata.gz.sig CHANGED
Binary file