fixbuilderror
This commit is contained in:
commit
8021bc568e
97
rubygem-shoulda-context.spec
Normal file
97
rubygem-shoulda-context.spec
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
%global gem_name shoulda-context
|
||||||
|
Name: rubygem-%{gem_name}
|
||||||
|
Version: 1.2.2
|
||||||
|
Release: 2
|
||||||
|
Summary: Context framework extracted from Shoulda
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/thoughtbot/shoulda-context
|
||||||
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
|
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}
|
||||||
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||||
|
sed -i 's/\r$//' MIT-LICENSE
|
||||||
|
sed -i 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' bin/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}.gemspec
|
||||||
|
|
||||||
|
%build
|
||||||
|
gem build %{gem_name}.gemspec
|
||||||
|
%gem_install
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
|
cp -a .%{gem_dir}/* \
|
||||||
|
%{buildroot}%{gem_dir}/
|
||||||
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
|
cp -pa .%{_bindir}/* \
|
||||||
|
%{buildroot}%{_bindir}/
|
||||||
|
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
||||||
|
|
||||||
|
%check
|
||||||
|
pushd .%{gem_instdir}
|
||||||
|
rm gemfiles/*.lock
|
||||||
|
%gemspec_remove_dep -s shoulda-context.gemspec -g mocha -d '~> 0.9.10'
|
||||||
|
%gemspec_add_dep -s shoulda-context.gemspec -g mocha -d '~> 1.0'
|
||||||
|
%gemspec_remove_dep -s shoulda-context.gemspec -g test-unit -d '~> 2.1.0'
|
||||||
|
%gemspec_add_dep -s shoulda-context.gemspec -g test-unit -d '~> 3.0'
|
||||||
|
%gemspec_remove_dep -s shoulda-context.gemspec -g appraisal -d
|
||||||
|
%gemspec_remove_dep -s shoulda-context.gemspec -g byebug -d
|
||||||
|
%gemspec_remove_dep -s shoulda-context.gemspec -g pry -d
|
||||||
|
%gemspec_remove_dep -s shoulda-context.gemspec -g pry-byebug -d
|
||||||
|
sed -i '/gem "rails"/ s/, :github=>"rails\/rails", :branch=>"4-1-stable"//' gemfiles/rails_4_1.gemfile
|
||||||
|
sed -i "/require 'mocha'/ s/mocha/mocha\/setup/" test/test_helper.rb
|
||||||
|
BUNDLE_GEMFILE=gemfiles/test_unit.gemfile bundle exec ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
||||||
|
BUNDLE_GEMFILE=gemfiles/minitest_5_x.gemfile bundle exec ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
||||||
|
BUNDLE_GEMFILE=gemfiles/rails_4_1.gemfile bundle exec ruby -Itest -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}/bin
|
||||||
|
%{gem_libdir}
|
||||||
|
%exclude %{gem_cache}
|
||||||
|
%{gem_spec}
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%doc %{gem_docdir}
|
||||||
|
%doc %{gem_instdir}/CONTRIBUTING.md
|
||||||
|
%{gem_instdir}/Appraisals
|
||||||
|
%{gem_instdir}/Gemfile
|
||||||
|
%doc %{gem_instdir}/README.md
|
||||||
|
%{gem_instdir}/gemfiles
|
||||||
|
%{gem_instdir}/init.rb
|
||||||
|
%dir %{gem_instdir}/rails
|
||||||
|
%{gem_instdir}/rails/init.rb
|
||||||
|
%{gem_instdir}/Rakefile
|
||||||
|
%exclude %{gem_instdir}/shoulda-context.gemspec
|
||||||
|
%{gem_instdir}/tasks
|
||||||
|
%{gem_instdir}/test
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* 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
|
||||||
4
rubygem-shoulda-context.yaml
Normal file
4
rubygem-shoulda-context.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: thoughtbot/shoulda-context
|
||||||
|
tag_prefix: "v"
|
||||||
|
separator: "."
|
||||||
BIN
shoulda-context-1.2.2.gem
Normal file
BIN
shoulda-context-1.2.2.gem
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user