rspec-support 3.5.0 → 3.6.0.beta1
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 -1
- data/lib/rspec/support/object_formatter.rb +16 -2
- data/lib/rspec/support/ruby_features.rb +8 -0
- data/lib/rspec/support/spec/shell_out.rb +3 -1
- data/lib/rspec/support/version.rb +1 -1
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 277ae700a9e01df297df3821c4640bad8fed14e3
|
4
|
+
data.tar.gz: 2b492173b69c3d4afe3f6755a852e111391c1af8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcab8b6c82d93e670758a7e5338e71192756dd68971c09a31896d7b08dbbe09f930a59fb7f75f07ae1eb36ba364f8284d2e96db40ee7f0242b41374b6ef5aa0a
|
7
|
+
data.tar.gz: 7b1fc780d0d067f274fec62a175eaa46621b682ebc2b18f3d8b27da3cba7796b3b4ad507bf5978cf45981f078e8d636bbfe4af3d936092e58f3fb2e611f59ac2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,7 +1,14 @@
|
|
1
|
+
### Development
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.5.0...master)
|
3
|
+
|
4
|
+
Bug Fixes:
|
5
|
+
|
6
|
+
* Prevent truncated formatted object output from mangling console codes. (#294, Anson Kelly)
|
7
|
+
|
1
8
|
### 3.5.0 / 2016-07-01
|
2
9
|
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.5.0.beta4...v3.5.0)
|
3
10
|
|
4
|
-
**No user facing changes since
|
11
|
+
**No user facing changes since beta4**
|
5
12
|
|
6
13
|
### 3.5.0.beta4 / 2016-06-05
|
7
14
|
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.5.0.beta3...v3.5.0.beta4)
|
@@ -37,8 +37,8 @@ module RSpec
|
|
37
37
|
if formatted_object.length < max_formatted_output_length
|
38
38
|
return formatted_object
|
39
39
|
else
|
40
|
-
beginning = formatted_object
|
41
|
-
ending = formatted_object
|
40
|
+
beginning = truncate_string formatted_object, 0, max_formatted_output_length / 2
|
41
|
+
ending = truncate_string formatted_object, -max_formatted_output_length / 2, -1
|
42
42
|
return beginning + ELLIPSIS + ending
|
43
43
|
end
|
44
44
|
end
|
@@ -244,6 +244,20 @@ module RSpec
|
|
244
244
|
DelegatorInspector,
|
245
245
|
InspectableObjectInspector
|
246
246
|
]
|
247
|
+
|
248
|
+
private
|
249
|
+
|
250
|
+
# Returns the substring defined by the start_index and end_index
|
251
|
+
# If the string ends with a partial ANSI code code then that
|
252
|
+
# will be removed as printing partial ANSI
|
253
|
+
# codes to the terminal can lead to corruption
|
254
|
+
def truncate_string(str, start_index, end_index)
|
255
|
+
cut_str = str[start_index..end_index]
|
256
|
+
|
257
|
+
# ANSI color codes are like: \e[33m so anything with \e[ and a
|
258
|
+
# number without a 'm' is an incomplete color code
|
259
|
+
cut_str.sub(/\e\[\d+$/, '')
|
260
|
+
end
|
247
261
|
end
|
248
262
|
end
|
249
263
|
end
|
@@ -28,6 +28,10 @@ module RSpec
|
|
28
28
|
RUBY_PLATFORM == 'java'
|
29
29
|
end
|
30
30
|
|
31
|
+
def jruby_9000?
|
32
|
+
jruby? && JRUBY_VERSION >= '9.0.0.0'
|
33
|
+
end
|
34
|
+
|
31
35
|
def rbx?
|
32
36
|
defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
|
33
37
|
end
|
@@ -141,6 +145,10 @@ module RSpec
|
|
141
145
|
# rubocop:enable Lint/Eval
|
142
146
|
end
|
143
147
|
|
148
|
+
def module_refinement_supported?
|
149
|
+
Module.method_defined?(:refine) || Module.private_method_defined?(:refine)
|
150
|
+
end
|
151
|
+
|
144
152
|
def module_prepends_supported?
|
145
153
|
Module.method_defined?(:prepend) || Module.private_method_defined?(:prepend)
|
146
154
|
end
|
@@ -60,7 +60,9 @@ module RSpec
|
|
60
60
|
# Ignore bundler + rubygems warning.
|
61
61
|
l =~ %r{site_ruby/\d\.\d\.\d/rubygems} ||
|
62
62
|
# This is required for windows for some reason
|
63
|
-
l =~ %r{lib/bundler/rubygems}
|
63
|
+
l =~ %r{lib/bundler/rubygems} ||
|
64
|
+
# This is a JRuby file that generates warnings on 9.0.3.0
|
65
|
+
l =~ %r{lib/ruby/stdlib/jar}
|
64
66
|
end.join("\n")
|
65
67
|
end
|
66
68
|
|
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.6.0.beta1
|
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: 2016-
|
51
|
+
date: 2016-10-10 00:00:00.000000000 Z
|
52
52
|
dependencies:
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: bundler
|
@@ -144,13 +144,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: 1.8.7
|
145
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
|
-
- - "
|
147
|
+
- - ">"
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version:
|
149
|
+
version: 1.3.1
|
150
150
|
requirements: []
|
151
151
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.2.2
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
|
-
summary: rspec-support-3.
|
155
|
+
summary: rspec-support-3.6.0.beta1
|
156
156
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|