diff --git a/rubygem-listen-3.1.5-Fix-issue-with-2.6.patch b/rubygem-listen-3.1.5-Fix-issue-with-2.6.patch new file mode 100644 index 0000000..ed5228d --- /dev/null +++ b/rubygem-listen-3.1.5-Fix-issue-with-2.6.patch @@ -0,0 +1,32 @@ +From 2908365366792ac3ba010fa32bc3be2beaed451a Mon Sep 17 00:00:00 2001 +From: Samuel Williams +Date: Sun, 16 Dec 2018 11:32:45 +1300 +Subject: [PATCH] Use raw Pathname to fix Linux specs. + +--- + spec/lib/listen/adapter/linux_spec.rb | 12 +----------- + 1 file changed, 1 insertions(+), 11 deletions(-) + +diff --git a/spec/lib/listen/adapter/linux_spec.rb b/spec/lib/listen/adapter/linux_spec.rb +index d77f0c0..da48319 100644 +--- a/spec/lib/listen/adapter/linux_spec.rb ++++ b/spec/lib/listen/adapter/linux_spec.rb +@@ -10,17 +10,7 @@ + end + + if linux? +- let(:dir1) do +- instance_double( +- Pathname, +- 'dir1', +- to_s: '/foo/dir1', +- cleanpath: real_dir1 +- ) +- end +- +- # just so cleanpath works in above double +- let(:real_dir1) { instance_double(Pathname, 'dir1', to_s: '/foo/dir1') } ++ let(:dir1) {Pathname.new("/foo/dir1")} + + let(:config) { instance_double(Listen::Adapter::Config) } + let(:queue) { instance_double(Queue) } diff --git a/rubygem-listen.spec b/rubygem-listen.spec index 6b06115..0b75d27 100644 --- a/rubygem-listen.spec +++ b/rubygem-listen.spec @@ -11,6 +11,10 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone https://github.com/guard/listen.git && cd listen # git checkout v3.1.5 && tar czvf rubygem-listen-3.1.5-tests.tgz spec Source1: rubygem-listen-%{version}-tests.tgz +# Fix test suite on Ruby 2.6. +# https://github.com/guard/listen/commit/466594233b9ee4377cc9f3a845ab8c60b33134a8 +# https://github.com/guard/listen/commit/2908365366792ac3ba010fa32bc3be2beaed451a +Patch0: rubygem-listen-3.1.5-Fix-issue-with-2.6.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby @@ -35,6 +39,10 @@ Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -b 1 +pushd %{_builddir} +%patch0 -p1 +popd + # Remove the hardcoded dependencies. We don't have them in Fedora # (except rb-inotify), they are platform specifis and not needed. # https://github.com/guard/listen/pull/54 @@ -96,6 +104,7 @@ popd %changelog * Mon Jan 28 2019 Vít Ondruch - 3.1.5-6 +- Fix test suite on Ruby 2.6. - .spec file refresh. * Sat Jul 14 2018 Fedora Release Engineering - 3.1.5-5