diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2012-08-11 10:42:55 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2012-08-11 10:42:55 +0000 |
commit | 7ab728cb1c453e60435c7178173850a1aec5daf8 (patch) | |
tree | df423931d759f9c3fcc716c9e39de3377fb3cdf6 /dev-ruby/rest-client | |
parent | Stable for amd64, wrt bug #428222 (diff) | |
download | historical-7ab728cb1c453e60435c7178173850a1aec5daf8.tar.gz historical-7ab728cb1c453e60435c7178173850a1aec5daf8.tar.bz2 historical-7ab728cb1c453e60435c7178173850a1aec5daf8.zip |
add ruby19 support
Package-Manager: portage-2.2.0_alpha110/cvs/Linux x86_64
Diffstat (limited to 'dev-ruby/rest-client')
-rw-r--r-- | dev-ruby/rest-client/ChangeLog | 10 | ||||
-rw-r--r-- | dev-ruby/rest-client/Manifest | 4 | ||||
-rw-r--r-- | dev-ruby/rest-client/files/rest-client-1.6.7-ruby19.patch | 111 | ||||
-rw-r--r-- | dev-ruby/rest-client/rest-client-1.6.7-r1.ebuild | 32 |
4 files changed, 154 insertions, 3 deletions
diff --git a/dev-ruby/rest-client/ChangeLog b/dev-ruby/rest-client/ChangeLog index 5a797845fc4c..5d7f6948917b 100644 --- a/dev-ruby/rest-client/ChangeLog +++ b/dev-ruby/rest-client/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-ruby/rest-client -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rest-client/ChangeLog,v 1.11 2011/09/16 18:58:42 graaff Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rest-client/ChangeLog,v 1.12 2012/08/11 10:42:55 hollow Exp $ + +*rest-client-1.6.7-r1 (11 Aug 2012) + + 11 Aug 2012; Benedikt Böhm <hollow@gentoo.org> +rest-client-1.6.7-r1.ebuild, + +files/rest-client-1.6.7-ruby19.patch: + add ruby19 support *rest-client-1.6.7 (16 Sep 2011) diff --git a/dev-ruby/rest-client/Manifest b/dev-ruby/rest-client/Manifest index 97ee1cd8c9a3..e24a94d18ba2 100644 --- a/dev-ruby/rest-client/Manifest +++ b/dev-ruby/rest-client/Manifest @@ -1,3 +1,4 @@ +AUX rest-client-1.6.7-ruby19.patch 4141 SHA256 d383ed443c8816a1020eb0e0b4edc57490e1cf013ecb310ddbf61a379080aea7 SHA512 838d31b7aef75131a0565326e58855fbf8720cae3fccb09c21e71a97150fbdeb9bb66001709f660978abc9125fff1182a9aaea3712984d6ee3072536237accf6 WHIRLPOOL e4c64a858f63f12de361c9a82ed6794b5d5db31d8ba772124ab3f83c5b04c5a5197686e2c3562ef16de7f22b15e78110c961eb280786d3fa919efa0dab595039 DIST rest-client-1.5.1.gem 53248 SHA256 7e55c1399a4ccc2dc9b8476eb9a0280040865cdf19df7d883e89709e669e9ded SHA512 c7258dd03683803b5fb30214e9989b8f2158a5c084c4f958fdc9f96f82dcd561825ea36966355375ffc3824d3d28e3d9fd6796f3c2b9585e619ae0d2535a14bc WHIRLPOOL b50125a9ae59feaf95491ca01929cba3c70205d1d0b4f668e35294ae3d0d628e3ab2e410c439ae10611067a6b5f70fd7314ff189419f1b95ab768b195436107a DIST rest-client-1.6.1.gem 55296 SHA256 7db53b5ef2ab200fabe841642c73ffeec9eaf2bb4f1ba9ef597b3b6ddd4ff4e7 SHA512 8816a8af90a86c37cf6e1fe6d8b498a9f4242ef599893ecc81887883ce5aa9c09f04f287f487a7db879d772d355e15cc574ae0b0ed867d238a2f6f88fd28c47f WHIRLPOOL 40012860b870039a81973a3dd3f30d20897441c6e68ab3a52d9f6b4eaf87379770207bade10f7a6584f0fcb25b37adab5fa23b6e4a9214b8d8a02d4c49fce81e DIST rest-client-1.6.3.gem 56832 SHA256 6a9bed5061d9fe39d9b531f315b08911c7bf4bf2fbaa23728aac2044a8a20eaf SHA512 bb188819940c644ce38f659aa5d602ac60ec894136c0449ede3ff6405c6729a836106a87527a4a00ea6544b359cc86727f7acd9d56e3a4b98a5d4fd4ba145e56 WHIRLPOOL 65026be7e7bf3c4a521165d8d49a6bf14d31f8f7161ee0093c230f7207cb6560c84f72d4926697bc8eb1a38229ae0a5287af554ec014d7a32ab2d8487b6184f8 @@ -5,6 +6,7 @@ DIST rest-client-1.6.7.gem 58368 SHA256 a3203433b8b0c914648caea54395a8791a61e0df EBUILD rest-client-1.5.1.ebuild 542 SHA256 4c4883f6e6c43f6be8f33069074b46de4afb261e17268a585405b8c3525d4e9d SHA512 ef7dd0958d0c3733da85b22eb271f7fb384226db872aebe969185da8a3b364b1d48a1865d4a23eaa087d604f1bc10c82fc94a984e594faf4099b4e54cd38dcee WHIRLPOOL 503ef08a31957359b8a4194021c54012ef960935418266409c0b71f86caa485fc9c5b077131e98a62eb2f51ccdbeed0183ed6604f7e8d0462d156019dc61fa73 EBUILD rest-client-1.6.1.ebuild 695 SHA256 12bad3bd4c3739113de6895102ecb38ba8ed20ff5a6489e313ca8cdac2f5276a SHA512 cb41362f77d9d717a6625d0936b9ff8828c875667ce2119162aace8f73f4252c0873745978dc29a13a108458ef7e0475b7661a8e0774c1cf3d56af66653e35dc WHIRLPOOL 79e04b8f90a40d22027b2479ab6ed5d4895ae52211df4b908325d94ec6450acf2c56ad37cbb1341df5c0e4ccf67330c8c1e69a5d199044dbaeb1cffac0d51abd EBUILD rest-client-1.6.3.ebuild 996 SHA256 5fe322e7aa82e9ad43328b2c6c20a3133854d8b5e416c169acfe91cb9b1808a3 SHA512 0ef233e8368a504b00cb48ba165b14d187f267c32026cdb78f06ec1162fa3fd9f64301d25f8f5d01f83008c1a45378152cbc4b13cb6e190e83c1ebc10a527252 WHIRLPOOL 6925ee61d71e099f0ed49c286717526aa4f9df4fb9bfb961b889d21a4e5aa7dbb6ac94c7440eb2e73ef6901af850cf2e1d0dfe32af93ea0c6ceb6cf0eed3ef82 +EBUILD rest-client-1.6.7-r1.ebuild 885 SHA256 72aeaaa2dc7c293a6eb59162b15e87be5d3e9a883f8e802ca3e48ad7937737e8 SHA512 bde26290b63b72ed7369e54373dfe29555be56b14da84554c8b3c8e3354350b519ef5042d535480ed32932df8f170e7d973fe8532659da1b51bce1612f0b20cc WHIRLPOOL 4cebd77c38c18f708acd84c6ef7607993aeb4eed5c1a0b1bdaacc09401092ff8a3758e5f2a7f129f7c4a6c5d60061864fa41d0d15d2eeabc04dbe57b49e60b09 EBUILD rest-client-1.6.7.ebuild 812 SHA256 be869c9718e026bd47d6b9dc3ef90cc92fa6ee2501a3dad08a855c627e51f91c SHA512 6db862bbb03d0a1ec69bc353096daa12433fbb2906a7cd813de0ae50ddd905184e243af84ab670438db8473cee2423980b63a06d1fa03cb90c06da292c027653 WHIRLPOOL b16d52576f20a6bbcfe57163133a9bf67f91c634376240bf303fa3fac40e163f8999c44d38b1c20803c87bc72a26c608f17078a5b1d5d9c3beef3bfd76a82a0f -MISC ChangeLog 1707 SHA256 5a94e8817c5f841cae5bb970dfcc55056aa6ac785bdfa50d31e3df8021dbfa1c SHA512 166f65e77b8216544b8d408c53b2719601559647b566423e81d523defffe5ea8286960cc24c97a29b015b992607f3c665dd1148d440ff656e4338b93ad8216a1 WHIRLPOOL 5bafe9cf72b16b8bc11975132bb532f05649d332aff52ad6fc17242abfbf036eeb156173c769136d139a5dbfe4126591a4d835e6263849523211c79d2c0db686 +MISC ChangeLog 1887 SHA256 197373a643b47fd664a773f3de854cacc9eab016912bc96156b91896be3ca16e SHA512 5217d48d00402f1425970183c587bf4fa6a12c0498a80bb5615f04949aef9e440fbc16eb6ff91849a60c3da06c0185a762e85dc7445d2a8c501eefcfbef2c893 WHIRLPOOL 4831f98433eaa23e67cf21c445ad62737db13a5ff99157bdd817c13ad18bc798f1d3d97a848847a63a63f08894aae63184db6d88f65b67852e7d177aff93332a MISC metadata.xml 158 SHA256 70b396ab3c7a63a81cb895b7728bd9eccdc9770afdb9919f2c54694b685f7032 SHA512 a9ab7b665b00f8a0619ffb3cf5260438a6f47fe997bc9cfbd5410d074b92e473dd1484d79a4afd736f52dc1277af42f6439953c696c35a92c75d94f4eb591baa WHIRLPOOL e8e518ad3cc7f0230aa7a43b82e730310527bd3b22033f13563a7c0630668bb0fa935ce64a3345c84b3fa2623fd14697c2ae0289266ae1fbc97bf032133a4aa6 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/rest-client-1.6.7-r1.ebuild b/dev-ruby/rest-client/rest-client-1.6.7-r1.ebuild new file mode 100644 index 000000000000..d88479833dfc --- /dev/null +++ b/dev-ruby/rest-client/rest-client-1.6.7-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rest-client/rest-client-1.6.7-r1.ebuild,v 1.1 2012/08/11 10:42:55 hollow Exp $ + +EAPI=4 +USE_RUBY="ruby18 ruby19 ree18" + +RUBY_FAKEGEM_TASK_TEST="spec" + +RUBY_FAKEGEM_EXTRADOC="history.md README.rdoc" + +inherit ruby-fakegem + +DESCRIPTION="Simple Simple HTTP and REST client for Ruby" +HOMEPAGE="http://github.com/archiloque/rest-client" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RUBY_PATCHES=( "${FILESDIR}/rest-client-1.6.7-ruby19.patch" ) + +ruby_add_bdepend "doc? ( dev-ruby/jeweler )" +ruby_add_bdepend "test? ( dev-ruby/jeweler dev-ruby/rspec:0 dev-ruby/webmock )" + +ruby_add_rdepend ">=dev-ruby/mime-types-1.16" + +all_ruby_prepare() { + # Remove spec that requires network access. + rm spec/integration/request_spec.rb || die +} |