grape 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +18 -0
 - data/CONTRIBUTING.md +1 -0
 - data/README.md +9 -1
 - data/lib/grape/api.rb +12 -0
 - data/lib/grape/dry_types.rb +12 -0
 - data/lib/grape/dsl/headers.rb +5 -2
 - data/lib/grape/dsl/helpers.rb +1 -1
 - data/lib/grape/middleware/auth/dsl.rb +7 -1
 - data/lib/grape/middleware/base.rb +1 -1
 - data/lib/grape/util/json.rb +2 -0
 - data/lib/grape/util/strict_hash_configuration.rb +1 -1
 - data/lib/grape/validations/types/array_coercer.rb +0 -2
 - data/lib/grape/validations/types/dry_type_coercer.rb +1 -10
 - data/lib/grape/validations/types/json.rb +0 -2
 - data/lib/grape/validations/types/primitive_coercer.rb +5 -7
 - data/lib/grape/validations/types/set_coercer.rb +0 -3
 - data/lib/grape/validations/types.rb +83 -9
 - data/lib/grape/validations/validators/all_or_none_of_validator.rb +16 -0
 - data/lib/grape/validations/validators/allow_blank_validator.rb +20 -0
 - data/lib/grape/validations/validators/as_validator.rb +14 -0
 - data/lib/grape/validations/validators/at_least_one_of_validator.rb +15 -0
 - data/lib/grape/validations/validators/base.rb +73 -71
 - data/lib/grape/validations/validators/coerce_validator.rb +75 -0
 - data/lib/grape/validations/validators/default_validator.rb +51 -0
 - data/lib/grape/validations/validators/exactly_one_of_validator.rb +17 -0
 - data/lib/grape/validations/validators/except_values_validator.rb +24 -0
 - data/lib/grape/validations/validators/multiple_params_base.rb +24 -22
 - data/lib/grape/validations/validators/mutual_exclusion_validator.rb +16 -0
 - data/lib/grape/validations/validators/presence_validator.rb +15 -0
 - data/lib/grape/validations/validators/regexp_validator.rb +16 -0
 - data/lib/grape/validations/validators/same_as_validator.rb +29 -0
 - data/lib/grape/validations/validators/values_validator.rb +88 -0
 - data/lib/grape/version.rb +1 -1
 - data/lib/grape.rb +59 -24
 - data/spec/grape/api/custom_validations_spec.rb +77 -46
 - data/spec/grape/api/deeply_included_options_spec.rb +3 -3
 - data/spec/grape/api/defines_boolean_in_params_spec.rb +2 -1
 - data/spec/grape/api/invalid_format_spec.rb +2 -0
 - data/spec/grape/api/recognize_path_spec.rb +1 -1
 - data/spec/grape/api/shared_helpers_exactly_one_of_spec.rb +9 -15
 - data/spec/grape/api_remount_spec.rb +16 -15
 - data/spec/grape/api_spec.rb +317 -193
 - data/spec/grape/dsl/callbacks_spec.rb +1 -0
 - data/spec/grape/dsl/headers_spec.rb +39 -9
 - data/spec/grape/dsl/helpers_spec.rb +3 -2
 - data/spec/grape/dsl/inside_route_spec.rb +6 -4
 - data/spec/grape/dsl/logger_spec.rb +16 -18
 - data/spec/grape/dsl/middleware_spec.rb +1 -0
 - data/spec/grape/dsl/parameters_spec.rb +1 -0
 - data/spec/grape/dsl/request_response_spec.rb +1 -0
 - data/spec/grape/dsl/routing_spec.rb +9 -6
 - data/spec/grape/endpoint/declared_spec.rb +12 -12
 - data/spec/grape/endpoint_spec.rb +59 -50
 - data/spec/grape/entity_spec.rb +13 -13
 - data/spec/grape/exceptions/body_parse_errors_spec.rb +3 -0
 - data/spec/grape/exceptions/invalid_accept_header_spec.rb +61 -22
 - data/spec/grape/exceptions/validation_errors_spec.rb +13 -10
 - data/spec/grape/exceptions/validation_spec.rb +5 -3
 - data/spec/grape/extensions/param_builders/hash_spec.rb +7 -7
 - data/spec/grape/extensions/param_builders/hash_with_indifferent_access_spec.rb +8 -8
 - data/spec/grape/extensions/param_builders/hashie/mash_spec.rb +8 -8
 - data/spec/grape/integration/rack_sendfile_spec.rb +1 -1
 - data/spec/grape/loading_spec.rb +8 -8
 - data/spec/grape/middleware/auth/dsl_spec.rb +14 -5
 - data/spec/grape/middleware/auth/strategies_spec.rb +60 -20
 - data/spec/grape/middleware/base_spec.rb +24 -15
 - data/spec/grape/middleware/error_spec.rb +1 -0
 - data/spec/grape/middleware/exception_spec.rb +111 -161
 - data/spec/grape/middleware/formatter_spec.rb +25 -4
 - data/spec/grape/middleware/globals_spec.rb +7 -4
 - data/spec/grape/middleware/stack_spec.rb +11 -11
 - data/spec/grape/middleware/versioner/accept_version_header_spec.rb +2 -1
 - data/spec/grape/middleware/versioner/header_spec.rb +14 -13
 - data/spec/grape/middleware/versioner/param_spec.rb +7 -1
 - data/spec/grape/middleware/versioner/path_spec.rb +5 -1
 - data/spec/grape/middleware/versioner_spec.rb +1 -1
 - data/spec/grape/parser_spec.rb +4 -0
 - data/spec/grape/path_spec.rb +52 -52
 - data/spec/grape/presenters/presenter_spec.rb +7 -6
 - data/spec/grape/request_spec.rb +6 -4
 - data/spec/grape/util/inheritable_setting_spec.rb +7 -7
 - data/spec/grape/util/inheritable_values_spec.rb +3 -2
 - data/spec/grape/util/reverse_stackable_values_spec.rb +3 -1
 - data/spec/grape/util/stackable_values_spec.rb +7 -5
 - data/spec/grape/validations/instance_behaivour_spec.rb +9 -10
 - data/spec/grape/validations/multiple_attributes_iterator_spec.rb +1 -0
 - data/spec/grape/validations/params_scope_spec.rb +9 -7
 - data/spec/grape/validations/single_attribute_iterator_spec.rb +1 -0
 - data/spec/grape/validations/types/primitive_coercer_spec.rb +2 -2
 - data/spec/grape/validations/types_spec.rb +8 -8
 - data/spec/grape/validations/validators/all_or_none_spec.rb +50 -56
 - data/spec/grape/validations/validators/allow_blank_spec.rb +136 -140
 - data/spec/grape/validations/validators/at_least_one_of_spec.rb +50 -56
 - data/spec/grape/validations/validators/coerce_spec.rb +10 -12
 - data/spec/grape/validations/validators/default_spec.rb +72 -78
 - data/spec/grape/validations/validators/exactly_one_of_spec.rb +71 -77
 - data/spec/grape/validations/validators/except_values_spec.rb +1 -1
 - data/spec/grape/validations/validators/mutual_exclusion_spec.rb +71 -77
 - data/spec/grape/validations/validators/presence_spec.rb +16 -1
 - data/spec/grape/validations/validators/regexp_spec.rb +25 -31
 - data/spec/grape/validations/validators/same_as_spec.rb +14 -20
 - data/spec/grape/validations/validators/values_spec.rb +172 -171
 - data/spec/grape/validations_spec.rb +45 -16
 - data/spec/integration/eager_load/eager_load_spec.rb +2 -2
 - data/spec/integration/multi_json/json_spec.rb +1 -1
 - data/spec/integration/multi_xml/xml_spec.rb +1 -1
 - data/spec/shared/versioning_examples.rb +10 -7
 - data/spec/spec_helper.rb +11 -1
 - metadata +116 -116
 - data/lib/grape/validations/types/build_coercer.rb +0 -94
 - data/lib/grape/validations/validators/all_or_none.rb +0 -16
 - data/lib/grape/validations/validators/allow_blank.rb +0 -18
 - data/lib/grape/validations/validators/as.rb +0 -12
 - data/lib/grape/validations/validators/at_least_one_of.rb +0 -15
 - data/lib/grape/validations/validators/coerce.rb +0 -87
 - data/lib/grape/validations/validators/default.rb +0 -49
 - data/lib/grape/validations/validators/exactly_one_of.rb +0 -17
 - data/lib/grape/validations/validators/except_values.rb +0 -22
 - data/lib/grape/validations/validators/mutual_exclusion.rb +0 -16
 - data/lib/grape/validations/validators/presence.rb +0 -13
 - data/lib/grape/validations/validators/regexp.rb +0 -14
 - data/lib/grape/validations/validators/same_as.rb +0 -27
 - data/lib/grape/validations/validators/values.rb +0 -86
 
