rest-client 2.0.2 → 2.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -71,9 +71,10 @@ describe RestClient do
71
71
  end
72
72
 
73
73
  describe 'version' do
74
- it 'has a version ~> 2.0.0.alpha' do
74
+ # test that there is a sane version number to avoid accidental 0.0.0 again
75
+ it 'has a version > 2.0.0.alpha, < 3.0' do
75
76
  ver = Gem::Version.new(RestClient.version)
76
- expect(Gem::Requirement.new('~> 2.0.0.alpha')).to be_satisfied_by(ver)
77
+ expect(Gem::Requirement.new('> 2.0.0.alpha', '< 3.0')).to be_satisfied_by(ver)
77
78
  end
78
79
  end
79
80
  end
@@ -34,11 +34,11 @@ describe RestClient::Utils do
34
34
  end
35
35
 
36
36
  describe '.cgi_parse_header' do
37
- it 'parses headers' do
37
+ it 'parses headers', :unless => RUBY_VERSION.start_with?('2.0') do
38
38
  expect(RestClient::Utils.cgi_parse_header('text/plain')).
39
39
  to eq ['text/plain', {}]
40
40
 
41
- expect(RestClient::Utils.cgi_parse_header('text/vnd.just.made.this.up ; ')).
41
+ expect(RestClient::Utils.cgi_parse_header('text/vnd.just.made.this.up')).
42
42
  to eq ['text/vnd.just.made.this.up', {}]
43
43
 
44
44
  expect(RestClient::Utils.cgi_parse_header('text/plain;charset=us-ascii')).
@@ -52,20 +52,20 @@ describe RestClient::Utils do
52
52
  to eq ['text/plain', {'charset' => 'us-ascii', 'another' => 'opt'}]
53
53
 
54
54
  expect(RestClient::Utils.cgi_parse_header(
55
- 'attachment; filename="silly.txt"')).
56
- to eq ['attachment', {'filename' => 'silly.txt'}]
55
+ 'foo/bar; filename="silly.txt"')).
56
+ to eq ['foo/bar', {'filename' => 'silly.txt'}]
57
57
 
58
58
  expect(RestClient::Utils.cgi_parse_header(
59
- 'attachment; filename="strange;name"')).
60
- to eq ['attachment', {'filename' => 'strange;name'}]
59
+ 'foo/bar; filename="strange;name"')).
60
+ to eq ['foo/bar', {'filename' => 'strange;name'}]
61
61
 
62
62
  expect(RestClient::Utils.cgi_parse_header(
63
- 'attachment; filename="strange;name";size=123;')).to eq \
64
- ['attachment', {'filename' => 'strange;name', 'size' => '123'}]
63
+ 'foo/bar; filename="strange;name";size=123')).to eq \
64
+ ['foo/bar', {'filename' => 'strange;name', 'size' => '123'}]
65
65
 
66
66
  expect(RestClient::Utils.cgi_parse_header(
67
- 'form-data; name="files"; filename="fo\\"o;bar"')).to eq \
68
- ['form-data', {'name' => 'files', 'filename' => 'fo"o;bar'}]
67
+ 'foo/bar; name="files"; filename="fo\\"o;bar"')).to eq \
68
+ ['foo/bar', {'name' => 'files', 'filename' => 'fo"o;bar'}]
69
69
  end
70
70
  end
71
71
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - REST Client Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-23 00:00:00.000000000 Z
11
+ date: 2017-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webmock
@@ -100,6 +100,26 @@ dependencies:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: http-accept
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: 1.7.0
110
+ - - "<"
111
+ - !ruby/object:Gem::Version
112
+ version: '2.0'
113
+ type: :runtime
114
+ prerelease: false
115
+ version_requirements: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: 1.7.0
120
+ - - "<"
121
+ - !ruby/object:Gem::Version
122
+ version: '2.0'
103
123
  - !ruby/object:Gem::Dependency
104
124
  name: http-cookie
105
125
  requirement: !ruby/object:Gem::Requirement
@@ -165,7 +185,9 @@ extra_rdoc_files:
165
185
  - history.md
166
186
  files:
167
187
  - ".gitignore"
188
+ - ".mailmap"
168
189
  - ".rspec"
190
+ - ".rubocop"
169
191
  - ".rubocop-disables.yml"
170
192
  - ".rubocop.yml"
171
193
  - ".travis.yml"
@@ -194,6 +216,7 @@ files:
194
216
  - lib/restclient/windows/root_certs.rb
195
217
  - rest-client.gemspec
196
218
  - rest-client.windows.gemspec
219
+ - spec/ISS.jpg
197
220
  - spec/helpers.rb
198
221
  - spec/integration/_lib.rb
199
222
  - spec/integration/capath_digicert/244b5494.0
@@ -213,7 +236,6 @@ files:
213
236
  - spec/unit/_lib.rb
214
237
  - spec/unit/abstract_response_spec.rb
215
238
  - spec/unit/exceptions_spec.rb
216
- - spec/unit/master_shake.jpg
217
239
  - spec/unit/params_array_spec.rb
218
240
  - spec/unit/payload_spec.rb
219
241
  - spec/unit/raw_response_spec.rb
@@ -239,17 +261,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
239
261
  version: 2.0.0
240
262
  required_rubygems_version: !ruby/object:Gem::Requirement
241
263
  requirements:
242
- - - ">="
264
+ - - ">"
243
265
  - !ruby/object:Gem::Version
244
- version: '0'
266
+ version: 1.3.1
245
267
  requirements: []
246
268
  rubyforge_project:
247
- rubygems_version: 2.6.11
269
+ rubygems_version: 2.6.12
248
270
  signing_key:
249
271
  specification_version: 4
250
272
  summary: Simple HTTP and REST client for Ruby, inspired by microframework syntax for
251
273
  specifying actions.
252
274
  test_files:
275
+ - spec/ISS.jpg
253
276
  - spec/helpers.rb
254
277
  - spec/integration/_lib.rb
255
278
  - spec/integration/capath_digicert/244b5494.0
@@ -269,7 +292,6 @@ test_files:
269
292
  - spec/unit/_lib.rb
270
293
  - spec/unit/abstract_response_spec.rb
271
294
  - spec/unit/exceptions_spec.rb
272
- - spec/unit/master_shake.jpg
273
295
  - spec/unit/params_array_spec.rb
274
296
  - spec/unit/payload_spec.rb
275
297
  - spec/unit/raw_response_spec.rb
Binary file