rspec-support 3.0.2 → 3.0.3

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
  SHA1:
3
- metadata.gz: 9cb39de744327700003b6241dbe2f204df549c8a
4
- data.tar.gz: 22a3ecd3996e27935caf7bd9ad13fa9eee6af36c
3
+ metadata.gz: 28ea8074fafdea78917ea13256e422066a5d1866
4
+ data.tar.gz: c41141d7e77221a91424a6b384c34d5a8b287f60
5
5
  SHA512:
6
- metadata.gz: c6d4f9bbcf292127109f31f16d5795192d2179b029f81627fddebbed9a314657f10a0f87c50253d6577dbf1f25f4bc188850d44278d03fc93170620558d9cc25
7
- data.tar.gz: 4ca2228ef2a97c06660fe78feafb7327cf15ab7385c838b6fad1e6281bf1a0b70090ea499fa14f9171b12786804917f4a2ae70bac59ddd0a98122a1a7241b3c5
6
+ metadata.gz: cec2e0cc5079359cafebe083ab48fe1464d27942e7e1ae5b405f0b099e4dae16d972a0ac7f7c953f1c8f16a18d8c872fcda883f68df2c15960ba3db67277d4b0
7
+ data.tar.gz: dcaffb3453f6c500935d0307376fa6476aa1ff7ebed89c78d000754f759ba05aa498c96273cf486cb5bdda6027cfa2387599513541a806c61ff824afebb0dfd9
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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
 
@@ -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 !~ /^\S+gems\/ruby\-\S+:\d+: warning:/
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
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Support
3
3
  module Version
4
- STRING = '3.0.2'
4
+ STRING = '3.0.3'
5
5
  end
6
6
  end
7
7
  end
@@ -1,3 +1,6 @@
1
+ require 'rspec/support'
2
+ RSpec::Support.require_rspec_support "caller_filter"
3
+
1
4
  module RSpec
2
5
  module Support
3
6
  module Warnings
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.2
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-06-21 00:00:00.000000000 Z
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.2
133
+ summary: rspec-support-3.0.3
134
134
  test_files: []
metadata.gz.sig CHANGED
Binary file