加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rubygem-sinatra.spec 3.02 KB
一键复制 编辑 原始数据 按行查看 历史
吴磊磊 提交于 2023-01-17 11:31 . fix the error_highlight test
%global gem_name sinatra
%bcond_with bootstrap
Summary: Ruby-based web application framework
Name: rubygem-%{gem_name}
Version: 2.0.8.1
Release: 2
License: MIT
URL: http://www.sinatrarb.com/
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/sinatra/sinatra.git && cd sinatra
# git archive -v -o sinatra-2.0.8.1-test.tar.gz v2.0.8.1 test/
Source1: %{gem_name}-%{version}-test.tar.gz
# Fix test failure due to Rack 2.2.2 incompatibility.
# https://github.com/sinatra/sinatra/pull/1605
Patch0: rubygem-sinatra-2.0.8.1-Fix-failing-tests.patch
Patch1: Internal-Sinatra-errors-now-extend-Sinatra-Error-test.patch
Patch2: Internal-Sinatra-errors-now-extend-Sinatra-Error.patch
BuildRequires: rubygems-devel ruby(release) ruby >= 2.2.0
%if ! 0%{?bootstrap}
BuildRequires: rubygem(rack) >= 2.0 rubygem(rack-protection) = %{version} rubygem(tilt)
BuildRequires: rubygem(mustermann) rubygem(rack-test) rubygem(minitest) > 5
%endif
Epoch: 1
BuildArch: noarch
%description
Sinatra is a DSL intended for quickly creating web-applications in Ruby
with minimal effort.
%package help
Summary: Documentation for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
Provides: %{name}-doc = %{version}-%{release}
Obsoletes: %{name}-doc < %{version}-%{release}
%description help
This package contains documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version} -b 1
pushd %{_builddir}
%patch0 -p1
%patch1 -p1
popd
%patch2 -p1
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -rv .%{gem_dir}/* %{buildroot}%{gem_dir}
sed -i -e 's|^#!/usr/bin/env ruby|#!/usr/bin/ruby|' \
%{buildroot}%{gem_instdir}/examples/*.rb
%if %{without bootstrap}
%check
pushd .%{gem_instdir}
cp -a %{_builddir}/test test
sed -i '/active_support/ s/$/ unless Hash.method_defined?(:slice)/' test/helper.rb
mv test/integration_test.rb{,.disabled}
ruby -e 'Dir.glob "./test/*_test.rb", &method(:require)'
popd
%endif
%files
%dir %{gem_instdir}
%exclude %{gem_instdir}/.*
%license %{gem_instdir}/LICENSE
%{gem_libdir}
%exclude %{gem_instdir}/sinatra.gemspec
%exclude %{gem_cache}
%{gem_spec}
%files help
%doc %{gem_docdir}
%doc %{gem_instdir}/AUTHORS.md
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/CONTRIBUTING.md
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/MAINTENANCE.md
%doc %{gem_instdir}/README*.md
%{gem_instdir}/Rakefile
%doc %{gem_instdir}/SECURITY.md
%{gem_instdir}/VERSION
%{gem_instdir}/examples
%changelog
* Tue Jan 17 2023 wulei <wulei80@h-partners.com> - 1:2.0.8.1-2
- fix the error_highlight test
* Thu Feb 24 2022 liyanan <liyanan32@huawei.com> - 2.0.8.1-1
- update to 2.0.8.1
* Wed Feb 10 2021 Ge Wang <wangge20@huawei.com> - 2.0.3-2
- solve test error due to rubygem-rack update to 2.2.0+
* Sat Aug 22 2020 liyanan <liyanan32@huawei.com> - 2.0.3-1
- package init
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化