httprb 0.1.4 → 0.1.5

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.
@@ -23,6 +23,7 @@ class HTTPCache
23
23
  else
24
24
  @http = Net::HTTP.new(req.uri.host, req.uri.port)
25
25
  @http.use_ssl = req.ssl?
26
+ @http.verify_mode = OpenSSL::SSL::VERIFY_NONE if req.ssl?
26
27
  @http.set_debug_output($stderr) if req.debug
27
28
  @http.start
28
29
  end
@@ -11,7 +11,8 @@ require 'cgi'
11
11
  module HTTPrb
12
12
 
13
13
  class Request
14
- attr_accessor :uri, :headers, :parameters, :ssl, :debug
14
+ attr_accessor :uri, :headers, :parameters, :ssl, :debug,
15
+ :verify_mode
15
16
  attr_reader :options
16
17
 
17
18
  # create an HTTPrb::Request object
@@ -1,6 +1,6 @@
1
1
  module HTTPrb
2
2
  # HTTPrb version
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httprb
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 17
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 1
8
- - 4
9
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
10
11
  platform: ruby
11
12
  authors:
12
13
  - thomas metge
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-11-13 00:00:00 -07:00
18
+ date: 2010-11-17 00:00:00 -07:00
18
19
  default_executable:
19
20
  dependencies: []
20
21
 
@@ -33,6 +34,9 @@ files:
33
34
  - lib/httprb/request.rb
34
35
  - lib/httprb/version.rb
35
36
  - lib/httprb.rb
37
+ - tests/test_dsl.rb
38
+ - tests/test_http_cache.rb
39
+ - tests/test_request.rb
36
40
  has_rdoc: true
37
41
  homepage: http://github.com/tommetge/httprb
38
42
  licenses: []
@@ -43,28 +47,31 @@ rdoc_options: []
43
47
  require_paths:
44
48
  - lib
45
49
  required_ruby_version: !ruby/object:Gem::Requirement
50
+ none: false
46
51
  requirements:
47
52
  - - ">="
48
53
  - !ruby/object:Gem::Version
54
+ hash: 3
49
55
  segments:
50
56
  - 0
51
57
  version: "0"
52
58
  required_rubygems_version: !ruby/object:Gem::Requirement
59
+ none: false
53
60
  requirements:
54
61
  - - ">="
55
62
  - !ruby/object:Gem::Version
63
+ hash: 3
56
64
  segments:
57
65
  - 0
58
66
  version: "0"
59
67
  requirements: []
60
68
 
61
69
  rubyforge_project:
62
- rubygems_version: 1.3.6
70
+ rubygems_version: 1.3.7
63
71
  signing_key:
64
72
  specification_version: 3
65
73
  summary: "http the ruby way: sinatra-like http client DSL"
66
74
  test_files:
67
- - tests/disabled/test_collisions.rb
68
75
  - tests/test_dsl.rb
69
76
  - tests/test_http_cache.rb
70
77
  - tests/test_request.rb
@@ -1,30 +0,0 @@
1
- require 'test/unit'
2
-
3
- $:.unshift File.join(File.dirname(File.dirname(__FILE__)), 'lib')
4
- require 'httprb'
5
-
6
- class TestDSL < Test::Unit::TestCase
7
- def setup
8
- end
9
-
10
- def teardown
11
- end
12
-
13
- def test_collisions
14
- assert_not_nil res = client_get('http://mozy.com')
15
- assert_not_nil res = client_head('mozy.com')
16
- assert_not_nil res = client_put('mozy.com')
17
- assert_not_nil res = client_post('mozy.com')
18
- assert_not_nil res = client_delete('mozy.com')
19
- end
20
-
21
- def test_custom_prefix
22
- ENV['HTTPRB_COLLISION_PREFIX'] = 'my_client'
23
- load 'httprb.rb'
24
- assert_not_nil res = my_client_get('mozy.com')
25
- assert_not_nil res = my_client_head('mozy.com')
26
- assert_not_nil res = my_client_put('mozy.com')
27
- assert_not_nil res = my_client_post('mozy.com')
28
- assert_not_nil res = my_client_delete('mozy.com')
29
- end
30
- end