Compare commits
10 Commits
052a67177b
...
0f7bec647b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f7bec647b | ||
|
|
dddcc8b513 | ||
|
|
301df621c6 | ||
|
|
482ef90c14 | ||
|
|
d8f3196046 | ||
|
|
0115a8caa3 | ||
|
|
0282e4c06a | ||
|
|
12a0fa8580 | ||
|
|
6da6bdc517 | ||
|
|
2556d57cbc |
120
rubygem-shoulda-matchers.spec
Normal file
120
rubygem-shoulda-matchers.spec
Normal file
@ -0,0 +1,120 @@
|
||||
%global gem_name shoulda-matchers
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 5.3.0
|
||||
Release: 1
|
||||
Summary: Making tests easy on the fingers and eyes
|
||||
License: MIT
|
||||
URL: https://github.com/thoughtbot/shoulda-matchers
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
# git clone https://github.com/thoughtbot/shoulda-matchers.git && cd shoulda-matchers
|
||||
# git archive -v -o shoulda-matchers-5.3.0-specs.tar.gz v5.3.0 spec/
|
||||
Source1: %{gem_name}-%{version}-specs.tar.gz
|
||||
|
||||
BuildRequires: ruby(release) rubygems-devel ruby rubygem(bcrypt) rubygem(jbuilder)
|
||||
BuildRequires: rubygem(puma) rubygem(rails) rubygem(rails-controller-testing) rubygem(rspec) rubygem(rspec-rails)
|
||||
BuildRequires: rubygem(shoulda-context) rubygem(spring) rubygem(sqlite3)
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
shoulda-matchers provides Test::Unit- and RSpec-compatible one-liners that
|
||||
test common Rails functionality. These tests would otherwise be much longer,
|
||||
more complex, and error-prone.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%description doc
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{gem_name}-%{version} -b 1
|
||||
|
||||
|
||||
%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 -s %{_builddir}/spec spec
|
||||
cat << GF > Gemfile
|
||||
source 'https://rubygems.org'
|
||||
gem 'actiontext'
|
||||
gem 'bcrypt'
|
||||
gem 'rails'
|
||||
gem 'rails-controller-testing'
|
||||
gem 'rspec'
|
||||
gem 'rspec-rails'
|
||||
gem 'sqlite3'
|
||||
gem 'spring'
|
||||
GF
|
||||
sed -i "/require 'pry/ s/^/#/" spec/spec_helper.rb
|
||||
sed -i "/current_bundle/ s/^/#/" \
|
||||
spec/acceptance_spec_helper.rb \
|
||||
spec/support/unit/load_environment.rb
|
||||
sed -i "/CurrentBundle/ s/^/#/" \
|
||||
spec/acceptance_spec_helper.rb \
|
||||
spec/support/unit/load_environment.rb
|
||||
sed -i '/def rails_new_command/,/^ end$/ {
|
||||
/rails new/ s/"$/ --skip-git --skip-asset-pipeline&/
|
||||
}' \
|
||||
spec/support/unit/rails_application.rb
|
||||
sed -i '/def rails_new_command/,/^ end$/ {
|
||||
/rails new/ s/"$/ --skip-git --skip-asset-pipeline&/
|
||||
}' \
|
||||
spec/support/acceptance/helpers/step_helpers.rb
|
||||
sed -i '/def load_file/,/end/ s/::load_file/::unsafe_load_file/' spec/support/tests/database_configuration.rb
|
||||
|
||||
bundle exec rspec spec/unit
|
||||
|
||||
sed -i "/add_gem 'spring-commands-rspec'/ s/^/#/" spec/support/acceptance/helpers/step_helpers.rb
|
||||
sed -i "/updating_bundle do |bundle|/a \\
|
||||
bundle.add_gem 'spring'" spec/support/acceptance/helpers/step_helpers.rb
|
||||
sed -i "/updating_bundle do |bundle|/a \\
|
||||
bundle.remove_gem 'capybara'" spec/support/acceptance/helpers/step_helpers.rb
|
||||
sed -i "/updating_bundle do |bundle|/a \\
|
||||
bundle.remove_gem 'selenium-webdriver'" spec/support/acceptance/helpers/step_helpers.rb
|
||||
sed -i "/updating_bundle do |bundle|/a \\
|
||||
bundle.remove_gem 'debug'" spec/support/acceptance/helpers/step_helpers.rb
|
||||
|
||||
bundle exec rspec spec/acceptance
|
||||
|
||||
popd
|
||||
|
||||
|
||||
%files
|
||||
%dir %{gem_instdir}
|
||||
%license %{gem_instdir}/LICENSE
|
||||
%{gem_libdir}
|
||||
%exclude %{gem_cache}
|
||||
%{gem_spec}
|
||||
|
||||
%files doc
|
||||
%doc %{gem_docdir}
|
||||
%doc %{gem_instdir}/README.md
|
||||
%doc %{gem_instdir}/docs
|
||||
%{gem_instdir}/shoulda-matchers.gemspec
|
||||
|
||||
%changelog
|
||||
* Thu Nov 16 2023 Ge Wang <wang__ge@126.com> - 5.3.0-1
|
||||
- update to 5.3.0
|
||||
|
||||
* Tue Jan 17 2023 wulei <wulei80@h-partners.com> - 5.1.0-1
|
||||
- update to 5.1.0
|
||||
|
||||
* Wed Jun 29 2022 liyanan <liyanan32@h-partners.com> - 4.5.1-1
|
||||
- Upgrade to version 4.5.1
|
||||
|
||||
* Thu Mar 3 2022 liyanan <liyanan32@huawei.com> - 3.1.2-2
|
||||
- fix build error
|
||||
|
||||
* Mon Aug 10 2020 yanan li <liyanan032@huawei.com> - 3.1.2-1
|
||||
- Package init
|
||||
BIN
shoulda-matchers-5.3.0-specs.tar.gz
Normal file
BIN
shoulda-matchers-5.3.0-specs.tar.gz
Normal file
Binary file not shown.
BIN
shoulda-matchers-5.3.0.gem
Normal file
BIN
shoulda-matchers-5.3.0.gem
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user