rspec-support 3.0.2 → 3.0.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 +12 -0
- data/lib/rspec/support.rb +18 -0
- data/lib/rspec/support/ruby_features.rb +1 -1
- data/lib/rspec/support/spec/stderr_splitter.rb +1 -1
- data/lib/rspec/support/version.rb +1 -1
- data/lib/rspec/support/warnings.rb +3 -0
- metadata +3 -3
- 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: 28ea8074fafdea78917ea13256e422066a5d1866
|
4
|
+
data.tar.gz: c41141d7e77221a91424a6b384c34d5a8b287f60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cec2e0cc5079359cafebe083ab48fe1464d27942e7e1ae5b405f0b099e4dae16d972a0ac7f7c953f1c8f16a18d8c872fcda883f68df2c15960ba3db67277d4b0
|
7
|
+
data.tar.gz: dcaffb3453f6c500935d0307376fa6476aa1ff7ebed89c78d000754f759ba05aa498c96273cf486cb5bdda6027cfa2387599513541a806c61ff824afebb0dfd9
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
### 3.0.3 / 2014-07-21
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.0.2...v3.0.3)
|
3
|
+
|
4
|
+
Bug Fixes:
|
5
|
+
|
6
|
+
* Fix regression in `Support#method_handle_for` where proxy objects
|
7
|
+
with method delegated would wrongly not return a method handle.
|
8
|
+
(Jon Rowe, #90)
|
9
|
+
* Properly detect Module#prepend support in Ruby 2.1+ (Ben Langfeld, #91)
|
10
|
+
* Fix `rspec/support/warnings.rb` so it can be loaded and used in
|
11
|
+
isolation. (Myron Marston, #93)
|
12
|
+
|
1
13
|
### 3.0.2 / 2014-06-20
|
2
14
|
[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.0.1...v3.0.2)
|
3
15
|
|
data/lib/rspec/support.rb
CHANGED
@@ -41,9 +41,19 @@ module RSpec
|
|
41
41
|
#
|
42
42
|
# - Objects that redefine #method (e.g. an HTTPRequest struct)
|
43
43
|
# - BasicObject subclasses that mixin a Kernel dup (e.g. SimpleDelegator)
|
44
|
+
# - Objects that undefine method and delegate everything to another
|
45
|
+
# object (e.g. Mongoid association objects)
|
44
46
|
if RubyFeatures.supports_rebinding_module_methods?
|
45
47
|
def self.method_handle_for(object, method_name)
|
46
48
|
KERNEL_METHOD_METHOD.bind(object).call(method_name)
|
49
|
+
rescue NameError => original
|
50
|
+
begin
|
51
|
+
handle = object.method(method_name)
|
52
|
+
raise original unless handle.is_a? Method
|
53
|
+
handle
|
54
|
+
rescue Exception
|
55
|
+
raise original
|
56
|
+
end
|
47
57
|
end
|
48
58
|
else
|
49
59
|
def self.method_handle_for(object, method_name)
|
@@ -52,6 +62,14 @@ module RSpec
|
|
52
62
|
else
|
53
63
|
object.method(method_name)
|
54
64
|
end
|
65
|
+
rescue NameError => original
|
66
|
+
begin
|
67
|
+
handle = object.method(method_name)
|
68
|
+
raise original unless handle.is_a? Method
|
69
|
+
handle
|
70
|
+
rescue Exception
|
71
|
+
raise original
|
72
|
+
end
|
55
73
|
end
|
56
74
|
end
|
57
75
|
end
|
@@ -21,7 +21,7 @@ module RSpec
|
|
21
21
|
module_function :required_kw_args_supported?
|
22
22
|
|
23
23
|
def module_prepends_supported?
|
24
|
-
Module.private_method_defined?(:prepend)
|
24
|
+
Module.method_defined?(:prepend) || Module.private_method_defined?(:prepend)
|
25
25
|
end
|
26
26
|
module_function :module_prepends_supported?
|
27
27
|
|
@@ -25,7 +25,7 @@ module RSpec
|
|
25
25
|
# To work around JRuby error:
|
26
26
|
# TypeError: $stderr must have write method, RSpec::StdErrSplitter given
|
27
27
|
def write(line)
|
28
|
-
if line !~
|
28
|
+
if line !~ %r{^\S+/gems/\S+:\d+: warning:} # http://rubular.com/r/kqeUIZOfPG
|
29
29
|
@orig_stderr.write(line)
|
30
30
|
@output_tracker.write(line)
|
31
31
|
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.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chelimsky
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
1yHC1AcSYpvi2dAbOiHT5iQF+krm4wse8KctXgTNnjMsHEoGKulJS2/sZl90jcCz
|
37
37
|
muA=
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date: 2014-
|
39
|
+
date: 2014-07-21 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
@@ -130,5 +130,5 @@ rubyforge_project: rspec
|
|
130
130
|
rubygems_version: 2.2.2
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
|
-
summary: rspec-support-3.0.
|
133
|
+
summary: rspec-support-3.0.3
|
134
134
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|