import rubygem-listen-3.7.1-2.el9

i9 changed/i9/rubygem-listen-3.7.1-2.el9
Arkady L. Shane 1 year ago
commit e21253e3f1
Signed by: tigro
GPG Key ID: 9C7900103E1C4F8B

Binary file not shown.

@ -0,0 +1,239 @@
From 2947373cd6325b273e3206b63d16ddbfc1118ecf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 3 Nov 2022 17:28:43 +0100
Subject: [PATCH] Fix kwargs matching with rspec-mock 3.12 and Ruby 3+
The test seems to be broken by:
https://github.com/rspec/rspec-mocks/pull/1461
---
spec/lib/listen/adapter/base_spec.rb | 2 +-
spec/lib/listen/adapter/linux_spec.rb | 6 ++++--
spec/lib/listen/adapter/polling_spec.rb | 2 +-
spec/lib/listen/directory_spec.rb | 12 ++++++------
spec/lib/listen/listener_spec.rb | 20 ++++++++++----------
spec/lib/listen/silencer/controller_spec.rb | 12 ++++++------
6 files changed, 28 insertions(+), 26 deletions(-)
diff --git a/spec/lib/listen/adapter/base_spec.rb b/spec/lib/listen/adapter/base_spec.rb
index 6cf0cad..2b53127 100644
--- a/spec/lib/listen/adapter/base_spec.rb
+++ b/spec/lib/listen/adapter/base_spec.rb
@@ -91,7 +91,7 @@ RSpec.describe Listen::Adapter::Base do
it 'passes invalidates the snapshot based on the event' do
subject.start
- expect(snapshot).to receive(:invalidate).with(:file, 'bar', cookie: 3)
+ expect(snapshot).to receive(:invalidate).with(:file, 'bar', { cookie: 3 })
event = { dir: '/foo/dir1', file: 'bar', type: :moved, cookie: 3 }
subject.fake_event(event)
diff --git a/spec/lib/listen/adapter/linux_spec.rb b/spec/lib/listen/adapter/linux_spec.rb
index e55bbf6..14f5d48 100644
--- a/spec/lib/listen/adapter/linux_spec.rb
+++ b/spec/lib/listen/adapter/linux_spec.rb
@@ -112,8 +112,10 @@ RSpec.describe Listen::Adapter::Linux do
expect(snapshot).to receive(:invalidate).with(
:file,
'path/foo.txt',
- cookie: 123,
- change: change
+ {
+ cookie: 123,
+ change: change
+ }
)
end
end
diff --git a/spec/lib/listen/adapter/polling_spec.rb b/spec/lib/listen/adapter/polling_spec.rb
index 925db74..fae546f 100644
--- a/spec/lib/listen/adapter/polling_spec.rb
+++ b/spec/lib/listen/adapter/polling_spec.rb
@@ -56,7 +56,7 @@ RSpec.describe Adapter::Polling do
it 'notifies change on every listener directories path' do
expect(snapshot).to receive(:invalidate).
- with(:dir, '.', recursive: true)
+ with(:dir, '.', { recursive: true })
t = Thread.new { subject.start }
sleep 0.25
diff --git a/spec/lib/listen/directory_spec.rb b/spec/lib/listen/directory_spec.rb
index 43ea522..3340067 100644
--- a/spec/lib/listen/directory_spec.rb
+++ b/spec/lib/listen/directory_spec.rb
@@ -76,7 +76,7 @@ RSpec.describe Directory do
expect(snapshot).to receive(:invalidate).with(:file, 'file.rb', {})
expect(snapshot).to receive(:invalidate).
- with(:dir, 'subdir', recursive: false)
+ with(:dir, 'subdir', { recursive: false })
described_class.scan(snapshot, '.', options)
end
@@ -91,7 +91,7 @@ RSpec.describe Directory do
it 'notices subdir does not exist' do
expect(snapshot).to receive(:invalidate).
- with(:dir, 'subdir', recursive: false)
+ with(:dir, 'subdir', { recursive: false })
described_class.scan(snapshot, '.', options)
end
@@ -219,7 +219,7 @@ RSpec.describe Directory do
expect(snapshot).to receive(:invalidate).with(:file, 'file.rb', {})
expect(snapshot).to receive(:invalidate).
- with(:dir, 'subdir', recursive: true)
+ with(:dir, 'subdir', { recursive: true })
described_class.scan(snapshot, '.', options)
end
@@ -240,10 +240,10 @@ RSpec.describe Directory do
expect(snapshot).to receive(:invalidate).with(:file, 'file.rb', {})
expect(snapshot).to receive(:invalidate).
- with(:dir, 'subdir', recursive: true)
+ with(:dir, 'subdir', { recursive: true })
expect(snapshot).to receive(:invalidate).
- with(:dir, 'subdir2', recursive: true)
+ with(:dir, 'subdir2', { recursive: true })
described_class.scan(snapshot, '.', options)
end
@@ -274,7 +274,7 @@ RSpec.describe Directory do
it 'snapshots changes for subdir' do
expect(snapshot).to receive(:invalidate).
- with(:dir, 'subdir', recursive: true)
+ with(:dir, 'subdir', { recursive: true })
described_class.scan(snapshot, '.', options)
end
diff --git a/spec/lib/listen/listener_spec.rb b/spec/lib/listen/listener_spec.rb
index 9b67e27..8dd9a7a 100644
--- a/spec/lib/listen/listener_spec.rb
+++ b/spec/lib/listen/listener_spec.rb
@@ -245,12 +245,12 @@ RSpec.describe Listener do
let(:options) { { ignore: /bar/ } }
it 'adds up to existing ignore options' do
- expect(silencer).to receive(:configure).once.with(ignore: [/bar/])
+ expect(silencer).to receive(:configure).once.with({ ignore: [/bar/] })
subject
expect(silencer).to receive(:configure).once.
- with(ignore: [/bar/, /foo/])
+ with({ ignore: [/bar/, /foo/] })
subject.ignore(/foo/)
end
@@ -260,12 +260,12 @@ RSpec.describe Listener do
let(:options) { { ignore: [/bar/] } }
it 'adds up to existing ignore options' do
- expect(silencer).to receive(:configure).once.with(ignore: [/bar/])
+ expect(silencer).to receive(:configure).once.with({ ignore: [/bar/] })
subject
expect(silencer).to receive(:configure).once.
- with(ignore: [/bar/, /foo/])
+ with({ ignore: [/bar/, /foo/] })
subject.ignore(/foo/)
end
@@ -287,9 +287,9 @@ RSpec.describe Listener do
let(:options) { { ignore!: /bar/ } }
it 'overwrites existing ignore options' do
- expect(silencer).to receive(:configure).once.with(ignore!: [/bar/])
+ expect(silencer).to receive(:configure).once.with({ ignore!: [/bar/] })
subject
- expect(silencer).to receive(:configure).once.with(ignore!: [/foo/])
+ expect(silencer).to receive(:configure).once.with({ ignore!: [/foo/] })
subject.ignore!([/foo/])
end
end
@@ -298,9 +298,9 @@ RSpec.describe Listener do
let(:options) { { ignore: /bar/ } }
it 'deletes ignore options' do
- expect(silencer).to receive(:configure).once.with(ignore: [/bar/])
+ expect(silencer).to receive(:configure).once.with({ ignore: [/bar/] })
subject
- expect(silencer).to receive(:configure).once.with(ignore!: [/foo/])
+ expect(silencer).to receive(:configure).once.with({ ignore!: [/foo/] })
subject.ignore!([/foo/])
end
end
@@ -311,9 +311,9 @@ RSpec.describe Listener do
let(:options) { { only: /bar/ } }
it 'overwrites existing ignore options' do
- expect(silencer).to receive(:configure).once.with(only: [/bar/])
+ expect(silencer).to receive(:configure).once.with({ only: [/bar/] })
subject
- expect(silencer).to receive(:configure).once.with(only: [/foo/])
+ expect(silencer).to receive(:configure).once.with({ only: [/foo/] })
subject.only([/foo/])
end
end
diff --git a/spec/lib/listen/silencer/controller_spec.rb b/spec/lib/listen/silencer/controller_spec.rb
index 984630c..5393a34 100644
--- a/spec/lib/listen/silencer/controller_spec.rb
+++ b/spec/lib/listen/silencer/controller_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe Listen::Silencer::Controller do
context 'when providing a single regexp as argument' do
it 'sets the given :ignore rules as array' do
subject
- allow(silencer).to receive(:configure).with(ignore: [/foo/])
+ allow(silencer).to receive(:configure).with({ ignore: [/foo/] })
subject.append_ignores(/foo/)
end
end
@@ -34,7 +34,7 @@ RSpec.describe Listen::Silencer::Controller do
context 'when providing multiple arguments' do
it 'sets the given :ignore rules as a flat array' do
subject
- allow(silencer).to receive(:configure).with(ignore: [/foo/, /bar/])
+ allow(silencer).to receive(:configure).with({ ignore: [/foo/, /bar/] })
subject.append_ignores(/foo/, /bar/)
end
end
@@ -42,7 +42,7 @@ RSpec.describe Listen::Silencer::Controller do
context 'when providing as array' do
it 'sets the given :ignore rules' do
subject
- allow(silencer).to receive(:configure).with(ignore: [/foo/, /bar/])
+ allow(silencer).to receive(:configure).with({ ignore: [/foo/, /bar/] })
subject.append_ignores([/foo/, /bar/])
end
end
@@ -50,18 +50,18 @@ RSpec.describe Listen::Silencer::Controller do
context 'with previous :ignore rules' do
subject do
- described_class.new(silencer, ignore: [/foo/, /bar/])
+ described_class.new(silencer, { ignore: [/foo/, /bar/] })
end
before do
- allow(silencer).to receive(:configure).with(ignore: [/foo/, /bar/])
+ allow(silencer).to receive(:configure).with({ ignore: [/foo/, /bar/] })
end
context 'when providing a nil' do
# TODO: should this invocation maybe reset the rules?
it 'reconfigures with existing :ignore rules' do
subject
- allow(silencer).to receive(:configure).with(ignore: [/foo/, /bar/])
+ allow(silencer).to receive(:configure).with({ ignore: [/foo/, /bar/] })
subject.append_ignores(nil)
end
end
--
2.38.1

@ -0,0 +1,211 @@
# Generated from listen-0.4.7.gem by gem2rpm -*- rpm-spec -*-
%global gem_name listen
Name: rubygem-%{gem_name}
Version: 3.7.1
Release: 2%{?dist}
Summary: Listen to file modifications
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 --no-checkout
# cd listen && git archive -v -o rubygem-listen-3.7.1-spec.txz v3.7.1 spec
Source1: rubygem-listen-%{version}-spec.txz
# Fix kwargs matching compatibility with RSpec 3.12+.
# https://github.com/guard/listen/pull/564
Patch0: rubygem-listen-3.7.1-Fix-kwargs-matching-with-rspec-mock-3.12-and-Ruby-3.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: rubygem(rb-inotify)
BuildRequires: rubygem(thor)
BuildRequires: rubygem(rspec)
BuildArch: noarch
%description
The Listen gem listens to file modifications and notifies you about the
changes. Works everywhere!
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
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 specific and not needed.
# https://github.com/guard/listen/pull/54
%gemspec_remove_dep -g rb-fsevent [">= 0.10.3", "~> 0.10"]
sed -i '/def self.usable?$/a return false' lib/listen/adapter/darwin.rb
%build
# Create the gem as gem install only works on a gem file
gem build ../%{gem_name}-%{version}.gemspec
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
%check
pushd .%{gem_instdir}
# Move the tests into place
ln -s %{_builddir}/spec spec
# We removed dependencies from other platforms so let's remove
# tests as well
mv spec/lib/listen/adapter/darwin_spec.rb{,.disabled}
rspec -rspec_helper spec
popd
%files
%dir %{gem_instdir}
%{_bindir}/listen
%license %{gem_instdir}/LICENSE.txt
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/CONTRIBUTING.md
%doc %{gem_instdir}/README.md
%changelog
* Thu Sep 21 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 3.7.1-2
- Rebuilt for MSVSphere 9.2
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Nov 03 2022 Vít Ondruch <vondruch@redhat.com> - 3.7.1-1
- Update to Listen 3.7.1.
Resolves: rhbz#2040523
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Nov 01 2021 Pavel Valena <pvalena@redhat.com> - 3.7.0-1
- Update to listen 3.7.0.
Resolves: rhbz#1984206
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-2
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Apr 02 2021 Pavel Valena <pvalena@redhat.com> - 3.5.1-1
- Update to listen 3.5.1.
Resolves: rhbz#1942074
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Jan 16 2021 Pavel Valena <pvalena@redhat.com> - 3.4.1-1
- Update to listen 3.4.1.
Resolves: rhbz#1916416
* Tue Jan 05 2021 Pavel Valena <pavel.valena@email.com> - 3.4.0-1
- Update to listen 3.4.0.
Resolves: rhbz#1902562
* Thu Nov 12 23:05:28 CET 2020 Pavel Valena <pvalena@redhat.com> - 3.3.0-1
- Update to listen 3.3.0.
Resolves: rhbz#1896227
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Feb 12 2020 Pavel Valena <pvalena@redhat.com> - 3.2.1-1
- Update to listen 3.2.1.
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 12 2019 Pavel Valena <pvalena@redhat.com> - 3.2.0-1
- Update to listen 3.2.0.
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 28 2019 Vít Ondruch <vondruch@redhat.com> - 3.1.5-6
- Fix test suite on Ruby 2.6.
- .spec file refresh.
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* 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).
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Aug 18 2015 Josef Stribny <jstribny@redhat.com> - 3.0.3-1
- Update to 3.0.3
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Oct 07 2014 Josef Stribny <jstribny@redhat.com> - 2.7.11-1
- Update to listen 2.7.11
* Mon Sep 01 2014 Josef Stribny <jstribny@redhat.com> - 2.7.9-1
- Update to listen 2.7.9.
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Mar 07 2013 Vít Ondruch <vondruch@redhat.com> - 0.4.7-3
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Jul 24 2012 Vít Ondruch <vondruch@redhat.com> - 0.4.7-1
- Initial package
Loading…
Cancel
Save