1 |
commit: 20254dbfd2c5c6c82591aeef23704681d0049157 |
2 |
Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Sep 26 16:22:17 2016 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 31 12:00:11 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20254dbf |
7 |
|
8 |
dev-ruby/rest-client: remove unused patch. |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/2417 |
11 |
|
12 |
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> |
13 |
|
14 |
.../files/rest-client-1.6.7-ruby19.patch | 111 --------------------- |
15 |
1 file changed, 111 deletions(-) |
16 |
|
17 |
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 |
18 |
deleted file mode 100644 |
19 |
index 92ae145..00000000 |
20 |
--- a/dev-ruby/rest-client/files/rest-client-1.6.7-ruby19.patch |
21 |
+++ /dev/null |
22 |
@@ -1,111 +0,0 @@ |
23 |
-diff --git a/spec/base.rb b/spec/base.rb |
24 |
-index 965a6e2..60fb86f 100644 |
25 |
---- a/spec/base.rb |
26 |
-+++ b/spec/base.rb |
27 |
-@@ -2,8 +2,6 @@ def is_ruby_19? |
28 |
- RUBY_VERSION == '1.9.1' or RUBY_VERSION == '1.9.2' |
29 |
- end |
30 |
- |
31 |
--Encoding.default_internal = Encoding.default_external = "ASCII-8BIT" if is_ruby_19? |
32 |
-- |
33 |
- require 'rubygems' |
34 |
- require 'spec' |
35 |
- |
36 |
-@@ -14,3 +12,4 @@ rescue LoadError |
37 |
- end |
38 |
- |
39 |
- require File.dirname(__FILE__) + '/../lib/restclient' |
40 |
-+require File.join(File.dirname(__FILE__), 'helpers', 'file_content_helper') |
41 |
-diff --git a/spec/helpers/file_content_helper.rb b/spec/helpers/file_content_helper.rb |
42 |
-new file mode 100644 |
43 |
-index 0000000..86dd263 |
44 |
---- /dev/null |
45 |
-+++ b/spec/helpers/file_content_helper.rb |
46 |
-@@ -0,0 +1,3 @@ |
47 |
-+def file_content_helper(path) |
48 |
-+ IO.respond_to?(:binread) ? IO.binread(path) : IO.read(path) |
49 |
-+end |
50 |
-diff --git a/spec/payload_spec.rb b/spec/payload_spec.rb |
51 |
-index 89ded79..c57b300 100644 |
52 |
---- a/spec/payload_spec.rb |
53 |
-+++ b/spec/payload_spec.rb |
54 |
-@@ -102,26 +102,28 @@ baz\r |
55 |
- |
56 |
- it "should form properly separated multipart data" do |
57 |
- f = File.new(File.dirname(__FILE__) + "/master_shake.jpg") |
58 |
-+ file_contents = file_content_helper(f.path) |
59 |
- m = RestClient::Payload::Multipart.new({:foo => f}) |
60 |
- m.to_s.should == <<-EOS |
61 |
- --#{m.boundary}\r |
62 |
- Content-Disposition: form-data; name="foo"; filename="master_shake.jpg"\r |
63 |
- Content-Type: image/jpeg\r |
64 |
- \r |
65 |
--#{IO.read(f.path)}\r |
66 |
-+#{file_contents}\r |
67 |
- --#{m.boundary}--\r |
68 |
- EOS |
69 |
- end |
70 |
- |
71 |
- it "should ignore the name attribute when it's not set" do |
72 |
- f = File.new(File.dirname(__FILE__) + "/master_shake.jpg") |
73 |
-+ file_contents = file_content_helper(f.path) |
74 |
- m = RestClient::Payload::Multipart.new({nil => f}) |
75 |
- m.to_s.should == <<-EOS |
76 |
- --#{m.boundary}\r |
77 |
- Content-Disposition: form-data; filename="master_shake.jpg"\r |
78 |
- Content-Type: image/jpeg\r |
79 |
- \r |
80 |
--#{IO.read(f.path)}\r |
81 |
-+#{file_contents}\r |
82 |
- --#{m.boundary}--\r |
83 |
- EOS |
84 |
- end |
85 |
-@@ -130,13 +132,14 @@ Content-Type: image/jpeg\r |
86 |
- f = File.new(File.dirname(__FILE__) + "/master_shake.jpg") |
87 |
- f.instance_eval "def content_type; 'text/plain'; end" |
88 |
- f.instance_eval "def original_filename; 'foo.txt'; end" |
89 |
-+ file_contents = file_content_helper(f.path) |
90 |
- m = RestClient::Payload::Multipart.new({:foo => f}) |
91 |
- m.to_s.should == <<-EOS |
92 |
- --#{m.boundary}\r |
93 |
- Content-Disposition: form-data; name="foo"; filename="foo.txt"\r |
94 |
- Content-Type: text/plain\r |
95 |
- \r |
96 |
--#{IO.read(f.path)}\r |
97 |
-+#{file_contents}\r |
98 |
- --#{m.boundary}--\r |
99 |
- EOS |
100 |
- end |
101 |
-@@ -154,13 +157,14 @@ foo\r |
102 |
- f = File.new(File.dirname(__FILE__) + "/master_shake.jpg") |
103 |
- f.instance_eval "def content_type; 'text/plain'; end" |
104 |
- f.instance_eval "def original_filename; 'foo.txt'; end" |
105 |
-+ file_contents = file_content_helper(f.path) |
106 |
- m = RestClient::Payload::Multipart.new({:foo => {:bar => f}}) |
107 |
- m.to_s.should == <<-EOS |
108 |
- --#{m.boundary}\r |
109 |
- Content-Disposition: form-data; name="foo[bar]"; filename="foo.txt"\r |
110 |
- Content-Type: text/plain\r |
111 |
- \r |
112 |
--#{IO.read(f.path)}\r |
113 |
-+#{file_contents}\r |
114 |
- --#{m.boundary}--\r |
115 |
- EOS |
116 |
- end |
117 |
-diff --git a/spec/response_spec.rb b/spec/response_spec.rb |
118 |
-index 840698e..d3964a8 100644 |
119 |
---- a/spec/response_spec.rb |
120 |
-+++ b/spec/response_spec.rb |
121 |
-@@ -90,12 +90,6 @@ describe RestClient::Response do |
122 |
- RestClient::Request.execute(:url => 'http://some/resource', :method => :get, :user => 'foo', :password => 'bar', :headers => {:accept => :json}).body.should == 'Foo' |
123 |
- end |
124 |
- |
125 |
-- it "follows a redirection and keep the cookies" do |
126 |
-- stub_request(:get, 'http://some/resource').to_return(:body => '', :status => 301, :headers => {'Set-Cookie' => CGI::Cookie.new('Foo', 'Bar'), 'Location' => 'http://new/resource', }) |
127 |
-- stub_request(:get, 'http://new/resource').with(:headers => {'Cookie' => 'Foo=Bar'}).to_return(:body => 'Qux') |
128 |
-- RestClient::Request.execute(:url => 'http://some/resource', :method => :get).body.should == 'Qux' |
129 |
-- end |
130 |
-- |
131 |
- it "doesn't follow a 301 when the request is a post" do |
132 |
- net_http_res = mock('net http response', :code => 301) |
133 |
- response = RestClient::Response.create('abc', net_http_res, {:method => :post}) |