rufus-verbs 0.6 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.txt CHANGED
@@ -101,7 +101,10 @@ using get(), post(), put() and delete() directly
101
101
 
102
102
  Using get() and co via an EndPoint to share common options for a set of requests
103
103
 
104
- ep = EndPoint.new :host => "resta.farian.host", :port => 7080, :resource => "inventory/tools"
104
+ ep = EndPoint.new(
105
+ :host => "resta.farian.host",
106
+ :port => 7080,
107
+ :resource => "inventory/tools")
105
108
 
106
109
  res = ep.get :id => 1
107
110
  # still a silver bullet ?
@@ -112,7 +115,10 @@ Using get() and co via an EndPoint to share common options for a set of requests
112
115
 
113
116
  A ConditionalEndPoint is an EndPoint that will use conditional GETs whenever possible
114
117
 
115
- ep = ConditionalEndPoint.new :host => "resta.farian.zion", :port => 7080, :resource => "inventory/tools"
118
+ ep = ConditionalEndPoint.new(
119
+ :host => "resta.farian.zion",
120
+ :port => 7080,
121
+ :resource => "inventory/tools")
116
122
 
117
123
  res = ep.get :id => 1
118
124
  # first call will retrieve the representation completely
@@ -139,7 +145,9 @@ Digest authentication and basic authentication are available at request or endpo
139
145
 
140
146
  res = get "http://server/doc0", :hba => [ "toto", "secretpass" ]
141
147
 
142
- res = get "http://server/doc1", :digest_authentication => [ "toto", "secretpass" ]
148
+ res = get(
149
+ "http://server/doc1",
150
+ :digest_authentication => [ "toto", "secretpass" ])
143
151
 
144
152
  The tests may provide good intel as on 'rufus-verbs' usage as well : http://rufus.rubyforge.org/svn/trunk/verbs/test/
145
153
 
@@ -86,5 +86,7 @@ module Rufus::Verbs
86
86
 
87
87
  EndPoint.request :options, args
88
88
  end
89
+
90
+ extend self
89
91
  end
90
92
 
@@ -39,7 +39,7 @@ module Verbs
39
39
  #
40
40
  # The version of this rufus-verbs [gem]
41
41
  #
42
- VERSION = '0.6'
42
+ VERSION = '0.7'
43
43
  end
44
44
  end
45
45
 
@@ -56,6 +56,18 @@ class ProxyTest < Test::Unit::TestCase
56
56
  #p res0.to_hash
57
57
  #p res1.to_hash
58
58
 
59
+ via1 = res1["via"]
60
+
61
+ unless via1
62
+ puts
63
+ puts
64
+ puts "seems like no open proxy could be found... no via..."
65
+ puts "can't test for now"
66
+ puts
67
+ puts
68
+ return
69
+ end
70
+
59
71
  via1 = res1["via"].split(", ")[-1]
60
72
  # last proxy
61
73
 
@@ -99,4 +99,10 @@ class SimpleTest < Test::Unit::TestCase
99
99
  r = options "http://localhost:7777/items"
100
100
  assert_equal [ :delete, :get, :head, :options, :post, :put], r
101
101
  end
102
+
103
+ def test_6
104
+
105
+ r = Rufus::Verbs::options "http://localhost:7777/items"
106
+ assert_equal [ :delete, :get, :head, :options, :post, :put], r
107
+ end
102
108
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rufus-verbs
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.6"
4
+ version: "0.7"
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-02-13 00:00:00 +09:00
12
+ date: 2008-02-17 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency