Update to Listen 3.1.5.

epel9
Vít Ondruch 9 years ago
parent a324ba38d1
commit 7e3c9692bc

2
.gitignore vendored

@ -6,3 +6,5 @@
/rubygem-listen-3.0.3-tests.tgz
/listen-3.0.6.gem
/rubygem-listen-3.0.6-tests.tgz
/listen-3.1.5.gem
/rubygem-listen-3.1.5-tests.tgz

@ -1,27 +0,0 @@
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,25 +2,22 @@
%global gem_name listen
Name: rubygem-%{gem_name}
Version: 3.0.6
Version: 3.1.5
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.6
# tar czvf rubygem-listen-3.0.6-tests.tgz spec
# 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
# 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)
BuildArch: noarch
%description
@ -44,10 +41,14 @@ Documentation for %{name}.
# 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
sed -i '/^.*<rb-fsevent>.*$/ s/^/#/' .%{gem_spec}
sed -i '/def self.usable?$/a return false' .%{gem_libdir}/listen/adapter/darwin.rb
# Remove ruby_dep dependency. We don't need to warn about Ruby versions.
sed -i '/^.*<ruby_dep>.*$/ s/^/#/' .%{gem_spec}
sed -i '/ruby_dep/ s/^/#/' .%{gem_libdir}/listen.rb
sed -i '/RubyDep/ s/^/#/' .%{gem_libdir}/listen.rb
%build
@ -64,22 +65,22 @@ cp -pa .%{_bindir}/* \
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
%check
pushd .%{gem_instdir}
# Move the tests into place
tar xzvf %{SOURCE1} -C .%{gem_instdir}
tar xzvf %{SOURCE1}
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
mv spec/lib/listen/adapter/darwin_spec.rb{,.disabled}
rspec -rspec_helper spec
popd
%files
%dir %{gem_instdir}
%{_bindir}/listen
%{gem_instdir}/bin
%license %{gem_instdir}/LICENSE.txt
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
@ -87,10 +88,13 @@ popd
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/README.md
%doc %{gem_instdir}/CONTRIBUTING.md
%doc %{gem_instdir}/README.md
%changelog
* Fri Jul 29 2016 Vít Ondruch <vondruch@redhat.com> - 3.1.5-1
- Update to Listen 3.1.5.
* 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).

@ -1,2 +1,2 @@
82be5ac1e94cac152c9c7d0a53b62023 listen-3.0.6.gem
47a84854ad0df71c11c1e792c4cfef61 rubygem-listen-3.0.6-tests.tgz
526af08cfe7d65d44a8680fd5d89d97e listen-3.1.5.gem
062926e3343312d89c20e6955f54f135 rubygem-listen-3.1.5-tests.tgz

Loading…
Cancel
Save