package init
This commit is contained in:
parent
e29442ab8a
commit
997f55b82a
BIN
fakefs-0.13.1.gem
Normal file
BIN
fakefs-0.13.1.gem
Normal file
Binary file not shown.
BIN
fakefs-0.13.1.tar.gz
Normal file
BIN
fakefs-0.13.1.tar.gz
Normal file
Binary file not shown.
12
rubygem-fakefs-0.13.1-Skip-tests-of-pwrite-and-pwrite.patch
Normal file
12
rubygem-fakefs-0.13.1-Skip-tests-of-pwrite-and-pwrite.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/test/fakefs_test.rb b/test/fakefs_test.rb
|
||||||
|
index 35f454c..ff7c827 100644
|
||||||
|
--- a/test/fakefs_test.rb
|
||||||
|
+++ b/test/fakefs_test.rb
|
||||||
|
@@ -1405,6 +1405,7 @@ class FakeFSTest < Minitest::Test
|
||||||
|
end
|
||||||
|
|
||||||
|
(RealFile.instance_methods - omitted_file_methods).each do |method_name|
|
||||||
|
+ next if [:pwrite, :pread].include? method_name
|
||||||
|
define_method("test_#{method_name}_method_in_file_is_in_fake_fs_file") do
|
||||||
|
assert File.instance_methods.include?(method_name), "#{method_name} method is not available in File :("
|
||||||
|
end
|
||||||
63
rubygem-fakefs.spec
Normal file
63
rubygem-fakefs.spec
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
%global gem_name fakefs
|
||||||
|
|
||||||
|
Name: rubygem-%{gem_name}
|
||||||
|
Version: 0.13.1
|
||||||
|
Release: 1
|
||||||
|
Summary: A fake filesystem. Use it in your tests
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/fakefs/fakefs
|
||||||
|
Source0: https://rubygems.org/gems/fakefs-%{version}.gem
|
||||||
|
Source1: https://github.com/fakefs/fakefs/archive/v%{version}/fakefs-%{version}.tar.gz
|
||||||
|
# Skip test of methods introduced in Ruby 2.5.
|
||||||
|
# https://github.com/fakefs/fakefs/issues/390
|
||||||
|
Patch0: rubygem-fakefs-0.13.1-Skip-tests-of-pwrite-and-pwrite.patch
|
||||||
|
|
||||||
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(rspec) rubygem(minitest)
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
A fake filesystem. Use it in your tests.
|
||||||
|
|
||||||
|
%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
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
gem build ../%{gem_name}-%{version}.gemspec
|
||||||
|
%gem_install
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
|
cp -a .%{gem_dir}/* \
|
||||||
|
%{buildroot}%{gem_dir}/
|
||||||
|
|
||||||
|
%check
|
||||||
|
pushd .%{gem_instdir}
|
||||||
|
ln -s %{_builddir}/{spec,test} .
|
||||||
|
rspec spec
|
||||||
|
popd
|
||||||
|
sed -i '/bundler/ s/^/#/' test/test_helper.rb
|
||||||
|
sed -i '/minitest\/rg/ s/^/#/' test/test_helper.rb
|
||||||
|
ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
||||||
|
|
||||||
|
%files
|
||||||
|
%dir %{gem_instdir}
|
||||||
|
%license %{gem_instdir}/LICENSE
|
||||||
|
%{gem_libdir}
|
||||||
|
%exclude %{gem_cache}
|
||||||
|
%{gem_spec}
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%doc %{gem_docdir}
|
||||||
|
%doc %{gem_instdir}/README.md
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Jul 30 2020 maminjie <maminjie1@huawei.com> - 0.13.1-1
|
||||||
|
- package init
|
||||||
4
rubygem-fakefs.yaml
Normal file
4
rubygem-fakefs.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: fakefs/fakefs
|
||||||
|
tag_prefix: "^v"
|
||||||
|
seperator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user