diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-ruby/rest-client | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-ruby/rest-client')
-rw-r--r-- | dev-ruby/rest-client/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/rest-client/files/rest-client-1.6.7-ruby19.patch | 111 | ||||
-rw-r--r-- | dev-ruby/rest-client/metadata.xml | 8 | ||||
-rw-r--r-- | dev-ruby/rest-client/rest-client-1.8.0-r1.ebuild | 35 | ||||
-rw-r--r-- | dev-ruby/rest-client/rest-client-1.8.0.ebuild | 35 |
5 files changed, 190 insertions, 0 deletions
diff --git a/dev-ruby/rest-client/Manifest b/dev-ruby/rest-client/Manifest new file mode 100644 index 000000000000..8ecb9c9421df --- /dev/null +++ b/dev-ruby/rest-client/Manifest @@ -0,0 +1 @@ +DIST rest-client-1.8.0.gem 124928 SHA256 e70e4fe5660181fe5c6909de06f7b716931b433f5748f3713c841be709031fd5 SHA512 d4c03b2d2807ae963b116e8c977411305b55836e4129b18ce2e88ea5795838c448bece151f6b57aa03920ea21d9120835159a7e9c4bc5c9998beb3705d1f2bfd WHIRLPOOL a1428fb25a47344362cd6d872035b87872dc3da8927483430bc33438e9d5c1d0f3ec120668185b56146545c5a7db21a110ad05ca8867e84dff11b3675f665843 diff --git a/dev-ruby/rest-client/files/rest-client-1.6.7-ruby19.patch b/dev-ruby/rest-client/files/rest-client-1.6.7-ruby19.patch new file mode 100644 index 000000000000..92ae14532967 --- /dev/null +++ b/dev-ruby/rest-client/files/rest-client-1.6.7-ruby19.patch @@ -0,0 +1,111 @@ +diff --git a/spec/base.rb b/spec/base.rb +index 965a6e2..60fb86f 100644 +--- a/spec/base.rb ++++ b/spec/base.rb +@@ -2,8 +2,6 @@ def is_ruby_19? + RUBY_VERSION == '1.9.1' or RUBY_VERSION == '1.9.2' + end + +-Encoding.default_internal = Encoding.default_external = "ASCII-8BIT" if is_ruby_19? +- + require 'rubygems' + require 'spec' + +@@ -14,3 +12,4 @@ rescue LoadError + end + + require File.dirname(__FILE__) + '/../lib/restclient' ++require File.join(File.dirname(__FILE__), 'helpers', 'file_content_helper') +diff --git a/spec/helpers/file_content_helper.rb b/spec/helpers/file_content_helper.rb +new file mode 100644 +index 0000000..86dd263 +--- /dev/null ++++ b/spec/helpers/file_content_helper.rb +@@ -0,0 +1,3 @@ ++def file_content_helper(path) ++ IO.respond_to?(:binread) ? IO.binread(path) : IO.read(path) ++end +diff --git a/spec/payload_spec.rb b/spec/payload_spec.rb +index 89ded79..c57b300 100644 +--- a/spec/payload_spec.rb ++++ b/spec/payload_spec.rb +@@ -102,26 +102,28 @@ baz\r + + it "should form properly separated multipart data" do + f = File.new(File.dirname(__FILE__) + "/master_shake.jpg") ++ file_contents = file_content_helper(f.path) + m = RestClient::Payload::Multipart.new({:foo => f}) + m.to_s.should == <<-EOS + --#{m.boundary}\r + Content-Disposition: form-data; name="foo"; filename="master_shake.jpg"\r + Content-Type: image/jpeg\r + \r +-#{IO.read(f.path)}\r ++#{file_contents}\r + --#{m.boundary}--\r + EOS + end + + it "should ignore the name attribute when it's not set" do + f = File.new(File.dirname(__FILE__) + "/master_shake.jpg") ++ file_contents = file_content_helper(f.path) + m = RestClient::Payload::Multipart.new({nil => f}) + m.to_s.should == <<-EOS + --#{m.boundary}\r + Content-Disposition: form-data; filename="master_shake.jpg"\r + Content-Type: image/jpeg\r + \r +-#{IO.read(f.path)}\r ++#{file_contents}\r + --#{m.boundary}--\r + EOS + end +@@ -130,13 +132,14 @@ Content-Type: image/jpeg\r + f = File.new(File.dirname(__FILE__) + "/master_shake.jpg") + f.instance_eval "def content_type; 'text/plain'; end" + f.instance_eval "def original_filename; 'foo.txt'; end" ++ file_contents = file_content_helper(f.path) + m = RestClient::Payload::Multipart.new({:foo => f}) + m.to_s.should == <<-EOS + --#{m.boundary}\r + Content-Disposition: form-data; name="foo"; filename="foo.txt"\r + Content-Type: text/plain\r + \r +-#{IO.read(f.path)}\r ++#{file_contents}\r + --#{m.boundary}--\r + EOS + end +@@ -154,13 +157,14 @@ foo\r + f = File.new(File.dirname(__FILE__) + "/master_shake.jpg") + f.instance_eval "def content_type; 'text/plain'; end" + f.instance_eval "def original_filename; 'foo.txt'; end" ++ file_contents = file_content_helper(f.path) + m = RestClient::Payload::Multipart.new({:foo => {:bar => f}}) + m.to_s.should == <<-EOS + --#{m.boundary}\r + Content-Disposition: form-data; name="foo[bar]"; filename="foo.txt"\r + Content-Type: text/plain\r + \r +-#{IO.read(f.path)}\r ++#{file_contents}\r + --#{m.boundary}--\r + EOS + end +diff --git a/spec/response_spec.rb b/spec/response_spec.rb +index 840698e..d3964a8 100644 +--- a/spec/response_spec.rb ++++ b/spec/response_spec.rb +@@ -90,12 +90,6 @@ describe RestClient::Response do + RestClient::Request.execute(:url => 'http://some/resource', :method => :get, :user => 'foo', :password => 'bar', :headers => {:accept => :json}).body.should == 'Foo' + end + +- it "follows a redirection and keep the cookies" do +- stub_request(:get, 'http://some/resource').to_return(:body => '', :status => 301, :headers => {'Set-Cookie' => CGI::Cookie.new('Foo', 'Bar'), 'Location' => 'http://new/resource', }) +- stub_request(:get, 'http://new/resource').with(:headers => {'Cookie' => 'Foo=Bar'}).to_return(:body => 'Qux') +- RestClient::Request.execute(:url => 'http://some/resource', :method => :get).body.should == 'Qux' +- end +- + it "doesn't follow a 301 when the request is a post" do + net_http_res = mock('net http response', :code => 301) + response = RestClient::Response.create('abc', net_http_res, {:method => :post}) diff --git a/dev-ruby/rest-client/metadata.xml b/dev-ruby/rest-client/metadata.xml new file mode 100644 index 000000000000..4d4e2f610ec7 --- /dev/null +++ b/dev-ruby/rest-client/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>ruby</herd> + <upstream> + <remote-id type="github">archiloque/rest-client</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-ruby/rest-client/rest-client-1.8.0-r1.ebuild b/dev-ruby/rest-client/rest-client-1.8.0-r1.ebuild new file mode 100644 index 000000000000..0b12173e169f --- /dev/null +++ b/dev-ruby/rest-client/rest-client-1.8.0-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +RUBY_FAKEGEM_RECIPE_TEST="rspec" + +RUBY_FAKEGEM_EXTRADOC="history.md README.rdoc" + +inherit ruby-fakegem + +DESCRIPTION="Simple Simple HTTP and REST client for Ruby" +HOMEPAGE="https://github.com/archiloque/rest-client" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +ruby_add_bdepend "test? ( dev-ruby/webmock )" + +ruby_add_rdepend " + >=dev-ruby/http-cookie-1.0.2:0 + >=dev-ruby/mime-types-1.16 + >=dev-ruby/netrc-0.7:0" + +all_ruby_prepare() { + sed -e '/bundler/I s:^:#:' \ + -e '/namespace :windows/,/^end/ s:^:#:' -i Rakefile || die + + # Remove spec that requires network access. + rm spec/integration/request_spec.rb || die +} diff --git a/dev-ruby/rest-client/rest-client-1.8.0.ebuild b/dev-ruby/rest-client/rest-client-1.8.0.ebuild new file mode 100644 index 000000000000..5c6e4b8e6480 --- /dev/null +++ b/dev-ruby/rest-client/rest-client-1.8.0.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +USE_RUBY="ruby19 ruby20" + +RUBY_FAKEGEM_RECIPE_TEST="rspec" + +RUBY_FAKEGEM_EXTRADOC="history.md README.rdoc" + +inherit ruby-fakegem + +DESCRIPTION="Simple Simple HTTP and REST client for Ruby" +HOMEPAGE="https://github.com/archiloque/rest-client" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +ruby_add_bdepend "test? ( dev-ruby/webmock )" + +ruby_add_rdepend " + >=dev-ruby/http-cookie-1.0.2:0 + >=dev-ruby/mime-types-1.16 + >=dev-ruby/netrc-0.7:0" + +all_ruby_prepare() { + sed -e '/bundler/I s:^:#:' \ + -e '/namespace :windows/,/^end/ s:^:#:' -i Rakefile || die + + # Remove spec that requires network access. + rm spec/integration/request_spec.rb || die +} |