Merge pull request !1 from 谢政/master
This commit is contained in:
openeuler-ci-bot 2020-09-01 09:56:48 +08:00 committed by Gitee
commit a4d1e1620b
4 changed files with 73 additions and 0 deletions

BIN
rspec-rails-3.8.1.gem Normal file

Binary file not shown.

69
rubygem-rspec-rails.spec Normal file
View File

@ -0,0 +1,69 @@
%global gem_name rspec-rails
%{?_with_bootstrap: %global bootstrap 1}
%global bootstrap 1
Name: rubygem-%{gem_name}
Version: 3.8.1
Release: 1
Summary: RSpec for Rails
License: MIT
URL: https://github.com/rspec/rspec-rails
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://github.com/rspec/%{gem_name}/archive/v%{version}.tar.gz
BuildRequires: ruby(release) rubygems-devel ruby
%if ! 0%{?bootstrap}
BuildRequires: rubygem(actionmailer) rubygem(activerecord) rubygem(ammeter) rubygem(bundler)
BuildRequires: rubygem(railties) rubygem(rspec) rubygem(sqlite3)
%endif
BuildArch: noarch
%description
rspec-rails is a testing framework for Rails 3+.
%package help
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
Provides: %{name}-doc = %{version}-%{release}
Obsoletes: %{name}-doc < %{version}-%{release}
%description help
Documentation for %{name}.
%prep
%setup -q -c -T
ln -s {gem_name}-{version}/spec spec
%gem_install -n %{SOURCE0}
%build
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%if ! 0%{?bootstrap}
%check
pushd .%{gem_instdir}
tar xzvf %{SOURCE1}
echo "gem 'rspec', :require => false" > Gemfile
sed -i '/uninitialized constant RSpec::Support/ s/::Support .*\\)//' spec/sanity_check_spec.rb
sed -i 's/`git ls-files -z`/""/' spec/rspec/rails_spec.rb
rspec -rspec_helper -rbundler spec
popd
%endif
%files
%dir %{gem_instdir}
%exclude %{gem_instdir}/.*
%license %{gem_instdir}/LICENSE.md
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files help
%doc %{gem_docdir}
%doc %{gem_instdir}/Capybara.md
%doc %{gem_instdir}/Changelog.md
%doc %{gem_instdir}/README.md
%changelog
* Wed Aug 19 2020 xiezheng <xiezheng4@huawei.com> - 3.8.1-1
- package init

4
rubygem-rspec-rails.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: rspec/rspec-rails
tag_prefix: "v"
separator: "."

BIN
v3.8.1.tar.gz Normal file

Binary file not shown.