| 
         @@ -489,18 +489,24 @@ describe Grape::Validations do 
     | 
|
| 
       489 
489 
     | 
    
         
             
                end
         
     | 
| 
       490 
490 
     | 
    
         | 
| 
       491 
491 
     | 
    
         
             
                context 'custom validator for a Hash' do
         
     | 
| 
       492 
     | 
    
         
            -
                   
     | 
| 
       493 
     | 
    
         
            -
                     
     | 
| 
       494 
     | 
    
         
            -
                       
     | 
| 
       495 
     | 
    
         
            -
                         
     | 
| 
       496 
     | 
    
         
            -
                          return if params[attr_name][:from] <= params[attr_name][:to]
         
     | 
| 
      
 492 
     | 
    
         
            +
                  let(:date_range_validator) do
         
     | 
| 
      
 493 
     | 
    
         
            +
                    Class.new(Grape::Validations::Validators::Base) do
         
     | 
| 
      
 494 
     | 
    
         
            +
                      def validate_param!(attr_name, params)
         
     | 
| 
      
 495 
     | 
    
         
            +
                        return if params[attr_name][:from] <= params[attr_name][:to]
         
     | 
| 
       497 
496 
     | 
    
         | 
| 
       498 
     | 
    
         
            -
             
     | 
| 
       499 
     | 
    
         
            -
                        end
         
     | 
| 
      
 497 
     | 
    
         
            +
                        raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: "'from' must be lower or equal to 'to'")
         
     | 
| 
       500 
498 
     | 
    
         
             
                      end
         
     | 
| 
       501 
499 
     | 
    
         
             
                    end
         
     | 
| 
       502 
500 
     | 
    
         
             
                  end
         
     | 
| 
       503 
501 
     | 
    
         | 
| 
      
 502 
     | 
    
         
            +
                  before do
         
     | 
| 
      
 503 
     | 
    
         
            +
                    described_class.register_validator('date_range', date_range_validator)
         
     | 
| 
      
 504 
     | 
    
         
            +
                  end
         
     | 
| 
      
 505 
     | 
    
         
            +
             
     | 
| 
      
 506 
     | 
    
         
            +
                  after do
         
     | 
| 
      
 507 
     | 
    
         
            +
                    described_class.deregister_validator('date_range')
         
     | 
| 
      
 508 
     | 
    
         
            +
                  end
         
     | 
| 
      
 509 
     | 
    
         
            +
             
     | 
| 
       504 
510 
     | 
    
         
             
                  before do
         
     | 
| 
       505 
511 
     | 
    
         
             
                    subject.params do
         
     | 
| 
       506 
512 
     | 
    
         
             
                      optional :date_range, date_range: true, type: Hash do
         
     | 
| 
         @@ -1183,8 +1189,8 @@ describe Grape::Validations do 
     | 
|
| 
       1183 
1189 
     | 
    
         
             
                end
         
     | 
| 
       1184 
1190 
     | 
    
         | 
| 
       1185 
1191 
     | 
    
         
             
                context 'custom validation' do
         
     | 
| 
       1186 
     | 
    
         
            -
                   
     | 
| 
       1187 
     | 
    
         
            -
                     
     | 
| 
      
 1192 
     | 
    
         
            +
                  let(:custom_validator) do
         
     | 
| 
      
 1193 
     | 
    
         
            +
                    Class.new(Grape::Validations::Validators::Base) do
         
     | 
| 
       1188 
1194 
     | 
    
         
             
                      def validate_param!(attr_name, params)
         
     | 
| 
       1189 
1195 
     | 
    
         
             
                        return if params[attr_name] == 'im custom'
         
     | 
| 
       1190 
1196 
     | 
    
         | 
| 
         @@ -1193,6 +1199,14 @@ describe Grape::Validations do 
     | 
|
| 
       1193 
1199 
     | 
    
         
             
                    end
         
     | 
| 
       1194 
1200 
     | 
    
         
             
                  end
         
     | 
| 
       1195 
1201 
     | 
    
         | 
| 
      
 1202 
     | 
    
         
            +
                  before do
         
     | 
| 
      
 1203 
     | 
    
         
            +
                    described_class.register_validator('customvalidator', custom_validator)
         
     | 
| 
      
 1204 
     | 
    
         
            +
                  end
         
     | 
| 
      
 1205 
     | 
    
         
            +
             
     | 
| 
      
 1206 
     | 
    
         
            +
                  after do
         
     | 
| 
      
 1207 
     | 
    
         
            +
                    described_class.deregister_validator('customvalidator')
         
     | 
| 
      
 1208 
     | 
    
         
            +
                  end
         
     | 
| 
      
 1209 
     | 
    
         
            +
             
     | 
| 
       1196 
1210 
     | 
    
         
             
                  context 'when using optional with a custom validator' do
         
     | 
| 
       1197 
1211 
     | 
    
         
             
                    before do
         
     | 
| 
       1198 
1212 
     | 
    
         
             
                      subject.params do
         
     | 
| 
         @@ -1332,8 +1346,8 @@ describe Grape::Validations do 
     | 
|
| 
       1332 
1346 
     | 
    
         
             
                  end
         
     | 
| 
       1333 
1347 
     | 
    
         | 
| 
       1334 
1348 
     | 
    
         
             
                  context 'when using options on param' do
         
     | 
| 
       1335 
     | 
    
         
            -
                     
     | 
| 
       1336 
     | 
    
         
            -
                       
     | 
| 
      
 1349 
     | 
    
         
            +
                    let(:custom_validator_with_options) do
         
     | 
| 
      
 1350 
     | 
    
         
            +
                      Class.new(Grape::Validations::Validators::Base) do
         
     | 
| 
       1337 
1351 
     | 
    
         
             
                        def validate_param!(attr_name, params)
         
     | 
| 
       1338 
1352 
     | 
    
         
             
                          return if params[attr_name] == @option[:text]
         
     | 
| 
       1339 
1353 
     | 
    
         | 
| 
         @@ -1342,6 +1356,14 @@ describe Grape::Validations do 
     | 
|
| 
       1342 
1356 
     | 
    
         
             
                      end
         
     | 
| 
       1343 
1357 
     | 
    
         
             
                    end
         
     | 
| 
       1344 
1358 
     | 
    
         | 
| 
      
 1359 
     | 
    
         
            +
                    before do
         
     | 
| 
      
 1360 
     | 
    
         
            +
                      described_class.register_validator('customvalidator_with_options', custom_validator_with_options)
         
     | 
| 
      
 1361 
     | 
    
         
            +
                    end
         
     | 
| 
      
 1362 
     | 
    
         
            +
             
     | 
| 
      
 1363 
     | 
    
         
            +
                    after do
         
     | 
| 
      
 1364 
     | 
    
         
            +
                      described_class.deregister_validator('customvalidator_with_options')
         
     | 
| 
      
 1365 
     | 
    
         
            +
                    end
         
     | 
