grape 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -4
- data/README.md +144 -4
- data/grape.gemspec +3 -1
- data/lib/grape.rb +94 -66
- data/lib/grape/api.rb +46 -4
- data/lib/grape/api/instance.rb +23 -12
- data/lib/grape/dsl/desc.rb +11 -2
- data/lib/grape/dsl/validations.rb +4 -3
- data/lib/grape/eager_load.rb +18 -0
- data/lib/grape/endpoint.rb +3 -3
- data/lib/grape/error_formatter.rb +1 -1
- data/lib/grape/exceptions/validation_errors.rb +4 -2
- data/lib/grape/formatter.rb +1 -1
- data/lib/grape/middleware/auth/base.rb +2 -4
- data/lib/grape/middleware/base.rb +2 -0
- data/lib/grape/middleware/helpers.rb +10 -0
- data/lib/grape/parser.rb +1 -1
- data/lib/grape/util/base_inheritable.rb +34 -0
- data/lib/grape/util/inheritable_values.rb +5 -25
- data/lib/grape/util/lazy_block.rb +25 -0
- data/lib/grape/util/lazy_value.rb +5 -0
- data/lib/grape/util/reverse_stackable_values.rb +7 -36
- data/lib/grape/util/stackable_values.rb +19 -22
- data/lib/grape/validations/attributes_iterator.rb +5 -3
- data/lib/grape/validations/multiple_attributes_iterator.rb +11 -0
- data/lib/grape/validations/params_scope.rb +12 -12
- data/lib/grape/validations/single_attribute_iterator.rb +13 -0
- data/lib/grape/validations/validator_factory.rb +6 -11
- data/lib/grape/validations/validators/all_or_none.rb +6 -13
- data/lib/grape/validations/validators/at_least_one_of.rb +5 -13
- data/lib/grape/validations/validators/base.rb +11 -10
- data/lib/grape/validations/validators/coerce.rb +4 -0
- data/lib/grape/validations/validators/default.rb +1 -1
- data/lib/grape/validations/validators/exactly_one_of.rb +6 -23
- data/lib/grape/validations/validators/multiple_params_base.rb +14 -10
- data/lib/grape/validations/validators/mutual_exclusion.rb +6 -18
- data/lib/grape/version.rb +1 -1
- data/spec/grape/api/defines_boolean_in_params_spec.rb +37 -0
- data/spec/grape/api_remount_spec.rb +158 -0
- data/spec/grape/api_spec.rb +72 -0
- data/spec/grape/endpoint_spec.rb +1 -1
- data/spec/grape/exceptions/base_spec.rb +4 -0
- data/spec/grape/exceptions/validation_errors_spec.rb +6 -4
- data/spec/grape/integration/rack_spec.rb +22 -6
- data/spec/grape/middleware/base_spec.rb +8 -0
- data/spec/grape/middleware/formatter_spec.rb +11 -1
- data/spec/grape/validations/multiple_attributes_iterator_spec.rb +29 -0
- data/spec/grape/validations/params_scope_spec.rb +13 -0
- data/spec/grape/validations/single_attribute_iterator_spec.rb +33 -0
- data/spec/grape/validations/validators/all_or_none_spec.rb +138 -30
- data/spec/grape/validations/validators/at_least_one_of_spec.rb +173 -29
- data/spec/grape/validations/validators/coerce_spec.rb +6 -2
- data/spec/grape/validations/validators/exactly_one_of_spec.rb +202 -38
- data/spec/grape/validations/validators/mutual_exclusion_spec.rb +184 -27
- data/spec/grape/validations_spec.rb +32 -20
- metadata +103 -115
- data/Appraisals +0 -28
- data/Dangerfile +0 -2
- data/Gemfile +0 -33
- data/Gemfile.lock +0 -231
- data/Guardfile +0 -10
- data/RELEASING.md +0 -111
- data/Rakefile +0 -25
- data/benchmark/simple.rb +0 -27
- data/benchmark/simple_with_type_coercer.rb +0 -22
- data/gemfiles/multi_json.gemfile +0 -35
- data/gemfiles/multi_xml.gemfile +0 -35
- data/gemfiles/rack_1.5.2.gemfile.lock +0 -232
- data/gemfiles/rack_edge.gemfile +0 -35
- data/gemfiles/rails_3.gemfile +0 -36
- data/gemfiles/rails_3.gemfile.lock +0 -288
- data/gemfiles/rails_4.gemfile +0 -35
- data/gemfiles/rails_4.gemfile.lock +0 -280
- data/gemfiles/rails_5.gemfile +0 -35
- data/gemfiles/rails_5.gemfile.lock +0 -312
- data/gemfiles/rails_edge.gemfile +0 -35
- data/pkg/grape-1.2.0.gem +0 -0
- data/pkg/grape-1.2.1.gem +0 -0
- data/pkg/grape-1.2.3.gem +0 -0
@@ -540,7 +540,10 @@ describe Grape::Validations do
|
|
540
540
|
]
|
541
541
|
|
542
542
|
expect(last_response.status).to eq(400)
|
543
|
-
expect(last_response.body).to eq(
|
543
|
+
expect(last_response.body).to eq(
|
544
|
+
'children[0][parents][0][name] is missing, ' \
|
545
|
+
'children[1][parents][0][name] is missing'
|
546
|
+
)
|
544
547
|
end
|
545
548
|
|
546
549
|
it 'safely handles empty arrays and blank parameters' do
|
@@ -548,7 +551,14 @@ describe Grape::Validations do
|
|
548
551
|
# should actually return 200, since an empty array is valid.
|
549
552
|
get '/within_array', children: []
|
550
553
|
expect(last_response.status).to eq(400)
|
551
|
-
expect(last_response.body).to eq(
|
554
|
+
expect(last_response.body).to eq(
|
555
|
+
'children[0][name] is missing, ' \
|
556
|
+
'children[0][parents] is missing, ' \
|
557
|
+
'children[0][parents] is invalid, ' \
|
558
|
+
'children[0][parents][0][name] is missing, ' \
|
559
|
+
'children[0][parents][0][name] is empty'
|
560
|
+
)
|
561
|
+
|
552
562
|
get '/within_array', children: [name: 'Jay']
|
553
563
|
expect(last_response.status).to eq(400)
|
554
564
|
expect(last_response.body).to eq('children[0][parents] is missing')
|
@@ -1223,7 +1233,9 @@ describe Grape::Validations do
|
|
1223
1233
|
end
|
1224
1234
|
get '/custom_message/mutually_exclusive', beer: 'true', wine: 'true', nested: { scotch: 'true', aquavit: 'true' }, nested2: [{ scotch2: 'true' }, { scotch2: 'true', aquavit2: 'true' }]
|
1225
1235
|
expect(last_response.status).to eq(400)
|
1226
|
-
expect(last_response.body).to eq
|
1236
|
+
expect(last_response.body).to eq(
|
1237
|
+
'beer, wine are mutually exclusive pass only one, nested[scotch], nested[aquavit] are mutually exclusive pass only one, nested2[1][scotch2], nested2[1][aquavit2] are mutually exclusive pass only one'
|
1238
|
+
)
|
1227
1239
|
end
|
1228
1240
|
end
|
1229
1241
|
|
@@ -1249,7 +1261,7 @@ describe Grape::Validations do
|
|
1249
1261
|
|
1250
1262
|
get '/mutually_exclusive', beer: 'true', wine: 'true', nested: { scotch: 'true', aquavit: 'true' }, nested2: [{ scotch2: 'true' }, { scotch2: 'true', aquavit2: 'true' }]
|
1251
1263
|
expect(last_response.status).to eq(400)
|
1252
|
-
expect(last_response.body).to eq 'beer, wine are mutually exclusive, scotch, aquavit are mutually exclusive, scotch2, aquavit2 are mutually exclusive'
|
1264
|
+
expect(last_response.body).to eq 'beer, wine are mutually exclusive, nested[scotch], nested[aquavit] are mutually exclusive, nested2[1][scotch2], nested2[1][aquavit2] are mutually exclusive'
|
1253
1265
|
end
|
1254
1266
|
end
|
1255
1267
|
|
@@ -1318,7 +1330,7 @@ describe Grape::Validations do
|
|
1318
1330
|
optional :beer
|
1319
1331
|
optional :wine
|
1320
1332
|
optional :juice
|
1321
|
-
exactly_one_of :beer, :wine, :juice, message:
|
1333
|
+
exactly_one_of :beer, :wine, :juice, message: 'are missing, exactly one parameter is required'
|
1322
1334
|
end
|
1323
1335
|
get '/exactly_one_of' do
|
1324
1336
|
'exactly_one_of works!'
|
@@ -1352,7 +1364,7 @@ describe Grape::Validations do
|
|
1352
1364
|
it 'errors when two or more are present' do
|
1353
1365
|
get '/custom_message/exactly_one_of', beer: 'string', wine: 'anotherstring'
|
1354
1366
|
expect(last_response.status).to eq(400)
|
1355
|
-
expect(last_response.body).to eq 'beer, wine are
|
1367
|
+
expect(last_response.body).to eq 'beer, wine, juice are missing, exactly one parameter is required'
|
1356
1368
|
end
|
1357
1369
|
end
|
1358
1370
|
|
@@ -1371,7 +1383,7 @@ describe Grape::Validations do
|
|
1371
1383
|
it 'errors when two or more are present' do
|
1372
1384
|
get '/exactly_one_of', beer: 'string', wine: 'anotherstring'
|
1373
1385
|
expect(last_response.status).to eq(400)
|
1374
|
-
expect(last_response.body).to eq 'beer, wine are
|
1386
|
+
expect(last_response.body).to eq 'beer, wine, juice are missing, exactly one parameter must be provided'
|
1375
1387
|
end
|
1376
1388
|
end
|
1377
1389
|
|
@@ -1399,7 +1411,7 @@ describe Grape::Validations do
|
|
1399
1411
|
it 'errors when none are present' do
|
1400
1412
|
get '/exactly_one_of_nested'
|
1401
1413
|
expect(last_response.status).to eq(400)
|
1402
|
-
expect(last_response.body).to eq 'nested is missing, beer_nested, wine_nested, juice_nested are missing, exactly one parameter must be provided'
|
1414
|
+
expect(last_response.body).to eq 'nested is missing, nested[beer_nested], nested[wine_nested], nested[juice_nested] are missing, exactly one parameter must be provided'
|
1403
1415
|
end
|
1404
1416
|
|
1405
1417
|
it 'succeeds when one is present' do
|
@@ -1411,7 +1423,7 @@ describe Grape::Validations do
|
|
1411
1423
|
it 'errors when two or more are present' do
|
1412
1424
|
get '/exactly_one_of_nested', nested: { beer_nested: 'string' }, nested2: [{ beer_nested2: 'string', wine_nested2: 'anotherstring' }]
|
1413
1425
|
expect(last_response.status).to eq(400)
|
1414
|
-
expect(last_response.body).to eq 'beer_nested2, wine_nested2 are
|
1426
|
+
expect(last_response.body).to eq 'nested2[0][beer_nested2], nested2[0][wine_nested2], nested2[0][juice_nested2] are missing, exactly one parameter must be provided'
|
1415
1427
|
end
|
1416
1428
|
end
|
1417
1429
|
end
|
@@ -1485,16 +1497,16 @@ describe Grape::Validations do
|
|
1485
1497
|
before :each do
|
1486
1498
|
subject.params do
|
1487
1499
|
requires :nested, type: Hash do
|
1488
|
-
optional :
|
1489
|
-
optional :
|
1490
|
-
optional :
|
1491
|
-
at_least_one_of :
|
1500
|
+
optional :beer
|
1501
|
+
optional :wine
|
1502
|
+
optional :juice
|
1503
|
+
at_least_one_of :beer, :wine, :juice
|
1492
1504
|
end
|
1493
1505
|
optional :nested2, type: Array do
|
1494
|
-
optional :
|
1495
|
-
optional :
|
1496
|
-
optional :
|
1497
|
-
at_least_one_of :
|
1506
|
+
optional :beer
|
1507
|
+
optional :wine
|
1508
|
+
optional :juice
|
1509
|
+
at_least_one_of :beer, :wine, :juice
|
1498
1510
|
end
|
1499
1511
|
end
|
1500
1512
|
subject.get '/at_least_one_of_nested' do
|
@@ -1505,17 +1517,17 @@ describe Grape::Validations do
|
|
1505
1517
|
it 'errors when none are present' do
|
1506
1518
|
get '/at_least_one_of_nested'
|
1507
1519
|
expect(last_response.status).to eq(400)
|
1508
|
-
expect(last_response.body).to eq 'nested is missing,
|
1520
|
+
expect(last_response.body).to eq 'nested is missing, nested[beer], nested[wine], nested[juice] are missing, at least one parameter must be provided'
|
1509
1521
|
end
|
1510
1522
|
|
1511
1523
|
it 'does not error when one is present' do
|
1512
|
-
get '/at_least_one_of_nested', nested: {
|
1524
|
+
get '/at_least_one_of_nested', nested: { beer: 'string' }, nested2: [{ beer: 'string' }]
|
1513
1525
|
expect(last_response.status).to eq(200)
|
1514
1526
|
expect(last_response.body).to eq 'at_least_one_of works!'
|
1515
1527
|
end
|
1516
1528
|
|
1517
1529
|
it 'does not error when two are present' do
|
1518
|
-
get '/at_least_one_of_nested', nested: {
|
1530
|
+
get '/at_least_one_of_nested', nested: { beer: 'string', wine: 'string' }, nested2: [{ beer: 'string', wine: 'string' }]
|
1519
1531
|
expect(last_response.status).to eq(200)
|
1520
1532
|
expect(last_response.body).to eq 'at_least_one_of works!'
|
1521
1533
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bleigh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -101,31 +101,11 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
-
- Appraisals
|
105
104
|
- CHANGELOG.md
|
106
105
|
- CONTRIBUTING.md
|
107
|
-
- Dangerfile
|
108
|
-
- Gemfile
|
109
|
-
- Gemfile.lock
|
110
|
-
- Guardfile
|
111
106
|
- LICENSE
|
112
107
|
- README.md
|
113
|
-
- RELEASING.md
|
114
|
-
- Rakefile
|
115
108
|
- UPGRADING.md
|
116
|
-
- benchmark/simple.rb
|
117
|
-
- benchmark/simple_with_type_coercer.rb
|
118
|
-
- gemfiles/multi_json.gemfile
|
119
|
-
- gemfiles/multi_xml.gemfile
|
120
|
-
- gemfiles/rack_1.5.2.gemfile.lock
|
121
|
-
- gemfiles/rack_edge.gemfile
|
122
|
-
- gemfiles/rails_3.gemfile
|
123
|
-
- gemfiles/rails_3.gemfile.lock
|
124
|
-
- gemfiles/rails_4.gemfile
|
125
|
-
- gemfiles/rails_4.gemfile.lock
|
126
|
-
- gemfiles/rails_5.gemfile
|
127
|
-
- gemfiles/rails_5.gemfile.lock
|
128
|
-
- gemfiles/rails_edge.gemfile
|
129
109
|
- grape.gemspec
|
130
110
|
- grape.png
|
131
111
|
- lib/grape.rb
|
@@ -148,6 +128,7 @@ files:
|
|
148
128
|
- lib/grape/dsl/routing.rb
|
149
129
|
- lib/grape/dsl/settings.rb
|
150
130
|
- lib/grape/dsl/validations.rb
|
131
|
+
- lib/grape/eager_load.rb
|
151
132
|
- lib/grape/endpoint.rb
|
152
133
|
- lib/grape/error_formatter.rb
|
153
134
|
- lib/grape/error_formatter/base.rb
|
@@ -197,6 +178,7 @@ files:
|
|
197
178
|
- lib/grape/middleware/filter.rb
|
198
179
|
- lib/grape/middleware/formatter.rb
|
199
180
|
- lib/grape/middleware/globals.rb
|
181
|
+
- lib/grape/middleware/helpers.rb
|
200
182
|
- lib/grape/middleware/stack.rb
|
201
183
|
- lib/grape/middleware/versioner.rb
|
202
184
|
- lib/grape/middleware/versioner/accept_version_header.rb
|
@@ -218,12 +200,14 @@ files:
|
|
218
200
|
- lib/grape/serve_file/file_body.rb
|
219
201
|
- lib/grape/serve_file/file_response.rb
|
220
202
|
- lib/grape/serve_file/sendfile_response.rb
|
203
|
+
- lib/grape/util/base_inheritable.rb
|
221
204
|
- lib/grape/util/content_types.rb
|
222
205
|
- lib/grape/util/endpoint_configuration.rb
|
223
206
|
- lib/grape/util/env.rb
|
224
207
|
- lib/grape/util/inheritable_setting.rb
|
225
208
|
- lib/grape/util/inheritable_values.rb
|
226
209
|
- lib/grape/util/json.rb
|
210
|
+
- lib/grape/util/lazy_block.rb
|
227
211
|
- lib/grape/util/lazy_value.rb
|
228
212
|
- lib/grape/util/registrable.rb
|
229
213
|
- lib/grape/util/reverse_stackable_values.rb
|
@@ -232,7 +216,9 @@ files:
|
|
232
216
|
- lib/grape/util/xml.rb
|
233
217
|
- lib/grape/validations.rb
|
234
218
|
- lib/grape/validations/attributes_iterator.rb
|
219
|
+
- lib/grape/validations/multiple_attributes_iterator.rb
|
235
220
|
- lib/grape/validations/params_scope.rb
|
221
|
+
- lib/grape/validations/single_attribute_iterator.rb
|
236
222
|
- lib/grape/validations/types.rb
|
237
223
|
- lib/grape/validations/types/build_coercer.rb
|
238
224
|
- lib/grape/validations/types/custom_type_coercer.rb
|
@@ -259,11 +245,9 @@ files:
|
|
259
245
|
- lib/grape/validations/validators/same_as.rb
|
260
246
|
- lib/grape/validations/validators/values.rb
|
261
247
|
- lib/grape/version.rb
|
262
|
-
- pkg/grape-1.2.0.gem
|
263
|
-
- pkg/grape-1.2.1.gem
|
264
|
-
- pkg/grape-1.2.3.gem
|
265
248
|
- spec/grape/api/custom_validations_spec.rb
|
266
249
|
- spec/grape/api/deeply_included_options_spec.rb
|
250
|
+
- spec/grape/api/defines_boolean_in_params_spec.rb
|
267
251
|
- spec/grape/api/inherited_helpers_spec.rb
|
268
252
|
- spec/grape/api/invalid_format_spec.rb
|
269
253
|
- spec/grape/api/namespace_parameters_in_route_spec.rb
|
@@ -340,7 +324,9 @@ files:
|
|
340
324
|
- spec/grape/util/strict_hash_configuration_spec.rb
|
341
325
|
- spec/grape/validations/attributes_iterator_spec.rb
|
342
326
|
- spec/grape/validations/instance_behaivour_spec.rb
|
327
|
+
- spec/grape/validations/multiple_attributes_iterator_spec.rb
|
343
328
|
- spec/grape/validations/params_scope_spec.rb
|
329
|
+
- spec/grape/validations/single_attribute_iterator_spec.rb
|
344
330
|
- spec/grape/validations/types_spec.rb
|
345
331
|
- spec/grape/validations/validators/all_or_none_spec.rb
|
346
332
|
- spec/grape/validations/validators/allow_blank_spec.rb
|
@@ -385,113 +371,115 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
385
371
|
- !ruby/object:Gem::Version
|
386
372
|
version: '0'
|
387
373
|
requirements: []
|
388
|
-
|
389
|
-
rubygems_version: 2.7.7
|
374
|
+
rubygems_version: 3.0.3
|
390
375
|
signing_key:
|
391
376
|
specification_version: 4
|
392
377
|
summary: A simple Ruby framework for building REST-like APIs.
|
393
378
|
test_files:
|
379
|
+
- spec/spec_helper.rb
|
380
|
+
- spec/integration/multi_xml/xml_spec.rb
|
381
|
+
- spec/integration/multi_json/json_spec.rb
|
394
382
|
- spec/shared/versioning_examples.rb
|
395
|
-
- spec/
|
396
|
-
- spec/
|
397
|
-
- spec/
|
398
|
-
- spec/
|
399
|
-
- spec/
|
400
|
-
- spec/
|
401
|
-
- spec/grape/api/required_parameters_with_invalid_method_spec.rb
|
402
|
-
- spec/grape/api/inherited_helpers_spec.rb
|
403
|
-
- spec/grape/api/recognize_path_spec.rb
|
404
|
-
- spec/grape/api/required_parameters_in_route_spec.rb
|
405
|
-
- spec/grape/api/nested_helpers_spec.rb
|
406
|
-
- spec/grape/api/routes_with_requirements_spec.rb
|
407
|
-
- spec/grape/api/patch_method_helpers_spec.rb
|
408
|
-
- spec/grape/api/optional_parameters_in_route_spec.rb
|
409
|
-
- spec/grape/api/invalid_format_spec.rb
|
410
|
-
- spec/grape/named_api_spec.rb
|
411
|
-
- spec/grape/exceptions/validation_spec.rb
|
412
|
-
- spec/grape/exceptions/validation_errors_spec.rb
|
413
|
-
- spec/grape/exceptions/missing_option_spec.rb
|
414
|
-
- spec/grape/exceptions/unknown_options_spec.rb
|
415
|
-
- spec/grape/exceptions/missing_mime_type_spec.rb
|
416
|
-
- spec/grape/exceptions/base_spec.rb
|
417
|
-
- spec/grape/exceptions/invalid_versioner_option_spec.rb
|
418
|
-
- spec/grape/exceptions/invalid_response_spec.rb
|
419
|
-
- spec/grape/exceptions/body_parse_errors_spec.rb
|
420
|
-
- spec/grape/exceptions/unknown_validator_spec.rb
|
421
|
-
- spec/grape/exceptions/invalid_formatter_spec.rb
|
422
|
-
- spec/grape/exceptions/invalid_accept_header_spec.rb
|
423
|
-
- spec/grape/dsl/routing_spec.rb
|
424
|
-
- spec/grape/dsl/logger_spec.rb
|
425
|
-
- spec/grape/dsl/request_response_spec.rb
|
426
|
-
- spec/grape/dsl/validations_spec.rb
|
427
|
-
- spec/grape/dsl/desc_spec.rb
|
428
|
-
- spec/grape/dsl/headers_spec.rb
|
429
|
-
- spec/grape/dsl/configuration_spec.rb
|
430
|
-
- spec/grape/dsl/settings_spec.rb
|
431
|
-
- spec/grape/dsl/callbacks_spec.rb
|
432
|
-
- spec/grape/dsl/parameters_spec.rb
|
433
|
-
- spec/grape/dsl/inside_route_spec.rb
|
434
|
-
- spec/grape/dsl/middleware_spec.rb
|
435
|
-
- spec/grape/dsl/helpers_spec.rb
|
436
|
-
- spec/grape/endpoint_spec.rb
|
437
|
-
- spec/grape/validations_spec.rb
|
438
|
-
- spec/grape/entity_spec.rb
|
439
|
-
- spec/grape/extensions/param_builders/hash_spec.rb
|
440
|
-
- spec/grape/extensions/param_builders/hash_with_indifferent_access_spec.rb
|
441
|
-
- spec/grape/extensions/param_builders/hashie/mash_spec.rb
|
442
|
-
- spec/grape/api_remount_spec.rb
|
443
|
-
- spec/grape/parser_spec.rb
|
444
|
-
- spec/grape/util/inheritable_setting_spec.rb
|
445
|
-
- spec/grape/util/reverse_stackable_values_spec.rb
|
446
|
-
- spec/grape/util/stackable_values_spec.rb
|
447
|
-
- spec/grape/util/inheritable_values_spec.rb
|
448
|
-
- spec/grape/util/strict_hash_configuration_spec.rb
|
449
|
-
- spec/grape/config_spec.rb
|
450
|
-
- spec/grape/presenters/presenter_spec.rb
|
451
|
-
- spec/grape/middleware/versioner/header_spec.rb
|
452
|
-
- spec/grape/middleware/versioner/accept_version_header_spec.rb
|
453
|
-
- spec/grape/middleware/versioner/param_spec.rb
|
454
|
-
- spec/grape/middleware/versioner/path_spec.rb
|
383
|
+
- spec/support/basic_auth_encode_helpers.rb
|
384
|
+
- spec/support/endpoint_faker.rb
|
385
|
+
- spec/support/file_streamer.rb
|
386
|
+
- spec/support/versioned_helpers.rb
|
387
|
+
- spec/support/content_type_helpers.rb
|
388
|
+
- spec/support/integer_helpers.rb
|
455
389
|
- spec/grape/middleware/error_spec.rb
|
456
390
|
- spec/grape/middleware/globals_spec.rb
|
457
|
-
- spec/grape/middleware/base_spec.rb
|
458
391
|
- spec/grape/middleware/formatter_spec.rb
|
459
|
-
- spec/grape/middleware/exception_spec.rb
|
460
|
-
- spec/grape/middleware/auth/base_spec.rb
|
461
392
|
- spec/grape/middleware/auth/strategies_spec.rb
|
462
393
|
- spec/grape/middleware/auth/dsl_spec.rb
|
394
|
+
- spec/grape/middleware/auth/base_spec.rb
|
463
395
|
- spec/grape/middleware/stack_spec.rb
|
396
|
+
- spec/grape/middleware/exception_spec.rb
|
464
397
|
- spec/grape/middleware/versioner_spec.rb
|
465
|
-
- spec/grape/
|
466
|
-
- spec/grape/
|
398
|
+
- spec/grape/middleware/versioner/accept_version_header_spec.rb
|
399
|
+
- spec/grape/middleware/versioner/header_spec.rb
|
400
|
+
- spec/grape/middleware/versioner/path_spec.rb
|
401
|
+
- spec/grape/middleware/versioner/param_spec.rb
|
402
|
+
- spec/grape/middleware/base_spec.rb
|
403
|
+
- spec/grape/config_spec.rb
|
404
|
+
- spec/grape/loading_spec.rb
|
405
|
+
- spec/grape/endpoint_spec.rb
|
406
|
+
- spec/grape/api_spec.rb
|
407
|
+
- spec/grape/util/reverse_stackable_values_spec.rb
|
408
|
+
- spec/grape/util/stackable_values_spec.rb
|
409
|
+
- spec/grape/util/inheritable_setting_spec.rb
|
410
|
+
- spec/grape/util/strict_hash_configuration_spec.rb
|
411
|
+
- spec/grape/util/inheritable_values_spec.rb
|
467
412
|
- spec/grape/integration/rack_spec.rb
|
468
413
|
- spec/grape/integration/rack_sendfile_spec.rb
|
414
|
+
- spec/grape/integration/global_namespace_function_spec.rb
|
415
|
+
- spec/grape/validations_spec.rb
|
416
|
+
- spec/grape/entity_spec.rb
|
417
|
+
- spec/grape/exceptions/validation_spec.rb
|
418
|
+
- spec/grape/exceptions/invalid_accept_header_spec.rb
|
419
|
+
- spec/grape/exceptions/missing_option_spec.rb
|
420
|
+
- spec/grape/exceptions/invalid_response_spec.rb
|
421
|
+
- spec/grape/exceptions/body_parse_errors_spec.rb
|
422
|
+
- spec/grape/exceptions/invalid_formatter_spec.rb
|
423
|
+
- spec/grape/exceptions/missing_mime_type_spec.rb
|
424
|
+
- spec/grape/exceptions/unknown_options_spec.rb
|
425
|
+
- spec/grape/exceptions/validation_errors_spec.rb
|
426
|
+
- spec/grape/exceptions/unknown_validator_spec.rb
|
427
|
+
- spec/grape/exceptions/invalid_versioner_option_spec.rb
|
428
|
+
- spec/grape/exceptions/base_spec.rb
|
429
|
+
- spec/grape/presenters/presenter_spec.rb
|
430
|
+
- spec/grape/validations/single_attribute_iterator_spec.rb
|
469
431
|
- spec/grape/validations/attributes_iterator_spec.rb
|
432
|
+
- spec/grape/validations/params_scope_spec.rb
|
433
|
+
- spec/grape/validations/instance_behaivour_spec.rb
|
434
|
+
- spec/grape/validations/multiple_attributes_iterator_spec.rb
|
435
|
+
- spec/grape/validations/types_spec.rb
|
436
|
+
- spec/grape/validations/validators/regexp_spec.rb
|
437
|
+
- spec/grape/validations/validators/mutual_exclusion_spec.rb
|
470
438
|
- spec/grape/validations/validators/exactly_one_of_spec.rb
|
471
|
-
- spec/grape/validations/validators/
|
439
|
+
- spec/grape/validations/validators/except_values_spec.rb
|
472
440
|
- spec/grape/validations/validators/presence_spec.rb
|
473
|
-
- spec/grape/validations/validators/coerce_spec.rb
|
474
|
-
- spec/grape/validations/validators/at_least_one_of_spec.rb
|
475
|
-
- spec/grape/validations/validators/same_as_spec.rb
|
476
|
-
- spec/grape/validations/validators/zh-CN.yml
|
477
|
-
- spec/grape/validations/validators/default_spec.rb
|
478
|
-
- spec/grape/validations/validators/regexp_spec.rb
|
479
441
|
- spec/grape/validations/validators/all_or_none_spec.rb
|
480
|
-
- spec/grape/validations/validators/except_values_spec.rb
|
481
|
-
- spec/grape/validations/validators/mutual_exclusion_spec.rb
|
482
442
|
- spec/grape/validations/validators/allow_blank_spec.rb
|
483
|
-
- spec/grape/validations/
|
484
|
-
- spec/grape/validations/
|
485
|
-
- spec/grape/validations/
|
486
|
-
- spec/grape/
|
487
|
-
- spec/grape/
|
443
|
+
- spec/grape/validations/validators/same_as_spec.rb
|
444
|
+
- spec/grape/validations/validators/default_spec.rb
|
445
|
+
- spec/grape/validations/validators/values_spec.rb
|
446
|
+
- spec/grape/validations/validators/at_least_one_of_spec.rb
|
447
|
+
- spec/grape/validations/validators/coerce_spec.rb
|
448
|
+
- spec/grape/validations/validators/zh-CN.yml
|
449
|
+
- spec/grape/extensions/param_builders/hashie/mash_spec.rb
|
450
|
+
- spec/grape/extensions/param_builders/hash_spec.rb
|
451
|
+
- spec/grape/extensions/param_builders/hash_with_indifferent_access_spec.rb
|
452
|
+
- spec/grape/parser_spec.rb
|
453
|
+
- spec/grape/request_spec.rb
|
454
|
+
- spec/grape/api/parameters_modification_spec.rb
|
455
|
+
- spec/grape/api/patch_method_helpers_spec.rb
|
456
|
+
- spec/grape/api/required_parameters_with_invalid_method_spec.rb
|
457
|
+
- spec/grape/api/nested_helpers_spec.rb
|
458
|
+
- spec/grape/api/defines_boolean_in_params_spec.rb
|
459
|
+
- spec/grape/api/invalid_format_spec.rb
|
460
|
+
- spec/grape/api/required_parameters_in_route_spec.rb
|
461
|
+
- spec/grape/api/namespace_parameters_in_route_spec.rb
|
462
|
+
- spec/grape/api/recognize_path_spec.rb
|
463
|
+
- spec/grape/api/shared_helpers_exactly_one_of_spec.rb
|
464
|
+
- spec/grape/api/inherited_helpers_spec.rb
|
465
|
+
- spec/grape/api/shared_helpers_spec.rb
|
466
|
+
- spec/grape/api/deeply_included_options_spec.rb
|
467
|
+
- spec/grape/api/routes_with_requirements_spec.rb
|
468
|
+
- spec/grape/api/custom_validations_spec.rb
|
469
|
+
- spec/grape/api/optional_parameters_in_route_spec.rb
|
470
|
+
- spec/grape/api_remount_spec.rb
|
471
|
+
- spec/grape/named_api_spec.rb
|
472
|
+
- spec/grape/dsl/request_response_spec.rb
|
473
|
+
- spec/grape/dsl/desc_spec.rb
|
474
|
+
- spec/grape/dsl/logger_spec.rb
|
475
|
+
- spec/grape/dsl/configuration_spec.rb
|
476
|
+
- spec/grape/dsl/validations_spec.rb
|
477
|
+
- spec/grape/dsl/parameters_spec.rb
|
478
|
+
- spec/grape/dsl/helpers_spec.rb
|
479
|
+
- spec/grape/dsl/middleware_spec.rb
|
480
|
+
- spec/grape/dsl/headers_spec.rb
|
481
|
+
- spec/grape/dsl/callbacks_spec.rb
|
482
|
+
- spec/grape/dsl/settings_spec.rb
|
483
|
+
- spec/grape/dsl/routing_spec.rb
|
484
|
+
- spec/grape/dsl/inside_route_spec.rb
|
488
485
|
- spec/grape/path_spec.rb
|
489
|
-
- spec/support/file_streamer.rb
|
490
|
-
- spec/support/versioned_helpers.rb
|
491
|
-
- spec/support/content_type_helpers.rb
|
492
|
-
- spec/support/integer_helpers.rb
|
493
|
-
- spec/support/basic_auth_encode_helpers.rb
|
494
|
-
- spec/support/endpoint_faker.rb
|
495
|
-
- spec/spec_helper.rb
|
496
|
-
- spec/integration/multi_json/json_spec.rb
|
497
|
-
- spec/integration/multi_xml/xml_spec.rb
|
data/Appraisals
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
appraise 'rails-3' do
|
2
|
-
gem 'rails', '3.2.22.5'
|
3
|
-
gem 'rack-cache', '<= 1.2' # Pin as next rack-cache version (1.3) removes Ruby1.9 support
|
4
|
-
end
|
5
|
-
|
6
|
-
appraise 'rails-4' do
|
7
|
-
gem 'rails', '4.2.10'
|
8
|
-
end
|
9
|
-
|
10
|
-
appraise 'rails-5' do
|
11
|
-
gem 'rails', '5.2.1'
|
12
|
-
end
|
13
|
-
|
14
|
-
appraise 'rails-edge' do
|
15
|
-
gem 'rails', github: 'rails/rails'
|
16
|
-
end
|
17
|
-
|
18
|
-
appraise 'rack-edge' do
|
19
|
-
gem 'rack', github: 'rack/rack'
|
20
|
-
end
|
21
|
-
|
22
|
-
appraise 'multi_json' do
|
23
|
-
gem 'multi_json', require: 'multi_json'
|
24
|
-
end
|
25
|
-
|
26
|
-
appraise 'multi_xml' do
|
27
|
-
gem 'multi_xml', require: 'multi_xml'
|
28
|
-
end
|