!4 Upgrade to 2.1.0
From: @lyn1001 Reviewed-by: @caodongxia Signed-off-by: @caodongxia
This commit is contained in:
commit
617c6093e4
BIN
mocha-1.14.0.gem
BIN
mocha-1.14.0.gem
Binary file not shown.
BIN
mocha-2.1.0-test.tar.gz
Normal file
BIN
mocha-2.1.0-test.tar.gz
Normal file
Binary file not shown.
BIN
mocha-2.1.0.gem
Normal file
BIN
mocha-2.1.0.gem
Normal file
Binary file not shown.
@ -1,14 +1,19 @@
|
|||||||
%global gem_name mocha
|
%global gem_name mocha
|
||||||
Summary: Mocking and stubbing library
|
Summary: Mocking and stubbing library
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 1.14.0
|
Version: 2.1.0
|
||||||
Release: 1
|
Release: 1
|
||||||
License: MIT or Ruby or BSD
|
License: MIT or Ruby or BSD
|
||||||
URL: https://github.com/freerange/mocha
|
URL: https://github.com/freerange/mocha
|
||||||
Source0: http://rubygems.org/gems/mocha-%{version}.gem
|
Source0: http://rubygems.org/gems/mocha-%{version}.gem
|
||||||
BuildRequires: ruby(release) rubygems-devel ruby rubygem(metaclass) rubygem(introspection)
|
# git clone https://github.com/freerange/mocha.git && cd mocha
|
||||||
BuildRequires: rubygem(minitest)
|
# git archive -v -o mocha-2.1.0-test.tar.gz v2.1.0 test/
|
||||||
|
Source1: %{gem_name}-%{version}-test.tar.gz
|
||||||
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(introspection)
|
||||||
|
BuildRequires: rubygem(minitest) rubygem(did_you_mean) rubygem(test-unit)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%global __requires_exclude ruby2_keywords
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Mocking and stubbing library with JMock/SchMock syntax, which allows mocking
|
Mocking and stubbing library with JMock/SchMock syntax, which allows mocking
|
||||||
and stubbing of methods on real (non-mock) classes.
|
and stubbing of methods on real (non-mock) classes.
|
||||||
@ -21,46 +26,53 @@ BuildArch: noarch
|
|||||||
This package contains documentation for %{name}.
|
This package contains documentation for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c -T
|
%setup -q -n %{gem_name}-%{version} -b 1
|
||||||
%gem_install -n %{SOURCE0}
|
|
||||||
pushd .%{gem_instdir}
|
|
||||||
popd
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
gem build ../%{gem_name}-%{version}.gemspec
|
||||||
|
%gem_install
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{gem_dir}
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
cp -pa .%{gem_dir}/* \
|
cp -a .%{gem_dir}/* \
|
||||||
%{buildroot}%{gem_dir}/
|
%{buildroot}%{gem_dir}/
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pushd .%{gem_instdir}
|
pushd .%{gem_instdir}
|
||||||
ruby -e "Dir.glob('./test/{unit,acceptance}/**/*_test.rb').each {|t| require t}"
|
ln -s %{_builddir}/test .
|
||||||
ruby -e "Dir.glob('./test/integration/**/*_test.rb').each {|t| require t}"
|
|
||||||
|
# Each part of test suite must be run separately, otherwise the test suite fails.
|
||||||
|
# https://github.com/freerange/mocha/issues/121
|
||||||
|
for kind in unit acceptance; do
|
||||||
|
ruby -e "Dir.glob('./test/$kind/**/*_test.rb').each {|t| require t}"
|
||||||
|
done
|
||||||
|
|
||||||
|
MOCHA_RUN_INTEGRATION_TESTS=minitest ruby -rminitest -e "Dir.glob('./test/integration/**/mini_test_test.rb').each {|t| require t}"
|
||||||
|
MOCHA_RUN_INTEGRATION_TESTS=test-unit ruby -rtest/unit -e "Dir.glob('./test/integration/**/test_unit_test.rb').each {|t| require t}"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%exclude %{gem_instdir}/.*
|
%exclude %{gem_instdir}/.*
|
||||||
%exclude %{gem_instdir}/init.rb
|
%license %{gem_instdir}/COPYING.md
|
||||||
%doc %{gem_instdir}/COPYING.md
|
%license %{gem_instdir}/MIT-LICENSE.md
|
||||||
%doc %{gem_instdir}/README.md
|
|
||||||
%doc %{gem_instdir}/MIT-LICENSE.md
|
|
||||||
%doc %{gem_instdir}/RELEASE.md
|
|
||||||
%dir %{gem_instdir}
|
|
||||||
%{gem_libdir}
|
%{gem_libdir}
|
||||||
%exclude %{gem_cache}
|
%exclude %{gem_cache}
|
||||||
%{gem_spec}
|
%{gem_spec}
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%{gem_instdir}/Gemfile*
|
|
||||||
%doc %{gem_docdir}
|
%doc %{gem_docdir}
|
||||||
%doc %{gem_instdir}/CONTRIBUTING.md
|
%doc %{gem_instdir}/CONTRIBUTING.md
|
||||||
|
%{gem_instdir}/Gemfile
|
||||||
|
%doc %{gem_instdir}/README.md
|
||||||
|
%doc %{gem_instdir}/RELEASE.md
|
||||||
%{gem_instdir}/Rakefile
|
%{gem_instdir}/Rakefile
|
||||||
%{gem_instdir}/mocha.gemspec
|
%{gem_instdir}/mocha.gemspec
|
||||||
%{gem_instdir}/gemfiles/
|
%{gem_instdir}/gemfiles/
|
||||||
%{gem_instdir}/yard-templates/
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 24 2024 liyanan <liyanan61@h-partners.com> - 2.1.0-1
|
||||||
|
- Upgrade to 2.1.0
|
||||||
|
|
||||||
* Fri Jul 01 2022 xu_ping <xuping33@h-partners.com> - 1.14.0-1
|
* Fri Jul 01 2022 xu_ping <xuping33@h-partners.com> - 1.14.0-1
|
||||||
- Upgrade 1.14.0
|
- Upgrade 1.14.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user