[DRE-commits] [ruby-rspec] 13/25: some patches
Cédric Boutillier
boutil at moszumanska.debian.org
Sat Mar 28 20:34:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch no_submodules
in repository ruby-rspec.
commit 764da58b3dc4be889b3f20db8508171d72347e9e
Author: Cédric Boutillier <boutil at debian.org>
Date: Tue Mar 24 23:50:14 2015 +0100
some patches
---
.../patches/add-vendor-ruby-to-caller-paths.patch | 47 ++++++++--------------
...able_specs_assuming_they_are_first_caller.patch | 28 +++++++++++++
debian/patches/path_to_executable.patch | 18 +++++++++
debian/patches/series | 10 ++---
debian/patches/skip_coverage.patch | 40 ++++++++++++++++++
5 files changed, 106 insertions(+), 37 deletions(-)
diff --git a/debian/patches/add-vendor-ruby-to-caller-paths.patch b/debian/patches/add-vendor-ruby-to-caller-paths.patch
index e67f2b7..3ac433e 100644
--- a/debian/patches/add-vendor-ruby-to-caller-paths.patch
+++ b/debian/patches/add-vendor-ruby-to-caller-paths.patch
@@ -1,33 +1,20 @@
---- 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)/} }
+Description: adapt regex to determine callers to installation path on Debian
+ the path of RSpec in Debian does not match /lib/rspec/core
+ This was causing file_path metadata to be wrong, breaking file_path filters.
+ This problem has moved from rspec-core to rspec-support with rspec 3.x.
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737734
+Author: Cédric Boutillier <boutil at debian.org>
+Forwarded: not-needed
+Last-Update: 2015-03-24
+
+--- a/rspec-support/lib/rspec/support/caller_filter.rb
++++ b/rspec-support/lib/rspec/support/caller_filter.rb
+@@ -17,7 +17,7 @@
- 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
+ ADDITIONAL_TOP_LEVEL_FILES = %w[ autorun ]
- 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
+- LIB_REGEX = %r{/lib/rspec/(#{(RSPEC_LIBS + ADDITIONAL_TOP_LEVEL_FILES).join('|')})(\.rb|/)}
++ LIB_REGEX = %r{/(lib|vendor_ruby)/rspec/(#{(RSPEC_LIBS + ADDITIONAL_TOP_LEVEL_FILES).join('|')})(\.rb|/)}
- 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.
+ # rubygems/core_ext/kernel_require.rb isn't actually part of rspec (obviously) but we want
+ # it ignored when we are looking for the first meaningful line of the backtrace outside
diff --git a/debian/patches/disable_specs_assuming_they_are_first_caller.patch b/debian/patches/disable_specs_assuming_they_are_first_caller.patch
new file mode 100644
index 0000000..eabd9f8
--- /dev/null
+++ b/debian/patches/disable_specs_assuming_they_are_first_caller.patch
@@ -0,0 +1,28 @@
+Description: disable some failing specs
+ because the backtrace contains a reference to debian/ruby-tests.rb
+Author: Cédric Boutillier <boutil at debian.org>
+Forwarded: not-needed
+Last-Update: 2015-03-24
+
+--- a/rspec-core/spec/rspec/core/formatters/documentation_formatter_spec.rb
++++ b/rspec-core/spec/rspec/core/formatters/documentation_formatter_spec.rb
+@@ -78,7 +78,7 @@
+ end
+
+ # The backrace is slightly different on JRuby so we skip there.
+- it 'produces the expected full output', :unless => RUBY_PLATFORM == 'java' do
++ xit 'produces the expected full output', :unless => RUBY_PLATFORM == 'java' do
+ output = run_example_specs_with_formatter("doc")
+ output.gsub!(/ +$/, '') # strip trailing whitespace
+
+--- a/rspec-core/spec/rspec/core/formatters/progress_formatter_spec.rb
++++ b/rspec-core/spec/rspec/core/formatters/progress_formatter_spec.rb
+@@ -41,7 +41,7 @@
+ end
+
+ # The backrace is slightly different on JRuby so we skip there.
+- it 'produces the expected full output', :unless => RUBY_PLATFORM == 'java' do
++ xit 'produces the expected full output', :unless => RUBY_PLATFORM == 'java' do
+ output = run_example_specs_with_formatter("progress")
+ output.gsub!(/ +$/, '') # strip trailing whitespace
+
diff --git a/debian/patches/path_to_executable.patch b/debian/patches/path_to_executable.patch
new file mode 100644
index 0000000..c547f86
--- /dev/null
+++ b/debian/patches/path_to_executable.patch
@@ -0,0 +1,18 @@
+Description: fix path to rspec executable
+ the relative path is different in the gem and in the installed version
+Author: Cédric Boutillier <boutil at debian.org>
+Forwarded: not-needed
+Last-Update: 2015-03-24
+
+--- a/rspec-core/lib/rspec/core.rb
++++ b/rspec-core/lib/rspec/core.rb
+@@ -159,7 +159,8 @@
+
+ # @private path to executable file.
+ def self.path_to_executable
+- @path_to_executable ||= File.expand_path('../../../exe/rspec', __FILE__)
++ #@path_to_executable ||= File.expand_path('../../../exe/rspec', __FILE__)
++ @path_to_executable ||= File.expand_path('../../../../../bin/rspec', __FILE__)
+ end
+ end
+
diff --git a/debian/patches/series b/debian/patches/series
index fe96332..15d5a5d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,8 +1,4 @@
-disable-autotest-in-tests.patch
-remove-rubygems-stuff-in-tests.patch
-remove-aruba-stuff-in-tests.patch
-fix-commandline-test.patch
-ruby_test_bin.patch
-fix_encoding.patch
-escape-path-in-match.patch
add-vendor-ruby-to-caller-paths.patch
+disable_specs_assuming_they_are_first_caller.patch
+path_to_executable.patch
+skip_coverage.patch
diff --git a/debian/patches/skip_coverage.patch b/debian/patches/skip_coverage.patch
new file mode 100644
index 0000000..852586b
--- /dev/null
+++ b/debian/patches/skip_coverage.patch
@@ -0,0 +1,40 @@
+Description: disable the use of simplecov in tests
+Author: Cédric Boutillier <boutil at debian.org>
+Forwarded: not-needed
+Last-Update: 2015-03-24
+
+--- a/rspec-expectations/spec/spec_helper.rb
++++ b/rspec-expectations/spec/spec_helper.rb
+@@ -1,8 +1,8 @@
+ require 'rspec/support/spec'
+
+-RSpec::Support::Spec.setup_simplecov do
+- minimum_coverage 97
+-end
++#RSpec::Support::Spec.setup_simplecov do
++# minimum_coverage 97
++#end
+
+ Dir['./spec/support/**/*'].each do |f|
+ require f.sub(%r{\./spec/}, '')
+--- a/rspec-mocks/spec/spec_helper.rb
++++ b/rspec-mocks/spec/spec_helper.rb
+@@ -1,9 +1,9 @@
+ require 'rspec/support/spec'
+ require 'rspec/support/ruby_features'
+
+-RSpec::Support::Spec.setup_simplecov do
+- minimum_coverage 95
+-end
++#RSpec::Support::Spec.setup_simplecov do
++# minimum_coverage 95
++#end
+
+ require 'yaml'
+ begin
+--- a/rspec-support/spec/spec_helper.rb
++++ b/rspec-support/spec/spec_helper.rb
+@@ -1,2 +1,2 @@
+ require 'rspec/support/spec'
+-RSpec::Support::Spec.setup_simplecov
++#RSpec::Support::Spec.setup_simplecov
--
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