runcible 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,4 +22,8 @@
22
22
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
24
  require "runcible/version"
25
- require File.join(File.dirname(__FILE__), 'runcible/resources/*.rb')
25
+ require "runcible/base"
26
+
27
+ resources = Dir[File.dirname(__FILE__) + '/runcible/resources/*.rb']
28
+ resources += Dir[File.dirname(__FILE__) + '/runcible/extensions/*.rb']
29
+ resources.each{ |f| require f }
@@ -24,7 +24,6 @@
24
24
  require 'rest_client'
25
25
  require 'oauth'
26
26
  require 'json'
27
- require './lib/runcible/oauth_setup'
28
27
 
29
28
 
30
29
  module Runcible
@@ -48,19 +47,20 @@ module Runcible
48
47
  end
49
48
 
50
49
  def self.call(method, path, options={})
51
- client = RestClient::Resource.new(config[:url], config)
50
+ path = '/pulp/api/v2/' + path
52
51
 
53
- payload = [:post, :put].include?(method) ? generate_payload(options) : {}
54
52
  headers = options[:headers] ? options[:headers] : {}
55
- params = options[:params]
56
- headers[:params] = params if params
53
+ headers[:params] = options[:params] if options[:params]
54
+ headers = add_oauth_header(method, path, headers) if config[:oauth]
55
+ headers["pulp-user"] = "admin"#config[:user]
56
+
57
+ payload = [:post, :put].include?(method) ? generate_payload(options) : {}
57
58
 
58
59
  args = [method]
59
60
  args << payload.to_json if [:post, :put].include?(method)
60
61
  args << headers if headers
61
62
 
62
- path = '/pulp/api/v2/' + path
63
-
63
+ client = RestClient::Resource.new(config[:url], config)
64
64
  process_response(client[path].send(*args))
65
65
  end
66
66
 
@@ -109,5 +109,27 @@ module Runcible
109
109
  return local_names
110
110
  end
111
111
 
112
+ def self.add_oauth_header(method, path, headers)
113
+ default_options = { :site => config[:url],
114
+ :http_method => method,
115
+ :request_token_path => "",
116
+ :authorize_path => "",
117
+ :access_token_path => "" }
118
+
119
+ default_options[:ca_file] = config[:ca_cert_file] unless config[:ca_cert_file].nil?
120
+ consumer = OAuth::Consumer.new(config[:oauth][:oauth_key], config[:oauth][:oauth_secret], default_options)
121
+
122
+ method_to_http_request = { :get => Net::HTTP::Get,
123
+ :post => Net::HTTP::Post,
124
+ :put => Net::HTTP::Put,
125
+ :delete => Net::HTTP::Delete }
126
+
127
+ http_request = method_to_http_request[method].new(path)
128
+ consumer.sign!(http_request)
129
+
130
+ headers['Authorization'] = http_request['Authorization']
131
+ return headers
132
+ end
133
+
112
134
  end
113
135
  end
@@ -21,7 +21,7 @@
21
21
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
- require './lib/runcible/resources/repository'
24
+ require 'runcible/resources/repository'
25
25
 
26
26
 
27
27
  module Runcible
@@ -21,7 +21,7 @@
21
21
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
- require './lib/runcible/base'
24
+ require 'runcible/base'
25
25
 
26
26
 
27
27
  module Runcible
@@ -21,7 +21,7 @@
21
21
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
- require 'lib/runcible/base'
24
+ require 'runcible/base'
25
25
 
26
26
 
27
27
  module Runcible
@@ -21,7 +21,7 @@
21
21
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
- require './lib/runcible/base'
24
+ require 'runcible/base'
25
25
 
26
26
 
27
27
  module Runcible
@@ -21,7 +21,7 @@
21
21
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
- require 'lib/runcible/base'
24
+ require 'runcible/base'
25
25
 
26
26
 
27
27
  module Runcible
@@ -1,3 +1,3 @@
1
1
  module Runcible
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,5 +1,4 @@
1
1
  ---
2
- recorded_with: VCR 2.2.4
3
2
  http_interactions:
4
3
  - request:
5
4
  method: delete
@@ -7,12 +6,12 @@ http_interactions:
7
6
  body:
8
7
  string: ""
9
8
  headers:
10
- Accept-Encoding:
11
- - gzip, deflate
12
- Content-Type:
13
- - application/json
14
9
  Accept:
15
10
  - application/json
11
+ Content-Type:
12
+ - application/json
13
+ Accept-Encoding:
14
+ - gzip, deflate
16
15
  response:
17
16
  status:
18
17
  code: 200
@@ -20,14 +19,14 @@ http_interactions:
20
19
  headers:
21
20
  Server:
22
21
  - Apache/2.2.22 (Fedora)
23
- Content-Type:
24
- - application/json
25
- Content-Length:
26
- - "4"
27
22
  Connection:
28
23
  - close
29
24
  Date:
30
25
  - Sun, 09 Sep 2012 00:16:36 GMT
26
+ Content-Type:
27
+ - application/json
28
+ Content-Length:
29
+ - "4"
31
30
  body:
32
31
  string: "null"
33
32
  http_version:
@@ -38,12 +37,12 @@ http_interactions:
38
37
  body:
39
38
  string: ""
40
39
  headers:
41
- Accept-Encoding:
42
- - gzip, deflate
43
- Content-Type:
44
- - application/json
45
40
  Accept:
46
41
  - application/json
42
+ Content-Type:
43
+ - application/json
44
+ Accept-Encoding:
45
+ - gzip, deflate
47
46
  response:
48
47
  status:
49
48
  code: 404
@@ -51,14 +50,14 @@ http_interactions:
51
50
  headers:
52
51
  Server:
53
52
  - Apache/2.2.22 (Fedora)
54
- Content-Type:
55
- - text/html; charset=UTF-8
56
- Content-Length:
57
- - "9"
58
53
  Connection:
59
54
  - close
60
55
  Date:
61
56
  - Sun, 09 Sep 2012 04:31:41 GMT
57
+ Content-Type:
58
+ - text/html; charset=UTF-8
59
+ Content-Length:
60
+ - "9"
62
61
  body:
63
62
  string: not found
64
63
  http_version:
@@ -69,12 +68,12 @@ http_interactions:
69
68
  body:
70
69
  string: ""
71
70
  headers:
72
- Accept-Encoding:
73
- - gzip, deflate
74
- Content-Type:
75
- - application/json
76
71
  Accept:
77
72
  - application/json
73
+ Content-Type:
74
+ - application/json
75
+ Accept-Encoding:
76
+ - gzip, deflate
78
77
  response:
79
78
  status:
80
79
  code: 404
@@ -82,14 +81,14 @@ http_interactions:
82
81
  headers:
83
82
  Server:
84
83
  - Apache/2.2.22 (Fedora)
85
- Content-Type:
86
- - text/html; charset=UTF-8
87
- Content-Length:
88
- - "9"
89
84
  Connection:
90
85
  - close
91
86
  Date:
92
87
  - Sun, 09 Sep 2012 04:32:39 GMT
88
+ Content-Type:
89
+ - text/html; charset=UTF-8
90
+ Content-Length:
91
+ - "9"
93
92
  body:
94
93
  string: not found
95
94
  http_version:
@@ -100,12 +99,12 @@ http_interactions:
100
99
  body:
101
100
  string: ""
102
101
  headers:
103
- Accept-Encoding:
104
- - gzip, deflate
105
- Content-Type:
106
- - application/json
107
102
  Accept:
108
103
  - application/json
104
+ Content-Type:
105
+ - application/json
106
+ Accept-Encoding:
107
+ - gzip, deflate
109
108
  response:
110
109
  status:
111
110
  code: 404
@@ -113,14 +112,14 @@ http_interactions:
113
112
  headers:
114
113
  Server:
115
114
  - Apache/2.2.22 (Fedora)
116
- Content-Type:
117
- - text/html; charset=UTF-8
118
- Content-Length:
119
- - "9"
120
115
  Connection:
121
116
  - close
122
117
  Date:
123
118
  - Sun, 09 Sep 2012 04:33:46 GMT
119
+ Content-Type:
120
+ - text/html; charset=UTF-8
121
+ Content-Length:
122
+ - "9"
124
123
  body:
125
124
  string: not found
126
125
  http_version:
@@ -131,14 +130,14 @@ http_interactions:
131
130
  body:
132
131
  string: "{\"password\":\"integration_test_user\",\"login\":\"integration_test_user\",\"name\":\"integration_test_password\"}"
133
132
  headers:
134
- Accept-Encoding:
135
- - gzip, deflate
133
+ Accept:
134
+ - application/json
136
135
  Content-Type:
137
136
  - application/json
138
137
  Content-Length:
139
138
  - "103"
140
- Accept:
141
- - application/json
139
+ Accept-Encoding:
140
+ - gzip, deflate
142
141
  response:
143
142
  status:
144
143
  code: 404
@@ -146,14 +145,14 @@ http_interactions:
146
145
  headers:
147
146
  Server:
148
147
  - Apache/2.2.22 (Fedora)
149
- Content-Type:
150
- - text/html; charset=UTF-8
151
- Content-Length:
152
- - "9"
153
148
  Connection:
154
149
  - close
155
150
  Date:
156
151
  - Sun, 09 Sep 2012 04:33:46 GMT
152
+ Content-Type:
153
+ - text/html; charset=UTF-8
154
+ Content-Length:
155
+ - "9"
157
156
  body:
158
157
  string: not found
159
158
  http_version:
@@ -164,12 +163,12 @@ http_interactions:
164
163
  body:
165
164
  string: ""
166
165
  headers:
167
- Accept-Encoding:
168
- - gzip, deflate
169
- Content-Type:
170
- - application/json
171
166
  Accept:
172
167
  - application/json
168
+ Content-Type:
169
+ - application/json
170
+ Accept-Encoding:
171
+ - gzip, deflate
173
172
  response:
174
173
  status:
175
174
  code: 200
@@ -177,30 +176,59 @@ http_interactions:
177
176
  headers:
178
177
  Server:
179
178
  - Apache/2.2.22 (Fedora)
180
- Content-Type:
181
- - application/json
182
- Content-Length:
183
- - "267"
184
179
  Connection:
185
180
  - close
186
181
  Date:
187
182
  - Sun, 09 Sep 2012 10:52:52 GMT
183
+ Content-Type:
184
+ - application/json
185
+ Content-Length:
186
+ - "267"
188
187
  body:
189
188
  string: "{\"_id\": {\"$oid\": \"5048f6c5ec6a6d6734000008\"}, \"name\": \"admin\", \"roles\": [\"super-users\"], \"_ns\": \"users\", \"login\": \"admin\", \"password\": \"VVz8lz2wFGM=,TKtfpt6HEXaxzEGRaDeJm5Zo7UsCdf9d26QVyiKKnb4=\", \"id\": \"5048f6c5ec6a6d6734000008\", \"_href\": \"/pulp/api/v2/users/admin/\"}"
190
189
  http_version:
191
190
  recorded_at: Sun, 09 Sep 2012 10:52:52 GMT
192
191
  - request:
193
- method: get
192
+ method: delete
194
193
  uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_user/
195
194
  body:
196
195
  string: ""
197
196
  headers:
197
+ Accept:
198
+ - application/json
199
+ Content-Type:
200
+ - application/json
198
201
  Accept-Encoding:
199
202
  - gzip, deflate
203
+ response:
204
+ status:
205
+ code: 200
206
+ message: OK
207
+ headers:
208
+ Server:
209
+ - Apache/2.2.22 (Fedora)
210
+ Date:
211
+ - Thu, 13 Sep 2012 21:19:38 GMT
200
212
  Content-Type:
201
213
  - application/json
214
+ Content-Length:
215
+ - "4"
216
+ body:
217
+ string: "null"
218
+ http_version:
219
+ recorded_at: Thu, 13 Sep 2012 21:19:38 GMT
220
+ - request:
221
+ method: get
222
+ uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_user/
223
+ body:
224
+ string: ""
225
+ headers:
202
226
  Accept:
203
227
  - application/json
228
+ Content-Type:
229
+ - application/json
230
+ Accept-Encoding:
231
+ - gzip, deflate
204
232
  response:
205
233
  status:
206
234
  code: 200
@@ -208,65 +236,263 @@ http_interactions:
208
236
  headers:
209
237
  Server:
210
238
  - Apache/2.2.22 (Fedora)
239
+ Date:
240
+ - Thu, 13 Sep 2012 21:19:40 GMT
211
241
  Content-Type:
212
242
  - application/json
213
243
  Content-Length:
214
244
  - "247"
215
- Connection:
216
- - close
217
- Date:
218
- - Mon, 10 Sep 2012 01:16:08 GMT
219
245
  body:
220
- string: "{\"_id\": {\"$oid\": \"504d3f58ec6a6d697600182e\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"password\": null, \"id\": \"504d3f58ec6a6d697600182e\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
246
+ string: "{\"_id\": {\"$oid\": \"50524decdc792114e700002a\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"password\": null, \"id\": \"50524decdc792114e700002a\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
221
247
  http_version:
222
- recorded_at: Mon, 10 Sep 2012 01:16:08 GMT
248
+ recorded_at: Thu, 13 Sep 2012 21:19:40 GMT
223
249
  - request:
224
250
  method: post
225
251
  uri: https://admin:admin@localhost/pulp/api/v2/users/
226
252
  body:
227
- string: "{\"login\":\"integration_test_user\"}"
253
+ string: "{\"password\":\"integration_test_password\",\"login\":\"integration_test_user\",\"name\":\"integration_test_user\"}"
228
254
  headers:
255
+ Accept:
256
+ - application/json
229
257
  Content-Type:
230
258
  - application/json
259
+ Content-Length:
260
+ - "103"
231
261
  Accept-Encoding:
232
262
  - gzip, deflate
263
+ response:
264
+ status:
265
+ code: 201
266
+ message: Created
267
+ headers:
268
+ Location:
269
+ - integration_test_user
270
+ Server:
271
+ - Apache/2.2.22 (Fedora)
272
+ Date:
273
+ - Thu, 13 Sep 2012 21:19:41 GMT
274
+ Content-Type:
275
+ - application/json
233
276
  Content-Length:
234
- - "33"
277
+ - "229"
278
+ body:
279
+ string: "{\"_id\": {\"$oid\": \"50524deedc792114e7000041\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"id\": \"50524deedc792114e7000041\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
280
+ http_version:
281
+ recorded_at: Thu, 13 Sep 2012 21:19:42 GMT
282
+ - request:
283
+ method: post
284
+ uri: https://localhost/pulp/api/v2/users/
285
+ body:
286
+ string: "{\"password\":\"integration_test_password\",\"login\":\"integration_test_user\",\"name\":\"integration_test_user\"}"
287
+ headers:
235
288
  Accept:
236
289
  - application/json
290
+ Authorization:
291
+ - OAuth oauth_body_hash="2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D", oauth_consumer_key="katello", oauth_nonce="uEdiZ5ik2FlxbjLpkF99lrlpNyi2OORNiLflX0MxY", oauth_signature="wLHkSByoJx2Xuue9OhxJE8xXZDM%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1347571252", oauth_version="1.0"
292
+ Content-Type:
293
+ - application/json
294
+ Content-Length:
295
+ - "103"
296
+ Accept-Encoding:
297
+ - gzip, deflate
237
298
  response:
238
299
  status:
239
- code: 201
240
- message: Created
300
+ code: 401
301
+ message: Unauthorized
241
302
  headers:
242
303
  Server:
243
304
  - Apache/2.2.22 (Fedora)
305
+ Date:
306
+ - Thu, 13 Sep 2012 21:20:52 GMT
244
307
  Content-Type:
245
308
  - application/json