| 
      
 1366 
     | 
    
         
            +
             
     | 
| 
       1345 
1367 
     | 
    
         
             
                    before do
         
     | 
| 
       1346 
1368 
     | 
    
         
             
                      subject.params do
         
     | 
| 
       1347 
1369 
     | 
    
         
             
                        optional :custom, customvalidator_with_options: { text: 'im custom with options', message: 'is not custom with options!' }
         
     | 
| 
         @@ -1436,21 +1458,25 @@ describe Grape::Validations do 
     | 
|
| 
       1436 
1458 
     | 
    
         
             
                        }
         
     | 
| 
       1437 
1459 
     | 
    
         
             
                      end
         
     | 
| 
       1438 
1460 
     | 
    
         
             
                    end
         
     | 
| 
      
 1461 
     | 
    
         
            +
             
     | 
| 
       1439 
1462 
     | 
    
         
             
                    it 'returns defaults' do
         
     | 
| 
       1440 
1463 
     | 
    
         
             
                      get '/order'
         
     | 
| 
       1441 
1464 
     | 
    
         
             
                      expect(last_response.status).to eq(200)
         
     | 
| 
       1442 
1465 
     | 
    
         
             
                      expect(last_response.body).to eq({ order: :asc, order_by: :created_at }.to_json)
         
     | 
| 
       1443 
1466 
     | 
    
         
             
                    end
         
     | 
| 
      
 1467 
     | 
    
         
            +
             
     | 
| 
       1444 
1468 
     | 
    
         
             
                    it 'overrides default value for order' do
         
     | 
| 
       1445 
1469 
     | 
    
         
             
                      get '/order?order=desc'
         
     | 
| 
       1446 
1470 
     | 
    
         
             
                      expect(last_response.status).to eq(200)
         
     | 
| 
       1447 
1471 
     | 
    
         
             
                      expect(last_response.body).to eq({ order: :desc, order_by: :created_at }.to_json)
         
     | 
| 
       1448 
1472 
     | 
    
         
             
                    end
         
     | 
| 
      
 1473 
     | 
    
         
            +
             
     | 
| 
       1449 
1474 
     | 
    
         
             
                    it 'overrides default value for order_by' do
         
     | 
| 
       1450 
1475 
     | 
    
         
             
                      get '/order?order_by=name'
         
     | 
| 
       1451 
1476 
     | 
    
         
             
                      expect(last_response.status).to eq(200)
         
     | 
| 
       1452 
1477 
     | 
    
         
             
                      expect(last_response.body).to eq({ order: :asc, order_by: :name }.to_json)
         
     | 
| 
       1453 
1478 
     | 
    
         
             
                    end
         
     | 
| 
      
 1479 
     | 
    
         
            +
             
     | 
| 
       1454 
1480 
     | 
    
         
             
                    it 'fails with invalid value' do
         
     | 
| 
       1455 
1481 
     | 
    
         
             
                      get '/order?order=invalid'
         
     | 
| 
       1456 
1482 
     | 
    
         
             
                      expect(last_response.status).to eq(400)
         
     | 
| 
         @@ -1475,7 +1501,7 @@ describe Grape::Validations do 
     | 
|
| 
       1475 
1501 
     | 
    
         | 
| 
       1476 
1502 
     | 
    
         
             
                context 'all or none' do
         
     | 
| 
       1477 
1503 
     | 
    
         
             
                  context 'optional params' do
         
     | 
| 
       1478 
     | 
    
         
            -
                    before  
     | 
| 
      
 1504 
     | 
    
         
            +
                    before do
         
     | 
| 
       1479 
1505 
     | 
    
         
             
                      subject.resource :custom_message do
         
     | 
| 
       1480 
1506 
     | 
    
         
             
                        params do
         
     | 
| 
       1481 
1507 
     | 
    
         
             
                          optional :beer
         
     | 
| 
         @@ -1488,17 +1514,20 @@ describe Grape::Validations do 
     | 
|
| 
       1488 
1514 
     | 
    
         
             
                        end
         
     | 
| 
       1489 
1515 
     | 
    
         
             
                      end
         
     | 
| 
       1490 
1516 
     | 
    
         
             
                    end
         
     | 
| 
      
 1517 
     | 
    
         
            +
             
     | 
| 
       1491 
1518 
     | 
    
         
             
                    context 'with a custom validation message' do
         
     | 
| 
       1492 
1519 
     | 
    
         
             
                      it 'errors when any one is present' do
         
     | 
| 
       1493 
1520 
     | 
    
         
             
                        get '/custom_message/all_or_none', beer: 'string'
         
     | 
| 
       1494 
1521 
     | 
    
         
             
                        expect(last_response.status).to eq(400)
         
     | 
| 
       1495 
1522 
     | 
    
         
             
                        expect(last_response.body).to eq 'beer, wine, juice all params are required or none is required'
         
     | 
| 
       1496 
1523 
     | 
    
         
             
                      end
         
     | 
| 
      
 1524 
     | 
    
         
            +
             
     | 
| 
       1497 
1525 
     | 
    
         
             
                      it 'works when all params are present' do
         
     | 
| 
       1498 
1526 
     | 
    
         
             
                        get '/custom_message/all_or_none', beer: 'string', wine: 'anotherstring', juice: 'anotheranotherstring'
         
     | 
| 
       1499 
1527 
     | 
    
         
             
                        expect(last_response.status).to eq(200)
         
     | 
| 
       1500 
1528 
     | 
    
         
             
                        expect(last_response.body).to eq 'all_or_none works!'
         
     | 
| 
       1501 
1529 
     | 
    
         
             
                      end
         
     | 
| 
      
 1530 
     | 
    
         
            +
             
     | 
| 
       1502 
1531 
     | 
    
         
             
                      it 'works when none are present' do
         
     | 
| 
       1503 
1532 
     | 
    
         
             
                        get '/custom_message/all_or_none'
         
     | 
| 
       1504 
1533 
     | 
    
         
             
                        expect(last_response.status).to eq(200)
         
     | 
| 
         @@ -1662,7 +1691,7 @@ describe Grape::Validations do 
     | 
|
| 
       1662 
1691 
     | 
    
         | 
| 
       1663 
1692 
     | 
    
         
             
                context 'exactly one of' do
         
     | 
| 
       1664 
1693 
     | 
    
         
             
                  context 'params' do
         
     | 
| 
       1665 
     | 
    
         
            -
                    before  
     | 
| 
      
 1694 
     | 
    
         
            +
                    before do
         
     | 
| 
       1666 
1695 
     | 
    
         
             
                      subject.resources :custom_message do
         
     | 
| 
       1667 
1696 
     | 
    
         
             
                        params do
         
     | 
| 
       1668 
1697 
     | 
    
         
             
                          optional :beer
         
     | 
| 
         @@ -1726,7 +1755,7 @@ describe Grape::Validations do 
     | 
|
| 
       1726 
1755 
     | 
    
         
             
                  end
         
     | 
| 
       1727 
1756 
     | 
    
         | 
| 
       1728 
1757 
     | 
    
         
             
                  context 'nested params' do
         
     | 
| 
       1729 
     | 
    
         
            -
                    before  
     | 
| 
      
 1758 
     | 
    
         
            +
                    before do
         
     | 
| 
       1730 
1759 
     | 
    
         
             
                      subject.params do
         
     | 
| 
       1731 
1760 
     | 
    
         
             
                        requires :nested, type: Hash do
         
     | 
| 
       1732 
1761 
     | 
    
         
             
                          optional :beer_nested
         
     | 
| 
         @@ -1768,7 +1797,7 @@ describe Grape::Validations do 
     | 
|
| 
       1768 
1797 
     | 
    
         | 
| 
       1769 
1798 
     | 
    
         
             
                context 'at least one of' do
         
     | 
| 
       1770 
1799 
     | 
    
         
             
                  context 'params' do
         
     | 
| 
       1771 
     | 
    
         
            -
                    before  
     | 
| 
      
 1800 
     | 
    
         
            +
                    before do
         
     | 
| 
       1772 
1801 
     | 
    
         
             
                      subject.resources :custom_message do
         
     | 
| 
       1773 
1802 
     | 
    
         
             
                        params do
         
     | 
| 
       1774 
1803 
     | 
    
         
             
                          optional :beer
         
     | 
| 
         @@ -1832,7 +1861,7 @@ describe Grape::Validations do 
     | 
|
| 
       1832 
1861 
     | 
    
         
             
                  end
         
     | 
| 
       1833 
1862 
     | 
    
         | 
| 
       1834 
1863 
     | 
    
         
             
                  context 'nested params' do
         
     | 
| 
       1835 
     | 
    
         
            -
                    before  
     | 
| 
      
 1864 
     | 
    
         
            +
                    before do
         
     | 
| 
       1836 
1865 
     | 
    
         
             
                      subject.params do
         
     | 
| 
       1837 
1866 
     | 
    
         
             
                        requires :nested, type: Hash do
         
     | 
| 
       1838 
1867 
     | 
    
         
             
                          optional :beer
         
     | 
| 
         @@ -6,10 +6,10 @@ require 'grape' 
     | 
|
| 
       6 
6 
     | 
    
         
             
            describe Grape do
         
     | 
| 
       7 
7 
     | 
    
         
             
              it 'eager_load!' do
         
     | 
| 
       8 
8 
     | 
    
         
             
                require 'grape/eager_load'
         
     | 
| 
       9 
     | 
    
         
            -
                expect {  
     | 
| 
      
 9 
     | 
    
         
            +
                expect { described_class.eager_load! }.not_to raise_error
         
     | 
| 
       10 
10 
     | 
    
         
             
              end
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
              it 'compile!' do
         
     | 
| 
       13 
     | 
    
         
            -
                expect { Class.new(Grape::API).compile! }. 
     | 
| 
      
 13 
     | 
    
         
            +
                expect { Class.new(Grape::API).compile! }.not_to raise_error
         
     | 
| 
       14 
14 
     | 
    
         
             
              end
         
     | 
| 
       15 
15 
     | 
    
         
             
            end
         
     | 
| 
         @@ -35,14 +35,14 @@ shared_examples_for 'versioning' do 
     | 
|
| 
       35 
35 
     | 
    
         
             
                end
         
     | 
| 
       36 
36 
     | 
    
         | 
| 
       37 
37 
     | 
    
         
             
                versioned_get '/awesome', 'v1', **macro_options
         
     | 
| 
       38 
     | 
    
         
            -
                expect(last_response.status).to  
     | 
| 
      
 38 
     | 
    
         
            +
                expect(last_response.status).to be 404
         
     | 
| 
       39 
39 
     | 
    
         | 
| 
       40 
40 
     | 
    
         
             
                versioned_get '/awesome', 'v2', **macro_options
         
     | 
| 
       41 
     | 
    
         
            -
                expect(last_response.status).to  
     | 
| 
      
 41 
     | 
    
         
            +
                expect(last_response.status).to be 200
         
     | 
| 
       42 
42 
     | 
    
         
             
                versioned_get '/legacy', 'v1', **macro_options
         
     | 
| 
       43 
     | 
    
         
            -
                expect(last_response.status).to  
     | 
| 
      
 43 
     | 
    
         
            +
                expect(last_response.status).to be 200
         
     | 
| 
       44 
44 
     | 
    
         
             
                versioned_get '/legacy', 'v2', **macro_options
         
     | 
| 
       45 
     | 
    
         
            -
                expect(last_response.status).to  
     | 
| 
      
 45 
     | 
    
         
            +
                expect(last_response.status).to be 404
         
     | 
| 
       46 
46 
     | 
    
         
             
              end
         
     | 
| 
       47 
47 
     | 
    
         | 
| 
       48 
48 
     | 
    
         
             
              it 'is able to specify multiple versions' do
         
     | 
| 
         @@ -52,11 +52,11 @@ shared_examples_for 'versioning' do 
     | 
|
| 
       52 
52 
     | 
    
         
             
                end
         
     | 
| 
       53 
53 
     | 
    
         | 
| 
       54 
54 
     | 
    
         
             
                versioned_get '/awesome', 'v1', **macro_options
         
     | 
| 
       55 
     | 
    
         
            -
                expect(last_response.status).to  
     | 
| 
      
 55 
     | 
    
         
            +
                expect(last_response.status).to be 200
         
     | 
| 
       56 
56 
     | 
    
         
             
                versioned_get '/awesome', 'v2', **macro_options
         
     | 
| 
       57 
     | 
    
         
            -
                expect(last_response.status).to  
     | 
| 
      
 57 
     | 
    
         
            +
                expect(last_response.status).to be 200
         
     | 
| 
       58 
58 
     | 
    
         
             
                versioned_get '/awesome', 'v3', **macro_options
         
     | 
| 
       59 
     | 
    
         
            -
                expect(last_response.status).to  
     | 
| 
      
 59 
     | 
    
         
            +
                expect(last_response.status).to be 404
         
     | 
| 
       60 
60 
     | 
    
         
             
              end
         
     | 
| 
       61 
61 
     | 
    
         | 
| 
       62 
62 
     | 
    
         
             
              context 'with different versions for the same endpoint' do
         
     | 
| 
         @@ -117,6 +117,7 @@ shared_examples_for 'versioning' do 
     | 
|
| 
       117 
117 
     | 
    
         
             
                    before do
         
     | 
| 
       118 
118 
     | 
    
         
             
                      @output ||= 'v2-'
         
     | 
| 
       119 
119 
     | 
    
         
             
                    end
         
     | 
| 
      
 120 
     | 
    
         
            +
             
     | 
| 
       120 
121 
     | 
    
         
             
                    get 'version' do
         
     | 
| 
       121 
122 
     | 
    
         
             
                      @output += 'version'
         
     | 
| 
       122 
123 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -126,6 +127,7 @@ shared_examples_for 'versioning' do 
     | 
|
| 
       126 
127 
     | 
    
         
             
                    before do
         
     | 
| 
       127 
128 
     | 
    
         
             
                      @output ||= 'v1-'
         
     | 
| 
       128 
129 
     | 
    
         
             
                    end
         
     | 
| 
      
 130 
     | 
    
         
            +
             
     | 
| 
       129 
131 
     | 
    
         
             
                    get 'version' do
         
     | 
| 
       130 
132 
     | 
    
         
             
                      @output += 'version'
         
     | 
| 
       131 
133 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -170,6 +172,7 @@ shared_examples_for 'versioning' do 
     | 
|
| 
       170 
172 
     | 
    
         
             
                  end
         
     | 
| 
       171 
173 
     | 
    
         
             
                  klass
         
     | 
| 
       172 
174 
     | 
    
         
             
                end
         
     | 
| 
      
 175 
     | 
    
         
            +
             
     | 
| 
       173 
176 
     | 
    
         
             
                before do
         
     | 
| 
       174 
177 
     | 
    
         
             
                  subject.format :txt
         
     | 
| 
       175 
178 
     | 
    
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | 
         @@ -5,6 +5,15 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) 
     | 
|
| 
       5 
5 
     | 
    
         
             
            $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'support'))
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            require 'grape'
         
     | 
| 
      
 8 
     | 
    
         
            +
            require 'test_prof/recipes/rspec/let_it_be'
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            class NullAdapter
         
     | 
| 
      
 11 
     | 
    
         
            +
              def begin_transaction; end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              def rollback_transaction; end
         
     | 
| 
      
 14 
     | 
    
         
            +
            end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            TestProf::BeforeAll.adapter = NullAdapter.new
         
     | 
| 
       8 
17 
     | 
    
         | 
| 
       9 
18 
     | 
    
         
             
            require 'rubygems'
         
     | 
