代码拉取完成,页面将自动刷新
%global gem_name shoulda-context
Name: rubygem-%{gem_name}
Version: 2.0.0
Release: 1
Summary: Context framework extracted from Shoulda
License: MIT
URL: https://github.com/thoughtbot/shoulda-context
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Patch0: rubygem-shoulda-context-2.0.0-Use-File-exist.patch
BuildRequires: ruby(release) rubygems-devel ruby rubygem(bundler) rubygem(jquery-rails)
BuildRequires: rubygem(mocha) rubygem(rails) rubygem(sass-rails) rubygem(sqlite3)
BuildRequires: rubygem(test-unit) rubygem(did_you_mean)
BuildArch: noarch
%description
Shoulda's contexts make it easy to write understandable and maintainable
tests for Test::Unit. It's fully compatible with your existing tests in
Test::Unit, and requires no retooling to use.
Refer to the shoulda gem if you want to know more about using shoulda
with Rails or RSpec.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
%patch0 -p1
gem spec %{SOURCE0} -l --ruby > %{gem_name}-%{version}.gemspec
sed -i 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' exe/convert_to_should_syntax
rm test/fake_rails_root/vendor/plugins/.keep
sed -i -r 's|"test/fake_rails_root/vendor/plugins/\.keep"(\.freeze)?,||' %{gem_name}-%{version}.gemspec
%build
gem build %{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/exe -type f | xargs chmod a+x
%check
pushd .%{gem_instdir}
sed -i '/git/ s/^/#/' shoulda-context.gemspec
cat << EOF > gemfiles/test.gemfile
source "https://rubygems.org"
gem "minitest"
gem "mocha"
gem "test-unit"
gemspec path: "../"
EOF
BUNDLE_GEMFILE=gemfiles/test.gemfile bundle install --local
sed -i '/require "appraisal"/ s/^/#/' test/support/current_bundle.rb
sed -i '/assert_appraisal!/ s/^/#/' test/test_helper.rb
sed -i '/require "pry-byebug"/ s/^/#/' test/test_helper.rb
sed -i '/require "warnings_logger"/ s/^/#/' test/test_helper.rb
sed -i '/WarningsLogger/,/^)/ s/^/#/' test/test_helper.rb
sed -i '/require_relative "support\/rails_application_with_shoulda_context"/ s/^/#/' test/test_helper.rb
mv test/shoulda/railtie_test.rb{,.disable}
mv test/shoulda/rerun_snippet_test.rb{,.disable}
TEST_FRAMEWORK=minitest BUNDLE_GEMFILE=gemfiles/test.gemfile ruby -Ilib:test -rsingleton -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
TEST_FRAMEWORK=test_unit BUNDLE_GEMFILE=gemfiles/test.gemfile ruby -Ilib:test -rsingleton -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
popd
%files
%dir %{gem_instdir}
%{_bindir}/convert_to_should_syntax
%exclude %{gem_instdir}/.*
%license %{gem_instdir}/MIT-LICENSE
%{gem_instdir}/exe
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/CONTRIBUTING.md
%{gem_instdir}/Appraisals
%{gem_instdir}/Gemfile
%{gem_instdir}/Gemfile.lock
%doc %{gem_instdir}/README.md
%{gem_instdir}/bin
%{gem_instdir}/gemfiles
%{gem_instdir}/Rakefile
%exclude %{gem_instdir}/shoulda-context.gemspec
%{gem_instdir}/tasks
%{gem_instdir}/test
%changelog
* Fri May 24 2024 xu_ping <707078654@qq.com> - 2.0.0-1
- Upgrade version to 2.0.0
* Wed Aug 02 2023 wangkai <13474090681@163.com> - 1.2.2-3
- Fix build error for ruby3.2.2
* Sat Mar 5 2022 liyanan <liyanan32@huawei.com> - 1.2.2-2
- fix build error
* Fri Aug 21 2020 shenleizhao <shenleizhao@huawei.com> - 1.2.2-1
- package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。