309
+ Content-Length:
310
+ - "25"
311
+ body:
312
+ string: "\"Invalid SSL Certificate\""
313
+ http_version:
314
+ recorded_at: Thu, 13 Sep 2012 21:20:52 GMT
315
+ - request:
316
+ method: post
317
+ uri: https://admin:@knifeparty.localdomain/pulp/api/v2/users/
318
+ body:
319
+ string: "{\"password\":\"integration_test_password\",\"login\":\"integration_test_user\",\"name\":\"integration_test_user\"}"
320
+ headers:
321
+ Pulp-User:
322
+ - admin
323
+ Accept:
324
+ - application/json
325
+ Content-Type:
326
+ - application/json
327
+ Content-Length:
328
+ - "103"
329
+ Accept-Encoding:
330
+ - gzip, deflate
331
+ response:
332
+ status:
333
+ code: 401
334
+ message: Unauthorized
335
+ headers:
336
+ Server:
337
+ - Apache/2.2.22 (Fedora)
338
+ Date:
339
+ - Thu, 13 Sep 2012 23:46:28 GMT
340
+ Content-Type:
341
+ - application/json
342
+ Content-Length:
343
+ - "30"
344
+ body:
345
+ string: "\"Invalid username or password\""
346
+ http_version:
347
+ recorded_at: Thu, 13 Sep 2012 23:46:28 GMT
348
+ - request:
349
+ method: get
350
+ uri: https://knifeparty.localdomain/pulp/api/v2/users/integration_test_user/
351
+ body:
352
+ string: ""
353
+ headers:
354
+ Pulp-User:
355
+ - admin
356
+ Accept:
357
+ - application/json
358
+ Authorization:
359
+ - OAuth oauth_consumer_key="katello", oauth_nonce="NLYFXbzmW8tHCCpajVrHIM5aO6kRGFoJyzoErEXJaGM", oauth_signature="pDffLtDuek1y91NpubSbKRnxeyY%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1347580101", oauth_version="1.0"
360
+ Content-Type:
361
+ - application/json
362
+ Accept-Encoding:
363
+ - gzip, deflate
364
+ response:
365
+ status:
366
+ code: 200
367
+ message: OK
368
+ headers:
369
+ Server:
370
+ - Apache/2.2.22 (Fedora)
371
+ Date:
372
+ - Thu, 13 Sep 2012 23:48:21 GMT
373
+ Content-Type:
374
+ - application/json
375
+ Content-Length:
376
+ - "247"
377
+ body:
378
+ string: "{\"_id\": {\"$oid\": \"505270c5dc792114e700017d\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"password\": null, \"id\": \"505270c5dc792114e700017d\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
379
+ http_version:
380
+ recorded_at: Thu, 13 Sep 2012 23:48:22 GMT
381
+ - request:
382
+ method: delete
383
+ uri: https://knifeparty.localdomain/pulp/api/v2/users/integration_test_user/
384
+ body:
385
+ string: ""
386
+ headers:
387
+ Pulp-User:
388
+ - admin
389
+ Accept:
390
+ - application/json
391
+ Authorization:
392
+ - OAuth oauth_consumer_key="katello", oauth_nonce="63aS6dF2dWhQjFDqKByNMQHODfWmWtC6FNZE8oiQKzE", oauth_signature="4behX7wP8uUwZuRPT6T53wdUKmI%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1347580103", oauth_version="1.0"
393
+ Content-Type:
394
+ - application/json
395
+ Accept-Encoding:
396
+ - gzip, deflate
397
+ response:
398
+ status:
399
+ code: 200
400
+ message: OK
401
+ headers:
402
+ Server:
403
+ - Apache/2.2.22 (Fedora)
404
+ Date:
405
+ - Thu, 13 Sep 2012 23:48:23 GMT
406
+ Content-Type:
407
+ - application/json
408
+ Content-Length:
409
+ - "4"
410
+ body:
411
+ string: "null"
412
+ http_version:
413
+ recorded_at: Thu, 13 Sep 2012 23:48:23 GMT
414
+ - request:
415
+ method: post
416
+ uri: https://knifeparty.localdomain/pulp/api/v2/users/
417
+ body:
418
+ string: "{\"password\":\"integration_test_password\",\"login\":\"integration_test_user\",\"name\":\"integration_test_user\"}"
419
+ headers:
420
+ Pulp-User:
421
+ - admin
422
+ Accept:
423
+ - application/json
424
+ Authorization:
425
+ - OAuth oauth_body_hash="2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D", oauth_consumer_key="katello", oauth_nonce="4UhIs4SCy7MDcc9k5Py4x1486mcvJ3LHPYh0n4g", oauth_signature="AbvEDcCnBThE7%2BWB7AWyIfalLrM%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1347580104", oauth_version="1.0"
426
+ Content-Type:
427
+ - application/json
428
+ Content-Length:
429
+ - "103"
430
+ Accept-Encoding:
431
+ - gzip, deflate
432
+ response:
433
+ status:
434
+ code: 201
435
+ message: Created
436
+ headers:
246
437
  Location:
247
438
  - integration_test_user
248
- Connection:
249
- - close
439
+ Server:
440
+ - Apache/2.2.22 (Fedora)
441
+ Date:
442
+ - Thu, 13 Sep 2012 23:48:24 GMT
443
+ Content-Type:
444
+ - application/json
250
445
  Content-Length:
251
446
  - "229"
252
- Date:
253
- - Mon, 10 Sep 2012 01:18:30 GMT
254
447
  body:
255
- string: "{\"_id\": {\"$oid\": \"504d3fe6ec6a6d69760018f5\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"id\": \"504d3fe6ec6a6d69760018f5\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
448
+ string: "{\"_id\": {\"$oid\": \"505270c8dc792114e70001b4\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"id\": \"505270c8dc792114e70001b4\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
256
449
  http_version:
257
- recorded_at: Mon, 10 Sep 2012 01:18:30 GMT
450
+ recorded_at: Thu, 13 Sep 2012 23:48:24 GMT
258
451
  - request:
259
- method: delete
260
- uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_user/
452
+ method: get
453
+ uri: https://admin:admin@knifeparty.localdomain/pulp/api/v2/users/integration_test_user/
261
454
  body:
262
455
  string: ""
263
456
  headers:
