[DRE-commits] [ruby-rspec] 01/02: more upstream spec fixes

Jérémy Bobbio lunar at alioth.debian.org
Mon Oct 21 20:48:44 UTC 2013


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/multideb
in repository ruby-rspec.

commit e3b833f6a86e2d557b4a8cf30f55fe2dc266ff8b
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Mon Oct 21 22:45:51 2013 +0200

    more upstream spec fixes
---
 .../patches/add-vendor-ruby-to-caller-paths.patch  |   33 ++++++++++++++++++++
 debian/patches/escape-path-in-match.patch          |   11 +++++++
 debian/patches/series                              |    1 +
 3 files changed, 45 insertions(+)

diff --git a/debian/patches/add-vendor-ruby-to-caller-paths.patch b/debian/patches/add-vendor-ruby-to-caller-paths.patch
new file mode 100644
index 0000000..e67f2b7
--- /dev/null
+++ b/debian/patches/add-vendor-ruby-to-caller-paths.patch
@@ -0,0 +1,33 @@
+--- a/rspec-core/lib/rspec/core/deprecation.rb
++++ b/rspec-core/lib/rspec/core/deprecation.rb
+@@ -8,7 +8,7 @@ module RSpec
+         # Temporarily support old and new APIs while we transition the other
+         # rspec libs to use a hash for the 2nd arg and no version arg
+         data = Hash === replacement_or_hash ? replacement_or_hash : { :replacement => replacement_or_hash }
+-        call_site = caller.find { |line| line !~ %r{/lib/rspec/(core|mocks|expectations|matchers|rails)/} }
++        call_site = caller.find { |line| line !~ %r{/(lib|vendor_ruby)/rspec/(core|mocks|expectations|matchers|rails)/} }
+ 
+         RSpec.configuration.reporter.deprecation(
+           {
+--- a/rspec-core/lib/rspec/core/metadata.rb
++++ b/rspec-core/lib/rspec/core/metadata.rb
+@@ -88,7 +88,7 @@ module RSpec
+         end
+ 
+         def first_caller_from_outside_rspec
+-          self[:caller].detect {|l| l !~ /\/lib\/rspec\/core/}
++          self[:caller].detect {|l| l !~ /\/(lib|vendor_ruby)\/rspec\/core/}
+         end
+ 
+         def method_description_after_module?(parent_part, child_part)
+--- a/rspec-core/lib/rspec/core/shared_example_group/collection.rb
++++ b/rspec-core/lib/rspec/core/shared_example_group/collection.rb
+@@ -27,7 +27,7 @@ module RSpec
+ 
+           def warn_deprecation_and_fetch_anyway(key)
+             if (example = fetch_anyway key)
+-              backtrace_line = caller.find { |line| !line.include?('lib/rspec/core') }
++              backtrace_line = caller.find { |line| !line !~ %r{(lib|vendor_ruby)/rspec/core} }
+               RSpec.warn_deprecation <<-WARNING.gsub(/^ /, '')
+                 Accessing shared_examples defined across contexts is deprecated.
+                 Please declare shared_examples within a shared context, or at the top level.
diff --git a/debian/patches/escape-path-in-match.patch b/debian/patches/escape-path-in-match.patch
index 9dbbd9e..3db75af 100644
--- a/debian/patches/escape-path-in-match.patch
+++ b/debian/patches/escape-path-in-match.patch
@@ -18,6 +18,17 @@
          })
        end
      end
+--- a/rspec-core/lib/rspec/core/backtrace_cleaner.rb
++++ b/rspec-core/lib/rspec/core/backtrace_cleaner.rb
+@@ -18,7 +18,7 @@ module RSpec
+         @exclusion_patterns = exclusion_patterns
+ 
+         if inclusion_patterns.nil?
+-          @inclusion_patterns = (matches_an_exclusion_pattern? Dir.getwd) ? [Regexp.new(Dir.getwd)] : []
++          @inclusion_patterns = (matches_an_exclusion_pattern? Dir.getwd) ? [Regexp.new(Regexp.escape(Dir.getwd))] : []
+         else
+           @inclusion_patterns = inclusion_patterns
+         end
 --- a/rspec-mocks/spec/rspec/mocks/nil_expectation_warning_spec.rb
 +++ b/rspec-mocks/spec/rspec/mocks/nil_expectation_warning_spec.rb
 @@ -13,7 +13,7 @@ module RSpec
diff --git a/debian/patches/series b/debian/patches/series
index cbfd900..fe96332 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ fix-commandline-test.patch
 ruby_test_bin.patch
 fix_encoding.patch
 escape-path-in-match.patch
+add-vendor-ruby-to-caller-paths.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rspec.git



More information about the Pkg-ruby-extras-commits mailing list