2020-08-21 10:02:51 +08:00
|
|
|
%global gem_name shoulda
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 3.6.0
|
2022-06-29 18:17:23 +08:00
|
|
|
Release: 3
|
2020-08-21 10:02:51 +08:00
|
|
|
Summary: Making tests easy on the fingers and eyes
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/thoughtbot/shoulda
|
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(jbuilder) rubygem(minitest-reporters)
|
|
|
|
|
BuildRequires: rubygem(rails) rubygem(shoulda-context) rubygem(shoulda-matchers)
|
2020-08-27 09:14:28 +08:00
|
|
|
BuildRequires: rubygem(sqlite3) rubygem(did_you_mean)
|
2020-08-21 10:02:51 +08:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%description
|
|
|
|
|
Making tests easy on the fingers and eyes.
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description doc
|
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{gem_name}-%{version}
|
2022-06-29 18:17:23 +08:00
|
|
|
%gemspec_remove_dep -g shoulda-matchers '~> 3.0'
|
|
|
|
|
%gemspec_add_dep -g shoulda-matchers ['>= 3.0', '< 5']
|
2020-08-21 10:02:51 +08:00
|
|
|
|
|
|
|
|
%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 -sf %{_builddir}/%{gem_name}-%{version}.gemspec %{gem_name}.gemspec
|
|
|
|
|
cat << GF > Gemfile
|
|
|
|
|
source 'https://rubygems.org'
|
|
|
|
|
gem 'rails'
|
|
|
|
|
GF
|
|
|
|
|
sed -i "/require 'pry/ s/^/#/" test/test_helper.rb
|
|
|
|
|
sed -i "/current_bundle/ s/^/#/" test/acceptance_test_helper.rb
|
|
|
|
|
sed -i "/assert_appraisal/ s/^/#/" test/acceptance_test_helper.rb
|
2020-08-27 09:14:28 +08:00
|
|
|
sed -i '/rails new/ s/"$/ --skip-bootsnap --skip-listen --skip-puma --skip-spring --skip-sprockets --skip-javascript"/' \
|
2020-08-21 10:02:51 +08:00
|
|
|
test/support/acceptance/helpers/step_helpers.rb
|
|
|
|
|
sed -i "/updating_bundle do |bundle|/a \\
|
|
|
|
|
bundle.remove_gem 'capybara'" test/support/acceptance/helpers/step_helpers.rb
|
|
|
|
|
sed -i "/updating_bundle do |bundle|/a \\
|
|
|
|
|
bundle.remove_gem 'selenium-webdriver'" test/support/acceptance/helpers/step_helpers.rb
|
|
|
|
|
sed -i "/updating_bundle do |bundle|/a \\
|
2020-08-27 09:14:28 +08:00
|
|
|
bundle.remove_gem 'rack-mini-profiler'" test/support/acceptance/helpers/step_helpers.rb
|
|
|
|
|
sed -i "/updating_bundle do |bundle|/a \\
|
|
|
|
|
bundle.remove_gem 'webdrivers'" test/support/acceptance/helpers/step_helpers.rb
|
2020-08-21 10:02:51 +08:00
|
|
|
sed -i '/ActiveRecord::Migration/ s/$/["5.2"]/' \
|
|
|
|
|
test/acceptance/rails_integration_test.rb
|
|
|
|
|
sed -i 's/render nothing: true/head :ok/' \
|
|
|
|
|
test/acceptance/rails_integration_test.rb
|
|
|
|
|
sed -i "/create_rails_application/a \\
|
|
|
|
|
add_minitest_to_project" test/acceptance/rails_integration_test.rb
|
|
|
|
|
ruby -rpathname -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%exclude %{gem_instdir}/.*
|
|
|
|
|
%license %{gem_instdir}/MIT-LICENSE
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
%{gem_instdir}/Appraisals
|
|
|
|
|
%doc %{gem_instdir}/CONTRIBUTING.md
|
|
|
|
|
%{gem_instdir}/Gemfile
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
%{gem_instdir}/Rakefile
|
|
|
|
|
%{gem_instdir}/gemfiles
|
|
|
|
|
%{gem_instdir}/shoulda.gemspec
|
|
|
|
|
%{gem_instdir}/test
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-06-29 18:17:23 +08:00
|
|
|
* Wed Jun 29 2022 liyanan <liyanan32@h-partners.com> - 3.6.0-3
|
|
|
|
|
- Relax shoulda-matchers dependency
|
|
|
|
|
|
2020-08-27 09:14:28 +08:00
|
|
|
* Thu Mar 3 2022 liyanan <liyanan32@huawei.com> - 3.6.0-2
|
|
|
|
|
- fix build error
|
|
|
|
|
|
2020-08-21 10:02:51 +08:00
|
|
|
* Wed Aug 19 2020 xiezheng <xiezheng4@huawei.com> - 3.6.0-1
|
|
|
|
|
- package init
|