457
+ Pulp-User:
458
+ - admin
459
+ Accept:
460
+ - application/json
264
461
  Content-Type:
265
462
  - application/json
266
463
  Accept-Encoding:
267
464
  - gzip, deflate
465
+ response:
466
+ status:
467
+ code: 200
468
+ message: OK
469
+ headers:
470
+ Server:
471
+ - Apache/2.2.22 (Fedora)
472
+ Date:
473
+ - Fri, 14 Sep 2012 00:58:45 GMT
474
+ Content-Type:
475
+ - application/json
476
+ Content-Length:
477
+ - "247"
478
+ body:
479
+ string: "{\"_id\": {\"$oid\": \"50528145dc792114e70001bf\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"password\": null, \"id\": \"50528145dc792114e70001bf\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
480
+ http_version:
481
+ recorded_at: Fri, 14 Sep 2012 00:58:45 GMT
482
+ - request:
483
+ method: delete
484
+ uri: https://admin:admin@knifeparty.localdomain/pulp/api/v2/users/integration_test_user/
485
+ body:
486
+ string: ""
487
+ headers:
488
+ Pulp-User:
489
+ - admin
268
490
  Accept:
269
491
  - application/json
492
+ Content-Type:
493
+ - application/json
494
+ Accept-Encoding:
495
+ - gzip, deflate
270
496
  response:
271
497
  status:
272
498
  code: 200
@@ -274,15 +500,49 @@ http_interactions:
274
500
  headers:
275
501
  Server:
276
502
  - Apache/2.2.22 (Fedora)
503
+ Date:
504
+ - Fri, 14 Sep 2012 00:58:48 GMT
277
505
  Content-Type:
278
506
  - application/json
279
- Connection:
280
- - close
281
507
  Content-Length:
282
508
  - "4"
283
- Date:
284
- - Mon, 10 Sep 2012 01:18:30 GMT
285
509
  body:
286
510
  string: "null"
287
511
  http_version:
288
- recorded_at: Mon, 10 Sep 2012 01:18:31 GMT
512
+ recorded_at: Fri, 14 Sep 2012 00:58:48 GMT
513
+ - request:
514
+ method: post
515
+ uri: https://admin:admin@knifeparty.localdomain/pulp/api/v2/users/
516
+ body:
517
+ string: "{\"password\":\"integration_test_password\",\"login\":\"integration_test_user\",\"name\":\"integration_test_user\"}"
518
+ headers:
519
+ Pulp-User:
520
+ - admin
521
+ Accept:
522
+ - application/json
523
+ Content-Type:
524
+ - application/json
525
+ Content-Length:
526
+ - "103"
527
+ Accept-Encoding:
528
+ - gzip, deflate
529
+ response:
530
+ status:
531
+ code: 201
532
+ message: Created
533
+ headers:
534
+ Server:
535
+ - Apache/2.2.22 (Fedora)
536
+ Location:
537
+ - integration_test_user
538
+ Date:
539
+ - Fri, 14 Sep 2012 00:58:49 GMT
540
+ Content-Type:
541
+ - application/json
542
+ Content-Length:
543
+ - "229"
544
+ body:
545
+ string: "{\"_id\": {\"$oid\": \"50528149dc792114e70001f6\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"id\": \"50528149dc792114e70001f6\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
546
+ http_version:
547
+ recorded_at: Fri, 14 Sep 2012 00:58:49 GMT
548
+ recorded_with: VCR 2.2.5
@@ -17,16 +17,16 @@ http_interactions:
17
17
  code: 404
18
18
  message: Not Found
19
19
  headers:
20
- Content-Type:
21
- - text/html; charset=UTF-8
22
- Content-Length:
23
- - "9"
24
- Date:
25
- - Sun, 09 Sep 2012 04:32:39 GMT
26
20
  Server:
27
21
  - Apache/2.2.22 (Fedora)
28
22
  Connection:
29
23
  - close
24
+ Date:
25
+ - Sun, 09 Sep 2012 04:32:39 GMT
26
+ Content-Type:
27
+ - text/html; charset=UTF-8
28
+ Content-Length:
29
+ - "9"
30
30
  body:
31
31
  string: not found
32
32
  http_version:
@@ -48,16 +48,16 @@ http_interactions:
48
48
  code: 404
49
49
  message: Not Found
50
50
  headers:
51
- Content-Type:
52
- - text/html; charset=UTF-8
53
- Content-Length:
54
- - "9"
55
- Date:
56
- - Sun, 09 Sep 2012 04:33:47 GMT
57
51
  Server:
58
52
  - Apache/2.2.22 (Fedora)
59
53
  Connection:
60
54
  - close
55
+ Date:
56
+ - Sun, 09 Sep 2012 04:33:47 GMT
57
+ Content-Type:
58
+ - text/html; charset=UTF-8
59
+ Content-Length:
60
+ - "9"
61
61
  body:
62
62
  string: not found
63
63
  http_version:
@@ -72,25 +72,25 @@ http_interactions:
72
72
  - application/json
73
73
  Content-Type:
74
74
  - application/json
75
- Accept-Encoding:
76
- - gzip, deflate
77
75
  Content-Length:
78
76
  - "103"
77
+ Accept-Encoding:
78
+ - gzip, deflate
79
79
  response:
80
80
  status:
81
81
  code: 404
82
82
  message: Not Found
83
83
  headers:
84
- Content-Type:
85
- - text/html; charset=UTF-8
86
- Content-Length:
87
- - "9"
88
- Date:
89
- - Sun, 09 Sep 2012 04:33:47 GMT
90
84
  Server:
