rest-client 1.8.0-x64-mingw32 → 2.0.0.rc1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -1
- data/.rubocop-disables.yml +375 -0
- data/.rubocop.yml +3 -0
- data/.travis.yml +3 -4
- data/AUTHORS +11 -1
- data/README.rdoc +84 -16
- data/Rakefile +16 -0
- data/bin/restclient +3 -5
- data/history.md +61 -0
- data/lib/restclient.rb +19 -2
- data/lib/restclient/abstract_response.rb +107 -42
- data/lib/restclient/exceptions.rb +44 -44
- data/lib/restclient/payload.rb +2 -2
- data/lib/restclient/platform.rb +19 -0
- data/lib/restclient/raw_response.rb +4 -0
- data/lib/restclient/request.rb +141 -38
- data/lib/restclient/resource.rb +3 -3
- data/lib/restclient/response.rb +61 -5
- data/lib/restclient/utils.rb +93 -0
- data/lib/restclient/version.rb +2 -1
- data/rest-client.gemspec +6 -5
- data/spec/helpers.rb +14 -0
- data/spec/integration/_lib.rb +1 -0
- data/spec/integration/httpbin_spec.rb +72 -0
- data/spec/integration/integration_spec.rb +79 -1
- data/spec/integration/request_spec.rb +24 -1
- data/spec/spec_helper.rb +21 -1
- data/spec/unit/_lib.rb +1 -0
- data/spec/unit/abstract_response_spec.rb +22 -8
- data/spec/unit/exceptions_spec.rb +9 -17
- data/spec/unit/payload_spec.rb +10 -10
- data/spec/unit/raw_response_spec.rb +1 -1
- data/spec/unit/request2_spec.rb +6 -6
- data/spec/unit/request_spec.rb +234 -43
- data/spec/unit/resource_spec.rb +1 -1
- data/spec/unit/response_spec.rb +72 -28
- data/spec/unit/restclient_spec.rb +3 -3
- data/spec/unit/utils_spec.rb +71 -0
- data/spec/unit/windows/root_certs_spec.rb +1 -1
- metadata +41 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e53ea0a34f727007aa8bf5e564ea94d1df013413
|
4
|
+
data.tar.gz: 72d955648c12a37a8d44fb024a94c2d490b5216f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6c96879eb01e0c09c77c8f143853d75963e761cabcacd8d17a79f57c1af460dfb40f52ef3eba04146e6d4867b287f49057347a958955c89157fa34d579ae768
|
7
|
+
data.tar.gz: dd77062a891eb9e90cbd6b4c0b6e31ef3148fb2249f628f588907b433cc92ed435aea107d34452b6a8ba6a214c719f20c62c1bb8e10997a04495b02a3093a796
|
data/.rspec
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
--
|
1
|
+
--color
|
2
|
+
--format progress
|
@@ -0,0 +1,375 @@
|
|
1
|
+
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
+
# on 2014-07-08 08:57:44 +0000 using RuboCop version 0.24.1.
|
3
|
+
# The point is for the user to remove these configuration records
|
4
|
+
# one by one as the offenses are removed from the code base.
|
5
|
+
# Note that changes in the inspected code, or installation of new
|
6
|
+
# versions of RuboCop, may require this file to be generated again.
|
7
|
+
|
8
|
+
# TODO
|
9
|
+
# Offense count: 1
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
Lint/StringConversionInInterpolation:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
# Tests only
|
15
|
+
# Offense count: 16
|
16
|
+
# Cop supports --auto-correct.
|
17
|
+
Lint/UnusedBlockArgument:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Lint/Eval:
|
21
|
+
Exclude:
|
22
|
+
- rest-client.windows.gemspec
|
23
|
+
|
24
|
+
# Offense count: 4
|
25
|
+
# Cop supports --auto-correct.
|
26
|
+
Style/Alias:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
# TODO
|
30
|
+
# Offense count: 3
|
31
|
+
# Cop supports --auto-correct.
|
32
|
+
Style/AndOr:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
# TODO
|
36
|
+
# Offense count: 3
|
37
|
+
# Cop supports --auto-correct.
|
38
|
+
Style/Blocks:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
# Offense count: 48
|
42
|
+
# Cop supports --auto-correct.
|
43
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
44
|
+
Style/BracesAroundHashParameters:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
# Offense count: 1
|
48
|
+
Style/ClassAndModuleCamelCase:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
# Offense count: 2
|
52
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
53
|
+
Style/ClassAndModuleChildren:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
# TODO?
|
57
|
+
# Offense count: 14
|
58
|
+
Metrics/AbcSize:
|
59
|
+
Max: 75
|
60
|
+
|
61
|
+
# TODO?
|
62
|
+
Metrics/MethodLength:
|
63
|
+
Max: 66
|
64
|
+
|
65
|
+
# TODO?
|
66
|
+
# Offense count: 4
|
67
|
+
Metrics/PerceivedComplexity:
|
68
|
+
Max: 24
|
69
|
+
|
70
|
+
# Offense count: 1
|
71
|
+
# Configuration parameters: CountComments.
|
72
|
+
Metrics/ClassLength:
|
73
|
+
Max: 411
|
74
|
+
|
75
|
+
# TODO
|
76
|
+
# Offense count: 5
|
77
|
+
Style/ClassVars:
|
78
|
+
Enabled: false
|
79
|
+
|
80
|
+
# TODO
|
81
|
+
# Offense count: 5
|
82
|
+
# Cop supports --auto-correct.
|
83
|
+
# Configuration parameters: PreferredMethods.
|
84
|
+
Style/CollectionMethods:
|
85
|
+
Enabled: false
|
86
|
+
|
87
|
+
# TODO
|
88
|
+
# Offense count: 4
|
89
|
+
# Cop supports --auto-correct.
|
90
|
+
Style/ColonMethodCall:
|
91
|
+
Enabled: false
|
92
|
+
|
93
|
+
# Offense count: 2
|
94
|
+
Style/ConstantName:
|
95
|
+
Enabled: false
|
96
|
+
|
97
|
+
# TODO: eh?
|
98
|
+
# Offense count: 4
|
99
|
+
Metrics/CyclomaticComplexity:
|
100
|
+
Max: 22
|
101
|
+
|
102
|
+
# Offense count: 1
|
103
|
+
# Cop supports --auto-correct.
|
104
|
+
Style/DeprecatedHashMethods:
|
105
|
+
Enabled: false
|
106
|
+
|
107
|
+
# TODO: docs
|
108
|
+
# Offense count: 17
|
109
|
+
Style/Documentation:
|
110
|
+
Enabled: false
|
111
|
+
|
112
|
+
# Offense count: 9
|
113
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
114
|
+
Style/DotPosition:
|
115
|
+
Enabled: false
|
116
|
+
|
117
|
+
# Offense count: 1
|
118
|
+
Style/DoubleNegation:
|
119
|
+
Enabled: false
|
120
|
+
|
121
|
+
# TODO
|
122
|
+
# Offense count: 2
|
123
|
+
Style/EachWithObject:
|
124
|
+
Enabled: false
|
125
|
+
|
126
|
+
# Offense count: 5
|
127
|
+
# Cop supports --auto-correct.
|
128
|
+
Style/EmptyLines:
|
129
|
+
Enabled: false
|
130
|
+
|
131
|
+
# Offense count: 11
|
132
|
+
# Cop supports --auto-correct.
|
133
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
134
|
+
Style/EmptyLinesAroundClassBody:
|
135
|
+
Enabled: false
|
136
|
+
|
137
|
+
# Offense count: 1
|
138
|
+
# Cop supports --auto-correct.
|
139
|
+
Style/EmptyLinesAroundMethodBody:
|
140
|
+
Enabled: false
|
141
|
+
|
142
|
+
# Offense count: 9
|
143
|
+
# Cop supports --auto-correct.
|
144
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
145
|
+
Style/EmptyLinesAroundModuleBody:
|
146
|
+
Enabled: false
|
147
|
+
|
148
|
+
# Offense count: 31
|
149
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
150
|
+
Style/Encoding:
|
151
|
+
Enabled: false
|
152
|
+
|
153
|
+
# TODO: exclude
|
154
|
+
# Offense count: 1
|
155
|
+
# Configuration parameters: Exclude.
|
156
|
+
Style/FileName:
|
157
|
+
Enabled: false
|
158
|
+
|
159
|
+
# Offense count: 3
|
160
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
161
|
+
Style/FormatString:
|
162
|
+
Enabled: false
|
163
|
+
|
164
|
+
# TODO: configure
|
165
|
+
# Offense count: 514
|
166
|
+
# Cop supports --auto-correct.
|
167
|
+
# Configuration parameters: SupportedStyles.
|
168
|
+
Style/HashSyntax:
|
169
|
+
EnforcedStyle: hash_rockets
|
170
|
+
|
171
|
+
# NOTABUG
|
172
|
+
# Offense count: 8
|
173
|
+
# Configuration parameters: MaxLineLength.
|
174
|
+
Style/IfUnlessModifier:
|
175
|
+
Enabled: false
|
176
|
+
|
177
|
+
# TODO: configure
|
178
|
+
# Offense count: 6
|
179
|
+
# Cop supports --auto-correct.
|
180
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
181
|
+
Style/IndentHash:
|
182
|
+
Enabled: false
|
183
|
+
|
184
|
+
# NOTABUG
|
185
|
+
# Offense count: 19
|
186
|
+
Style/Lambda:
|
187
|
+
Enabled: false
|
188
|
+
|
189
|
+
# TODO
|
190
|
+
# Offense count: 14
|
191
|
+
# Cop supports --auto-correct.
|
192
|
+
Style/LeadingCommentSpace:
|
193
|
+
Enabled: false
|
194
|
+
|
195
|
+
# TODO
|
196
|
+
# Offense count: 218
|
197
|
+
# Configuration parameters: AllowURI.
|
198
|
+
Metrics/LineLength:
|
199
|
+
Max: 340
|
200
|
+
|
201
|
+
# TODO
|
202
|
+
# Offense count: 28
|
203
|
+
# Cop supports --auto-correct.
|
204
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
205
|
+
Style/MethodDefParentheses:
|
206
|
+
Enabled: false
|
207
|
+
|
208
|
+
# TODO
|
209
|
+
# Offense count: 1
|
210
|
+
Style/ModuleFunction:
|
211
|
+
Enabled: false
|
212
|
+
|
213
|
+
# Offense count: 4
|
214
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
215
|
+
Style/Next:
|
216
|
+
Enabled: false
|
217
|
+
|
218
|
+
# Offense count: 1
|
219
|
+
# Cop supports --auto-correct.
|
220
|
+
# Configuration parameters: IncludeSemanticChanges.
|
221
|
+
Style/NonNilCheck:
|
222
|
+
Enabled: false
|
223
|
+
|
224
|
+
# TODO: exclude
|
225
|
+
# Offense count: 1
|
226
|
+
# Cop supports --auto-correct.
|
227
|
+
Style/Not:
|
228
|
+
Enabled: false
|
229
|
+
|
230
|
+
# Offense count: 2
|
231
|
+
# Cop supports --auto-correct.
|
232
|
+
Style/NumericLiterals:
|
233
|
+
MinDigits: 11
|
234
|
+
|
235
|
+
# TODO?
|
236
|
+
# Offense count: 1
|
237
|
+
# Cop supports --auto-correct.
|
238
|
+
# Configuration parameters: AllowSafeAssignment.
|
239
|
+
Style/ParenthesesAroundCondition:
|
240
|
+
Enabled: false
|
241
|
+
|
242
|
+
# Offense count: 8
|
243
|
+
# Cop supports --auto-correct.
|
244
|
+
# Configuration parameters: PreferredDelimiters.
|
245
|
+
Style/PercentLiteralDelimiters:
|
246
|
+
PreferredDelimiters:
|
247
|
+
'%w': '{}'
|
248
|
+
'%W': '{}'
|
249
|
+
'%Q': '{}'
|
250
|
+
Exclude:
|
251
|
+
- 'bin/restclient'
|
252
|
+
|
253
|
+
# Offense count: 3
|
254
|
+
# Configuration parameters: NamePrefixBlacklist.
|
255
|
+
Style/PredicateName:
|
256
|
+
Enabled: false
|
257
|
+
|
258
|
+
# TODO: configure
|
259
|
+
# Offense count: 3
|
260
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
261
|
+
Style/RaiseArgs:
|
262
|
+
Enabled: false
|
263
|
+
|
264
|
+
# TODO
|
265
|
+
# Offense count: 1
|
266
|
+
# Cop supports --auto-correct.
|
267
|
+
Style/RedundantBegin:
|
268
|
+
Enabled: false
|
269
|
+
|
270
|
+
# Offense count: 2
|
271
|
+
# Cop supports --auto-correct.
|
272
|
+
Style/RedundantSelf:
|
273
|
+
Enabled: false
|
274
|
+
|
275
|
+
# Offense count: 1
|
276
|
+
Style/RescueModifier:
|
277
|
+
Enabled: false
|
278
|
+
Exclude:
|
279
|
+
- 'bin/restclient'
|
280
|
+
|
281
|
+
# TODO: configure
|
282
|
+
# Offense count: 12
|
283
|
+
# Cop supports --auto-correct.
|
284
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
285
|
+
Style/SignalException:
|
286
|
+
Enabled: false
|
287
|
+
|
288
|
+
# TODO
|
289
|
+
# Offense count: 2
|
290
|
+
# Cop supports --auto-correct.
|
291
|
+
Style/SpaceAfterNot:
|
292
|
+
Enabled: false
|
293
|
+
|
294
|
+
# Offense count: 19
|
295
|
+
# Cop supports --auto-correct.
|
296
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
297
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
298
|
+
Enabled: false
|
299
|
+
|
300
|
+
# Offense count: 20
|
301
|
+
# Cop supports --auto-correct.
|
302
|
+
Style/SpaceAroundOperators:
|
303
|
+
Enabled: false
|
304
|
+
|
305
|
+
# Offense count: 9
|
306
|
+
# Cop supports --auto-correct.
|
307
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
308
|
+
Style/SpaceBeforeBlockBraces:
|
309
|
+
Enabled: false
|
310
|
+
|
311
|
+
# Offense count: 37
|
312
|
+
# Cop supports --auto-correct.
|
313
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
314
|
+
Style/SpaceInsideBlockBraces:
|
315
|
+
Enabled: false
|
316
|
+
|
317
|
+
# Offense count: 6
|
318
|
+
# Cop supports --auto-correct.
|
319
|
+
Style/SpaceInsideBrackets:
|
320
|
+
Enabled: false
|
321
|
+
|
322
|
+
# Offense count: 181
|
323
|
+
# Cop supports --auto-correct.
|
324
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
325
|
+
Style/SpaceInsideHashLiteralBraces:
|
326
|
+
Enabled: false
|
327
|
+
|
328
|
+
# TODO
|
329
|
+
# Offense count: 9
|
330
|
+
# Cop supports --auto-correct.
|
331
|
+
Style/SpaceInsideParens:
|
332
|
+
Enabled: false
|
333
|
+
|
334
|
+
# Offense count: 414
|
335
|
+
# Cop supports --auto-correct.
|
336
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
337
|
+
Style/StringLiterals:
|
338
|
+
Enabled: false
|
339
|
+
|
340
|
+
# NOTABUG
|
341
|
+
# Offense count: 14
|
342
|
+
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
|
343
|
+
Style/TrailingComma:
|
344
|
+
Enabled: false
|
345
|
+
|
346
|
+
# TODO: configure
|
347
|
+
# Offense count: 1
|
348
|
+
# Cop supports --auto-correct.
|
349
|
+
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
|
350
|
+
Style/TrivialAccessors:
|
351
|
+
Enabled: false
|
352
|
+
Exclude: ['lib/restclient/payload.rb']
|
353
|
+
|
354
|
+
# TODO?
|
355
|
+
# Offense count: 3
|
356
|
+
Style/UnlessElse:
|
357
|
+
Enabled: false
|
358
|
+
|
359
|
+
# TODO?
|
360
|
+
# Offense count: 6
|
361
|
+
# Cop supports --auto-correct.
|
362
|
+
Style/UnneededPercentQ:
|
363
|
+
Enabled: false
|
364
|
+
|
365
|
+
# Offense count: 5
|
366
|
+
# Cop supports --auto-correct.
|
367
|
+
Style/WordArray:
|
368
|
+
MinSize: 4
|
369
|
+
|
370
|
+
# TODO?
|
371
|
+
# Offense count: 5
|
372
|
+
# Cop supports --auto-correct.
|
373
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
374
|
+
Style/BarePercentLiterals:
|
375
|
+
Enabled: false
|
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- "1.9.2"
|
4
3
|
- "1.9.3"
|
5
4
|
- "2.0.0"
|
6
|
-
#
|
7
|
-
#
|
8
|
-
- "2.1" # always the latest 2.1.x
|
5
|
+
- "2.1" # latest 2.1.x
|
6
|
+
- "2.2" # latest 2.2.x
|
9
7
|
- "jruby-19mode"
|
8
|
+
- "jruby-head"
|
10
9
|
script:
|
11
10
|
bundle exec rake test
|
12
11
|
branches:
|
data/AUTHORS
CHANGED
@@ -3,6 +3,7 @@ the following kind souls:
|
|
3
3
|
|
4
4
|
Adam Jacob
|
5
5
|
Adam Wiggins
|
6
|
+
Alex Tomlins
|
6
7
|
Aman Gupta
|
7
8
|
Andy Brody
|
8
9
|
Blake Mizerany
|
@@ -17,12 +18,14 @@ Coda Hale
|
|
17
18
|
Crawford
|
18
19
|
Cyril Rohr
|
19
20
|
Dan Mayer
|
21
|
+
Dario Hamidi
|
20
22
|
David Backeus
|
21
23
|
David Perkowski
|
22
24
|
Dmitri Dolguikh
|
23
25
|
Dusty Doris
|
24
26
|
Dylan Egan
|
25
27
|
El Draper
|
28
|
+
Evan Broder
|
26
29
|
Evan Smith
|
27
30
|
François Beausoleil
|
28
31
|
Gabriele Cirulli
|
@@ -40,9 +43,11 @@ Jari Bakken
|
|
40
43
|
Jeff Remer
|
41
44
|
Jeffrey Hardy
|
42
45
|
Jeremy Kemper
|
46
|
+
Joe Rafaniello
|
43
47
|
John Barnette
|
44
48
|
Jon Rowe
|
45
49
|
Jordi Massaguer Pla
|
50
|
+
Joshua J. Campoverde
|
46
51
|
Juan Alvarez
|
47
52
|
Julien Kirch
|
48
53
|
Justin Coyne
|
@@ -56,10 +61,14 @@ Lars Gierth
|
|
56
61
|
Lawrence Leonard Gilbert
|
57
62
|
Lee Jarvis
|
58
63
|
Lennon Day-Reynolds
|
64
|
+
Lin Jen-Shin
|
59
65
|
Marc-André Cournoyer
|
60
66
|
Matthew Manning
|
61
67
|
Michael Klett
|
68
|
+
Michael Rykov
|
69
|
+
Michael Westbom
|
62
70
|
Mike Fletcher
|
71
|
+
Nelson Elhage
|
63
72
|
Nicholas Wieland
|
64
73
|
Nick Plante
|
65
74
|
Niko Dittmann
|
@@ -70,7 +79,7 @@ Pedro Belo
|
|
70
79
|
Philip Corliss
|
71
80
|
Pierre-Louis Gottfrois
|
72
81
|
Rafael Ssouza
|
73
|
-
Rick
|
82
|
+
Rick Olson
|
74
83
|
Robert Eanes
|
75
84
|
Rodrigo Panachi
|
76
85
|
Syl Turner
|
@@ -78,4 +87,5 @@ T. Watanabe
|
|
78
87
|
Tekin
|
79
88
|
W. Andrew Loe III
|
80
89
|
Waynn Lue
|
90
|
+
Xavier Shay
|
81
91
|
tpresa
|