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 CHANGED
@@ -1 +1 @@
1
- 0.0.18
1
+ 0.0.19
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
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.18"
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-01-11}
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 = [
@@ -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
@@ -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.18
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-01-11 00:00:00 -08:00
12
+ date: 2010-02-06 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15