91
85
  - Apache/2.2.22 (Fedora)
92
86
  Connection:
93
87
  - close
88
+ Date:
89
+ - Sun, 09 Sep 2012 04:33:47 GMT
90
+ Content-Type:
91
+ - text/html; charset=UTF-8
92
+ Content-Length:
93
+ - "9"
94
94
  body:
95
95
  string: not found
96
96
  http_version:
@@ -105,31 +105,29 @@ http_interactions:
105
105
  - application/json
106
106
  Content-Type:
107
107
  - application/json
108
- Accept-Encoding:
109
- - gzip, deflate
110
108
  Content-Length:
111
109
  - "33"
110
+ Accept-Encoding:
111
+ - gzip, deflate
112
112
  response:
113
113
  status:
114
114
  code: 201
115
115
  message: Created
116
116
  headers:
117
- Content-Type:
118
- - application/json
119
117
  Location:
120
118
  - integration_test_user
121
- Content-Length:
122
- - "229"
123
- Date:
124
- - Mon, 10 Sep 2012 01:16:08 GMT
125
119
  Server:
126
120
  - Apache/2.2.22 (Fedora)
127
- Connection:
128
- - close
121
+ Date:
122
+ - Thu, 13 Sep 2012 21:19:40 GMT
123
+ Content-Type:
124
+ - application/json
125
+ Content-Length:
126
+ - "229"
129
127
  body:
130
- string: "{\"_id\": {\"$oid\": \"504d3f59ec6a6d697600183a\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"id\": \"504d3f59ec6a6d697600183a\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
128
+ string: "{\"_id\": {\"$oid\": \"50524decdc792114e700002a\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"id\": \"50524decdc792114e700002a\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
131
129
  http_version:
132
- recorded_at: Mon, 10 Sep 2012 01:16:09 GMT
130
+ recorded_at: Thu, 13 Sep 2012 21:19:40 GMT
133
131
  - request:
134
132
  method: get
135
133
  uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_user/
@@ -147,28 +145,191 @@ http_interactions:
147
145
  code: 200
148
146
  message: OK
149
147
  headers:
148
+ Server:
149
+ - Apache/2.2.22 (Fedora)
150
+ Date:
151
+ - Thu, 13 Sep 2012 21:19:42 GMT
150
152
  Content-Type:
151
153
  - application/json
152
154
  Content-Length:
153
155
  - "302"
156
+ body:
157
+ string: "{\"_id\": {\"$oid\": \"50524deedc792114e7000041\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"password\": \"TtzSzZ3nndo=,lUHZuadr+J5A2gz5TDKPTBR6gmLFUkNN/NQ6APIWfoQ=\", \"id\": \"50524deedc792114e7000041\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
158
+ http_version:
159
+ recorded_at: Thu, 13 Sep 2012 21:19:42 GMT
160
+ - request:
161
+ method: delete
162
+ uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_user/
163
+ body:
164
+ string: ""
165
+ headers:
166
+ Accept:
167
+ - application/json
168
+ Content-Type:
169
+ - application/json
170
+ Accept-Encoding:
171
+ - gzip, deflate
172
+ response:
173
+ status:
174
+ code: 200
175
+ message: OK
176
+ headers:
177
+ Server:
178
+ - Apache/2.2.22 (Fedora)
179
+ Date:
180
+ - Thu, 13 Sep 2012 21:19:42 GMT
181
+ Content-Type:
182
+ - application/json
183
+ Content-Length:
184
+ - "4"
185
+ body:
186
+ string: "null"
187
+ http_version:
188
+ recorded_at: Thu, 13 Sep 2012 21:19:42 GMT
189
+ - request:
190
+ method: get
191
+ uri: https://localhost/pulp/api/v2/users/integration_test_user/
192
+ body:
193
+ string: ""
194
+ headers:
195
+ Accept:
196
+ - application/json
197
+ Authorization:
198
+ - OAuth oauth_consumer_key="katello", oauth_nonce="rlmGy4UnIV27cHcMtBkY0ilGR4mEkRF7i9pBXbS4PGc", oauth_signature="zlb5q5q27CYBrAe69uqYfURvbno%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1347572405", oauth_version="1.0"
199
+ Content-Type:
200
+ - application/json
201
+ Accept-Encoding:
202
+ - gzip, deflate
203
+ response:
204
+ status:
205
+ code: 401
206
+ message: Unauthorized
207
+ headers:
208
+ Server:
209
+ - Apache/2.2.22 (Fedora)
154
210
  Date:
155
- - Mon, 10 Sep 2012 01:16:10 GMT
211
+ - Thu, 13 Sep 2012 21:40:05 GMT
212
+ Content-Type:
213
+ - application/json
214
+ Content-Length:
215
+ - "25"
216
+ body:
217
+ string: "\"Invalid SSL Certificate\""
218
+ http_version:
219
+ recorded_at: Thu, 13 Sep 2012 21:40:05 GMT
220
+ - request:
221
+ method: get
222
+ uri: https://admin:@knifeparty.localdomain/pulp/api/v2/users/integration_test_user/
223
+ body:
224
+ string: ""
225
+ headers:
226
+ Pulp-User:
227
+ - admin
228
+ Accept:
229
+ - application/json
230
+ Content-Type:
231
+ - application/json
232
+ Accept-Encoding:
233
+ - gzip, deflate
234
+ response:
235
+ status:
236
+ code: 401
237
+ message: Unauthorized
238
+ headers:
156
239
  Server:
157
240
  - Apache/2.2.22 (Fedora)
