excon 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of excon might be problematic. Click here for more details.
- data/VERSION +1 -1
- data/excon.gemspec +3 -3
- data/lib/excon.rb +8 -0
- data/lib/excon/connection.rb +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.19
|
data/excon.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in
|
3
|
+
# Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{excon}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.19"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Wesley Beary"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-02-06}
|
13
13
|
s.description = %q{speed, persistence, http(s)}
|
14
14
|
s.email = %q{wbeary@engineyard.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/excon.rb
CHANGED
@@ -20,4 +20,12 @@ module Excon
|
|
20
20
|
Excon::Connection.new(url)
|
21
21
|
end
|
22
22
|
|
23
|
+
%w{connect delete get head options post put trace}.each do |method|
|
24
|
+
eval <<-DEF
|
25
|
+
def self.#{method}(url, params = {})
|
26
|
+
new(url).request(params.merge!(:method => '#{method.upcase}'))
|
27
|
+
end
|
28
|
+
DEF
|
29
|
+
end
|
30
|
+
|
23
31
|
end
|
data/lib/excon/connection.rb
CHANGED
@@ -8,11 +8,11 @@ module Excon
|
|
8
8
|
|
9
9
|
def request(params)
|
10
10
|
begin
|
11
|
-
params[:path] ||=
|
11
|
+
params[:path] ||= @uri.path
|
12
12
|
unless params[:path][0..0] == '/'
|
13
13
|
params[:path] = "/#{params[:path]}"
|
14
14
|
end
|
15
|
-
if params[:query] && !params[:query].empty?
|
15
|
+
if (params[:query] && !params[:query].empty?) || @uri.query
|
16
16
|
params[:path] << "?#{params[:query]}"
|
17
17
|
end
|
18
18
|
request = "#{params[:method]} #{params[:path]} HTTP/1.1\r\n"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wesley Beary
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-02-06 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|