package init

This commit is contained in:
tushenmei 2020-08-28 15:29:37 +08:00
parent 346dabd2e8
commit cd6c105945
5 changed files with 114 additions and 0 deletions

BIN
listen-3.1.5.gem Normal file

Binary file not shown.

View File

@ -0,0 +1,32 @@
From 2908365366792ac3ba010fa32bc3be2beaed451a Mon Sep 17 00:00:00 2001
From: Samuel Williams <samuel.williams@oriontransfer.co.nz>
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) }

78
rubygem-listen.spec Normal file
View File

@ -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 <tushenmei@huawei.com> - 3.1.5-1
- package init

4
rubygem-listen.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: guard/listen
tag_prefix: "listen-"
separator: "."

BIN
v3.1.5.tar.gz Normal file

Binary file not shown.