158
- Connection:
159
- - close
241
+ Date:
242
+ - Thu, 13 Sep 2012 23:46:28 GMT
243
+ Content-Type:
244
+ - application/json
245
+ Content-Length:
246
+ - "30"
247
+ body:
248
+ string: "\"Invalid username or password\""
249
+ http_version:
250
+ recorded_at: Thu, 13 Sep 2012 23:46:28 GMT
251
+ - request:
252
+ method: post
253
+ uri: https://knifeparty.localdomain/pulp/api/v2/users/
160
254
  body:
161
- string: "{\"_id\": {\"$oid\": \"504d3f5aec6a6d6976001850\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"password\": \"Ud1yuk10NCA=,/dvwUqWKkt7TtOWJ0EEkzcy1+r+eHGKtxelPmLMn86w=\", \"id\": \"504d3f5aec6a6d6976001850\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
255
+ string: "{\"login\":\"integration_test_user\"}"
256
+ headers:
257
+ Pulp-User:
258
+ - admin
259
+ Accept:
260
+ - application/json
261
+ Authorization:
262
+ - OAuth oauth_body_hash="2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D", oauth_consumer_key="katello", oauth_nonce="vAZCLjpa6EyiK3s6UqKNmziRvnEsQa388o08GNzID5k", oauth_signature="Y9u7fArmvws145eQOPudLIvdAiI%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1347580103", oauth_version="1.0"
263
+ Content-Type:
264
+ - application/json
265
+ Content-Length:
266
+ - "33"
267
+ Accept-Encoding:
268
+ - gzip, deflate
269
+ response:
270
+ status:
271
+ code: 201
272
+ message: Created
273
+ headers:
274
+ Location:
275
+ - integration_test_user
276
+ Server:
277
+ - Apache/2.2.22 (Fedora)
278
+ Date:
279
+ - Thu, 13 Sep 2012 23:48:23 GMT
280
+ Content-Type:
281
+ - application/json
282
+ Content-Length:
283
+ - "229"
284
+ body:
285
+ string: "{\"_id\": {\"$oid\": \"505270c7dc792114e700019f\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"id\": \"505270c7dc792114e700019f\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
162
286
  http_version:
163
- recorded_at: Mon, 10 Sep 2012 01:16:10 GMT
287
+ recorded_at: Thu, 13 Sep 2012 23:48:23 GMT
288
+ - request:
289
+ method: get
290
+ uri: https://knifeparty.localdomain/pulp/api/v2/users/integration_test_user/
291
+ body:
292
+ string: ""
293
+ headers:
294
+ Pulp-User:
295
+ - admin
296
+ Accept:
297
+ - application/json
298
+ Authorization:
299
+ - OAuth oauth_consumer_key="katello", oauth_nonce="oxQGWuj49uyqw89r86PSRtsD8YijYBn8DWghQvPwQ", oauth_signature="TqzP%2FrNNxAS5EjdXx%2FrhRoclDn8%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1347580104", oauth_version="1.0"
300
+ Content-Type:
301
+ - application/json
302
+ Accept-Encoding:
303
+ - gzip, deflate
304
+ response:
305
+ status:
306
+ code: 200
307
+ message: OK
308
+ headers:
309
+ Server:
310
+ - Apache/2.2.22 (Fedora)
311
+ Date:
312
+ - Thu, 13 Sep 2012 23:48:24 GMT
313
+ Content-Type:
314
+ - application/json
315
+ Content-Length:
316
+ - "302"
317
+ body:
318
+ string: "{\"_id\": {\"$oid\": \"505270c8dc792114e70001b4\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"password\": \"rtccCcy7u8c=,MifOD0W86ExRq5niZqvOHR6dekzd+cqJzlLKT64p9o0=\", \"id\": \"505270c8dc792114e70001b4\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
319
+ http_version:
320
+ recorded_at: Thu, 13 Sep 2012 23:48:24 GMT
164
321
  - request:
165
322
  method: delete
166
- uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_user/
323
+ uri: https://knifeparty.localdomain/pulp/api/v2/users/integration_test_user/
167
324
  body:
168
325
  string: ""
169
326
  headers:
327
+ Pulp-User:
328
+ - admin
170
329
  Accept:
171
330
  - application/json
331
+ Authorization:
332
+ - OAuth oauth_consumer_key="katello", oauth_nonce="lPppGJBo0u14WM8UznaPhWusnvwZZLBXu5IT5j9oUzw", oauth_signature="lnBD%2F5w6%2B2bV49PCF4zCZREDw8o%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1347580104", oauth_version="1.0"
172
333
  Content-Type:
173
334
  - application/json
174
335
  Accept-Encoding:
@@ -178,18 +339,113 @@ http_interactions:
178
339
  code: 200
179
340
  message: OK
180
341
  headers:
342
+ Server:
343
+ - Apache/2.2.22 (Fedora)
344
+ Date:
345
+ - Thu, 13 Sep 2012 23:48:24 GMT
181
346
  Content-Type:
182
347
  - application/json
183
348
  Content-Length:
184
349
  - "4"
