rest-client 0.8 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rest-client might be problematic. Click here for more details.

data/Rakefile CHANGED
@@ -31,7 +31,7 @@ require 'rake/gempackagetask'
31
31
  require 'rake/rdoctask'
32
32
  require 'fileutils'
33
33
 
34
- version = "0.8"
34
+ version = "0.8.1"
35
35
  name = "rest-client"
36
36
 
37
37
  spec = Gem::Specification.new do |s|
data/lib/resource.rb CHANGED
@@ -71,6 +71,10 @@ module RestClient
71
71
  :headers => headers.merge(additional_headers))
72
72
  end
73
73
 
74
+ def to_s
75
+ url
76
+ end
77
+
74
78
  def user
75
79
  options[:user]
76
80
  end
data/lib/rest_client.rb CHANGED
@@ -168,6 +168,7 @@ module RestClient
168
168
 
169
169
  net = net_http_class.new(uri.host, uri.port)
170
170
  net.use_ssl = uri.is_a?(URI::HTTPS)
171
+ net.verify_mode = OpenSSL::SSL::VERIFY_NONE
171
172
 
172
173
  display_log request_log
173
174
 
@@ -68,4 +68,8 @@ describe RestClient::Resource do
68
68
  parent['posts'].user.should == 'user'
69
69
  parent['posts'].password.should == 'password'
70
70
  end
71
+
72
+ it "prints its url with to_s" do
73
+ RestClient::Resource.new('x').to_s.should == 'x'
74
+ end
71
75
  end
@@ -60,6 +60,7 @@ describe RestClient do
60
60
  Net::HTTP.stub!(:new).and_return(@net)
61
61
  @net.stub!(:start).and_yield(@http)
62
62
  @net.stub!(:use_ssl=)
63
+ @net.stub!(:verify_mode=)
63
64
  end
64
65
 
65
66
  it "requests xml mimetype" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest-client
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.8"
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Wiggins
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-13 00:00:00 -07:00
12
+ date: 2008-11-18 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15