- Update to 3.0.6.

- Fix test suite for Ruby 2.3 compatibility (rhbz#1308046).
epel9
Jun Aruga 9 years ago
parent 07cbe3d4cd
commit a324ba38d1

2
.gitignore vendored

@ -4,3 +4,5 @@
/listen-2.7.11.gem
/listen-3.0.3.gem
/rubygem-listen-3.0.3-tests.tgz
/listen-3.0.6.gem
/rubygem-listen-3.0.6-tests.tgz

@ -1,25 +0,0 @@
diff --git a/listen-3.0.3.gemspec b/listen-3.0.3.gemspec
index 93d3c61..e29ee73 100644
--- a/specifications/listen-3.0.3.gemspec
+++ b/specifications/listen-3.0.3.gemspec
@@ -25,17 +25,11 @@ Gem::Specification.new do |s|
s.specification_version = 4
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<rb-fsevent>, [">= 0.9.3"])
- s.add_runtime_dependency(%q<rb-inotify>, [">= 0.9"])
s.add_development_dependency(%q<bundler>, [">= 1.3.5"])
else
- s.add_dependency(%q<rb-fsevent>, [">= 0.9.3"])
- s.add_dependency(%q<rb-inotify>, [">= 0.9"])
s.add_dependency(%q<bundler>, [">= 1.3.5"])
end
else
- s.add_dependency(%q<rb-fsevent>, [">= 0.9.3"])
- s.add_dependency(%q<rb-inotify>, [">= 0.9"])
s.add_dependency(%q<bundler>, [">= 1.3.5"])
end
end
--
2.5.0

@ -0,0 +1,27 @@
From 7b2c935c1156568eb5bca0dc2a3ff2f0ae6c7f9e Mon Sep 17 00:00:00 2001
From: Thiago Ribeiro <thiagitosouza@gmail.com>
Date: Thu, 3 Mar 2016 09:26:17 -0300
Subject: [PATCH] Fix listener_spec when running with ruby2.3
- This commit closes #367
---
spec/lib/listen/listener_spec.rb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/spec/lib/listen/listener_spec.rb b/spec/lib/listen/listener_spec.rb
index ac60358..0fdace4 100644
--- a/spec/lib/listen/listener_spec.rb
+++ b/spec/lib/listen/listener_spec.rb
@@ -86,7 +86,11 @@
context 'with a block' do
let(:myblock) { instance_double(Proc) }
let(:block) { proc { myblock.call } }
- subject { described_class.new('dir1', &block) }
+ subject do
+ described_class.new('dir1') do |*args|
+ myblock.call(*args)
+ end
+ end
it 'passes the block to the event processor' do
allow(Event::Config).to receive(:new) do |*_args, &some_block|

@ -2,27 +2,25 @@
%global gem_name listen
Name: rubygem-%{gem_name}
Version: 3.0.3
Release: 2%{?dist}
Version: 3.0.6
Release: 1%{?dist}
Summary: Listen to file modifications
Group: Development/Languages
License: MIT
URL: https://github.com/guard/listen
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/guard/listen.git && cd listen && git checkout v3.0.3
# tar czvf rubygem-listen-3.0.3-tests.tgz spec
# git clone https://github.com/guard/listen.git && cd listen && git checkout v3.0.6
# tar czvf rubygem-listen-3.0.6-tests.tgz spec
Source1: rubygem-listen-%{version}-tests.tgz
# 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
Patch0: listen-%{version}-Remove-hardcoded-platform-specific-dependencies.patch
# Ruby 2.3 tests compatibility
# https://github.com/guard/listen/commit/7b2c935.patch
Patch0: rubygem-listen-3.0.6-fix-test-for-ruby-2.3.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: rubygem(rb-inotify)
BuildRequires: rubygem(thor)
BuildRequires: rubygem(rspec) => 3.0.0rc1
BuildRequires: rubygem(rspec) < 3.1
BuildArch: noarch
%description
@ -43,14 +41,12 @@ Documentation for %{name}.
%setup -q -c -T
%gem_install -n %{SOURCE0}
pushd .%{gem_instdir}
# Patch: Avoid Kernel.require
# https://github.com/guard/listen/issues/340
sed -i -e 's/Kernel.require/require/' ./lib/listen/adapter/linux.rb
popd
pushd .%{gem_dir}
%patch0 -p1
# 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
pushd .%{gem_dir}/specifications
sed -i -e '/^.*<rb-fsevent>.*$/ s/^/#/' ./listen-%{version}.gemspec
sed -i -e '/^.*<rb-inotify>.*$/ s/^/#/' ./listen-%{version}.gemspec
popd
%build
@ -75,6 +71,7 @@ pushd .%{gem_instdir}
# We removed dependencies from other platforms so let's remove
# tests as well
rm spec/lib/listen/adapter/darwin_spec.rb
patch -p1 < %{PATCH0}
rspec -Ilib:spec -rspec_helper spec
popd
@ -82,7 +79,7 @@ popd
%dir %{gem_instdir}
%{_bindir}/listen
%{gem_instdir}/bin
%doc %{gem_instdir}/LICENSE.txt
%license %{gem_instdir}/LICENSE.txt
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
@ -94,6 +91,10 @@ popd
%doc %{gem_instdir}/CONTRIBUTING.md
%changelog
* Wed Apr 20 2016 Jun Aruga <jaruga@redhat.com> - 3.0.6-1
- Update to 3.0.6.
- Fix test suite for Ruby 2.3 compatibility (rhbz#1308046).
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

@ -1,2 +1,2 @@
32cf5b15cfa92293e08906dd43dc4fb4 listen-3.0.3.gem
dffb809f716d7609f46947a1b26e417f rubygem-listen-3.0.3-tests.tgz
82be5ac1e94cac152c9c7d0a53b62023 listen-3.0.6.gem
47a84854ad0df71c11c1e792c4cfef61 rubygem-listen-3.0.6-tests.tgz

Loading…
Cancel
Save