2020-08-19 10:53:58 +08:00
|
|
|
%global gem_name multipart-post
|
|
|
|
|
Name: rubygem-multipart-post
|
2023-11-15 15:47:56 +08:00
|
|
|
Version: 2.3.0
|
2020-08-19 10:53:58 +08:00
|
|
|
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}
|
2023-11-15 15:47:56 +08:00
|
|
|
%license %{gem_instdir}/license.md
|
2020-08-19 10:53:58 +08:00
|
|
|
%{gem_libdir}
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{gem_docdir}
|
2023-11-15 15:47:56 +08:00
|
|
|
%doc %{gem_instdir}/readme.md
|
|
|
|
|
%doc %{gem_instdir}/changelog.md
|
2020-08-19 10:53:58 +08:00
|
|
|
|
|
|
|
|
%changelog
|
2023-11-15 15:47:56 +08:00
|
|
|
* Wed Nov 15 2023 xu_ping <707078654@qq.com> - 2.3.0-1
|
|
|
|
|
- Upgrade 2.3.0
|
|
|
|
|
|
2022-06-30 16:57:23 +08:00
|
|
|
* Thu Jun 30 2022 xu_ping <xuping33@h-partners.com> - 2.2.3-1
|
|
|
|
|
- Upgrade 2.2.3
|
|
|
|
|
|
2020-08-19 10:53:58 +08:00
|
|
|
* Mon Jul 27 2020 yaokai <yaokai13@huawei.com> - 2.0.0-1
|
|
|
|
|
- package init
|