1 |
flameeyes 10/04/30 18:12:06 |
2 |
|
3 |
Added: faraday-0.4.3-gentoo.patch |
4 |
Log: |
5 |
Initial import of the faraday library. Patch sent upstream for 0.4.4 release. |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-ruby/faraday/files/faraday-0.4.3-gentoo.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/faraday/files/faraday-0.4.3-gentoo.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/faraday/files/faraday-0.4.3-gentoo.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: faraday-0.4.3-gentoo.patch |
15 |
=================================================================== |
16 |
diff --git a/Rakefile b/Rakefile |
17 |
index 61daa8b..1138f0f 100644 |
18 |
--- a/Rakefile |
19 |
+++ b/Rakefile |
20 |
@@ -38,8 +40,6 @@ rescue LoadError |
21 |
end |
22 |
end |
23 |
|
24 |
-task :test => :check_dependencies |
25 |
- |
26 |
task :default => :test |
27 |
|
28 |
require 'rake/rdoctask' |
29 |
diff --git a/lib/faraday/connection.rb b/lib/faraday/connection.rb |
30 |
index dbda09a..f441d42 100644 |
31 |
--- a/lib/faraday/connection.rb |
32 |
+++ b/lib/faraday/connection.rb |
33 |
@@ -173,12 +173,12 @@ module Faraday |
34 |
# |
35 |
def build_url(url, params = nil) |
36 |
uri = URI.parse(url.to_s) |
37 |
- uri.host ||= @host |
38 |
- uri.port ||= @port |
39 |
- uri.scheme ||= @scheme |
40 |
if @path_prefix && uri.path !~ /^\// |
41 |
uri.path = "#{@path_prefix.size > 1 ? @path_prefix : nil}/#{uri.path}" |
42 |
end |
43 |
+ uri.host ||= @host |
44 |
+ uri.port ||= @port |
45 |
+ uri.scheme ||= @scheme |
46 |
replace_query(uri, params) |
47 |
uri |
48 |
end |
49 |
--- faraday-0.4.3.orig/test/helper.rb |
50 |
+++ faraday-0.4.3/test/helper.rb |
51 |
@@ -1,6 +1,4 @@ |
52 |
require 'rubygems' |
53 |
-gem 'rack', '~> 1.1.0' |
54 |
-gem 'addressable', '2.1.1' |
55 |
|
56 |
require 'test/unit' |
57 |
if ENV['LEFTRIGHT'] |