[packages/ruby-multipart-post] new, version 2.0.0

glen glen at pld-linux.org
Mon Apr 18 20:36:18 CEST 2016


commit 19cb9f221890f263d27837059cb2cb4295925b04
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Apr 18 21:35:54 2016 +0300

    new, version 2.0.0
    
    based on fedora package, 5e2cd26

 ruby-multipart-post.spec | 87 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 87 insertions(+)
---
diff --git a/ruby-multipart-post.spec b/ruby-multipart-post.spec
new file mode 100644
index 0000000..7e312f7
--- /dev/null
+++ b/ruby-multipart-post.spec
@@ -0,0 +1,87 @@
+#
+# Conditional build:
+%bcond_with	tests		# build without tests
+%bcond_with	doc			# don't build ri/rdoc
+
+%define pkgname multipart-post
+Summary:	Creates a multipart form post accessory for Net::HTTP
+Name:		ruby-%{pkgname}
+Version:	2.0.0
+Release:	0.1
+License:	MIT
+Group:		Development/Languages
+Source0:	http://rubygems.org/gems/%{pkgname}-%{version}.gem
+# Source0-md5:	1be431f2e8b50cc5b63cc7b7e23fef44
+URL:		http://github.com/nicksieger/multipart-post
+BuildRequires:	rpm-rubyprov
+BuildRequires:	rpmbuild(macros) >= 1.665
+%if %{with tests}
+BuildRequires:	rubygem(minitest)
+%endif
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%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 %{name}
+Group:		Documentation
+Requires:	%{name} = %{version}-%{release}
+
+%description doc
+Documentation for %{name}
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+
+%build
+# write .gemspec
+%__gem_helper spec
+
+%if %{with tests}
+# To run the tests using minitest 5
+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
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}}
+cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
+cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%{ruby_vendorlibdir}/composite_io.rb
+%{ruby_vendorlibdir}/multipart_post.rb
+%{ruby_vendorlibdir}/multipartable.rb
+%dir %{ruby_vendorlibdir}/net/http/post
+%{ruby_vendorlibdir}/net/http/post/multipart.rb
+%{ruby_vendorlibdir}/parts.rb
+%{ruby_specdir}/%{pkgname}-%{version}.gemspec
+
+%if %{with doc}
+%files doc
+%defattr(644,root,root,755)
+%doc Manifest.txt History.txt
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-multipart-post.git/commitdiff/19cb9f221890f263d27837059cb2cb4295925b04



More information about the pld-cvs-commit mailing list