rubygem-rspec-core/rubygem-rspec-core.spec

130 lines
4.4 KiB
RPMSpec
Raw Permalink Normal View History

2020-09-07 11:33:53 +08:00
%bcond_with bootstrap
2023-01-17 14:23:54 +08:00
%global majorver 3.12.0
2020-08-28 12:09:12 +08:00
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
%global fullver %{majorver}%{?preminorver}
%global gem_name rspec-core
%global need_bootstrap_set 0
2020-08-28 12:09:12 +08:00
%undefine __brp_mangle_shebangs
Summary: Rspec-2 runner and formatters
Name: rubygem-%{gem_name}
Version: %{majorver}
Release: 2
2020-08-28 12:09:12 +08:00
License: MIT
URL: http://github.com/rspec/rspec-mocks
Source0: http://rubygems.org/gems/%{gem_name}-%{fullver}.gem
Source1: https://github.com/rspec/%{gem-name}/archive/v%{version}.tar.gz
BuildRequires: rubygems-devel
%if 0%{?need_bootstrap_set} < 1
BuildRequires: rubygem(minitest) rubygem(nokogiri) rubygem(rake) rubygem(rspec)
BuildRequires: rubygem(aruba) rubygem(flexmock) rubygem(mocha) rubygem(coderay)
BuildRequires: rubygem(thread_order) git
BuildRequires: glibc-langpack-en
%endif
Requires: rubygem(rake)
BuildArch: noarch
%description
Behaviour Driven Development for Ruby.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
%description doc
This package contains documentation for %{name}.
%prep
%setup -q -T -n %{gem_name}-%{version} -b 1
gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build
gem build %{gem_name}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{_prefix}
cp -a .%{_prefix}/* %{buildroot}%{_prefix}/
rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts}
2020-09-07 11:33:53 +08:00
%if %{with bootstrap}
2020-08-28 12:09:12 +08:00
%if 0%{?need_bootstrap_set} < 1
%check
LANG=C.UTF-8
FAILFILE=()
FAILTEST=()
FAILFILE+=("spec/rspec/core/formatters/progress_formatter_spec.rb")
FAILTEST+=("produces the expected full output")
FAILFILE+=("spec/rspec/core/formatters/documentation_formatter_spec.rb")
FAILTEST+=("produces the expected full output")
FAILFILE+=("spec/integration/suite_hooks_errors_spec.rb")
FAILTEST+=("nicely formats errors")
FAILFILE+=("spec/integration/spec_file_load_errors_spec.rb")
FAILTEST+=("nicely handles load-time errors")
FAILFILE+=("spec/rspec/core/runner_spec.rb")
FAILTEST+=("if drb server is started with 127.0.0.1")
FAILFILE+=("spec/rspec/core/runner_spec.rb")
FAILTEST+=("if drb server is started with localhost")
FAILFILE+=("spec/rspec/core/bisect/server_spec.rb")
FAILTEST+=("receives suite results")
FAILFILE+=("spec/rspec/core/bisect/server_spec.rb")
FAILTEST+=("aborts as soon as the last expected failure finishes")
FAILFILE+=("spec/rspec/core/bisect/server_spec.rb")
FAILTEST+=("aborts after an expected failure")
FAILFILE+=("spec/integration/bisect_runners_spec.rb")
FAILTEST+=("honors.*run_all_when_everything_filtered")
FAILFILE+=("spec/integration/bisect_runners_spec.rb")
FAILTEST+=("raises BisectFailedError")
FAILFILE+=("spec/integration/bisect_runners_spec.rb")
FAILTEST+=("runs the specs in an isolated environment")
for ((i = 0; i < ${#FAILFILE[@]}; i++)) {
sed -i \
-e "\@${FAILTEST[$i]}@s|do$|, :broken => true do|" \
${FAILFILE[$i]}
}
grep -rl 'in_current_dir' | \
xargs sed -i 's/in_current_dir/cd(".")/'
grep -rl 'clean_current_dir' spec/ | \
xargs sed -i 's/clean_current_dir/setup_aruba/'
sed -i 's/remove_file/remove/' \
spec/integration/order_spec.rb \
%{nil}
sed -i '\@expect.*dirs\.pop@d' \
spec/integration/spec_file_load_errors_spec.rb \
spec/integration/suite_hooks_errors_spec.rb \
%{nil}
sed -i.warn lib/rspec/core/configuration_options.rb \
-e '\@because the HOME environment variable is not set@s|RSpec\.warning|#RSpec.warning|'
ruby -rrubygems -Ilib/ -S exe/rspec || \
ruby -rrubygems -Ilib/ -S exe/rspec --tag ~broken
%endif
mv lib/rspec/core/configuration_options.rb{.warn,}
2020-09-07 11:48:18 +08:00
%endif
2020-08-28 12:09:12 +08:00
%files
%dir %{gem_instdir}
%license %{gem_instdir}/LICENSE.md
%doc %{gem_instdir}/Changelog.md
%doc %{gem_instdir}/README.md
%{_bindir}/rspec
%{gem_instdir}/exe/
%{gem_instdir}/lib/
%exclude %{gem_cache}
%{gem_spec}
%files doc
%{gem_docdir}
%changelog
* Wed Jan 18 2023 Ge Wang <wangge20@h-partners.com> -3.12.0-2
- Restore need_bootstrap_set flag after upgrade
2023-01-17 14:23:54 +08:00
* Mon Jan 09 2023 Ge Wang <wangge20@h-partners.com> - 3.12.0-1
- Upgrade to version 3.12.0
2022-06-29 17:52:28 +08:00
* Wed Jun 29 2022 liyanan <liyanan32@h-partners.com> - 3.10.2-1
- Upgrade to version 3.10.2
2020-09-07 11:33:53 +08:00
* Mon Sep 7 2020 liyanan <liyanan32@huawei.com> - 3.8.2-2
- fix build fail
2020-08-28 17:20:07 +08:00
* Wed Aug 19 2020 huangyangke <huangyangke@huawei.com> - 3.8.2-1
2020-08-28 12:09:12 +08:00
- package init