| 
       10 
19 
     | 
    
         
             
            require 'bundler'
         
     | 
| 
         @@ -27,7 +36,8 @@ RSpec.configure do |config| 
     | 
|
| 
       27 
36 
     | 
    
         
             
              config.filter_run_when_matching :focus
         
     | 
| 
       28 
37 
     | 
    
         
             
              config.warnings = true
         
     | 
| 
       29 
38 
     | 
    
         | 
| 
       30 
     | 
    
         
            -
              config.before(: 
     | 
| 
      
 39 
     | 
    
         
            +
              config.before(:all) { Grape::Util::InheritableSetting.reset_global! }
         
     | 
| 
      
 40 
     | 
    
         
            +
              config.before { Grape::Util::InheritableSetting.reset_global! }
         
     | 
| 
       31 
41 
     | 
    
         | 
| 
       32 
42 
     | 
    
         
             
              # Enable flags like --only-failures and --next-failure
         
     | 
| 
       33 
43 
     | 
    
         
             
              config.example_status_persistence_file_path = '.rspec_status'
         
     | 
    
        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.6. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.6.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Michael Bleigh
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2021- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-12-28 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: activesupport
         
     | 
| 
         @@ -115,6 +115,7 @@ files: 
     | 
|
| 
       115 
115 
     | 
    
         
             
            - lib/grape/config.rb
         
     | 
| 
       116 
116 
     | 
    
         
             
            - lib/grape/content_types.rb
         
     | 
| 
       117 
117 
     | 
    
         
             
            - lib/grape/cookies.rb
         
     | 
| 
      
 118 
     | 
    
         
            +
            - lib/grape/dry_types.rb
         
     | 
| 
       118 
119 
     | 
    
         
             
            - lib/grape/dsl/api.rb
         
     | 
| 
       119 
120 
     | 
    
         
             
            - lib/grape/dsl/callbacks.rb
         
     | 
| 
       120 
121 
     | 
    
         
             
            - lib/grape/dsl/configuration.rb
         
     | 
| 
         @@ -223,7 +224,6 @@ files: 
     | 
|
| 
       223 
224 
     | 
    
         
             
            - lib/grape/validations/single_attribute_iterator.rb
         
     | 
| 
       224 
225 
     | 
    
         
             
            - lib/grape/validations/types.rb
         
     | 
| 
       225 
226 
     | 
    
         
             
            - lib/grape/validations/types/array_coercer.rb
         
     | 
| 
       226 
     | 
    
         
            -
            - lib/grape/validations/types/build_coercer.rb
         
     | 
| 
       227 
227 
     | 
    
         
             
            - lib/grape/validations/types/custom_type_coercer.rb
         
     | 
| 
       228 
228 
     | 
    
         
             
            - lib/grape/validations/types/custom_type_collection_coercer.rb
         
     | 
| 
       229 
229 
     | 
    
         
             
            - lib/grape/validations/types/dry_type_coercer.rb
         
     | 
| 
         @@ -235,21 +235,21 @@ files: 
     | 
|
| 
       235 
235 
     | 
    
         
             
            - lib/grape/validations/types/set_coercer.rb
         
     | 
| 
       236 
236 
     | 
    
         
             
            - lib/grape/validations/types/variant_collection_coercer.rb
         
     | 
| 
       237 
237 
     | 
    
         
             
            - lib/grape/validations/validator_factory.rb
         
     | 
| 
       238 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
       239 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
       240 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
       241 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
      
 238 
     | 
    
         
            +
            - lib/grape/validations/validators/all_or_none_of_validator.rb
         
     | 
| 
      
 239 
     | 
    
         
            +
            - lib/grape/validations/validators/allow_blank_validator.rb
         
     | 
| 
      
 240 
     | 
    
         
            +
            - lib/grape/validations/validators/as_validator.rb
         
     | 
| 
      
 241 
     | 
    
         
            +
            - lib/grape/validations/validators/at_least_one_of_validator.rb
         
     | 
| 
       242 
242 
     | 
    
         
             
            - lib/grape/validations/validators/base.rb
         
     | 
| 
       243 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
       244 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
       245 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
       246 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
      
 243 
     | 
    
         
            +
            - lib/grape/validations/validators/coerce_validator.rb
         
     | 
| 
      
 244 
     | 
    
         
            +
            - lib/grape/validations/validators/default_validator.rb
         
     | 
| 
      
 245 
     | 
    
         
            +
            - lib/grape/validations/validators/exactly_one_of_validator.rb
         
     | 
| 
      
 246 
     | 
    
         
            +
            - lib/grape/validations/validators/except_values_validator.rb
         
     | 
| 
       247 
247 
     | 
    
         
             
            - lib/grape/validations/validators/multiple_params_base.rb
         
     | 
| 
       248 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
       249 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
       250 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
       251 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
       252 
     | 
    
         
            -
            - lib/grape/validations/validators/ 
     | 
| 
      
 248 
     | 
    
         
            +
            - lib/grape/validations/validators/mutual_exclusion_validator.rb
         
     | 
| 
      
 249 
     | 
    
         
            +
            - lib/grape/validations/validators/presence_validator.rb
         
     | 
| 
      
 250 
     | 
    
         
            +
            - lib/grape/validations/validators/regexp_validator.rb
         
     | 
| 
      
 251 
     | 
    
         
            +
            - lib/grape/validations/validators/same_as_validator.rb
         
     | 
| 
      
 252 
     | 
    
         
            +
            - lib/grape/validations/validators/values_validator.rb
         
     | 
| 
       253 
253 
     | 
    
         
             
            - lib/grape/version.rb
         
     | 
| 
       254 
254 
     | 
    
         
             
            - spec/grape/api/custom_validations_spec.rb
         
     | 
| 
       255 
255 
     | 
    
         
             
            - spec/grape/api/deeply_included_options_spec.rb
         
     | 
| 
         @@ -371,9 +371,9 @@ licenses: 
     | 
|
| 
       371 
371 
     | 
    
         
             
            - MIT
         
     | 
| 
       372 
372 
     | 
    
         
             
            metadata:
         
     | 
| 
       373 
373 
     | 
    
         
             
              bug_tracker_uri: https://github.com/ruby-grape/grape/issues
         
     | 
| 
       374 
     | 
    
         
            -
              changelog_uri: https://github.com/ruby-grape/grape/blob/v1.6. 
     | 
| 
       375 
     | 
    
         
            -
              documentation_uri: https://www.rubydoc.info/gems/grape/1.6. 
     | 
| 
       376 
     | 
    
         
            -
              source_code_uri: https://github.com/ruby-grape/grape/tree/v1.6. 
     | 
| 
      
 374 
     | 
    
         
            +
              changelog_uri: https://github.com/ruby-grape/grape/blob/v1.6.1/CHANGELOG.md
         
     | 
| 
      
 375 
     | 
    
         
            +
              documentation_uri: https://www.rubydoc.info/gems/grape/1.6.1
         
     | 
| 
      
 376 
     | 
    
         
            +
              source_code_uri: https://github.com/ruby-grape/grape/tree/v1.6.1
         
     | 
| 
       377 
377 
     | 
    
         
             
            post_install_message:
         
     | 
| 
       378 
378 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       379 
379 
     | 
    
         
             
            require_paths:
         
     | 
| 
         @@ -389,123 +389,123 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       389 
389 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       390 
390 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       391 
391 
     | 
    
         
             
            requirements: []
         
     | 
| 
       392 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 392 
     | 
    
         
            +
            rubygems_version: 3.3.0.dev
         
     | 
| 
       393 
393 
     | 
    
         
             
            signing_key:
         
     | 
| 
       394 
394 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       395 
395 
     | 
    
         
             
            summary: A simple Ruby framework for building REST-like APIs.
         
     | 
| 
       396 
396 
     | 
    
         
             
            test_files:
         
     | 
| 
       397 
     | 
    
         
            -
            - spec/ 
     | 
| 
       398 
     | 
    
         
            -
            - spec/ 
     | 
| 
       399 
     | 
    
         
            -
            - spec/ 
     | 
| 
       400 
     | 
    
         
            -
            - spec/ 
     | 
| 
       401 
     | 
    
         
            -
            - spec/ 
     | 
| 
       402 
     | 
    
         
            -
            - spec/ 
     | 
| 
       403 
     | 
    
         
            -
            - spec/ 
     | 
| 
       404 
     | 
    
         
            -
            - spec/ 
     | 
| 
       405 
     | 
    
         
            -
            - spec/ 
     | 
| 
       406 
     | 
    
         
            -
            - spec/ 
     | 
| 
       407 
     | 
    
         
            -
            - spec/ 
     | 
| 
       408 
     | 
    
         
            -
            - spec/ 
     | 
| 
       409 
     | 
    
         
            -
            - spec/ 
     | 
| 
       410 
     | 
    
         
            -
            - spec/grape/ 
     | 
| 
       411 
     | 
    
         
            -
            - spec/grape/ 
     | 
| 
       412 
     | 
    
         
            -
            - spec/grape/ 
     | 
| 
       413 
     | 
    
         
            -
            - spec/grape/ 
     | 
| 
       414 
     | 
    
         
            -
            - spec/grape/ 
     | 
| 
       415 
     | 
    
         
            -
            - spec/grape/ 
     | 
| 
       416 
     | 
    
         
            -
            - spec/grape/middleware/stack_spec.rb
         
     | 
| 
       417 
     | 
    
         
            -
            - spec/grape/middleware/exception_spec.rb
         
     | 
| 
       418 
     | 
    
         
            -
            - spec/grape/middleware/versioner_spec.rb
         
     | 
| 
       419 
     | 
    
         
            -
            - spec/grape/middleware/versioner/accept_version_header_spec.rb
         
     | 
| 
       420 
     | 
    
         
            -
            - spec/grape/middleware/versioner/header_spec.rb
         
     | 
| 
       421 
     | 
    
         
            -
            - spec/grape/middleware/versioner/path_spec.rb
         
     | 
| 
       422 
     | 
    
         
            -
            - spec/grape/middleware/versioner/param_spec.rb
         
     | 
| 
       423 
     | 
    
         
            -
            - spec/grape/middleware/base_spec.rb
         
     | 
| 
      
 397 
     | 
    
         
            +
            - spec/grape/api/custom_validations_spec.rb
         
     | 
| 
      
 398 
     | 
    
         
            +
            - spec/grape/api/deeply_included_options_spec.rb
         
     | 
| 
      
 399 
     | 
    
         
            +
            - spec/grape/api/defines_boolean_in_params_spec.rb
         
     | 
| 
      
 400 
     | 
    
         
            +
            - spec/grape/api/inherited_helpers_spec.rb
         
     | 
| 
      
 401 
     | 
    
         
            +
            - spec/grape/api/instance_spec.rb
         
     | 
| 
      
 402 
     | 
    
         
            +
            - spec/grape/api/invalid_format_spec.rb
         
     | 
| 
      
 403 
     | 
    
         
            +
            - spec/grape/api/namespace_parameters_in_route_spec.rb
         
     | 
| 
      
 404 
     | 
    
         
            +
            - spec/grape/api/nested_helpers_spec.rb
         
     | 
| 
      
 405 
     | 
    
         
            +
            - spec/grape/api/optional_parameters_in_route_spec.rb
         
     | 
| 
      
 406 
     | 
    
         
            +
            - spec/grape/api/parameters_modification_spec.rb
         
     | 
| 
      
 407 
     | 
    
         
            +
            - spec/grape/api/patch_method_helpers_spec.rb
         
     | 
| 
      
 408 
     | 
    
         
            +
            - spec/grape/api/recognize_path_spec.rb
         
     | 
| 
      
 409 
     | 
    
         
            +
            - spec/grape/api/required_parameters_in_route_spec.rb
         
     | 
| 
      
 410 
     | 
    
         
            +
            - spec/grape/api/required_parameters_with_invalid_method_spec.rb
         
     | 
| 
      
 411 
     | 
    
         
            +
            - spec/grape/api/routes_with_requirements_spec.rb
         
     | 
| 
      
 412 
     | 
    
         
            +
            - spec/grape/api/shared_helpers_exactly_one_of_spec.rb
         
     | 
| 
      
 413 
     | 
    
         
            +
            - spec/grape/api/shared_helpers_spec.rb
         
     | 
| 
      
 414 
     | 
    
         
            +
            - spec/grape/api_remount_spec.rb
         
     | 
| 
      
 415 
     | 
    
         
            +
            - spec/grape/api_spec.rb
         
     | 
| 
       424 
416 
     | 
    
         
             
            - spec/grape/config_spec.rb
         
     | 
| 
       425 
     | 
    
         
            -
            - spec/grape/ 
     | 
| 
      
 417 
     | 
    
         
            +
            - spec/grape/dsl/callbacks_spec.rb
         
     | 
| 
      
 418 
     | 
    
         
            +
            - spec/grape/dsl/configuration_spec.rb
         
     | 
| 
      
 419 
     | 
    
         
            +
            - spec/grape/dsl/desc_spec.rb
         
     | 
| 
      
 420 
     | 
    
         
            +
            - spec/grape/dsl/headers_spec.rb
         
     | 
| 
      
 421 
     | 
    
         
            +
            - spec/grape/dsl/helpers_spec.rb
         
     | 
| 
      
 422 
     | 
    
         
            +
            - spec/grape/dsl/inside_route_spec.rb
         
     | 
| 
      
 423 
     | 
    
         
            +
            - spec/grape/dsl/logger_spec.rb
         
     | 
| 
      
 424 
     | 
    
         
            +
            - spec/grape/dsl/middleware_spec.rb
         
     | 
| 
      
 425 
     | 
    
         
            +
            - spec/grape/dsl/parameters_spec.rb
         
     | 
| 
      
 426 
     | 
    
         
            +
            - spec/grape/dsl/request_response_spec.rb
         
     | 
| 
      
 427 
     | 
    
         
            +
            - spec/grape/dsl/routing_spec.rb
         
     | 
| 
      
 428 
     | 
    
         
            +
            - spec/grape/dsl/settings_spec.rb
         
     | 
| 
      
 429 
     | 
    
         
            +
            - spec/grape/dsl/validations_spec.rb
         
     | 
| 
      
 430 
     | 
    
         
            +
            - spec/grape/endpoint/declared_spec.rb
         
     | 
| 
       426 
431 
     | 
    
         
             
            - spec/grape/endpoint_spec.rb
         
     | 
| 
       427 
     | 
    
         
            -
            - spec/grape/api_spec.rb
         
     | 
| 
       428 
     | 
    
         
            -
            - spec/grape/util/reverse_stackable_values_spec.rb
         
     | 
| 
       429 
     | 
    
         
            -
            - spec/grape/util/stackable_values_spec.rb
         
     | 
| 
       430 
     | 
    
         
            -
            - spec/grape/util/inheritable_setting_spec.rb
         
     | 
| 
       431 
     | 
    
         
            -
            - spec/grape/util/strict_hash_configuration_spec.rb
         
     | 
| 
       432 
     | 
    
         
            -
            - spec/grape/util/inheritable_values_spec.rb
         
     | 
| 
       433 
     | 
    
         
            -
            - spec/grape/integration/rack_spec.rb
         
     | 
| 
       434 
     | 
    
         
            -
            - spec/grape/integration/rack_sendfile_spec.rb
         
     | 
| 
       435 
     | 
    
         
            -
            - spec/grape/integration/global_namespace_function_spec.rb
         
     | 
| 
       436 
     | 
    
         
            -
            - spec/grape/validations_spec.rb
         
     | 
| 
       437 
432 
     | 
    
         
             
            - spec/grape/entity_spec.rb
         
     | 
| 
       438 
     | 
    
         
            -
            - spec/grape/exceptions/ 
     | 
| 
       439 
     | 
    
         
            -
            - spec/grape/exceptions/invalid_accept_header_spec.rb
         
     | 
| 
       440 
     | 
    
         
            -
            - spec/grape/exceptions/missing_option_spec.rb
         
     | 
| 
       441 
     | 
    
         
            -
            - spec/grape/exceptions/invalid_response_spec.rb
         
     | 
| 
      
 433 
     | 
    
         
            +
            - spec/grape/exceptions/base_spec.rb
         
     | 
| 
       442 
434 
     | 
    
         
             
            - spec/grape/exceptions/body_parse_errors_spec.rb
         
     | 
| 
      
 435 
     | 
    
         
            +
            - spec/grape/exceptions/invalid_accept_header_spec.rb
         
     | 
| 
       443 
436 
     | 
    
         
             
            - spec/grape/exceptions/invalid_formatter_spec.rb
         
     | 
| 
      
 437 
     | 
    
         
            +
            - spec/grape/exceptions/invalid_response_spec.rb
         
     | 
| 
      
 438 
     | 
    
         
            +
            - spec/grape/exceptions/invalid_versioner_option_spec.rb
         
     | 
| 
       444 
439 
     | 
    
         
             
            - spec/grape/exceptions/missing_mime_type_spec.rb
         
     | 
| 
      
 440 
     | 
    
         
            +
            - spec/grape/exceptions/missing_option_spec.rb
         
     | 
| 
       445 
441 
     | 
    
         
             
            - spec/grape/exceptions/unknown_options_spec.rb
         
     | 
| 
       446 
     | 
    
         
            -
            - spec/grape/exceptions/validation_errors_spec.rb
         
     | 
| 
       447 
442 
     | 
    
         
             
            - spec/grape/exceptions/unknown_validator_spec.rb
         
     | 
| 
       448 
     | 
    
         
            -
            - spec/grape/exceptions/ 
     | 
| 
       449 
     | 
    
         
            -
            - spec/grape/exceptions/ 
     | 
| 
      
 443 
     | 
    
         
            +
            - spec/grape/exceptions/validation_errors_spec.rb
         
     | 
| 
      
 444 
     | 
    
         
            +
            - spec/grape/exceptions/validation_spec.rb
         
     | 
| 
      
 445 
     | 
    
         
            +
            - spec/grape/extensions/param_builders/hash_spec.rb
         
     | 
| 
      
 446 
     | 
    
         
            +
            - spec/grape/extensions/param_builders/hash_with_indifferent_access_spec.rb
         
     | 
| 
      
 447 
     | 
    
         
            +
            - spec/grape/extensions/param_builders/hashie/mash_spec.rb
         
     | 
| 
      
 448 
     | 
    
         
            +
            - spec/grape/integration/global_namespace_function_spec.rb
         
     | 
| 
      
 449 
     | 
    
         
            +
            - spec/grape/integration/rack_sendfile_spec.rb
         
     | 
| 
      
 450 
     | 
    
         
            +
            - spec/grape/integration/rack_spec.rb
         
     | 
| 
      
 451 
     | 
    
         
            +
            - spec/grape/loading_spec.rb
         
     | 
| 
      
 452 
     | 
    
         
            +
            - spec/grape/middleware/auth/base_spec.rb
         
     | 
| 
      
 453 
     | 
    
         
            +
            - spec/grape/middleware/auth/dsl_spec.rb
         
     | 
| 
      
 454 
     | 
    
         
            +
            - spec/grape/middleware/auth/strategies_spec.rb
         
     | 
| 
      
 455 
     | 
    
         
            +
            - spec/grape/middleware/base_spec.rb
         
     | 
| 
      
 456 
     | 
    
         
            +
            - spec/grape/middleware/error_spec.rb
         
     | 
| 
      
 457 
     | 
    
         
            +
            - spec/grape/middleware/exception_spec.rb
         
     | 
| 
      
 458 
     | 
    
         
            +
            - spec/grape/middleware/formatter_spec.rb
         
     | 
| 
      
 459 
     | 
    
         
            +
            - spec/grape/middleware/globals_spec.rb
         
     | 
| 
      
 460 
     | 
    
         
            +
            - spec/grape/middleware/stack_spec.rb
         
     | 
| 
      
 461 
     | 
    
         
            +
            - spec/grape/middleware/versioner/accept_version_header_spec.rb
         
     | 
| 
      
 462 
     | 
    
         
            +
            - spec/grape/middleware/versioner/header_spec.rb
         
     | 
| 
      
 463 
     | 
    
         
            +
            - spec/grape/middleware/versioner/param_spec.rb
         
     | 
| 
      
 464 
     | 
    
         
            +
            - spec/grape/middleware/versioner/path_spec.rb
         
     | 
| 
      
 465 
     | 
    
         
            +
            - spec/grape/middleware/versioner_spec.rb
         
     | 
| 
      
 466 
     | 
    
         
            +
            - spec/grape/named_api_spec.rb
         
     | 
| 
      
 467 
     | 
    
         
            +
            - spec/grape/parser_spec.rb
         
     | 
| 
      
 468 
     | 
    
         
            +
            - spec/grape/path_spec.rb
         
     | 
| 
       450 
469 
     | 
    
         
             
            - spec/grape/presenters/presenter_spec.rb
         
     | 
| 
       451 
     | 
    
         
            -
            - spec/grape/ 
     | 
| 
      
 470 
     | 
    
         
            +
            - spec/grape/request_spec.rb
         
     | 
| 
      
 471 
     | 
    
         
            +
            - spec/grape/util/inheritable_setting_spec.rb
         
     | 
| 
      
 472 
     | 
    
         
            +
            - spec/grape/util/inheritable_values_spec.rb
         
     | 
| 
      
 473 
     | 
    
         
            +
            - spec/grape/util/reverse_stackable_values_spec.rb
         
     | 
| 
      
 474 
     | 
    
         
            +
            - spec/grape/util/stackable_values_spec.rb
         
     | 
| 
      
 475 
     | 
    
         
            +
            - spec/grape/util/strict_hash_configuration_spec.rb
         
     | 
| 
       452 
476 
     | 
    
         
             
            - spec/grape/validations/attributes_iterator_spec.rb
         
     | 
| 
       453 
     | 
    
         
            -
            - spec/grape/validations/types/primitive_coercer_spec.rb
         
     | 
| 
       454 
     | 
    
         
            -
            - spec/grape/validations/types/set_coercer_spec.rb
         
     | 
| 
       455 
     | 
    
         
            -
            - spec/grape/validations/types/array_coercer_spec.rb
         
     | 
| 
       456 
     | 
    
         
            -
            - spec/grape/validations/params_scope_spec.rb
         
     | 
| 
       457 
477 
     | 
    
         
             
            - spec/grape/validations/instance_behaivour_spec.rb
         
     | 
| 
       458 
478 
     | 
    
         
             
            - spec/grape/validations/multiple_attributes_iterator_spec.rb
         
     | 
| 
      
 479 
     | 
    
         
            +
            - spec/grape/validations/params_scope_spec.rb
         
     | 
| 
      
 480 
     | 
    
         
            +
            - spec/grape/validations/single_attribute_iterator_spec.rb
         
     | 
| 
      
 481 
     | 
    
         
            +
            - spec/grape/validations/types/array_coercer_spec.rb
         
     | 
| 
      
 482 
     | 
    
         
            +
            - spec/grape/validations/types/primitive_coercer_spec.rb
         
     | 
| 
      
 483 
     | 
    
         
            +
            - spec/grape/validations/types/set_coercer_spec.rb
         
     | 
| 
       459 
484 
     | 
    
         
             
            - spec/grape/validations/types_spec.rb
         
     | 
| 
       460 
     | 
    
         
            -
            - spec/grape/validations/validators/ 
     | 
| 
       461 
     | 
    
         
            -
            - spec/grape/validations/validators/ 
     | 
| 
      
 485 
     | 
    
         
            +
            - spec/grape/validations/validators/all_or_none_spec.rb
         
     | 
| 
      
 486 
     | 
    
         
            +
            - spec/grape/validations/validators/allow_blank_spec.rb
         
     | 
| 
      
 487 
     | 
    
         
            +
            - spec/grape/validations/validators/at_least_one_of_spec.rb
         
     | 
| 
      
 488 
     | 
    
         
            +
            - spec/grape/validations/validators/coerce_spec.rb
         
     | 
| 
      
 489 
     | 
    
         
            +
            - spec/grape/validations/validators/default_spec.rb
         
     | 
| 
       462 
490 
     | 
    
         
             
            - spec/grape/validations/validators/exactly_one_of_spec.rb
         
     | 
| 
       463 
491 
     | 
    
         
             
            - spec/grape/validations/validators/except_values_spec.rb
         
     | 
| 
      
 492 
     | 
    
         
            +
            - spec/grape/validations/validators/mutual_exclusion_spec.rb
         
     | 
| 
       464 
493 
     | 
    
         
             
            - spec/grape/validations/validators/presence_spec.rb
         
     | 
| 
       465 
     | 
    
         
            -
            - spec/grape/validations/validators/ 
     | 
| 
       466 
     | 
    
         
            -
            - spec/grape/validations/validators/allow_blank_spec.rb
         
     | 
| 
      
 494 
     | 
    
         
            +
            - spec/grape/validations/validators/regexp_spec.rb
         
     | 
| 
       467 
495 
     | 
    
         
             
            - spec/grape/validations/validators/same_as_spec.rb
         
     | 
| 
       468 
     | 
    
         
            -
            - spec/grape/validations/validators/default_spec.rb
         
     | 
| 
       469 
496 
     | 
    
         
             
            - spec/grape/validations/validators/values_spec.rb
         
     | 
| 
       470 
     | 
    
         
            -
            - spec/grape/validations/validators/at_least_one_of_spec.rb
         
     | 
| 
       471 
     | 
    
         
            -
            - spec/grape/validations/validators/coerce_spec.rb
         
     | 
| 
       472 
497 
     | 
    
         
             
            - spec/grape/validations/validators/zh-CN.yml
         
     | 
| 
       473 
     | 
    
         
            -
            - spec/grape/ 
     | 
| 
       474 
     | 
    
         
            -
            - spec/ 
     | 
| 
       475 
     | 
    
         
            -
            - spec/ 
     | 
| 
       476 
     | 
    
         
            -
            - spec/ 
     | 
| 
       477 
     | 
    
         
            -
            - spec/ 
     | 
| 
       478 
     | 
    
         
            -
            - spec/ 
     | 
| 
       479 
     | 
    
         
            -
            - spec/ 
     | 
| 
       480 
     | 
    
         
            -
            - spec/ 
     | 
| 
       481 
     | 
    
         
            -
            - spec/ 
     | 
| 
       482 
     | 
    
         
            -
            - spec/ 
     | 
| 
       483 
     | 
    
         
            -
            - spec/ 
     | 
| 
       484 
     | 
    
         
            -
            - spec/ 
     | 
| 
       485 
     | 
    
         
            -
            - spec/ 
     | 
| 
       486 
     | 
    
         
            -
            - spec/ 
     | 
| 
       487 
     | 
    
         
            -
            - spec/grape/api/namespace_parameters_in_route_spec.rb
         
     | 
| 
       488 
     | 
    
         
            -
            - spec/grape/api/recognize_path_spec.rb
         
     | 
| 
       489 
     | 
    
         
            -
            - spec/grape/api/shared_helpers_exactly_one_of_spec.rb
         
     | 
| 
       490 
     | 
    
         
            -
            - spec/grape/api/inherited_helpers_spec.rb
         
     | 
| 
       491 
     | 
    
         
            -
            - spec/grape/api/shared_helpers_spec.rb
         
     | 
| 
       492 
     | 
    
         
            -
            - spec/grape/api/deeply_included_options_spec.rb
         
     | 
| 
       493 
     | 
    
         
            -
            - spec/grape/api/routes_with_requirements_spec.rb
         
     | 
| 
       494 
     | 
    
         
            -
            - spec/grape/api/custom_validations_spec.rb
         
     | 
| 
       495 
     | 
    
         
            -
            - spec/grape/api/optional_parameters_in_route_spec.rb
         
     | 
| 
       496 
     | 
    
         
            -
            - spec/grape/api_remount_spec.rb
         
     | 
| 
       497 
     | 
    
         
            -
            - spec/grape/named_api_spec.rb
         
     | 
| 
       498 
     | 
    
         
            -
            - spec/grape/dsl/request_response_spec.rb
         
     | 
| 
       499 
     | 
    
         
            -
            - spec/grape/dsl/desc_spec.rb
         
     | 
| 
       500 
     | 
    
         
            -
            - spec/grape/dsl/logger_spec.rb
         
     | 
| 
       501 
     | 
    
         
            -
            - spec/grape/dsl/configuration_spec.rb
         
     | 
| 
       502 
     | 
    
         
            -
            - spec/grape/dsl/validations_spec.rb
         
     | 
| 
       503 
     | 
    
         
            -
            - spec/grape/dsl/parameters_spec.rb
         
     | 
| 
       504 
     | 
    
         
            -
            - spec/grape/dsl/helpers_spec.rb
         
     | 
| 
       505 
     | 
    
         
            -
            - spec/grape/dsl/middleware_spec.rb
         
     | 
| 
       506 
     | 
    
         
            -
            - spec/grape/dsl/headers_spec.rb
         
     | 
| 
       507 
     | 
    
         
            -
            - spec/grape/dsl/callbacks_spec.rb
         
     | 
| 
       508 
     | 
    
         
            -
            - spec/grape/dsl/settings_spec.rb
         
     | 
| 
       509 
     | 
    
         
            -
            - spec/grape/dsl/routing_spec.rb
         
     | 
| 
       510 
     | 
    
         
            -
            - spec/grape/dsl/inside_route_spec.rb
         
     | 
| 
       511 
     | 
    
         
            -
            - spec/grape/path_spec.rb
         
     | 
| 
      
 498 
     | 
    
         
            +
            - spec/grape/validations_spec.rb
         
     | 
| 
      
 499 
     | 
    
         
            +
            - spec/integration/eager_load/eager_load_spec.rb
         
     | 
| 
      
 500 
     | 
    
         
            +
            - spec/integration/multi_json/json_spec.rb
         
     | 
| 
      
 501 
     | 
    
         
            +
            - spec/integration/multi_xml/xml_spec.rb
         
     | 
| 
      
 502 
     | 
    
         
            +
            - spec/shared/versioning_examples.rb
         
     | 
| 
      
 503 
     | 
    
         
            +
            - spec/spec_helper.rb
         
     | 
| 
      
 504 
     | 
    
         
            +
            - spec/support/basic_auth_encode_helpers.rb
         
     | 
| 
      
 505 
     | 
    
         
            +
            - spec/support/chunks.rb
         
     | 
| 
      
 506 
     | 
    
         
            +
            - spec/support/content_type_helpers.rb
         
     | 
| 
      
 507 
     | 
    
         
            +
            - spec/support/eager_load.rb
         
     | 
| 
      
 508 
     | 
    
         
            +
            - spec/support/endpoint_faker.rb
         
     | 
| 
      
 509 
     | 
    
         
            +
            - spec/support/file_streamer.rb
         
     | 
| 
      
 510 
     | 
    
         
            +
            - spec/support/integer_helpers.rb
         
     | 
| 
      
 511 
     | 
    
         
            +
            - spec/support/versioned_helpers.rb
         
     |