rspec-support 3.9.0 → 3.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27ddd84c490aacfced87a3d772c93cf8391484030d28f78789ff5e9263811d42
4
- data.tar.gz: 515eecb4064c04ac636b6171ad1308532596a13d9b132ac4689893ab76f43bfe
3
+ metadata.gz: '0608e9d9e32db7972f9ed9edf1acc660be6e859589a5bb40118979f32e3e3093'
4
+ data.tar.gz: df94499781e6a3f6460990392a90bcea42c4c1aaa028357139787ab1b92716df
5
5
  SHA512:
6
- metadata.gz: 3755a83a18dcd1326ac122e8250b0abbe0c50af2e630748478c8dfbf0c0f64f65d59725db3ae5370e382f49409b8f7d1639aa09a75c143d4186a8bfeda36a9e3
7
- data.tar.gz: 6a41a8e6f905e1c2a37a776a2438d461859aab8434b1cd20c0aa4ca50fb17d898465535710018c8c01c199fde6e179ffef35feb1cd118dc4b71894a0a12d960b
6
+ metadata.gz: 7598c046151adc5322cddd117f5809c3b3f9b1271c5db74496d6961e0799c1fbf3a47d2b48f1195be96b3c2ce0baab7c11d2f19709d478fc44848523034b9514
7
+ data.tar.gz: f548fa1b506985c64d9d612463cb4ffb8b41233a86af16ee26449e936570dbe0d4c2f2d9ad5c7fe3cd1a1b57d3156fba368b2f44627634053c2f1db51f64fc6d
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,10 +1,27 @@
1
+ ### 3.9.2 / 2019-12-30
2
+ [Full Changelog](http://github.com/rspec/rspec-support/compare/v3.9.1...v3.9.2)
3
+
4
+ Bug Fixes:
5
+
6
+ * Remove unneeded eval. (Matijs van Zuijlen, #394)
7
+
8
+ ### 3.9.1 / 2019-12-28
9
+ [Full Changelog](http://github.com/rspec/rspec-support/compare/v3.9.0...v3.9.1)
10
+
11
+ Bug Fixes:
12
+
13
+ * Remove warning caused by keyword arguments on Ruby 2.7.0.
14
+ (Jon Rowe, #392)
15
+
1
16
  ### 3.9.0 / 2019-10-07
17
+ [Full Changelog](http://github.com/rspec/rspec-support/compare/v3.8.3...v3.9.0)
2
18
 
3
19
  *NO CHANGES*
4
20
 
5
21
  Version 3.9.0 was released to allow other RSpec gems to release 3.9.0.
6
22
 
7
23
  ### 3.8.3 / 2019-10-02
24
+ [Full Changelog](http://github.com/rspec/rspec-support/compare/v3.8.2...v3.8.3)
8
25
 
9
26
  Bug Fixes:
10
27
 
@@ -5,31 +5,11 @@ module RSpec
5
5
  # Reduce allocations by storing constants.
6
6
  UTF_8 = "UTF-8"
7
7
  US_ASCII = "US-ASCII"
8
- #
9
- # In MRI 2.1 'invalid: :replace' changed to also replace an invalid byte sequence
10
- # see https://github.com/ruby/ruby/blob/v2_1_0/NEWS#L176
11
- # https://www.ruby-forum.com/topic/6861247
12
- # https://twitter.com/nalsh/status/553413844685438976
13
- #
14
- # For example, given:
15
- # "\x80".force_encoding("Emacs-Mule").encode(:invalid => :replace).bytes.to_a
16
- #
17
- # On MRI 2.1 or above: 63 # '?'
18
- # else : 128 # "\x80"
19
- #
8
+
20
9
  # Ruby's default replacement string is:
21
10
  # U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else
22
11
  # ? ("\x3F")
23
12
  REPLACE = "?"
24
- ENCODE_UNCONVERTABLE_BYTES = {
25
- :invalid => :replace,
26
- :undef => :replace,
27
- :replace => REPLACE
28
- }
29
- ENCODE_NO_CONVERTER = {
30
- :invalid => :replace,
31
- :replace => REPLACE
32
- }
33
13
 
34
14
  def initialize(string, encoding=nil)
35
15
  @encoding = encoding
@@ -112,9 +92,25 @@ module RSpec
112
92
  string = remove_invalid_bytes(string)
113
93
  string.encode(@encoding)
114
94
  rescue Encoding::UndefinedConversionError, Encoding::InvalidByteSequenceError
115
- string.encode(@encoding, ENCODE_UNCONVERTABLE_BYTES)
95
+ # Originally defined as a constant to avoid uneeded allocations, this hash must
96
+ # be defined inline (without {}) to avoid warnings on Ruby 2.7
97
+ #
98
+ # In MRI 2.1 'invalid: :replace' changed to also replace an invalid byte sequence
99
+ # see https://github.com/ruby/ruby/blob/v2_1_0/NEWS#L176
100
+ # https://www.ruby-forum.com/topic/6861247
101
+ # https://twitter.com/nalsh/status/553413844685438976
102
+ #
103
+ # For example, given:
104
+ # "\x80".force_encoding("Emacs-Mule").encode(:invalid => :replace).bytes.to_a
105
+ #
106
+ # On MRI 2.1 or above: 63 # '?'
107
+ # else : 128 # "\x80"
108
+ #
109
+ string.encode(@encoding, :invalid => :replace, :undef => :replace, :replace => REPLACE)
116
110
  rescue Encoding::ConverterNotFoundError
117
- string.dup.force_encoding(@encoding).encode(ENCODE_NO_CONVERTER)
111
+ # Originally defined as a constant to avoid uneeded allocations, this hash must
112
+ # be defined inline (without {}) to avoid warnings on Ruby 2.7
113
+ string.dup.force_encoding(@encoding).encode(:invalid => :replace, :replace => REPLACE)
118
114
  end
119
115
 
120
116
  # Prevents raising ArgumentError
@@ -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.2'
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.2
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-30 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.2/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.2
150
150
  test_files: []
metadata.gz.sig CHANGED
Binary file