%global gem_name multipart-post Name: rubygem-multipart-post Version: 2.2.3 Release: 1 Summary: Creates a multipart form post accessory for Net::HTTP License: MIT URL: http://github.com/nicksieger/multipart-post Source0: http://rubygems.org/gems/multipart-post-%{version}.gem BuildRequires: ruby(release) rubygems-devel ruby rubygem(minitest) BuildArch: noarch %description Use with Net::HTTP to do multipart form posts. IO values that have #content_type, #original_filename, and #local_path will be posted as a binary file. %package doc Summary: Documentation for rubygem-multipart-post Requires: rubygem-multipart-post = %{version}-%{release} BuildArch: noarch %description doc Documentation for rubygem-multipart-post %prep %setup -q -c -T %gem_install -n %{SOURCE0} %build %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd %{buildroot}%{gem_instdir} ruby -rminitest/autorun -Ilib - << \EOF module Kernel alias orig_require require remove_method :require def require path orig_require path unless path == 'test/unit' end end Test = Minitest Dir.glob "./test/**/test_*.rb", &method(:require) EOF popd %files %dir %{gem_instdir} %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %changelog * Thu Jun 30 2022 xu_ping - 2.2.3-1 - Upgrade 2.2.3 * Mon Jul 27 2020 yaokai - 2.0.0-1 - package init