[DRE-commits] [ruby-rspec] 01/02: update rake task fix

Antonio Terceiro terceiro at moszumanska.debian.org
Thu Apr 9 11:34:18 UTC 2015


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

terceiro pushed a commit to branch master
in repository ruby-rspec.

commit 08970065c318e38edf6fa372214e73bb84701bb0
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Thu Apr 9 13:09:43 2015 +0200

    update rake task fix
---
 debian/patches/fix-rake-task.patch | 64 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/debian/patches/fix-rake-task.patch b/debian/patches/fix-rake-task.patch
index 3bf1af3..f4afced 100644
--- a/debian/patches/fix-rake-task.patch
+++ b/debian/patches/fix-rake-task.patch
@@ -16,3 +16,67 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  
        # Default pattern for spec files.
        DEFAULT_PATTERN = 'spec/**{,/*/**}/*_spec.rb'
+@@ -146,7 +146,6 @@ module RSpec
+         cmd_parts = []
+         cmd_parts << RUBY
+         cmd_parts << ruby_opts
+-        cmd_parts << rspec_load_path
+         cmd_parts << escape(rspec_path)
+         cmd_parts << file_inclusion_specification
+         cmd_parts << file_exclusion_specification
+@@ -158,15 +157,6 @@ module RSpec
+         lambda { |s| s.nil? || s == "" }
+       end
+ 
+-      def rspec_load_path
+-        @rspec_load_path ||= begin
+-          core_and_support = $LOAD_PATH.grep(
+-            /#{File::SEPARATOR}rspec-(core|support)[^#{File::SEPARATOR}]*#{File::SEPARATOR}lib/
+-          ).uniq
+-
+-          "-I#{core_and_support.map { |file| escape file }.join(File::PATH_SEPARATOR)}"
+-        end
+-      end
+     end
+   end
+ end
+--- a/rspec-core/spec/rspec/core/rake_task_spec.rb
++++ b/rspec-core/spec/rspec/core/rake_task_spec.rb
+@@ -32,25 +32,23 @@ module RSpec::Core
+       end
+     end
+ 
+-    default_load_path_opts = '-I\S+'
+-
+     context "default" do
+       it "renders rspec" do
+-        expect(spec_command).to match(/^#{ruby} #{default_load_path_opts} '?#{Regexp.escape(task.rspec_path.shellescape)}'?/)
++        expect(spec_command).to match(/^#{ruby} '?#{Regexp.escape(task.rspec_path.shellescape)}'?/)
+       end
+     end
+ 
+     context "with space", :unless => RSpec::Support::OS.windows? do
+       it "renders rspec with space escaped" do
+         task.rspec_path = '/path with space/exe/rspec'
+-        expect(spec_command).to match(/^#{ruby} #{default_load_path_opts} \/path\\ with\\ space\/exe\/rspec/)
++        expect(spec_command).to match(/^#{ruby} \/path\\ with\\ space\/exe\/rspec/)
+       end
+     end
+ 
+     context "with ruby options" do
+       it "renders them before the rspec path" do
+         task.ruby_opts = "-w"
+-        expect(spec_command).to match(/^#{ruby} -w #{default_load_path_opts} '?#{Regexp.escape(task.rspec_path.shellescape)}'?/)
++        expect(spec_command).to match(/^#{ruby} -w '?#{Regexp.escape(task.rspec_path.shellescape)}'?/)
+       end
+     end
+ 
+@@ -218,7 +216,7 @@ module RSpec::Core
+ 
+         expect(spec_command).not_to include_extra_load_path_entries
+       end
+-    end
++    end if false
+ 
+     it "sets the files to run in a consistent order, regardless of the underlying FileList ordering" do
+       task.pattern = 'a/*.rb'

-- 
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