!3 [sync] PR-2: 修复单包构建问题

From: @openeuler-sync-bot 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2022-02-11 04:55:53 +00:00 committed by Gitee
commit a5227cb7c0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 7 additions and 19 deletions

Binary file not shown.

BIN
fakefs-1.2.2-tests.tar.gz Normal file

Binary file not shown.

BIN
fakefs-1.2.2.gem Normal file

Binary file not shown.

View File

@ -1,12 +0,0 @@
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

View File

@ -1,16 +1,15 @@
%global gem_name fakefs %global gem_name fakefs
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: 0.13.1 Version: 1.2.2
Release: 1 Release: 1
Summary: A fake filesystem. Use it in your tests Summary: A fake filesystem. Use it in your tests
License: MIT License: MIT
URL: https://github.com/fakefs/fakefs URL: https://github.com/fakefs/fakefs
Source0: https://rubygems.org/gems/fakefs-%{version}.gem Source0: https://rubygems.org/gems/fakefs-%{version}.gem
Source1: https://github.com/fakefs/fakefs/archive/v%{version}/fakefs-%{version}.tar.gz Source1: https://github.com/fakefs/fakefs/archive/v%{version}/fakefs-%{version}-tests.tar.gz
# Skip test of methods introduced in Ruby 2.5. # Skip test of methods introduced in Ruby 2.5.
# https://github.com/fakefs/fakefs/issues/390 # 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) BuildRequires: ruby(release) rubygems-devel ruby rubygem(rspec) rubygem(minitest)
BuildArch: noarch BuildArch: noarch
@ -27,7 +26,6 @@ Documentation for %{name}.
%prep %prep
%setup -q -n %{gem_name}-%{version} -b 1 %setup -q -n %{gem_name}-%{version} -b 1
%patch0 -p1
%build %build
gem build ../%{gem_name}-%{version}.gemspec gem build ../%{gem_name}-%{version}.gemspec
@ -42,10 +40,10 @@ cp -a .%{gem_dir}/* \
pushd .%{gem_instdir} pushd .%{gem_instdir}
ln -s %{_builddir}/{spec,test} . ln -s %{_builddir}/{spec,test} .
rspec spec rspec spec
popd
sed -i '/bundler/ s/^/#/' test/test_helper.rb sed -i '/bundler/ s/^/#/' test/test_helper.rb
sed -i '/minitest\/rg/ s/^/#/' test/test_helper.rb sed -i '/maxitest\/autorun/ s/^/#/' test/test_helper.rb
ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' LC_ALL=C.UTF-8 ruby -Ilib -rminitest/autorun -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
popd
%files %files
%dir %{gem_instdir} %dir %{gem_instdir}
@ -59,5 +57,7 @@ ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
%doc %{gem_instdir}/README.md %doc %{gem_instdir}/README.md
%changelog %changelog
* Thu Feb 10 2022 zhangtao <zhangtao221@huawei.com> - 1.2.2-1
- package update to 1.2.2
* Thu Jul 30 2020 maminjie <maminjie1@huawei.com> - 0.13.1-1 * Thu Jul 30 2020 maminjie <maminjie1@huawei.com> - 0.13.1-1
- package init - package init