350
+ body:
351
+ string: "null"
352
+ http_version:
353
+ recorded_at: Thu, 13 Sep 2012 23:48:24 GMT
354
+ - request:
355
+ method: post
356
+ uri: https://admin:admin@knifeparty.localdomain/pulp/api/v2/users/
357
+ body:
358
+ string: "{\"login\":\"integration_test_user\"}"
359
+ headers:
360
+ Pulp-User:
361
+ - admin
362
+ Accept:
363
+ - application/json
364
+ Content-Type:
365
+ - application/json
366
+ Content-Length:
367
+ - "33"
368
+ Accept-Encoding:
369
+ - gzip, deflate
370
+ response:
371
+ status:
372
+ code: 201
373
+ message: Created
374
+ headers:
375
+ Server:
376
+ - Apache/2.2.22 (Fedora)
377
+ Location:
378
+ - integration_test_user
379
+ Date:
380
+ - Fri, 14 Sep 2012 00:58:47 GMT
381
+ Content-Type:
382
+ - application/json
383
+ Content-Length:
384
+ - "229"
385
+ body:
386
+ string: "{\"_id\": {\"$oid\": \"50528148dc792114e70001e1\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"id\": \"50528148dc792114e70001e1\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
387
+ http_version:
388
+ recorded_at: Fri, 14 Sep 2012 00:58:48 GMT
389
+ - request:
390
+ method: get
391
+ uri: https://admin:admin@knifeparty.localdomain/pulp/api/v2/users/integration_test_user/
392
+ body:
393
+ string: ""
394
+ headers:
395
+ Pulp-User:
396
+ - admin
397
+ Accept:
398
+ - application/json
399
+ Content-Type:
400
+ - application/json
401
+ Accept-Encoding:
402
+ - gzip, deflate
403
+ response:
404
+ status:
405
+ code: 200
406
+ message: OK
407
+ headers:
408
+ Server:
409
+ - Apache/2.2.22 (Fedora)
185
410
  Date:
186
- - Mon, 10 Sep 2012 01:16:10 GMT
411
+ - Fri, 14 Sep 2012 00:58:49 GMT
412
+ Content-Type:
413
+ - application/json
414
+ Content-Length:
415
+ - "302"
416
+ body:
417
+ string: "{\"_id\": {\"$oid\": \"50528149dc792114e70001f6\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"password\": \"KJpwU67ozJw=,mRERDp3mP169dk4fFXAK4w8n8iaWAXNsZBYW9mOBLsA=\", \"id\": \"50528149dc792114e70001f6\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
418
+ http_version:
419
+ recorded_at: Fri, 14 Sep 2012 00:58:49 GMT
420
+ - request:
421
+ method: delete
422
+ uri: https://admin:admin@knifeparty.localdomain/pulp/api/v2/users/integration_test_user/
423
+ body:
424
+ string: ""
425
+ headers:
426
+ Pulp-User:
427
+ - admin
428
+ Accept:
429
+ - application/json
430
+ Content-Type:
431
+ - application/json
432
+ Accept-Encoding:
433
+ - gzip, deflate
434
+ response:
435
+ status:
436
+ code: 200
437
+ message: OK
438
+ headers:
187
439
  Server:
188
440
  - Apache/2.2.22 (Fedora)
189
- Connection:
190
- - close
441
+ Date:
442
+ - Fri, 14 Sep 2012 00:58:49 GMT
443
+ Content-Type:
444
+ - application/json
445
+ Content-Length:
446
+ - "4"
191
447
  body:
192
448
  string: "null"
193
449
  http_version:
194
- recorded_at: Mon, 10 Sep 2012 01:16:10 GMT
195
- recorded_with: VCR 2.2.4
450
+ recorded_at: Fri, 14 Sep 2012 00:58:49 GMT
451
+ recorded_with: VCR 2.2.5
@@ -12,7 +12,6 @@
12
12
  require 'rubygems'
13
13
  require 'minitest/unit'
14
14
  require 'minitest/autorun'
15
- require 'inifile'
16
15
 
17
16
  require 'test/integration/vcr_setup'
18
17
  require 'lib/runcible/base'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runcible
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Eric D Helms
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-10 00:00:00 Z
18
+ date: 2012-09-14 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Exposing pulp's juiciest components to the Ruby world.
@@ -36,7 +36,6 @@ files:
36
36
  - lib/runcible.rb
37
37
  - lib/runcible/base.rb
38
38
  - lib/runcible/extensions/repository.rb
39
- - lib/runcible/oauth_setup.rb
40
39
  - lib/runcible/resources/repository.rb
41
40
  - lib/runcible/resources/role.rb
42
41
  - lib/runcible/resources/task.rb
@@ -1,29 +0,0 @@
1
- unless RestClient.const_defined? :OAUTH_EXTENSION
2
- RestClient::OAUTH_EXTENSION = lambda do |request, args|
3
- if args[:oauth]
4
- uri = URI.parse args[:url]
5
- default_options = { :site => "#{uri.scheme}://#{uri.host}:#{uri.port.to_s}",
6
- :request_token_path => "",
7
- :authorize_path => "",
8
- :access_token_path => "" }
9
- options = default_options.merge args[:oauth][:options] || { }
10
- consumer = OAuth::Consumer.new(args[:oauth][:oauth_key], args[:oauth][:oauth_secret], options)
11
-
12
-
13
- method_to_http_request = { :get => Net::HTTP::Get,
14
- :post => Net::HTTP::Post,
15
- :put => Net::HTTP::Put,
16
- :delete => Net::HTTP::Delete }
17
-
18
- http_request = method_to_http_request[args[:method]].
19
- new(args[:url]) # create Net::HTTPRequest to get oauth header,
20
- # because RestClient::Request is not supported by Oauth
21
- consumer.sign!(http_request)
22
- request['Authorization'] = http_request['Authorization'] # add oauth header to rest_client request
23
- end
24
- end
25
- end
26
-
27
- unless RestClient.before_execution_procs.include? RestClient::OAUTH_EXTENSION
28
- RestClient.add_before_execution_proc &RestClient::OAUTH_EXTENSION
29
- end