diff --git a/listen-3.1.5.gem b/listen-3.1.5.gem new file mode 100644 index 0000000..3508492 Binary files /dev/null and b/listen-3.1.5.gem differ 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 new file mode 100644 index 0000000..57ce30b --- /dev/null +++ b/rubygem-listen.spec @@ -0,0 +1,78 @@ +%global gem_name listen +Name: rubygem-%{gem_name} +Version: 3.1.5 +Release: 1 +Summary: Listen to file modifications +License: MIT +URL: https://github.com/guard/listen +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +Source1: https://github.com/guard/%{gem_name}/archive/v%{version}.tar.gz +# 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) rubygems-devel ruby rubygem(rb-inotify) 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} +ln -s %{_builddir}/%{gem_name}-%{version}/spec spec +%patch0 -p1 +popd +%gemspec_remove_dep -g rb-fsevent [">= 0.9.4", "~> 0.9"] +sed -i '/def self.usable?$/a return false' lib/listen/adapter/darwin.rb +%gemspec_remove_dep -g ruby_dep "~> 1.2" +sed -i '/ruby_dep/ s/^/#/' lib/listen.rb +sed -i '/RubyDep/ s/^/#/' lib/listen.rb + +%build +gem build ../%{gem_name}-%{version}.gemspec +%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} +ln -s %{_builddir}/%{gem_name}-%{version}/spec spec +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 +* Mon Aug 24 2020 tushenmei - 3.1.5-1 +- package init diff --git a/rubygem-listen.yaml b/rubygem-listen.yaml new file mode 100644 index 0000000..6c1d202 --- /dev/null +++ b/rubygem-listen.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: guard/listen +tag_prefix: "listen-" +separator: "." diff --git a/v3.1.5.tar.gz b/v3.1.5.tar.gz new file mode 100644 index 0000000..a777664 Binary files /dev/null and b/v3.1.5.tar.gz differ