Diff of the two buildlogs: -- --- b1/build.log 2024-04-27 19:12:11.842057672 +0000 +++ b2/build.log 2024-04-27 19:13:08.739634176 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Fri May 30 13:32:39 -12 2025 -I: pbuilder-time-stamp: 1748655159 +I: Current time: Sat May 31 15:35:14 +14 2025 +I: pbuilder-time-stamp: 1748655314 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/trixie-reproducible-base.tgz] I: copying local configuration @@ -31,52 +31,84 @@ dpkg-source: info: applying update-test-expectations.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/2162559/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/1217687/tmp/hooks/D01_modify_environment starting +debug: Running on codethink01-arm64. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 May 31 01:35 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/1217687/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/1217687/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='arm64' - DEBIAN_FRONTEND='noninteractive' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="21" [3]="1" [4]="release" [5]="aarch64-unknown-linux-gnu") + BASH_VERSION='5.2.21(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=arm64 + DEBIAN_FRONTEND=noninteractive DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=12 ' - DISTRIBUTION='trixie' - HOME='/root' - HOST_ARCH='arm64' + DIRSTACK=() + DISTRIBUTION=trixie + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=aarch64 + HOST_ARCH=arm64 IFS=' ' - INVOCATION_ID='033ce96953b5485d8887d710b165c268' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='2162559' - PS1='# ' - PS2='> ' + INVOCATION_ID=af6512821c11460fa268e6184d79de53 + LANG=C + LANGUAGE=nl_BE:nl + LC_ALL=C + MACHTYPE=aarch64-unknown-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=1217687 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.pQVU4a0Y/pbuilderrc_zN8D --distribution trixie --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.pQVU4a0Y/b1 --logfile b1/build.log ruby-grape_2.0.0-3.dsc' - SUDO_GID='109' - SUDO_UID='104' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://192.168.101.4:3128' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.pQVU4a0Y/pbuilderrc_Z0SG --distribution trixie --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.pQVU4a0Y/b2 --logfile b2/build.log ruby-grape_2.0.0-3.dsc' + SUDO_GID=109 + SUDO_UID=104 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://192.168.101.4:3128 I: uname -a - Linux codethink03-arm64 6.1.0-20-cloud-arm64 #1 SMP Debian 6.1.85-1 (2024-04-11) aarch64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-20-cloud-arm64 #1 SMP Debian 6.1.85-1 (2024-04-11) aarch64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 May 24 13:38 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/2162559/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 May 26 17:47 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/1217687/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -468,7 +500,7 @@ Get: 177 http://deb.debian.org/debian trixie/main arm64 ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.3 kB] Get: 178 http://deb.debian.org/debian trixie/main arm64 ruby-rspec all 3.13.0c0e0m0s1-2 [5184 B] Get: 179 http://deb.debian.org/debian trixie/main arm64 ruby-test-prof all 0.12.2+dfsg-1 [42.8 kB] -Fetched 51.5 MB in 1s (63.1 MB/s) +Fetched 51.5 MB in 0s (148 MB/s) debconf: delaying package configuration, since apt-utils is not installed dpkg: libssl3:arm64: dependency problems, but removing anyway as you requested: libkrb5-3:arm64 depends on libssl3 (>= 3.0.0). @@ -1066,8 +1098,8 @@ Setting up tzdata (2024a-3) ... Current default time zone: 'Etc/UTC' -Local time is now: Sat May 31 01:33:47 UTC 2025. -Universal Time is now: Sat May 31 01:33:47 UTC 2025. +Local time is now: Sat May 31 01:35:37 UTC 2025. +Universal Time is now: Sat May 31 01:35:37 UTC 2025. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up autotools-dev (20220109.1) ... @@ -1225,7 +1257,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/ruby-grape-2.0.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../ruby-grape_2.0.0-3_source.changes +I: user script /srv/workspace/pbuilder/1217687/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for trixie +I: user script /srv/workspace/pbuilder/1217687/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/ruby-grape-2.0.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../ruby-grape_2.0.0-3_source.changes dpkg-buildpackage: info: source package ruby-grape dpkg-buildpackage: info: source version 2.0.0-3 dpkg-buildpackage: info: source distribution unstable @@ -1257,7 +1293,7 @@ dh_prep -O--buildsystem=ruby dh_auto_install --destdir=debian/ruby-grape/ -O--buildsystem=ruby dh_ruby --install /build/reproducible-path/ruby-grape-2.0.0/debian/ruby-grape -/usr/bin/ruby3.1 -S gem build --config-file /dev/null --verbose /tmp/d20250530-2186827-g51rah/gemspec +/usr/bin/ruby3.1 -S gem build --config-file /dev/null --verbose /tmp/d20250531-1238419-coz7x8/gemspec Failed to load /dev/null because it doesn't contain valid YAML hash WARNING: open-ended dependency on activesupport (>= 5) is not recommended if activesupport is semantically versioned, use: @@ -1277,7 +1313,7 @@ Name: grape Version: 2.0.0 File: grape-2.0.0.gem -/usr/bin/ruby3.1 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-grape/usr/share/rubygems-integration/all /tmp/d20250530-2186827-g51rah/grape-2.0.0.gem +/usr/bin/ruby3.1 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-grape/usr/share/rubygems-integration/all /tmp/d20250531-1238419-coz7x8/grape-2.0.0.gem Failed to load /dev/null because it doesn't contain valid YAML hash /build/reproducible-path/ruby-grape-2.0.0/debian/ruby-grape/usr/share/rubygems-integration/all/gems/grape-2.0.0/lib/grape.rb /build/reproducible-path/ruby-grape-2.0.0/debian/ruby-grape/usr/share/rubygems-integration/all/gems/grape-2.0.0/lib/grape/api.rb @@ -1460,521 +1496,795 @@ /usr/share/rubygems-integration/all/gems/dry-equalizer-0.3.0/lib/dry/equalizer.rb:5: warning: previous definition of Equalizer was here /build/reproducible-path/ruby-grape-2.0.0/spec/grape/validations/validators/except_values_spec.rb:10: warning: method redefined; discarding old excepts -Randomized with seed 64893 - -Grape::Validations::Validators::PresenceValidator - with multiple parameters per requires - validates for all defined params - with a custom validation message - requires when missing - valid when set - requires when empty - with a required non-empty string - requires when missing - requires when empty - valid when set - with reused parameter documentation once required and once optional - works with required - works with optional - with required parameters and no type - validates name, company - with triply nested required parameters - validates triple nested parameters - with a custom type - does not validate their type when it is missing - with a required regexp parameter supplied in the POST body - validates id - with nested parameters - validates nested parameters - without validation - does not validate for any params - -Grape::Endpoint - get - routes to namespace and path params with dots, with overridden requirements - routes to namespace and path params with dots, with merged requirements - routes to a path with multiple params with dots - routes to a namespace param with dots +Randomized with seed 11886 Grape::Validations::Types::SetCoercer #call + a set of sets of arrays + coerces elements in the nested set a set of primitives coerces elements to the set a set of sets coerces elements in the nested set - a set of sets of arrays - coerces elements in the nested set -Grape::Http::Headers - is expected to eq "X-Cascade" - is expected to eq "Transfer-Encoding" - is expected to eq "Allow" - is expected to eq "Location" +Grape::Middleware::Globals + calls through to the app + environment + sets the grape.request.params environment + sets the grape.request.headers environment + sets the grape.request environment -Grape::DSL::Validations - .params - evaluates block - returns a ParamsScope - .reset_validations! - does not reset documentation description - resets declared params - resets params - resets validations +Grape::Validations::Types::ArrayCoercer + #call + an array of arrays + coerces elements in the nested array + an array of primitives + coerces elements in the array + an array of sets + coerces elements in the nested set -Grape::Validations::Validators::DefaultValidator - set default values for missing params in the request - allows optional arrays with optional params - sets lambda based defaults at the time of call - allows optional arrays to be omitted - set default values for optional params - does not allows faulty optional arrays - lets you leave required values nested inside an optional blank - set default values for optional params and allow to use required fields in the same time - sets default values for grouped arrays - set default value for optional param - array with default values and given conditions - applies the default values only if the conditions are met - optional with nil as value - variant-member-type collections - respects the default value - respects the default value - respects the default value - respects the default value - primitive types - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - structures types - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - special types - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - respects the default value - optional group with defaults - optional array with default value includes optional param with default value - sets default value for optional array if param is not provided - optional array without default value includes optional param with default value - returns nil for optional array if param is not provided - optional hash without default value includes optional param with default value - returns nil for optional hash if param is not provided - does not fail even if invalid params is passed to default validator - optional hash with default value includes optional param with default value - sets default value for optional hash if param is not provided - sets own default value for inner param if parent param is provided - sets default value from parent defaults for inner param if parent param is not provided +Grape::API + works for specified format + works for unspecified format + doesn't work for format different than specified -Validator with instance variables - passes validation every time +Grape::API + execute first request in reasonable time -Grape::Request - when the build_params_with is set to Hashie - when the API includes a specific param builder - is expected to be a kind of Hashie::Mash - when the API does not include a specific param builder - is expected to be a kind of Hash - #params - by default returns stringified parameter keys - with grape.routing_args - cuts version and route_info - when build_params_with: Grape::Extensions::Hash::ParamBuilder is specified - returns symbolized params - #headers - with symbolic header names - converts them to string - with non-HTTP_* stuff in env - does not include them - with http headers in env - cuts HTTP_ prefix and capitalizes header name words +Grape::API::Instance + boolean constant + sets Boolean as a type + Params endpoint type + params type is a boolean -Grape::Exceptions::MissingGroupType - #message - is expected to include "group type is required" - Grape::Exceptions::MissingGroupTypeError - behaves like deprecated class - raises an ActiveSupport::DeprecationException +Grape::API::Instance + top level setting + does not inherit settings from the superclass (Grape::API::Instance) + when an instance is the root + can call the instance endpoint + when an instance is mounted on the root + can call the instance endpoint + with multiple moutes + does not raise a FrozenError on first instance + responds the correct body at the second instance + responds the correct body at the first instance + does not raise a FrozenError on second instance -Grape::Exceptions::InvalidAcceptHeader - API with cascade=true and rescue_from :all handler - that receives - an invalid version in the request - behaves like a cascaded request - does not find a matching route - an invalid vendor in the request - behaves like a cascaded request - does not find a matching route - that received a request with correct vendor and version - behaves like a valid request - does return with status 200 - does return the expected result - API with cascade=true and without a rescue handler - that received a request with correct vendor and version - behaves like a valid request - does return with status 200 - does return the expected result - that receives - an invalid vendor in the request - behaves like a cascaded request - does not find a matching route - an invalid version in the request - behaves like a cascaded request - does not find a matching route - API with cascade=false, http_codes but without a rescue handler - that received a request with correct vendor and version - behaves like a valid request - does return the expected result - does return with status 200 - that receives - an invalid vendor in the request - behaves like a not-cascaded request - does not accept the request - does not include the X-Cascade=pass header - an invalid version in the request - behaves like a not-cascaded request - does not include the X-Cascade=pass header - does not accept the request - API with cascade=false and rescue_from :all handler - that received a request with correct vendor and version - behaves like a valid request - does return the expected result - does return with status 200 - that receives - an invalid vendor in the request - behaves like a rescued request - does show rescue handler processing - does not include the X-Cascade=pass header - API with cascade=false and with rescue_from :all handler and http_codes - that receives - an invalid vendor in the request - behaves like a rescued request - does show rescue handler processing - does not include the X-Cascade=pass header - that received a request with correct vendor and version - behaves like a valid request - does return with status 200 - does return the expected result - API with cascade=false and without a rescue handler - that received a request with correct vendor and version - behaves like a valid request - does return with status 200 - does return the expected result - that receives - an invalid vendor in the request - behaves like a not-cascaded request - does not accept the request - does not include the X-Cascade=pass header - an invalid version in the request - behaves like a not-cascaded request - does not accept the request - does not include the X-Cascade=pass header - API with cascade=true, http_codes but without a rescue handler - that received a request with correct vendor and version - behaves like a valid request - does return the expected result - does return with status 200 - that receives - an invalid version in the request - behaves like a cascaded request - does not find a matching route - an invalid vendor in the request - behaves like a cascaded request - does not find a matching route - API with cascade=true and with rescue_from :all handler and http_codes - that received a request with correct vendor and version - behaves like a valid request - does return the expected result - does return with status 200 - that receives - an invalid vendor in the request - behaves like a cascaded request - does not find a matching route - an invalid version in the request - behaves like a cascaded request - does not find a matching route +Grape + .config + is expected to eq {:param_builder=>Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder} -Grape::Validations::Validators::ExceptValuesValidator - 3: req_except_no_value - invalid-type1 - 0: req_except - valid-type - 11: opt_except_array_type_coerce_default - [10] - 2: req_except_custom_message - invalid-type3 - 6: req_except_lambda_custom_message - invalid-type4 - 5: req_except_lambda - invalid-type1 - 2: req_except_custom_message - valid-type - 10: opt_except_type_coerce_default - - raises IncompatibleOptionValues when type is incompatible with values array - 10: opt_except_type_coerce_default - 3 - 6: req_except_lambda_custom_message - invalid-type1 - 11: opt_except_array_type_coerce_default - 10 - 9: req_except_type_coerce - 11 - 7: opt_except_default - - 9: req_except_type_coerce - 11 - 8: opt_except_lambda_default - invalid-type3 - 1: req_except_hash - invalid-type3 - raises IncompatibleOptionValues when a default array has excluded values - 11: opt_except_array_type_coerce_default - ["3"] - 12: req_except_range - 13 - 8: opt_except_lambda_default - valid-type - 1: req_except_hash - invalid-type1 - 7: opt_except_default - invalid-type1 - 10: opt_except_type_coerce_default - invalid-type1 - 11: opt_except_array_type_coerce_default - - raises IncompatibleOptionValues on a default value in exclude - 0: req_except - invalid-type1 - 10: opt_except_type_coerce_default - 3 - 11: opt_except_array_type_coerce_default - invalid-type1 - 12: req_except_range - 11 - 7: opt_except_default - valid-type - 7: opt_except_default - invalid-type3 - 8: opt_except_lambda_default - invalid-type1 - 4: req_except_empty - invalid-type1 - 8: opt_except_lambda_default - - 9: req_except_type_coerce - invalid-type1 - 9: req_except_type_coerce - 3 - 5: req_except_lambda - valid-type - 11: opt_except_array_type_coerce_default - [3] - 9: req_except_type_coerce - 3 - 2: req_except_custom_message - invalid-type1 - 6: req_except_lambda_custom_message - valid-type - 0: req_except - invalid-type3 - 5: req_except_lambda - invalid-type4 - 1: req_except_hash - valid-type - 10: opt_except_type_coerce_default - 10 +Grape::API::Helpers + defines parameters -StrictHashConfiguration - set nested configs +Grape::Exceptions::InvalidVersionerOption + #message + contains the problem in the message -Grape::Middleware::Versioner::AcceptVersionHeader - succeeds if :strict is set to false - succeeds if :strict is not set - when :strict is set - fails with 406 Not Acceptable if header is empty - succeeds if proper header is set - fails with 406 Not Acceptable if header is not set - api.version - is set - fails with 406 Not Acceptable if version is not supported - is set if format provided - when :strict and cascade: false - fails with 406 Not Acceptable if header is not set - fails with 406 Not Acceptable if header is empty - succeeds if proper header is set +Grape::Endpoint + put + responds + get + responds without ext -Grape::Middleware::Globals - calls through to the app - environment - sets the grape.request environment - sets the grape.request.headers environment - sets the grape.request.params environment +Grape::Validations::Validators::AllOrNoneOfValidator + #validate! + when all restricted params are present + does not return a validation error + mixed with other params + does not return a validation error + when no restricted params are present + does not return a validation error + when a subset of restricted params are present + returns a validation error + when restricted params are nested inside required hash + returns a validation error with full names of the params + when mutually exclusive params are nested inside array + returns a validation error with full names of the params + when custom message is specified + returns a validation error + when mutually exclusive params are deeply nested + returns a validation error with full names of the params -Grape::DSL::RequestResponse - .default_error_status - sets a default error status - .represent - sets a presenter for a class - .default_format - returns the format without paramter - sets the default format - .formatter - sets the formatter for a content type - .content_type - sets a content type for a format - .error_formatter - sets a error_formatter - understands syntactic sugar - .default_error_formatter - sets a new error formatter - .rescue_from - :all - sets given proc as rescue handler - abort if :with option value is not Symbol, String or Proc - sets given block as rescue handler - sets a rescue handler declared through :with option - abort if both :with option and block are passed - sets rescue all to true - :grape_exceptions - sets given block as rescue handler - sets a rescue handler declared through :with option - sets rescue all to true - sets given proc as rescue handler - list of exceptions is passed - rescues only base handlers if rescue_subclasses: false option is passed - sets given proc as rescue handler for each key in hash - sets given block as rescue handler for each key in hash - sets a rescue handler declared through :with option for each key in hash - sets hash of exceptions as rescue handlers - .content_types - returns all content types - .parser - sets a parser for a content type - .format - sets a new format +Grape::Exceptions::ValidationErrors + api with rescue_from :all handler + with content_type xml + can recover from failed body parsing + with content_type json + can recover from failed body parsing + with content_type text + can recover from failed body parsing + with no specific content_type + can recover from failed body parsing + api with rescue_from :grape_exceptions handler with block + with content_type json + returns body parsing error message + with content_type xml + returns body parsing error message + api without a rescue handler + with content_type text + can recover from failed body parsing + and with no specific content_type + can recover from failed body parsing + with content_type xml + can recover from failed body parsing + and with content_type json + can recover from failed body parsing + api with rescue_from :grape_exceptions handler + with content_type xml + returns body parsing error message + with content_type json + returns body parsing error message -Grape::DSL::Logger - .logger - sets a logger - returns a logger +Grape::DSL::Headers + when headers are set + #header + set + returns value + get + returns a specifc value + returns all set headers + delete + deletes a header key-value pair + when no headers are set + #header + returns nil -Grape::Middleware::Stack - #insert_before - inserts a middleware before another middleware class - inserts a middleware before an anonymous class given by its superclass - raises an error on an invalid index - #use - pushes a middleware class onto the stack - pushes a middleware class with arguments onto the stack - pushes a middleware class with block arguments onto the stack - #merge_with - applies a collection of operations and middlewares - middleware spec with proc declaration exists - properly forwards spec arguments - #insert_after - inserts a middleware after an anonymous class given by its superclass - raises an error on an invalid index - inserts a middleware after another middleware class - #concat - calls +merge_with+ with the :use specs - adds non :use specs to @others - #insert - inserts a middleware class at the integer index - #build - returns a rack builder instance - when @others are present - applies the middleware specs stored in @others +Grape::Exceptions::ValidationErrors + #full_messages + when attributes is an array of symbols + returns an array with an error full message + with errors + returns an array with each errors full message + message + is not repeated + is expected to include "FooBar is invalid" + is expected to eq 1 + initialize + assigns headers through base class + api + can return structured json with separate fields -Grape::API - with a global namespace function - works +Grape::DSL::Parameters + #use + calls processes associated with named params + raises error when non-existent named param is called + #with + creates a scope with group attributes + #params + inherits params from parent + when params argument is an array of hashes + returns values of each hash for @element key + when params argument is a hash + returns value for @element key + when params argument is not a array or a hash + returns empty hash + #mutually_exclusive + adds an mutally exclusive parameter validation + #requires + adds a required parameter + #group + is alias to #requires + #all_or_none_of + adds an all or none of parameter validation + #use_scope + is alias to #use + #includes + is alias to #use + #exactly_one_of + adds an exactly of one parameter validation + #optional + adds an optional parameter + #at_least_one_of + adds an at least one of parameter validation Grape::DSL::Routing - .delete - delegates to .route - .version - sets a version for route + .versions + returns last defined version + .segment + is alias to #namespace + .namespace + creates a new namespace with given name and options + calls #joined_space_path on Namespace .prefix sets a prefix for route - .do_not_route_options! - sets do not route options option - .options - delegates to .route - .group - is alias to #namespace - .scope - create a scope without affecting the URL + .route_param + does not modify options parameter + calls #namespace with given params + nests requirements option under param name .routes returns value received from #prepare_routes when #routes was already called once does not call prepare_routes again - .versions - returns last defined version - .namespace - calls #joined_space_path on Namespace - creates a new namespace with given name and options + .group + is alias to #namespace + .do_not_route_options! + sets do not route options option + .resources + is alias to #namespace .mount mounts on a nested path mounts multiple routes at once - .patch - delegates to .route - .head + .options delegates to .route - .put + .patch delegates to .route + .scope + create a scope without affecting the URL .do_not_route_head! sets do not route head option - .route_param - nests requirements option under param name - does not modify options parameter - calls #namespace with given params - .get + .head delegates to .route - .resource - is alias to #namespace - .post + .get delegates to .route - .segment - is alias to #namespace .route + does not duplicate identical endpoints generates correct endpoint options - marks end of the route defines a new endpoint - does not duplicate identical endpoints resets validations - .resources + marks end of the route + .version + sets a version for route + .put + delegates to .route + .resource is alias to #namespace + .post + delegates to .route + .delete + delegates to .route -Grape::DSL::Middleware - .use - adds a middleware with the right operation - .insert - adds a middleware with the right operation - .middleware - returns the middleware stack - .insert_before - adds a middleware with the right operation - .insert_after - adds a middleware with the right operation +A named API + can access the name of the API -Grape::Middleware::Versioner::Param - provides a nil version if no version is given - cuts (only) the version out of the params - sets the API version based on the default param (apiver) - with specified versions - allows versions that have been specified - throws an error if a non-allowed version is specified - when there are multiple versions without a custom param - responds correctly to a v2 request - responds correctly to a v1 request - with specified parameter name - does not set the API version based on the default param - sets the API version based on the custom parameter name - when there are multiple versions with a custom param - responds correctly to a v2 request - responds correctly to a v1 request - when no version is set - returns a 200 (matches the first version found) +Grape::Exceptions::UnknownValidator + #message + contains the problem in the message + +Grape::API + .recognize_path + returns nil if given path does not match with registered routes + fetches endpoint by given path + +Grape::Exceptions::InvalidResponse + #message + contains the problem in the message + +Grape::DSL::Logger + .logger + returns a logger + sets a logger Grape::Endpoint - get - responds without ext - responds with ext - put - responds + when route modifies param value + param default should not change + +Grape::Middleware::Error + Non-StandardError exception with a provided rescue handler + default error response + rescues the exception using the default handler + custom error response + rescues the exception using the provided handler + with defaults + does not trap errors by default + + is possible to return the backtrace and the original exception in txt format + with rescue_all + Non-StandardError exception + does not trap errors other than StandardError + StandardError exception + defaults to a 500 status + sets the message appropriately + + responds to custom Grape exceptions appropriately + + does not trap regular error! codes + + is possible to return errors in jsonapi format + + is possible to return hash errors in jsonapi format + + is possible to specify a different default status code + + is possible to return errors in json format + + is possible to return the backtrace and the original exception in xml format + with rescue_options :backtrace and :exception set to true + is possible to return the backtrace and the original exception in json format + + is possible to return errors in xml format + + is possible to return hash errors in json format + + is possible to specify a custom formatter + + is possible to return hash errors in xml format + +Grape::Validations + params + required with an Array and a Hash block + does not output index [0] for Hash types + optional using Grape::Entity documentation + adds entity documentation to declared params + works when field_a is present + works when field_b is present + works when field_a and field_b are not present + with block and empty args + works + group params with nested params which has a type + errors when group param is invalid + mutually exclusive + in a group + works when only one from the set is present + errors when more than one from the set is present + more than one set of mutually exclusive params + errors for all sets + with a custom validation message + errors for all sets + mutually exclusive params inside Hash group + invalidates if request param is invalid type + optional params + errors when two or more are present + with custom validation message + errors when two or more are present + requires with nested params + validates correctly in deep nested params + required with an Array block + errors when param is not an Array + adds to declared parameters + doesn't throw a missing param when param is present but empty + errors when param not present + doesn't throw a missing param when param is present + at least one of + params + errors when none are present + does not error when one is present + does not error when two are present + with a custom validation message + does not error when two are present + does not error when one is present + errors when none are present + nested params + does not error when two are present + does not error when one is present + errors when none are present + custom validator for a Hash + which is optional + doesn't throw an error if the validation passes + errors if the validation fails + which is required + doesn't throw an error if the validation passes + errors if the validation fails + all or none + optional params + with a custom validation message + errors when any one is present + works when all params are present + works when none are present + hash with a required param with validation + errors when param is not a Hash + works when all params match + required + works when required field is present but nil + errors when param not present + adds to declared parameters + doesn't throw a missing param when param is present + custom validation + when using requires with a custom validator + validates when param is not present + validates when param is present + nested namespaces + peer namespaces does not have the validator + the nested namespace inherits the custom validator + namespaces nested in peers should also not have the validator + when nested, specifying a route should clear out the validations for deeper nested params + the parent namespace uses the validator + when using optional with a custom validator + validates when param is present + validates with custom validator when param present and incorrect type + skips validation when parameter isn't present + when using options on param + validates param with custom validator with options + required with a Hash block + adds to declared parameters + doesn't throw a missing param when param is present + errors when param is not a Hash + errors when nested param not present + errors when param not present + group + adds to declared parameters + doesn't throw a missing param when param is present + errors when param not present + validation within arrays with JSON + errors when a parameter is not present + can handle new scopes within child elements + safely handles empty arrays and blank parameters + with block and keyword argument + works + exactly one of + params + errors when two or more are present + errors when none are present + succeeds when one is present + with a custom validation message + errors when none are present + errors when two or more are present + succeeds when one is present + nested params + errors when two or more are present + succeeds when one is present + errors when none are present + optional + doesn't validate when param not present + adds to declared parameters + validates when params is present + in a group + errors when more than one from the set is present + works when only one from the set is present + does not falsely think the param is there if it is provided outside the block + errors when no parameter from the set is present + nested optional Array blocks + handles validation within arrays + does internal validations if the outer group is present + all_or_none_of + does no internal validations if the outer group is blank + adds to declared parameters + handles deep nesting + exactly_one_of + at_least_one_of + Issue occurs whenever: +* param structure with at least three levels +* 1st level item is a required Array that has >1 entry with an optional item present and >1 entry with an optional item missing +* 2nd level is an optional Array or Hash +* 3rd level is a required item (can be any type) +* additional levels do not effect the issue from occuring + example based off actual real world use case + simplest example using Array -> Hash -> String + correctly indexes invalida data + simplest example using Array -> Array -> Hash -> String + multiple levels of optional and requires settings + with valid data + with invalid data + named + with block + returns defaults + fails with invalid value + overrides default value for order_by + overrides default value for order + can be defined + in helper module which kind of Grape::DSL::Helpers::BaseHelper + in helpers + can be included in usual params + by #use with multiple params + by #use + requires :none using Grape::Entity documentation + errors when required_field is not present + works when required_field is present + adds entity documentation to declared params + optional with an Array block + doesn't throw a missing param when the group isn't present + errors when group is present, but required param is not + adds to declared parameters + doesn't throw a missing param when both group and param are given + errors when param is present but isn't an Array + multiple validation errors + throws the validation errors + validation within arrays + safely handles empty arrays and blank parameters + handle errors for all array elements + errors when a parameter is not present in array within array + errors when param is not an Array + can handle new scopes within child elements + errors when a parameter is not present + with block param + group defaults to Array type + requires defaults to Array type + optional defaults to Array type + requires :all using Grape::Entity documentation + adds entity documentation to declared params + works when required_field is present + errors when required_field is not present + requires :all or :none but except a non-existent field using Grape::Entity documentation + requires :none + adds only the entity documentation to declared params, nothing more + requires :all + adds only the entity documentation to declared params, nothing more + require_validator + when found + is expected to equal Grape::Validations::Validators::PresenceValidator + when not found + raises an error + +Grape::Validations::Validators::ValuesValidator + does not allow an invalid value for a parameter + allows a blank value when the allow_blank option is true +Error 'comparison of String with 0 failed' raised while validating attribute 'number' + does not allow non-numeric string value for int value using lambda + does not allow an invalid value for a parameter using an endless range + allows a valid default value + raises IncompatibleOptionValues when type is incompatible with values array +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + allows a default value with except + validates against an empty array in a proc +Error 'undefined method `>' for nil:NilClass + + requires :number, type: Integer, values: ->(v) { v > 0 } + ^' raised while validating attribute 'number' + does not allow nil for int value using lambda + allows a valid default value + validates default value from proc against values in a proc + allows values to be a kind of the coerced type in an array + allows a valid value for a parameter + does not allow an invalid value for a parameter using lambda + validates against values in a proc + allows a proc for values + allows numeric string for int value using lambda + validates default value from proc + raises IncompatibleOptionValues on an invalid default value from proc + raises IncompatibleOptionValues when values contains a value that is not a kind of the type + allows value using lambda + rejects all values if values is an empty array + raises IncompatibleOptionValues when except contains a value that is not a kind of the type + does not validate updated values without proc + allows values to be a kind of the coerced type not just an instance of it + does not allow invalid value using lambda + raises IncompatibleOptionValues on an invalid default value + validates against values in an endless range + boolean values + rejects a value which is not in the list + allows a value from the list + exclude with a standard custom validation message +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + does not allow an invalid value for a parameter + exclusive excepts with lambda and coercion +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + allows any other value outside excepts +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + rejects values that matches except + exclusive excepts +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + rejects an array of values if any of them matches except +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + allows any other value outside excepts +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + allows any other value outside excepts when type is included +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + rejects values that matches except + custom validation using proc +DEPRECATION WARNING: The values validator proc option is deprecated. The lambda expression can now be assigned directly to values. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + accepts a single valid value +DEPRECATION WARNING: The values validator proc option is deprecated. The lambda expression can now be assigned directly to values. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + uses supplied message +DEPRECATION WARNING: The values validator proc option is deprecated. The lambda expression can now be assigned directly to values. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + rejects an invalid value among valid ones +DEPRECATION WARNING: The values validator proc option is deprecated. The lambda expression can now be assigned directly to values. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + rejects a single invalid value +DEPRECATION WARNING: The values validator proc option is deprecated. The lambda expression can now be assigned directly to values. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + accepts multiple valid values + when proc has an arity of 1 + rejects an invalid value + accepts a valid value + when arity is > 1 +Error 'wrong number of arguments (given 1, expected 2)' raised while validating attribute 'input_one' +Error 'wrong number of arguments (given 1, expected 2)' raised while validating attribute 'input_two' + returns an error status code + with a range of values + allows a single value inside of the range + rejects a single value outside the range + allows an array of values inside of the range + rejects an array of values if any of them are outside the range + with a lambda values + only evaluates values dynamically with each request + chooses default + with a custom exclude validation message +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + does not allow an invalid value for a parameter + nil value for a parameter + accepts for an optional param with a list of values + allows for a required param in child scope + does not allow for root params scope + with a custom exclude validation message +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + does not allow an invalid value for a parameter + exclusive excepts with lambda +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + allows any other value outside excepts +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + allows any other value outside excepts when type is included +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + rejects values that matches except + with mixed values and excepts +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + rejects outside except and outside value +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + rejects except +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + allows value, but not in except + with a custom validation message + does not allow an invalid value for a parameter + does not allow an invalid value for a parameter using lambda + validates against values in a proc + allows a valid value for a parameter + +MultiXml + uses multi_xml + +Grape::Middleware::Auth::Strategies + Basic Auth + throws a 401 is wrong auth is given + authenticates if given valid creds + throws a 401 if no auth is given + +Grape::Validations::Types::PrimitiveCoercer + #call + the strict mode + Boolean + returns a value as it is when the given value is Boolean + returns an error when the given value is not Boolean + BigDecimal + returns an error when the given value is not BigDecimal + returns a value as it is when the given value is BigDecimal + Integer + coerces an empty string to nil + accepts non-nil value + DateTime + coerces an empty string to nil + Boolean + coerces 'false' to false + returns an error when the given value cannot be coerced + coerces 'true' to true + coerces an empty string to nil + coerces 'false' to false + coerces '0' to false + coerces 'true' to true + coerces '1' to true + String + coerces to String + does not coerce an empty string to nil + BigDecimal + coerces to BigDecimal + coerces an empty string to nil + Symbol + coerces an empty string to nil + Numeric + accepts a non-nil value + coerces an empty string to nil + Float + coerces an empty string to nil + a type unknown in Dry-types + raises error on init + Time + coerces an empty string to nil + +Grape::Util::InheritableSetting + #api_class + is specific to the class + #route + works with route values + sets a value until the next route + #api_class + is specific to the class + #to_hash + return all settings as a hash + #point_in_time_copy + decouples namespace values + resets point_in_time_copies + decouples namespace stackable values + decouples namespace inheritable values + decouples route values + decouples namespace reverse stackable values + adds itself to original as clone + #namespace_inheritable + handles different parents + works with inheritable values + #namespace + uses new values when a new namespace starts + sets a value until the end of a namespace + #namespace_reverse_stackable + works with reverse stackable values + #namespace_stackable + works with stackable values + #global + overrides global values + sets the global inherited values + sets a global value + handles different parents + #inherit_from + notifies clones + +Grape::API::Helpers + defines parameters + +Grape::Middleware::Versioner::Header + succeeds if :strict is set to false + succeeds if :strict is not set + succeeds if :strict is set to false and given an invalid header + with missing vendor option + fails + api.type and api.subtype + sets preferred type and subtype + sets preferred type + sets type and subtype to first choice of content type if no preference given + when multiple versions are specified + succeeds with v1 + fails with another version + succeeds with v2 + when :strict is set + fails with 406 Not Acceptable if header is empty + succeeds if proper header is set + fails with 406 Not Acceptable if header is not set + when there are multiple versions with complex vendor specified with rescue_from :all + with header versioned endpoints and a rescue_all block defined + responds correctly to a v1 request + responds correctly to a v2 request + api.version + fails with 406 Not Acceptable if version is invalid + is set if format provided + is set + api.format + is set + is nil if not provided + when version is set to v1 + is set + is nil if not provided + when version is set to v1 + is nil if not provided + is set + api.vendor + fails with 406 Not Acceptable if vendor is invalid + is set + is set if format provided + when version is set + is set + fails with 406 Not Acceptable if vendor is invalid + is set if format provided + when :strict and cascade: false + fails with 406 Not Acceptable if header is not set + fails with 406 Not Acceptable if header is application/xml + fails with 406 Not Acceptable if header contains a single invalid accept + fails with 406 Not Acceptable if header is empty + succeeds if proper header is set + +Grape::Http::Headers + is expected to eq "Location" + is expected to eq "Transfer-Encoding" + is expected to eq "Allow" + is expected to eq "X-Cascade" Grape::Validations::Validators::CoerceValidator coerce error on malformed input error on malformed input (Array) + using coerce_with + parses parameters even if type is valid + accepts any callable + parses parameters with Array[String] type + uses parse where available + parses parameters with Array[Array[String]] type and coerce_with + parses parameters with Array[Integer] type + must be supplied with :type or :coerce + parses parameters with Array type + Array type and coerce_with should + coerce nil value to array + coerce array as array + not coerce missing field + Integer type and coerce_with potentially returning nil + returns invalid value if coercion returns a wrong type + accepts value that coerces to nil + coerces to Integer + Integer type and coerce_with should + coerce nil value to integer + not coerce missing field + coerce integer as integer + converter + does not build a coercer multiple times multiple types fails when no coercion is possible - may not be supplied together with a single type coerces to first possible type + may not be supplied together with a single type custom coercion rules - performs no additional coercion still validates type + performs no additional coercion respects :coerce_with for primitive collections allows multiple collection types @@ -1982,56 +2292,19 @@ allows collections with multiple types when params is Hashie::Mash for primitive collections - allows collections with multiple types allows multiple collection types allows singular form declaration - converter - does not build a coercer multiple times - with a custom validation message - errors on malformed input - on custom coercion rules - respects :coerce_with - still validates type - performs no additional coercion - i18n - gives an english fallback error when default locale message is blank - i18n error on malformed input - using coerce_with - must be supplied with :type or :coerce - uses parse where available - parses parameters with Array[Integer] type - parses parameters even if type is valid - accepts any callable - parses parameters with Array[String] type - parses parameters with Array[Array[String]] type and coerce_with - parses parameters with Array type - Integer type and coerce_with potentially returning nil - accepts value that coerces to nil - returns invalid value if coercion returns a wrong type - coerces to Integer - Integer type and coerce_with should - not coerce missing field - coerce nil value to integer - coerce integer as integer - Array type and coerce_with should - coerce array as array - coerce nil value to array - not coerce missing field + allows collections with multiple types coerces - BigDecimal Nests integers - String Integer + String Grape::API::Boolean - a custom type - coerces the given value - returning the InvalidValue instance when invalid - uses a custom message added to the invalid value + BigDecimal + Set + Set of Bools + Set of Integers nil values - structures types - respects the nil value - respects the nil value - respects the nil value special types respects the nil value respects the nil value @@ -2053,1882 +2326,1039 @@ respects the nil value respects the nil value respects the nil value + structures types + respects the nil value + respects the nil value + respects the nil value + json + Grape::API::Boolean + BigDecimal + File + File + collection + Rack::Multipart::UploadedFile empty string + structures types + is coerced to nil for type Set + is coerced to nil for type Array primitive types + is coerced to nil for type Symbol is coerced to nil for type Numeric + is coerced to nil for type Grape::API::Boolean + is coerced to nil for type Date is coerced to nil for type Integer - is coerced to nil for type TrueClass - is coerced to nil for type Time is coerced to nil for type FalseClass - is coerced to nil for type Float - is coerced to nil for type Symbol - is not coerced to nil for type String - is coerced to nil for type BigDecimal - is coerced to nil for type Grape::API::Boolean is coerced to nil for type DateTime - is coerced to nil for type Date - structures types - is coerced to nil for type Array - is coerced to nil for type Set + is coerced to nil for type BigDecimal + is not coerced to nil for type String + is coerced to nil for type Float + is coerced to nil for type Time + is coerced to nil for type TrueClass special types - is coerced to nil for type [JSON] is coerced to nil for type JSON + is coerced to nil for type [JSON] variant-member-type collections - is coerced to nil for type [Integer, String, [Integer, String]] is coerced to nil for type [Integer, String] - File - collection - File - Rack::Multipart::UploadedFile - Set - Set of Integers - Set of Bools - json - BigDecimal - Grape::API::Boolean + is coerced to nil for type [Integer, String, [Integer, String]] + a custom type + coerces the given value + returning the InvalidValue instance when invalid + uses a custom message added to the invalid value Array - Array of Bools - Array of type implementing parse Array of a custom type - Set of type implementing parse + Array of type implementing parse Array of Integers + Array of Bools + Set of type implementing parse + i18n + i18n error on malformed input + gives an english fallback error when default locale message is blank first-class JSON - works when declared optional - parses objects, hashes, and arrays doesn't make sense using coerce_with accepts Array[JSON] shorthand + parses objects, hashes, and arrays + works when declared optional + with a custom validation message + errors on malformed input + on custom coercion rules + respects :coerce_with + performs no additional coercion + still validates type -Grape::Validations::Validators::AtLeastOneOfValidator - #validate! - when none of the restricted params is selected - returns a validation error - when custom message is specified - returns a validation error - when a subset of restricted params are present - does not return a validation error - when all restricted params are present - does not return a validation error - mixed with other params - does not return a validation error - when restricted params are nested inside hash - when at least one of them is present - does not return a validation error - when none of them are present - returns a validation error with full names of the params - when restricted params are nested inside array - when at least one of them is present - does not return a validation error - when none of them are present - returns a validation error with full names of the params - when restricted params are deeply nested - when none of them are present - returns a validation error with full names of the params - when at least one of them is present - does not return a validation error - when exactly one of the restricted params is selected - does not return a validation error - -Grape::Middleware::Auth::Strategies - Basic Auth - throws a 401 if no auth is given - throws a 401 is wrong auth is given - authenticates if given valid creds - -Grape::Validations::Validators::AllowBlankValidator - invalid input - refuses missing - refuses empty string - refuses only whitespaces - refuses nil - valid input - accepts empty input - accepts empty when datetime allow_blank - allows missing optional strings - accepts empty when boolean allow_blank - accepts false when boolean allow_blank - accepts value when time allow_blank - accepts empty when date allow_blank - accepts empty input when allow_blank is false - accepts empty when symbol allow_blank - accepts valid input - allow_blank when Numeric - accepts empty when integer allow_blank - accepts empty when integer allow_blank - accepts empty when float allow_blank - in an optional group - as a required param - refuses a blank value in an existing group - accepts a nested missing date value - accepts a missing group, even with a disallwed blank param - as an optional param - accepts a missing group, even with a disallwed blank param - accepts a nested missing optional value - refuses a blank existing value in an existing scope - custom validation message - with valid input - accepts valid input - accepts empty when boolean allow_blank - accepts empty when symbol allow_blank - accepts empty when date allow_blank - accepts false when boolean allow_blank - accepts empty input - accepts empty when datetime allow_blank - accepts empty input when allow_blank is false - allow_blank when Numeric - accepts empty when float allow_blank - accepts empty when integer allow_blank - accepts empty when integer allow_blank - in an optional group - as an optional param - refuses a blank existing value in an existing scope - accepts a missing group, even with a disallwed blank param - accepts a nested missing optional value - as a required param - accepts a missing group, even with a disallwed blank param - refuses a blank value in an existing group - accepts a nested missing date value - with invalid input - refuses empty string - refuses nil - refuses only whitespaces - refuses empty string for an optional param - in a required group - as a required param - refuses a blank value in a required existing group - refuses a string value in a required hash group - as an optional param - accepts a nested missing value - refuses a blank existing value in an existing scope - refuses a string value in an optional hash group - in a required group - as a required param - refuses a string value in a required hash group - refuses a blank value in a required existing group - as an optional param - refuses a string value in an optional hash group - accepts a nested missing value - refuses a blank existing value in an existing scope - -Rack::Sendfile - when calling sendfile - contains Sendfile headers - when streaming non file content - not contains Sendfile headers - -Grape::Validations::Types - ::structure? - recognizes Array as a structure - recognizes Set as a structure - recognizes Hash as a structure - special types - when JSON - is expected to eq Grape::Validations::Types::Json - when Array[JSON] - is expected to eq Grape::Validations::Types::JsonArray - when Rack::Multipart::UploadedFile - is expected to eq Grape::Validations::Types::File - when File - is expected to eq Grape::Validations::Types::File - ::build_coercer - caches the result of the build_coercer method - has internal cache variables - ::special? - provides special handling for JSON - provides special handling for Rack::Multipart::UploadedFile - provides special handling for [JSON] - provides special handling for File - ::custom? - returns true if the type responds to :parse with one argument - returns false if the type's #parse method takes other than one argument - returns false if the type does not respond to :parse - ::primitive? - recognizes Time as a primitive - recognizes Date as a primitive - recognizes Numeric as a primitive - recognizes BigDecimal as a primitive - recognizes Grape::API::Boolean as a primitive - recognizes String as a primitive - identifies unknown types - recognizes Float as a primitive - recognizes DateTime as a primitive - recognizes Symbol as a primitive - recognizes Integer as a primitive +Grape::API::Helpers + default + public + private + default + patch + default + private + public -Grape::DSL::Helpers - .helpers - uses provided modules - uses many provided modules - adds a module with the given block - with an external file - sets Boolean as a Grape::API::Boolean - in child classes - is available +StrictHashConfiguration + set nested configs -Grape::Exceptions::InvalidResponse - #message - contains the problem in the message +Grape::Endpoint + post + 405 -Grape::Middleware::Versioner::Header - succeeds if :strict is set to false and given an invalid header - succeeds if :strict is set to false - succeeds if :strict is not set - api.vendor - fails with 406 Not Acceptable if vendor is invalid - is set - is set if format provided - when version is set - is set if format provided - fails with 406 Not Acceptable if vendor is invalid - is set - when multiple versions are specified - fails with another version - succeeds with v2 - succeeds with v1 - api.version - is set if format provided - fails with 406 Not Acceptable if version is invalid - is set - api.format - is set - is nil if not provided - when version is set to v1 - is set - is nil if not provided - when version is set to v1 - is nil if not provided - is set - when there are multiple versions with complex vendor specified with rescue_from :all - with header versioned endpoints and a rescue_all block defined - responds correctly to a v1 request - responds correctly to a v2 request - when :strict and cascade: false - succeeds if proper header is set - fails with 406 Not Acceptable if header contains a single invalid accept - fails with 406 Not Acceptable if header is application/xml - fails with 406 Not Acceptable if header is empty - fails with 406 Not Acceptable if header is not set - api.type and api.subtype - sets type and subtype to first choice of content type if no preference given - sets preferred type - sets preferred type and subtype - when :strict is set - fails with 406 Not Acceptable if header is not set - fails with 406 Not Acceptable if header is empty - succeeds if proper header is set - with missing vendor option - fails +Grape::Middleware::Base + is able to access the response + calls through to the app + has the app as an accessor + #context + allows access to response context + header overwrite + overwrites header by after headers + callbacks + calls #after + calls #before + after callback with errors + does not overwrite the application response + with patched warnings + does show a warning + callbacks on error + calls #after + #response + when Array + body + header + status + returns the memoized Rack::Response instance + when Rack::Response + returns the memoized Rack::Response instance + header + status + body + after callback + overwrites application response + options + persists options passed at initialization + defaults + overrides default options when provided + persists the default options + header + is able to set a header -Rack - correctly populates params from a Tempfile - when the app is mounted - finds the app on the namespace +Grape::API::Helpers + can access helpers from a mounted resource + can access helpers from a mounted resource in a nested resource Grape::DSL::Callbacks - .after - adds a block to "after" - .before - adds a block to "before" .after_validation adds a block to "after_validation" + .before + adds a block to "before" .before_validation adds a block to "before_validation" - -Grape::DSL::Settings - #namespace_setting - delegates to get_or_set - sets a value until the end of a namespace - resets values after leaving nested namespaces - #unset_namespace_setting - delegates to unset - #unset_namespace_inheritable - delegates to unset - #get_or_set - sets a values - returns a value when nil is new value is provided - #unset_global_setting - delegates to unset - #unset - deletes a key from settings - #unset_route_setting - delegates to unset - #unset_api_class_setting - delegates to unset - #within_namespace - calls start and end for a namespace - returns the last result - #route_setting - sets a value until the next route - delegates to get_or_set - #api_class_setting - delegates to get_or_set - #namespace_inheritable - delegates to get_or_set - inherits values from surrounding namespace - #namespace_stackable - stacks values from surrounding namespace - delegates to get_or_set - #global_setting - delegates to get_or_set - #unset_namespace_stackable - delegates to unset - complex scenario - plays well - -Grape::Validations::Validators::Base - #inherited - when validator is anonymous - does not register the validator - when validator's underscored name ends with _validator - registers the custom validator with short name not ending with validator - when validator's underscored name does not end with _validator - registers the custom validator with a short name - -A named API - can access the name of the API - -Grape::Endpoint - put - responds - get - responds without ext - -Grape::Validations::Validators::SameAsValidator - / - is not the same - is expected to eq "password_confirmation is not the same as password" - is the same - is expected to eq "" - /custom-message - is the same - is expected to eq "" - is not the same - is expected to eq "password_confirmation not match" + .after + adds a block to "after" Grape::Presenters::Presenter + represent + represent object present - instance - presents dummy hash multiple presenter instance presents both dummy presenter - represent - represent object - -Grape::Validations::Validators::ValuesValidator - validates default value from proc - validates against an empty array in a proc - does not allow an invalid value for a parameter - validates against values in a proc - does not validate updated values without proc - allows values to be a kind of the coerced type in an array - raises IncompatibleOptionValues when except contains a value that is not a kind of the type - raises IncompatibleOptionValues on an invalid default value from proc - raises IncompatibleOptionValues on an invalid default value -Error 'comparison of String with 0 failed' raised while validating attribute 'number' - does not allow non-numeric string value for int value using lambda - does not allow invalid value using lambda - allows value using lambda - validates default value from proc against values in a proc - allows numeric string for int value using lambda -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - allows a default value with except - does not allow an invalid value for a parameter using an endless range - raises IncompatibleOptionValues when type is incompatible with values array - allows a valid value for a parameter - allows a proc for values - allows values to be a kind of the coerced type not just an instance of it - validates against values in an endless range - does not allow an invalid value for a parameter using lambda -Error 'undefined method `>' for nil:NilClass - - requires :number, type: Integer, values: ->(v) { v > 0 } - ^' raised while validating attribute 'number' - does not allow nil for int value using lambda - allows a valid default value - rejects all values if values is an empty array - allows a valid default value - raises IncompatibleOptionValues when values contains a value that is not a kind of the type - allows a blank value when the allow_blank option is true - with a custom validation message - does not allow an invalid value for a parameter - validates against values in a proc - allows a valid value for a parameter - does not allow an invalid value for a parameter using lambda - custom validation using proc -DEPRECATION WARNING: The values validator proc option is deprecated. The lambda expression can now be assigned directly to values. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - accepts multiple valid values -DEPRECATION WARNING: The values validator proc option is deprecated. The lambda expression can now be assigned directly to values. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - rejects an invalid value among valid ones -DEPRECATION WARNING: The values validator proc option is deprecated. The lambda expression can now be assigned directly to values. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - accepts a single valid value -DEPRECATION WARNING: The values validator proc option is deprecated. The lambda expression can now be assigned directly to values. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - uses supplied message -DEPRECATION WARNING: The values validator proc option is deprecated. The lambda expression can now be assigned directly to values. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - rejects a single invalid value - when proc has an arity of 1 - accepts a valid value - rejects an invalid value - when arity is > 1 -Error 'wrong number of arguments (given 1, expected 2)' raised while validating attribute 'input_one' -Error 'wrong number of arguments (given 1, expected 2)' raised while validating attribute 'input_two' - returns an error status code - with a lambda values - chooses default - only evaluates values dynamically with each request - nil value for a parameter - allows for a required param in child scope - does not allow for root params scope - accepts for an optional param with a list of values - with a custom exclude validation message -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - does not allow an invalid value for a parameter - with mixed values and excepts -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - rejects outside except and outside value -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - allows value, but not in except -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - rejects except - boolean values - rejects a value which is not in the list - allows a value from the list - with a range of values - rejects a single value outside the range - allows a single value inside of the range - allows an array of values inside of the range - rejects an array of values if any of them are outside the range - exclusive excepts with lambda -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - rejects values that matches except -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - allows any other value outside excepts -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - allows any other value outside excepts when type is included - with a custom exclude validation message -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - does not allow an invalid value for a parameter - exclusive excepts with lambda and coercion -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - allows any other value outside excepts -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - rejects values that matches except - exclude with a standard custom validation message -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - does not allow an invalid value for a parameter - exclusive excepts -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - allows any other value outside excepts when type is included -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - allows any other value outside excepts -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - rejects an array of values if any of them matches except -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - rejects values that matches except - -Grape::Middleware::Formatter - detection - uses the default format if none is provided - uses the format parameter if one is provided - uses the xml extension if one is provided - uses the json extension if one is provided - uses the requested format if provided in headers - uses the file extension format if provided before headers - send file - returns a file response - error handling -caught error of type StandardError in after callback inside Grape::Middleware::Formatter : StandardError - does not rescue other exceptions - rescues formatter-specific exceptions - serialization - looks at the bodies for possibly serializable data - xml - calls #to_xml if the content type is xml - jsonapi - calls #to_json if the content type is jsonapi - default format - calls #to_json since default format is json - accept header detection - parses headers with symbols as hash keys - detects from the Accept header - ensures that a quality of 0 is less preferred than any other content type - uses quality rankings to determine formats - parses headers with other attributes - handles quality rankings mixed with nothing - ignores invalid quality rankings - parses headers with vendor and api version - handles quality rankings that have a default 1.0 value - with custom vendored content types - uses the custom type - input - ignores multipart/mixed - ignores application/x-www-form-urlencoded - ignores application/x-www-form-urlencoded - ignores multipart/form-data - ignores multipart/related - ignores multipart/mixed - parses the body from an xml DELETE and copies values into rack.request.from_hash - ignores multipart/mixed - ignores multipart/form-data - rewinds IO - ignores application/x-www-form-urlencoded - ignores multipart/form-data - ignores application/x-www-form-urlencoded - parses the chunked body from DELETE and copies values into rack.request.from_hash - parses the body from an xml POST and copies values into rack.request.from_hash - ignores multipart/related - parses the body from an xml PATCH and copies values into rack.request.from_hash - rewinds IO - ignores multipart/form-data - rewinds IO - parses the body from an xml PUT and copies values into rack.request.from_hash - ignores multipart/related - ignores multipart/mixed - parses the chunked body from PATCH and copies values into rack.request.from_hash - rewinds IO - parses the chunked body from POST and copies values into rack.request.from_hash - parses the chunked body from PUT and copies values into rack.request.from_hash - ignores multipart/related - when body is nil - does not read and parse the body - application/json - parses the body from DELETE and copies values into rack.request.form_hash - application/json; charset=utf-8 - parses the body from DELETE and copies values into rack.request.form_hash - when body is nil - does not read and parse the body - when body is empty - does not read and parse the body - when body is not nil or empty - when Content-Type is supported - parses the body from PATCH and copies values into rack.request.form_hash - when Content-Type is not supported - returns a 415 HTTP error status - when body is not nil or empty - when Content-Type is not supported - returns a 415 HTTP error status - when Content-Type is supported - parses the body from POST and copies values into rack.request.form_hash - application/json - parses the body from PUT and copies values into rack.request.form_hash - application/json; charset=utf-8 - parses the body from PATCH and copies values into rack.request.form_hash - application/json; charset=utf-8 - parses the body from PUT and copies values into rack.request.form_hash - when body is nil - does not read and parse the body - when body is nil - does not read and parse the body - application/json - parses the body from POST and copies values into rack.request.form_hash - when body is not nil or empty - when Content-Type is supported - parses the body from DELETE and copies values into rack.request.form_hash - when Content-Type is not supported - returns a 415 HTTP error status - when body is not nil or empty - when Content-Type is not supported - returns a 415 HTTP error status - when Content-Type is supported - parses the body from PUT and copies values into rack.request.form_hash - when body is empty - does not read and parse the body - when body is empty - does not read and parse the body - application/json; charset=utf-8 - parses the body from POST and copies values into rack.request.form_hash - application/json - parses the body from PATCH and copies values into rack.request.form_hash - when body is empty - does not read and parse the body - content-type - is set to closest generic for custom vendored/versioned without registered type - is set for vendored with registered type - is set for txt - is set for json - is set for xml - is set for custom - inheritable formatters - returns response by invalid formatter - custom parser raises exception and rescue options are enabled for backtrace and original_exception - adds the backtrace and original_exception to the error output - no content responses - does not modify a 154 response - does not modify a 153 response - does not modify a 199 response - does not modify a 188 response - does not modify a 120 response - does not modify a 133 response - does not modify a 169 response - does not modify a 161 response - does not modify a 158 response - does not modify a 198 response - does not modify a 191 response - does not modify a 143 response - does not modify a 140 response - does not modify a 175 response - does not modify a 106 response - does not modify a 111 response - does not modify a 149 response - does not modify a 177 response - does not modify a 103 response - does not modify a 144 response - does not modify a 165 response - does not modify a 135 response - does not modify a 124 response - does not modify a 196 response - does not modify a 178 response - does not modify a 172 response - does not modify a 141 response - does not modify a 112 response - does not modify a 118 response - does not modify a 150 response - does not modify a 179 response - does not modify a 182 response - does not modify a 138 response - does not modify a 108 response - does not modify a 148 response - does not modify a 189 response - does not modify a 197 response - does not modify a 101 response - does not modify a 157 response - does not modify a 142 response - does not modify a 125 response - does not modify a 121 response - does not modify a 156 response - does not modify a 152 response - does not modify a 159 response - does not modify a 130 response - does not modify a 160 response - does not modify a 195 response - does not modify a 126 response - does not modify a 116 response - does not modify a 139 response - does not modify a 180 response - does not modify a 128 response - does not modify a 170 response - does not modify a 147 response - does not modify a 136 response - does not modify a 127 response - does not modify a 105 response - does not modify a 134 response - does not modify a 119 response - does not modify a 190 response - does not modify a 102 response - does not modify a 181 response - does not modify a 122 response - does not modify a 184 response - does not modify a 123 response - does not modify a 113 response - does not modify a 176 response - does not modify a 194 response - does not modify a 186 response - does not modify a 110 response - does not modify a 137 response - does not modify a 304 response - does not modify a 132 response - does not modify a 173 response - does not modify a 167 response - does not modify a 185 response - does not modify a 145 response - does not modify a 100 response - does not modify a 114 response - does not modify a 204 response - does not modify a 171 response - does not modify a 155 response - does not modify a 146 response - does not modify a 168 response - does not modify a 164 response - does not modify a 166 response - does not modify a 115 response - does not modify a 192 response - does not modify a 193 response - does not modify a 162 response - does not modify a 129 response - does not modify a 183 response - does not modify a 174 response - does not modify a 107 response - does not modify a 131 response - does not modify a 104 response - does not modify a 117 response - does not modify a 151 response - does not modify a 163 response - does not modify a 109 response - does not modify a 187 response - format - uses custom json formatter - uses custom formatter - default - uses default json formatter + instance + presents dummy hash -Grape::Http::Headers - is expected to eq "X-Cascade" - is expected to eq "Location" - is expected to eq "Allow" - is expected to eq "Transfer-Encoding" +Grape::Request + #headers + with http headers in env + cuts HTTP_ prefix and capitalizes header name words + with symbolic header names + converts them to string + with non-HTTP_* stuff in env + does not include them + #params + by default returns stringified parameter keys + with grape.routing_args + cuts version and route_info + when build_params_with: Grape::Extensions::Hash::ParamBuilder is specified + returns symbolized params + when the build_params_with is set to Hashie + when the API does not include a specific param builder + is expected to be a kind of Hash + when the API includes a specific param builder + is expected to be a kind of Hashie::Mash -Grape::Validations::Validators::AllOrNoneOfValidator +Grape::Validations::Validators::MutualExclusionValidator #validate! - when restricted params are nested inside required hash - returns a validation error with full names of the params + when mutually exclusive params are nested inside optional hash + when params are passed + returns a validation error with full names of the params + when params are empty + does not return a validation error + when all mutually exclusive params are present + returns a validation error + mixed with other params + returns a validation error + when a subset of mutually exclusive params are present + returns a validation error when custom message is specified returns a validation error - when no restricted params are present + when no mutually exclusive params are present does not return a validation error - when mutually exclusive params are nested inside array + when mutually exclusive params are nested inside required hash returns a validation error with full names of the params - when all restricted params are present - does not return a validation error - mixed with other params - does not return a validation error - when a subset of restricted params are present - returns a validation error when mutually exclusive params are deeply nested returns a validation error with full names of the params - -Grape::API::Instance - when an instance is mounted on the root - can call the instance endpoint - when an instance is the root - can call the instance endpoint - top level setting - does not inherit settings from the superclass (Grape::API::Instance) - with multiple moutes - does not raise a FrozenError on first instance - responds the correct body at the first instance - does not raise a FrozenError on second instance - responds the correct body at the second instance - -Grape::API::Helpers - defines parameters - -Grape::Validations::Validators::MutualExclusionValidator - #validate! when mutually exclusive params are nested inside array returns a validation error with full names of the params - when mutually exclusive params are deeply nested - returns a validation error with full names of the params - when no mutually exclusive params are present - does not return a validation error - when a subset of mutually exclusive params are present - returns a validation error - when mutually exclusive params are nested inside required hash - returns a validation error with full names of the params - when custom message is specified - returns a validation error - when all mutually exclusive params are present - returns a validation error - mixed with other params - returns a validation error - when mutually exclusive params are nested inside optional hash - when params are empty - does not return a validation error - when params are passed - returns a validation error with full names of the params - -Grape::Middleware::Auth::DSL - .http_digest - when realm is not hash - sets auth parameters - when realm is a hash - sets auth parameters - .http_basic - sets auth parameters - .auth - can be called multiple times - sets auth parameters - -Grape::Validations::ParamsScope - returns a sensible error message within a nested context - includes level 2 nested parameters outside the given within #declared(params) - raises an error if the dependent parameter was never specified - includes the nested parameter within #declared(params) - includes deeply nested parameters within #declared(params) - when validations are dependent on a parameter within an array param - passes none Hash params - when validations are dependent on a parameter - includes the nested parameter within #declared(params) - allows renaming of dependent parameters - does not raise an error if the dependent parameter is a Hash - does not raise an error if when using nested given - does not validate nested requires when given is false - raises an error if the dependent parameter was never specified - includes level 2 nested parameters outside the given within #declared(params) - returns a sensible error message within a nested context - allows renaming of dependent on parameter - applies the validations only if the parameter is present - applies the validations of multiple parameters - detect unmet nested dependency - includes the parameter within #declared(params) - raises an error if the dependent parameter is the renamed one - does not raise if the dependent parameter is not the renamed one - applies only the appropriate validation - allows nested dependent parameters - when the dependent parameter is not present #declared(params) - lateral parameter within lateral hash parameter - evaluate_given_true - evaluate_given_false - lateral parameter - evaluate_given_true - evaluate_given_false - nested given parameter within a nested given parameter within an array param - evaluate_given_true - evaluate_given_false - nested given parameter within an array param - evaluate_given_true - evaluate_given_false - lateral hash parameter - evaluate_given_true - evaluate_given_false - nested given parameter - evaluate_given_false - evaluate_given_true - lateral parameter within an array param - evaluate_given_true - evaluate_given_false - default value in given block - when dependency meets - sets default value for dependent parameter - when dependency does not meet - does not set default value for dependent parameter - parameters in group - allows Hash as type - handles missing optional Array type - errors when no type is provided - errors with an unsupported type - allows Array as type - when validations are dependent on a parameter with specific value - (case 1) - includes the parameter within #declared(params) - skips validation when base param does not have a specified value - skips validation when base param is missing - applies the validation when base param has the specific value - (case 9) - applies the validation when base param has the specific value - skips validation when base param does not have a specified value - includes the parameter within #declared(params) - (case 2) - includes the parameter within #declared(params) - skips validation when base param is missing - applies the validation when base param has the specific value - skips validation when base param does not have a specified value - (case 11) - skips validation when base param does not have a specified value - applies the validation when base param has the specific value - includes the parameter within #declared(params) - (case 4) - skips validation when base param does not have a specified value - applies the validation when base param has the specific value - skips validation when base param is missing - includes the parameter within #declared(params) - (case 13) - applies the validation when base param has the specific value - includes the parameter within #declared(params) - skips validation when base param does not have a specified value - (case 15) - includes the parameter within #declared(params) - skips validation when base param does not have a specified value - applies the validation when base param has the specific value - (case 12) - applies the validation when base param has the specific value - includes the parameter within #declared(params) - skips validation when base param does not have a specified value - (case 5) - skips validation when base param is missing - skips validation when base param does not have a specified value - applies the validation when base param has the specific value - includes the parameter within #declared(params) - (case 14) - applies the validation when base param has the specific value - includes the parameter within #declared(params) - skips validation when base param does not have a specified value - (case 3) - skips validation when base param is missing - skips validation when base param does not have a specified value - applies the validation when base param has the specific value - includes the parameter within #declared(params) - (case 8) - applies the validation when base param has the specific value - skips validation when base param does not have a specified value - includes the parameter within #declared(params) - (case 7) - skips validation when base param is missing - includes the parameter within #declared(params) - applies the validation when base param has the specific value - skips validation when base param does not have a specified value - (case 6) - includes the parameter within #declared(params) - applies the validation when base param has the specific value - skips validation when base param is missing - skips validation when base param does not have a specified value - (case 10) - includes the parameter within #declared(params) - applies the validation when base param has the specific value - skips validation when base param does not have a specified value - (case 0) - skips validation when base param does not have a specified value - applies the validation when base param has the specific value - includes the parameter within #declared(params) - skips validation when base param is missing - coercing values validation with proc -DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) - allows the proc to pass validation without checking in except - allows the proc to pass validation without checking - allows the proc to pass validation without checking in value - failing fast - when fail_fast is not defined - does not stop validation - when fail_fast is defined it stops the validation - for a single param - of other params - with exactly_one_of validation for optional parameters within an Hash param - when invalid data is provided - returns a failure response - when correct data is provided - returns a successful response - with range values - when the default is an array - and is a subset of allowed values - does not raise an exception - and is the entire range of allowed values - does not raise an exception - when both range endpoints are #kind_of? the type - accepts values in the range - rejects values outside the range - when right range endpoint isn't #kind_of? the type - raises exception - when left range endpoint isn't #kind_of? the type - raises exception - when validations are dependent on a parameter within an array param within #declared(params).to_json - applies the constraint within each value - when params have group attributes - with validations - when parameter has the same validator as a group - prioritizes parameter validation over group validation - returns a successful response - when data is invalid - applies group validations for every parameter - returns a validation error - with nested groups - when data is invalid - returns a validation error - responds with HTTP error - when correct data is provided - returns a successful response - with types - when invalid date provided - responds with HTTP error - returns a validation error - when created_at receives a valid date - returns a date - returns a successful response - with several group attributes - when correct data is provided - returns a successful response - when data is invalid - returns a validation error - responds with HTTP error - when using custom types - coerces the parameter via the type's parse method - array without coerce type explicitly given - raises exception when range values have different endpoint types - fails to call API without Array type - raises exception when values are of different type - sets the type based on first element - param renaming - is expected to eq "-there we go" - renaming can be defined before default - renaming can be defined after default - is expected to eq "{\"baz\":{\"qux\":\"any\"}}" - is expected to eq 200 - is expected to eq "any-any2" - is expected to eq "foo is empty" - -Grape::Path - #initialize - remebers the settings - remembers the path - remembers the namespace - #path_with_suffix - combines the path and suffix - when using a specific format - might have a suffix with specified format - #namespace? - is false when the namespace starts with whitespace - is true otherwise - is false when the namespace is nil - is false when the namespace is the root path - #suffix - when using a specific format - accepts specified format - when path versioning is not used - includes a '/' otherwise - does not include a '/' when the path has a path - does not include a '/' when the path has a namespace - when path versioning is used - includes a '/' - #uses_path_versioning? - is true when the version option is path - is false when the version option is header - is false when the version setting is nil - #mount_path - is nil when the mount path is nil - is nil when no mount path setting exists - splits the mount path - #root_prefix - splits the mount path - is nil when the mount path is nil - is nil when no root prefix setting exists - #path? - is true otherwise - is false when the path starts with whitespace - is false when the path is nil - is false when the path is the root path - #path - uses the namespace after the mount path and root prefix - uses the raw path after the namespace - root_prefix - is not included when it is nil - is included after the mount path - mount_path - is included when it is not nil - is not included when it is nil -MultiXml - uses multi_xml +Grape::DSL::RequestResponse + .content_types + returns all content types + .content_type + sets a content type for a format + .formatter + sets the formatter for a content type + .default_error_status + sets a default error status + .default_error_formatter + sets a new error formatter + .rescue_from + list of exceptions is passed + sets hash of exceptions as rescue handlers + sets given block as rescue handler for each key in hash + sets a rescue handler declared through :with option for each key in hash + rescues only base handlers if rescue_subclasses: false option is passed + sets given proc as rescue handler for each key in hash + :grape_exceptions + sets a rescue handler declared through :with option + sets given proc as rescue handler + sets rescue all to true + sets given block as rescue handler + :all + abort if :with option value is not Symbol, String or Proc + abort if both :with option and block are passed + sets given block as rescue handler + sets rescue all to true + sets a rescue handler declared through :with option + sets given proc as rescue handler + .default_format + sets the default format + returns the format without paramter + .parser + sets a parser for a content type + .format + sets a new format + .represent + sets a presenter for a class + .error_formatter + sets a error_formatter + understands syntactic sugar -Grape::Validations::Validators::RegexpValidator - accepts nil - accepts valid input - regexp with array - refuses nil items - refuses empty items - refuses inapppopriate items - accepts nil instead of array - accepts valid items - nested regexp with array - refuses inapppopriate - invalid input - refuses empty - refuses inapppopriate - custom validation message - accepts valid input - accepts nil - with invalid input - refuses empty - refuses inapppopriate - regexp with array - accepts valid items - refuses empty items - accepts nil instead of array - refuses inapppopriate items - refuses nil items +Grape::Middleware::Versioner::Path + sets the API version based on the first path + does not cut the version out of the path + provides a nil version if no path is given + with a pattern + ignores the version if it fails to match + sets the version if it matches + with specified versions as ["v1", "v2"] + allows versions that have been specified + throws an error if a non-allowed version is specified + with prefix, but requested version is not matched + recognizes potential version + with mount path + recognizes potential version + with specified versions as [:v1, "v2"] + allows versions that have been specified + throws an error if a non-allowed version is specified + with specified versions as ["v1", :v2] + allows versions that have been specified + throws an error if a non-allowed version is specified + with specified versions as [:v1, :v2] + allows versions that have been specified + throws an error if a non-allowed version is specified -Grape::API::Helpers - defines parameters +Grape::Validations::Validators::ExceptValuesValidator + 12: req_except_range - 11 + 7: opt_except_default - + 7: opt_except_default - invalid-type1 + 2: req_except_custom_message - valid-type + 2: req_except_custom_message - invalid-type3 + 10: opt_except_type_coerce_default - 10 + 10: opt_except_type_coerce_default - invalid-type1 + raises IncompatibleOptionValues on a default value in exclude + 2: req_except_custom_message - invalid-type1 + 1: req_except_hash - invalid-type1 + 11: opt_except_array_type_coerce_default - + 11: opt_except_array_type_coerce_default - [3] + 1: req_except_hash - invalid-type3 + 3: req_except_no_value - invalid-type1 + raises IncompatibleOptionValues when a default array has excluded values + 0: req_except - valid-type + 10: opt_except_type_coerce_default - + 9: req_except_type_coerce - invalid-type1 + 6: req_except_lambda_custom_message - invalid-type4 + 5: req_except_lambda - invalid-type1 + 5: req_except_lambda - valid-type + 0: req_except - invalid-type1 + 4: req_except_empty - invalid-type1 + 9: req_except_type_coerce - 3 + 7: opt_except_default - valid-type + 9: req_except_type_coerce - 11 + 9: req_except_type_coerce - 3 + 5: req_except_lambda - invalid-type4 + 9: req_except_type_coerce - 11 + 11: opt_except_array_type_coerce_default - [10] + 10: opt_except_type_coerce_default - 3 + 8: opt_except_lambda_default - valid-type + 8: opt_except_lambda_default - invalid-type1 + 0: req_except - invalid-type3 + 7: opt_except_default - invalid-type3 + 6: req_except_lambda_custom_message - invalid-type1 + 11: opt_except_array_type_coerce_default - invalid-type1 + 10: opt_except_type_coerce_default - 3 + 11: opt_except_array_type_coerce_default - ["3"] + 12: req_except_range - 13 + 8: opt_except_lambda_default - + raises IncompatibleOptionValues when type is incompatible with values array + 6: req_except_lambda_custom_message - valid-type + 8: opt_except_lambda_default - invalid-type3 + 1: req_except_hash - valid-type + 11: opt_except_array_type_coerce_default - 10 MultiJson uses multi_json (PENDING: Temporarily skipped with xit) -Grape - .config - is expected to eq {:param_builder=>Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder} - -Grape::Util::ReverseStackableValues - #[] - returns parent value when no value is set - returns an array of values - parent values are not changed - combines parent and actual values (actual first) - #to_hash - returns a Hash representation - #clone - copies all values - complex (i.e. not primitive) data types (ex. middleware, please see bug #930) - copies values; does not duplicate them - #delete - does not delete parent values - deletes a key - #[]= - sets a value - can handle array values - pushes further values - #keys - returns merged keys with parent - returns all keys +Grape::Validations::ParamsScope::AttributesDoc + #document + documentation is enabled + documents attributes + false as a default value + is still documented + behaves like an optional doc attribute + does not mention it + behaves like an optional doc attribute + does not mention it + nil as a default value + is still documented + the description key instead of desc + adds the given description + behaves like an optional doc attribute + does not mention it + behaves like an optional doc attribute + does not mention it + behaves like an optional doc attribute + does not mention it + documentation is disabled + does not document attributes + #extract_details + does not clean up doc attrs mandatory for validators + cleans up doc attrs needed for documentation only + tells when attributes are required Grape::API - .recognize_path - returns nil if given path does not match with registered routes - fetches endpoint by given path - -Grape::Exceptions::Validation - fails when params are missing - when message is a symbol - stores message_key - when message is a String - does not store the message_key - -Grape -/build/reproducible-path/ruby-grape-2.0.0/lib/grape/eager_load.rb:20: warning: possibly useless use of :: in void context - compile! - eager_load! - -Grape::Validations::SingleAttributeIterator - #each - when params is an array - yields every single attribute from the list for each of the array elements - empty values - marks params with empty values - when missing optional value - does not yield skipped values - when params is a hash - yields params and every single attribute from the list - -Grape::Middleware::Error - has a default message - sets the status code based on the rack util status code symbol - sets the error message appropriately - defaults to a 500 status - sets the status code appropriately - with http code - adds the status code if wanted - presents an error message - -Grape::Extensions::Hash::ParamBuilder - in an api - symbolizes params keys - symbolizes the params - #params - is Hash - in an endpoint - #params - is of type Hash - -Grape::Exceptions::MissingMimeType - #message - contains the problem in the message - contains the resolution in the message - -Grape::API::Helpers - default - private - default - public - patch - default - private - public - -Grape::API::Helpers - can access helpers from a mounted resource - can access helpers from a mounted resource in a nested resource - -Grape::Exceptions::ValidationErrors - api with rescue_from :grape_exceptions handler with block - with content_type json - returns body parsing error message - with content_type xml - returns body parsing error message - api with rescue_from :grape_exceptions handler - with content_type json - returns body parsing error message - with content_type xml - returns body parsing error message - api with rescue_from :all handler - with content_type json - can recover from failed body parsing - with content_type xml - can recover from failed body parsing - with content_type text - can recover from failed body parsing - with no specific content_type - can recover from failed body parsing - api without a rescue handler - and with content_type json - can recover from failed body parsing - with content_type text - can recover from failed body parsing - and with no specific content_type - can recover from failed body parsing - with content_type xml - can recover from failed body parsing - -Grape::Validations::MultipleAttributesIterator - #each - when params is empty optional placeholder - does not yield it - when params is a hash - yields the whole params hash without the list of attrs - when params is an array - yields each element of the array without the list of attrs - -Grape::Middleware::Auth::Base - throws a 401 is wrong auth is given - authenticates if given valid creds - + custom route helpers on nested APIs + returns the given id when it is valid + returns an error when the id is bad + .error_format Grape::API - execute first request in reasonable time - -Grape::Endpoint - #declared - does not include missing attributes if that option is passed - has as many keys as there are declared params - shows nil for nested params if include_missing is true - builds nested params when given array - filters out any additional params that are given - builds arrays correctly - shows nil for multiple allowed types if include_missing is true - does not include missing attributes when there are nested hashes - does not work in a before filter - includes missing attributes with defaults when there are nested hashes - builds nested params - includes attributes with value that evaluates to nil - does not include renamed missing attributes if that option is passed - has a optional param with default value all the time - includes attributes with value that evaluates to false - stringifies if that option is passed - when the param is missing and include_missing=false - sets nested objects to be nil - when the param is missing and include_missing=true - includes all declared children when type=Hash - sets objects with type=Array to be an array - sets objects with type=Hash to be a hash - sets objects with type=Set to be a set - when params are not built with default class -W, [2025-05-30T13:34:48.890308 #2187560] WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#first defined in Enumerable. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method. -W, [2025-05-30T13:34:48.894623 #2187560] WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#first defined in Enumerable. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method. - returns an object that corresponds with the params class - hashie mash - returns an object that corresponds with the params class - hash with indifferent access - returns an object that corresponds with the params class - hash - #declared; call from child namespace - is expected to eq 200 - with include_parent_namespaces: false - returns declared parameters only from current namespace - without declaration - returns all requested parameters - with include_parent_namespaces: true - returns declared parameters from every parent namespace - #declared; with multiple route_param - return only :id without :artist_id - return :filter and :id parameters in declared for second enpoint inside route_param - return :compositor_id for mounter in route_param - return only :artist_id without :id - #declared; from a nested mounted endpoint - can access parent attributes - #declared; mixed nesting - can access parent route_param - parameter renaming - with a renamed hash with nested renamed parameter - ignores the renamed parameter (as name, 1) - ignores the renamed parameter (as name, 2) - ignores the renamed parameter (as name, 3) - validates the renamed parameter correctly (original name) - maps the renamed parameter correctly (original name) - generates the correct parameter names for documentation - with a renamed hash with nested parameters - ignores the renamed parameter (as name) - maps the renamed parameter correctly (original name) - validates the renamed parameter correctly (original name) - generates the correct parameter names for documentation - with a deeply nested parameter structure - generates the correct parameter names for documentation - does not modify the request params - maps no parameters when none are given - maps the renamed parameter correctly - with a renamed root parameter - maps the renamed parameter correctly (original name) - ignores the renamed parameter (as name) - generates the correct parameter names for documentation - validates the renamed parameter correctly (original name) - -Grape::Endpoint - when route modifies param value - param default should not change - + rescues all errors with a default formatter Grape::API - instance_for_rack - when the app was mounted + defaults the error formatter to format Grape::API - returns the first mounted instance - when the app was not mounted + rescues all errors and return :json Grape::API - returns the base_instance - with json default_error_formatter + rescues all errors and return :txt Grape::API - returns json error - catch-all + rescues all errors and return :txt with backtrace Grape::API - anchor=false + rescues error! and return txt Grape::API - anchor=true - .default_error_status + rescues all errors and return :json with backtrace + with + class Grape::API - has a default error status + returns a custom error format + class +/build/reproducible-path/ruby-grape-2.0.0/spec/grape/api_spec.rb:2447: warning: method redefined; discarding old call +/build/reproducible-path/ruby-grape-2.0.0/spec/grape/api_spec.rb:2470: warning: previous definition of call was here Grape::API - uses the default error status in error! + returns a custom error format + with json format Grape::API - allows setting default_error_status - .compile + rescues error! called with a hash and returns json Grape::API - sets the instance - do_not_route_head! + rescues error! called with a string and returns json Grape::API - options does not contain HEAD + rescues error! called with a symbol and returns json + .mount + with a bare rack app Grape::API - does not allow HEAD on a GET request - custom middleware - .use + makes a bare Rack app available at the endpoint Grape::API - does not destroy the middleware settings on multiple runs + anchors the routes, passing all subroutes to it Grape::API - uses a block if one is given + is able to cascade + mounting an API Grape::API - adds middleware + mounts on a path Grape::API - calls the middleware + applies the settings to nested mounted apis Grape::API - does not show up outside the namespace + recognizes potential versions with mounted path Grape::API - adds a block if one is given + applies the settings of the mounting api Grape::API - mounts behind error middleware - .middleware + responds to options Grape::API - includes all middleware from stacked settings + mounts multiple versioned APIs with nested resources Grape::API - includes middleware arguments from settings - .insert_after + mounts a versioned API with nested resources Grape::API - runs after a given middleware - .insert_before + mounts a prefixed API with nested resources Grape::API - runs before a given middleware - .version using header - behaves like versioning + mounts on a nested path Grape::API - sets the API version + applies format to a mounted API with nested resources Grape::API - is able to specify version as a nesting + collects the routes of the mounted api Grape::API - adds the prefix before the API version + applies auth to a mounted API with nested resources Grape::API - is able to specify multiple versions + responds to options with path versioning + when some rescues are defined by mounted Grape::API - does not overwrite version parameter with API version - with before block defined within a version block + prefers rescues defined by mounted even if outer is more specific Grape::API - calls before block that is defined within the version block - with catch-all - v1 + prefers more specific rescues defined by mounted Grape::API - finds catch all + prefers rescues defined by mounted if they rescue similar error class Grape::API - finds endpoint - v2 + inherits parent rescues + when mounting class extends a subclass of Grape::API + mounts APIs with the same superclass + when including a module + correctlies include module in nested mount + without a hash Grape::API - finds endpoint + calls through setting the route to "/" + desc Grape::API - finds catch all - with different versions for the same endpoint - without a prefix + does not inherit param descriptions in consequent namespaces Grape::API - allows the same endpoint to be implemented - with a prefix + includes details Grape::API - allows the same endpoint to be implemented - .inherited - does not override methods inherited from Class - overriding via composition - allows overriding the hook - overriding within class - allows overriding the hook - .call - it does not add to the app setup + allows to set the type attribute on :group element Grape::API - calls the app - .scope + uses full name of parameters in nested groups Grape::API - scopes the various settings - .prefix + empty array of routes Grape::API - supports OPTIONS + describes a method with parameters Grape::API - disallows POST + describes methods separately Grape::API - routes through with the prefix + merges the parameters of the namespace with the parameters of the method Grape::API - routes root through with the prefix - .insert + does not symbolize params Grape::API - inserts middleware in a specific location in the stack - .formatter - multiple formatters + groups nested params and prevents overwriting of params with same name in different groups Grape::API - sets another formatter + empty array of routes Grape::API - sets one formatter - custom formatter + merges the parameters of nested namespaces Grape::API - uses json +DEPRECATION WARNING: /build/reproducible-path/ruby-grape-2.0.0/spec/grape/api_spec.rb:3053: The route_xxx methods such as route_foo have been deprecated, please use foo. (called from method_missing at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/router/route.rb:27) + describes a method Grape::API - uses custom formatter - custom formatter class + parses parameters when no description is given Grape::API - uses json +DEPRECATION WARNING: /build/reproducible-path/ruby-grape-2.0.0/spec/grape/api_spec.rb:3098: The route_xxx methods such as route_foo have been deprecated, please use foo. (called from method_missing at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/router/route.rb:27) + namespaces and describe arbitrary parameters Grape::API - uses custom formatter - .rescue_from klass, block + has params which does not include format and version as named captures Grape::API - rescues Exception - custom errors + resets desc + .format + :txt only Grape::API - rescues a subclass of an error by default + forces txt without an extension Grape::API - does not rescue a different error + forces txt from a non-accepting header Grape::API - rescues multiple specific errors + does not accept extensions other than specified Grape::API - rescues a specific error + accepts specified extension + :serializable_hash Grape::API - rescues an error via rescue_from :all - .rescue_from klass, lambda + root Grape::API - rescues an error with the lambda + instance Grape::API - can execute the lambda with an argument - .mount - with a bare rack app + array + :json Grape::API - is able to cascade + raised :error from middleware Grape::API - anchors the routes, passing all subroutes to it + does not force json with an extension Grape::API - makes a bare Rack app available at the endpoint - without a hash + forces json without an extension Grape::API - calls through setting the route to "/" - mounting an API + forces json from a non-accepting header Grape::API - mounts a prefixed API with nested resources + can be overwritten with an explicit content type + :txt Grape::API - applies auth to a mounted API with nested resources + does not force txt with an extension Grape::API - mounts on a nested path + forces txt from a non-accepting header Grape::API - applies the settings to nested mounted apis + forces txt without an extension + :xml Grape::API - applies format to a mounted API with nested resources + hash Grape::API - mounts a versioned API with nested resources + string Grape::API - collects the routes of the mounted api + array Grape::API - mounts multiple versioned APIs with nested resources + raised :error from middleware + .version using param + behaves like versioning Grape::API - applies the settings of the mounting api + is able to specify version as a nesting Grape::API - responds to options + sets the API version Grape::API - recognizes potential versions with mounted path + adds the prefix before the API version Grape::API - mounts on a path + is able to specify multiple versions Grape::API - responds to options with path versioning - when some rescues are defined by mounted + does not overwrite version parameter with API version + with before block defined within a version block Grape::API - prefers rescues defined by mounted if they rescue similar error class + calls before block that is defined within the version block + with different versions for the same endpoint + without a prefix Grape::API - prefers more specific rescues defined by mounted + allows the same endpoint to be implemented + with a prefix Grape::API - inherits parent rescues + allows the same endpoint to be implemented + with catch-all + v1 Grape::API - prefers rescues defined by mounted even if outer is more specific - when mounting class extends a subclass of Grape::API - mounts APIs with the same superclass - when including a module - correctlies include module in nested mount + finds endpoint +Grape::API + finds catch all + v2 +Grape::API + finds endpoint +Grape::API + finds catch all .represent Grape::API requires a :with option Grape::API adds the association to the :representations setting - .default_format + .default_error_status Grape::API - parses data in default format + uses the default error status in error! Grape::API - returns data in default format - .error_format + has a default error status Grape::API - rescues all errors and return :txt with backtrace + allows setting default_error_status + .version using header + behaves like versioning Grape::API - rescues all errors and return :json with backtrace + sets the API version Grape::API - rescues all errors with a default formatter + adds the prefix before the API version Grape::API - rescues error! and return txt + is able to specify multiple versions Grape::API - defaults the error formatter to format + is able to specify version as a nesting Grape::API - rescues all errors and return :json + does not overwrite version parameter with API version + with different versions for the same endpoint + with a prefix Grape::API - rescues all errors and return :txt - class + allows the same endpoint to be implemented + without a prefix Grape::API - returns a custom error format - with - class -/build/reproducible-path/ruby-grape-2.0.0/spec/grape/api_spec.rb:2470: warning: method redefined; discarding old call -/build/reproducible-path/ruby-grape-2.0.0/spec/grape/api_spec.rb:2447: warning: previous definition of call was here + allows the same endpoint to be implemented + with catch-all + v1 Grape::API - returns a custom error format - with json format + finds endpoint Grape::API - rescues error! called with a hash and returns json + finds catch all + v2 Grape::API - rescues error! called with a symbol and returns json + finds catch all Grape::API - rescues error! called with a string and returns json - with unsafe HTML format specified + finds endpoint + with before block defined within a version block Grape::API - escapes the HTML - .version - when defined + calls before block that is defined within the version block + .insert Grape::API - returns version value - when not defined + inserts middleware in a specific location in the stack + normal class methods + is equal to itself + can find the appropiate name + .change! Grape::API - returns nil - desc + invalidates any compiled instance + .compile! Grape::API - does not inherit param descriptions in consequent namespaces + compiles the instance for rack! Grape::API - has params which does not include format and version as named captures + requires the grape/eager_load file + .endpoints Grape::API - allows to set the type attribute on :group element + adds one for each route created + filters Grape::API - does not symbolize params + calls only before filters when validation fails Grape::API -DEPRECATION WARNING: /build/reproducible-path/ruby-grape-2.0.0/spec/grape/api_spec.rb:3098: The route_xxx methods such as route_foo have been deprecated, please use foo. (called from method_missing at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/router/route.rb:27) - namespaces and describe arbitrary parameters + adds a before filter Grape::API - includes details + calls all filters when validation passes Grape::API - uses full name of parameters in nested groups + adds a after filter Grape::API - merges the parameters of nested namespaces + adds a after_validation filter Grape::API - parses parameters when no description is given + adds a before filter to current and child namespaces only Grape::API - describes a method with parameters + calls filters in the correct order + .version using accept_version_header + behaves like versioning Grape::API - resets desc + is able to specify multiple versions Grape::API - empty array of routes + adds the prefix before the API version Grape::API -DEPRECATION WARNING: /build/reproducible-path/ruby-grape-2.0.0/spec/grape/api_spec.rb:3053: The route_xxx methods such as route_foo have been deprecated, please use foo. (called from method_missing at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/router/route.rb:27) - describes a method + does not overwrite version parameter with API version Grape::API - groups nested params and prevents overwriting of params with same name in different groups + sets the API version Grape::API - merges the parameters of the namespace with the parameters of the method + is able to specify version as a nesting + with catch-all + v2 Grape::API - empty array of routes + finds catch all Grape::API - describes methods separately - http_codes + finds endpoint + v1 Grape::API - is used as presenter + finds catch all Grape::API - presented with + finds endpoint + with before block defined within a version block +Grape::API + calls before block that is defined within the version block + with different versions for the same endpoint + with a prefix +Grape::API + allows the same endpoint to be implemented + without a prefix +Grape::API + allows the same endpoint to be implemented + routes + empty api structure +Grape::API + returns an empty array of routes + status +Grape::API + can be set to arbitrary Integer value +Grape::API + can be set with a status code symbol + api structure with multiple apis +Grape::API + sets params + api structure with additional parameters +Grape::API + splits a string with limit +Grape::API + splits a string +Grape::API + sets params + single method api structure +Grape::API + returns one route + api structure with an api without params +Grape::API + sets params + api structure with two versions and a namespace +Grape::API + returns the latest version set +Grape::API + returns versions +Grape::API + sets prefix +Grape::API + sets route versions +Grape::API + sets a nested namespace +Grape::API + sets route paths + api with a custom route setting +Grape::API + exposed lifecycle - when the api_call has an exception + when the api_call has a controlled error Grape::API follows the errored life_cycle (skips after) - when the api_call succeeds + when the api_call has an exception Grape::API - follows the standard life_cycle + follows the errored life_cycle (skips after) when the api_call fails validation Grape::API follows the failed_validation cycle (skips after_validation, api_call & after) - when the api_call has a controlled error + when the api_call succeeds Grape::API - follows the errored life_cycle (skips after) - .version using accept_version_header - behaves like versioning + follows the standard life_cycle + .finally + when the ensure block has no exceptions + when a handled error occurs inside the API call Grape::API - sets the API version + executes the ensure code + when an unhandled occurs inside the API call Grape::API - does not overwrite version parameter with API version + executes the ensure code + when no errors occurs Grape::API - adds the prefix before the API version + executes the ensure code + with a helper Grape::API - is able to specify multiple versions + has access to the helper + when no API call is made Grape::API - is able to specify version as a nesting - with different versions for the same endpoint - with a prefix + has not executed the ensure code + .rescue_from :grape_exceptions Grape::API - allows the same endpoint to be implemented - without a prefix + rescues grape exceptions with a user-defined handler Grape::API - allows the same endpoint to be implemented - with catch-all - v2 + rescues grape exceptions + .logger Grape::API - finds catch all + does not unnecessarily retain duplicate setup blocks Grape::API - finds endpoint - v1 + returns an instance of Logger class by default + with a custom logger + exposes its interaface + http_codes Grape::API - finds endpoint + is used as presenter Grape::API - finds catch all - with before block defined within a version block + presented with + body + plain text Grape::API - calls before block that is defined within the version block - normal class methods - can find the appropiate name - is equal to itself + returns blank body + false +Grape::API + returns blank body format Grape::API - streams the content of the file with stream +DEPRECATION WARNING: Use stream to use a Stream object. (called from block (4 levels) in at /build/reproducible-path/ruby-grape-2.0.0/spec/grape/api_spec.rb:1243) + returns the content of the file with file Grape::API - sets content type for json error + sets content type for xml error +Grape::API + sets content type for binary format +Grape::API + sets content type for error Grape::API does not set Cache-Control Grape::API - sets content type for txt format + includes extension in format Grape::API - sets content type for serializable hash format + sets content type for txt format Grape::API - sets content type for binary format + returns raw data when content type binary Grape::API - sets content type for xml error + does not include extension in id Grape::API sets content type for xml Grape::API - returns raw data when content type binary + streams the content of the file with stream Grape::API - sets content type for error + sets content type for json error Grape::API - includes extension in format + sets content type for serializable hash format Grape::API sets content type for json -Grape::API - does not include extension in id -Grape::API -DEPRECATION WARNING: Use stream to use a Stream object. (called from block (4 levels) in at /build/reproducible-path/ruby-grape-2.0.0/spec/grape/api_spec.rb:1243) - returns the content of the file with file env["api.format"] Grape::API - uploads and downloads a PNG file via attachment -Grape::API uploads and downloads a PNG file via /attachment.png Grape::API uploads and downloads a Ruby file +Grape::API + uploads and downloads a PNG file via attachment with a custom content_type Grape::API + sets content type for error +Grape::API sets content type + .rescue_from Grape::API - sets content type for error - .content_type + uses default_rescue_handler to handle invalid response from rescue_from Grape::API - allows to override content-type +caught error of type StandardError in after callback inside Grape::Middleware::Formatter : StandardError + can rescue exceptions raised in the formatter Grape::API - removes existing content types + mimics default ruby "rescue" handler Grape::API - sets additional content-type + rescues all errors if rescue_from :all is called +Grape::API + does not rescue errors when rescue_from is not set +Grape::API + uses custom helpers defined by using #helpers method +Grape::API + rescues all errors with a json formatter +Grape::API + rescues only certain errors if rescue_from is called with specific errors + with multiple apis + avoids polluting global namespace + CustomError subclass of Grape::Exceptions::Base +Grape::API + does not re-raise exceptions of type Grape::Exceptions::Base +Grape::API + rescues custom grape exceptions + .compile +Grape::API + sets the instance .http_basic Grape::API + protects any resources on the same scope +Grape::API + is scopable +Grape::API can set instance variables accessible to routes Grape::API - protects any resources on the same scope + has access to the current endpoint +Grape::API + has access to helper methods Grape::API is callable via .auth as well + cascading + via endpoint Grape::API - has access to helper methods + cascades Grape::API - has access to the current endpoint + does not cascade + via version Grape::API - is scopable - .format - :txt + cascades Grape::API - forces txt without an extension + does not cascade + .rescue_from klass, rescue_subclasses: boolean Grape::API - forces txt from a non-accepting header + does not rescue child errors if rescue_subclasses is false Grape::API - does not force txt with an extension - :xml + sets rescue_subclasses to true by default Grape::API - string + rescues error as well as subclass errors with rescue_subclasses option set + .parser Grape::API - array + parses data in format requested by content-type + custom parser class Grape::API - hash + uses custom parser + none parser class Grape::API - raised :error from middleware - :txt only + does not parse data + multi_xml Grape::API - does not accept extensions other than specified + doesn't parse yaml + lambda parser Grape::API - accepts specified extension + uses parser for text/custom Grape::API - forces txt without an extension + uses parser for text/custom; charset=UTF-8 + .prefix Grape::API - forces txt from a non-accepting header - :json + routes through with the prefix Grape::API - forces json from a non-accepting header + supports OPTIONS Grape::API - forces json without an extension + disallows POST Grape::API - does not force json with an extension + routes root through with the prefix + .formatter + multiple formatters Grape::API - raised :error from middleware + sets one formatter Grape::API - can be overwritten with an explicit content type - :serializable_hash + sets another formatter + custom formatter class Grape::API - instance + uses json Grape::API - array + uses custom formatter + custom formatter Grape::API - root - .rescue_from klass, with: :method_name + uses custom formatter Grape::API - rescues an error with the specified method name + uses json + .route + plain Grape::API - correctly chooses exception handler if :all handler is specified + provides access to route info + with desc Grape::API - aborts if the specified method name does not exist - .version using path - behaves like versioning + returns route parameters Grape::API - is able to specify multiple versions + returns route description + .content_type Grape::API - adds the prefix before the API version + allows to override content-type Grape::API - is able to specify version as a nesting + sets additional content-type Grape::API - sets the API version + removes existing content types + .route Grape::API - does not overwrite version parameter with API version - with different versions for the same endpoint - without a prefix + allows and properly constrain a OPTIONS method Grape::API - allows the same endpoint to be implemented - with a prefix + allows for multiple paths Grape::API - allows the same endpoint to be implemented - with catch-all - v2 + allows and properly constrain a HEAD method Grape::API - finds endpoint + allows and properly constrain a DELETE method Grape::API - finds catch all - v1 + 405 responses includes an Allow header specifying supported methods Grape::API - finds endpoint + runs before filter exactly once on 405 bad method Grape::API - finds catch all - with before block defined within a version block + returns a 201 response code for POST by default Grape::API - calls before block that is defined within the version block - .route_param + allows for :any as a verb Grape::API - adds a parameterized route segment namespace + allows for format in namespace with no path Grape::API - defines requirements with a single hash - with param type definitions + runs only the before filter on 405 bad method Grape::API - is used by passing to options - .route + allows and properly constrain a POST method Grape::API - runs all filters and body with a custom OPTIONS method + handles empty calls +Grape::API + allows and properly constrain a PUT method +Grape::API + allows for multiple verbs Grape::API overwrites the default HEAD request Grape::API - allows for format without corrupting a param + allows for no path Grape::API allows and properly constrain a GET method Grape::API - allows for no path + returns a 405 for an unsupported method with an X-Custom-Header Grape::API - 405 responses includes an Content-Type header + allows for format without corrupting a param Grape::API - allows for :any as a verb + allows and properly constrain a PATCH method Grape::API - allows and properly constrain a HEAD method + allows for multipart paths Grape::API - returns a 405 for an unsupported method with an X-Custom-Header + allows for catch-all in a namespace Grape::API - returns a 201 response code for POST by default + runs all filters and body with a custom OPTIONS method Grape::API - allows and properly constrain a PATCH method + 405 responses includes an Content-Type header + adds an OPTIONS route that Grape::API - allows and properly constrain a PUT method + has an Allow header Grape::API - allows for format in namespace with no path + calls before hook Grape::API - 405 responses includes an Allow header specifying supported methods + has no Content-Length Grape::API - allows for catch-all in a namespace + calls after hook Grape::API - allows for multiple paths + does not call after_validation hook Grape::API - runs only the before filter on 405 bad method + has an empty body Grape::API - allows and properly constrain a DELETE method + returns a 204 Grape::API - handles empty calls + has no Content-Type Grape::API - allows for multipart paths + does not call before_validation hook + when format is xml Grape::API - runs before filter exactly once on 405 bad method + returns a 405 for an unsupported method + when hook behaviour is controlled by attributes on the route + when HEAD is called for the defined GET Grape::API - allows for multiple verbs + responds with 401 because before expectations in before hooks are not met + when HTTP method is defined and the underlying before hook expectation is not met Grape::API - allows and properly constrain a POST method + ends up in the endpoint + when HEAD is called for the defined GET Grape::API - allows and properly constrain a OPTIONS method - post + responds with 200 because before hooks are not called + when HTTP method is not defined Grape::API - allows a(n) String json object in params + responds with a 405 status + when HTTP method is defined and everything is like the before hooks expect Grape::API - stores input in api.request.input + ends up in the endpoint + when HTTP method is defined with attribute Grape::API - allows a(n) Symbol json object in params + responds with the defined error in the before hook + adds an OPTIONS route for namespaced endpoints that Grape::API - allows a(n) Integer json object in params + returns a 204 Grape::API - allows a(n) Hash json object in params + has no Content-Type Grape::API - allows a(n) Array json object in params + has no Content-Length +Grape::API + has an empty body +Grape::API + calls the outer before filter +Grape::API + calls the inner before filter +Grape::API + has an Allow header + post Grape::API stores input in api.request.input Grape::API - allows a(n) Float json object in params + allows a(n) TrueClass json object in params Grape::API stores input in api.request.input Grape::API + allows a(n) NilClass json object in params +Grape::API stores input in api.request.input Grape::API stores input in api.request.input Grape::API + allows a(n) Hash json object in params +Grape::API + allows a(n) Integer json object in params +Grape::API + allows a(n) Array json object in params +Grape::API allows a(n) FalseClass json object in params Grape::API stores input in api.request.input Grape::API stores input in api.request.input Grape::API - allows a(n) TrueClass json object in params -Grape::API stores input in api.request.input Grape::API - allows a(n) NilClass json object in params + allows a(n) Symbol json object in params +Grape::API + allows a(n) String json object in params +Grape::API + stores input in api.request.input Grape::API stores input in api.request.input +Grape::API + allows a(n) Float json object in params chunked transfer encoding Grape::API stores input in api.request.input @@ -3956,101 +3386,60 @@ chunked transfer encoding Grape::API stores input in api.request.input - format -Grape::API - allows .json -Grape::API - allows .txt - when format is xml -Grape::API - returns a 405 for an unsupported method - allows HEAD on a GET request that -Grape::API - has an empty body -Grape::API - returns a 200 - when a resource routes by POST, GET, PATCH, PUT, and DELETE - it adds an OPTIONS route for namespaced endpoints that -Grape::API - has an empty body -Grape::API - returns a 204 -Grape::API - has an Allow header - when hook behaviour is controlled by attributes on the route - when HTTP method is not defined -Grape::API - responds with a 405 status - when HEAD is called for the defined GET -Grape::API - responds with 200 because before hooks are not called - when HTTP method is defined and everything is like the before hooks expect + adds a 405 Not Allowed route that Grape::API - ends up in the endpoint - when HTTP method is defined with attribute + has an Allow header Grape::API - responds with the defined error in the before hook - when HTTP method is defined and the underlying before hook expectation is not met + returns a 405 Grape::API - ends up in the endpoint - when HEAD is called for the defined GET + has a X-Custom-Header Grape::API - responds with 401 because before expectations in before hooks are not met + contains error message in body when accessing env Grape::API returns a 405 for an unsupported method - adds an OPTIONS route for namespaced endpoints that -Grape::API - has no Content-Type + allows HEAD on a GET request that Grape::API - has an Allow header + returns a 200 Grape::API - calls the inner before filter + has an empty body + put Grape::API - has no Content-Length + allows a(n) TrueClass json object in params Grape::API - returns a 204 + allows a(n) FalseClass json object in params Grape::API - has an empty body + stores input in api.request.input Grape::API - calls the outer before filter - put + allows a(n) NilClass json object in params Grape::API stores input in api.request.input Grape::API stores input in api.request.input Grape::API - stores input in api.request.input + allows a(n) Array json object in params Grape::API stores input in api.request.input Grape::API - allows a(n) NilClass json object in params + allows a(n) Hash json object in params Grape::API stores input in api.request.input Grape::API - allows a(n) Symbol json object in params -Grape::API allows a(n) Float json object in params Grape::API - allows a(n) Array json object in params -Grape::API stores input in api.request.input Grape::API - allows a(n) Integer json object in params -Grape::API - allows a(n) FalseClass json object in params + allows a(n) Symbol json object in params Grape::API allows a(n) String json object in params Grape::API - allows a(n) Hash json object in params + allows a(n) Integer json object in params Grape::API stores input in api.request.input Grape::API stores input in api.request.input Grape::API stores input in api.request.input -Grape::API - allows a(n) TrueClass json object in params chunked transfer encoding Grape::API stores input in api.request.input @@ -4078,310 +3467,221 @@ chunked transfer encoding Grape::API stores input in api.request.input - adds an OPTIONS route that -Grape::API - has an Allow header -Grape::API - calls after hook -Grape::API - does not call before_validation hook -Grape::API - has no Content-Type -Grape::API - does not call after_validation hook -Grape::API - returns a 204 -Grape::API - calls before hook -Grape::API - has an empty body + format Grape::API - has no Content-Length - adds a 405 Not Allowed route that + allows .json Grape::API - has a X-Custom-Header + allows .txt + when a resource routes by POST, GET, PATCH, PUT, and DELETE + it adds an OPTIONS route for namespaced endpoints that Grape::API - contains error message in body + returns a 204 Grape::API - has an Allow header + has an empty body Grape::API - returns a 405 + has an Allow header root routes should work with Grape::API - param versioned APIs -Grape::API Accept-Version header versioned APIs Grape::API + header versioned APIs +Grape::API header versioned APIs with multiple headers Grape::API unversioned APIs Grape::API - header versioned APIs + param versioned APIs path versioned APIs when a single version provided Grape::API - without a format -Grape::API with a format +Grape::API + without a format when array of versions provided Grape::API is expected to eql "root" Grape::API is expected to eql "root" - const_missing - raises an error - filters -Grape::API - calls only before filters when validation fails -Grape::API - adds a after filter + instance_for_rack + when the app was not mounted Grape::API - calls all filters when validation passes + returns the base_instance + when the app was mounted Grape::API - adds a before filter to current and child namespaces only + returns the first mounted instance + .default_format Grape::API - adds a before filter + parses data in default format Grape::API - calls filters in the correct order + returns data in default format + do_not_route_head! Grape::API - adds a after_validation filter - .namespace + options does not contain HEAD Grape::API - is retrievable and converted to a path + does not allow HEAD on a GET request + custom middleware + .use Grape::API - cancels itself after the block is over + mounts behind error middleware Grape::API - is stackable + does not show up outside the namespace Grape::API - `.group` is an alias + calls the middleware Grape::API - `.segment` is an alias + uses a block if one is given Grape::API - accepts path segments correctly + does not destroy the middleware settings on multiple runs Grape::API - comes after the prefix and version + adds middleware Grape::API - `.resource` is an alias + adds a block if one is given + .insert_before Grape::API - is callable with nil just to push onto the stack + runs before a given middleware + .middleware Grape::API - `.resources` is an alias - cascading - via endpoint + includes all middleware from stacked settings Grape::API - does not cascade + includes middleware arguments from settings + .insert_after Grape::API - cascades - via version + runs after a given middleware + with unsafe HTML format specified Grape::API - cascades + escapes the HTML + .rescue_from klass, block Grape::API - does not cascade - custom route helpers on nested APIs - returns the given id when it is valid - returns an error when the id is bad - .helpers + rescues Exception + custom errors Grape::API - allows multiple calls with modules and blocks + rescues a specific error Grape::API - is reopenable + rescues multiple specific errors Grape::API - is accessible from the endpoint + rescues a subclass of an error by default Grape::API - allows for modules + rescues an error via rescue_from :all Grape::API - is scopable - .rescue_from klass, rescue_subclasses: boolean + does not rescue a different error + .namespace Grape::API - rescues error as well as subclass errors with rescue_subclasses option set + is retrievable and converted to a path Grape::API - does not rescue child errors if rescue_subclasses is false + cancels itself after the block is over Grape::API - sets rescue_subclasses to true by default - .endpoint + `.resources` is an alias Grape::API - path - .rescue_from :grape_exceptions + is callable with nil just to push onto the stack Grape::API - rescues grape exceptions + `.resource` is an alias Grape::API - rescues grape exceptions with a user-defined handler - body - false + `.segment` is an alias Grape::API - returns blank body - plain text + `.group` is an alias Grape::API - returns blank body - .compile! + is stackable Grape::API - compiles the instance for rack! + accepts path segments correctly Grape::API - requires the grape/eager_load file + comes after the prefix and version do_not_route_options! Grape::API - does not include OPTIONS in Allow header -Grape::API does not create an OPTIONS route - .configure -Grape::API - allows configuring the api - when not given a block -Grape::API - returns a configuration object - when given a block -Grape::API - calls the block passing the config -Grape::API - returns self - .parser -Grape::API - parses data in format requested by content-type - multi_xml -Grape::API - doesn't parse yaml - custom parser class -Grape::API - uses custom parser - lambda parser -Grape::API - uses parser for text/custom; charset=UTF-8 -Grape::API - uses parser for text/custom - none parser class -Grape::API - does not parse data - .change! -Grape::API - invalidates any compiled instance - .route - with desc -Grape::API - returns route parameters -Grape::API - returns route description - plain -Grape::API - provides access to route info - .logger -Grape::API - does not unnecessarily retain duplicate setup blocks -Grape::API - returns an instance of Logger class by default - with a custom logger - exposes its interaface - .rescue_from -Grape::API - uses custom helpers defined by using #helpers method -Grape::API - does not rescue errors when rescue_from is not set -Grape::API - rescues all errors if rescue_from :all is called -Grape::API -caught error of type StandardError in after callback inside Grape::Middleware::Formatter : StandardError - can rescue exceptions raised in the formatter -Grape::API - uses default_rescue_handler to handle invalid response from rescue_from -Grape::API - rescues all errors with a json formatter -Grape::API - rescues only certain errors if rescue_from is called with specific errors -Grape::API - mimics default ruby "rescue" handler - with multiple apis - avoids polluting global namespace - CustomError subclass of Grape::Exceptions::Base -Grape::API - does not re-raise exceptions of type Grape::Exceptions::Base Grape::API - rescues custom grape exceptions - routes - empty api structure -Grape::API - returns an empty array of routes - api with a custom route setting + does not include OPTIONS in Allow header + .rescue_from klass, with: :method_name Grape::API - exposed - api structure with an api without params + aborts if the specified method name does not exist Grape::API - sets params - api structure with multiple apis + rescues an error with the specified method name Grape::API - sets params - single method api structure + correctly chooses exception handler if :all handler is specified + with json default_error_formatter Grape::API - returns one route - status + returns json error + .route_param Grape::API - can be set with a status code symbol + adds a parameterized route segment namespace Grape::API - can be set to arbitrary Integer value - api structure with two versions and a namespace + defines requirements with a single hash + with param type definitions Grape::API - sets a nested namespace + is used by passing to options + .endpoint Grape::API - sets route versions + path + with non-UTF-8 characters in specified format Grape::API - returns versions + converts the characters + .call + it does not add to the app setup Grape::API - sets route paths + calls the app + .rescue_from klass, lambda Grape::API - returns the latest version set + can execute the lambda with an argument Grape::API - sets prefix - api structure with additional parameters + rescues an error with the lambda + .version + when not defined Grape::API - sets params + returns nil + when defined Grape::API - splits a string with limit + returns version value + .configure Grape::API - splits a string - .finally - when the ensure block has no exceptions - when no errors occurs + allows configuring the api + when not given a block Grape::API - executes the ensure code - with a helper + returns a configuration object + when given a block Grape::API - has access to the helper - when no API call is made + returns self Grape::API - has not executed the ensure code - when a handled error occurs inside the API call + calls the block passing the config + .scope Grape::API - executes the ensure code - when an unhandled occurs inside the API call + scopes the various settings + const_missing + raises an error + catch-all Grape::API - executes the ensure code - .endpoints + anchor=false Grape::API - adds one for each route created - .version using param + anchor=true + .inherited + does not override methods inherited from Class + overriding via composition + allows overriding the hook + overriding within class + allows overriding the hook + .version using path behaves like versioning Grape::API is able to specify multiple versions Grape::API + is able to specify version as a nesting +Grape::API adds the prefix before the API version Grape::API does not overwrite version parameter with API version Grape::API - is able to specify version as a nesting -Grape::API sets the API version + with before block defined within a version block +Grape::API + calls before block that is defined within the version block with catch-all v2 Grape::API - finds catch all -Grape::API finds endpoint +Grape::API + finds catch all v1 Grape::API finds endpoint Grape::API finds catch all - with before block defined within a version block -Grape::API - calls before block that is defined within the version block with different versions for the same endpoint with a prefix Grape::API @@ -4389,672 +3689,75 @@ without a prefix Grape::API allows the same endpoint to be implemented - with non-UTF-8 characters in specified format + .helpers Grape::API - converts the characters - -Grape::Exceptions::MissingOption - #message - contains the problem in the message - -Grape::DSL::Parameters - #includes - is alias to #use - #requires - adds a required parameter - #use - calls processes associated with named params - raises error when non-existent named param is called - #params - inherits params from parent - when params argument is not a array or a hash - returns empty hash - when params argument is an array of hashes - returns values of each hash for @element key - when params argument is a hash - returns value for @element key - #with - creates a scope with group attributes - #at_least_one_of - adds an at least one of parameter validation - #optional - adds an optional parameter - #exactly_one_of - adds an exactly of one parameter validation - #all_or_none_of - adds an all or none of parameter validation - #group - is alias to #requires - #use_scope - is alias to #use - #mutually_exclusive - adds an mutally exclusive parameter validation - -Grape::Exceptions::UnknownValidator - #message - contains the problem in the message - -Grape::Exceptions::Base - #compose_message - when I18n does not enforce available locales - when the fallback locale is not available - returns the translated message - when the fallback locale is available - returns the translated message - when I18n enforces available locales - when the fallback locale is not available - returns the translation string - when the fallback locale is available - returns the translated message - #to_s - is expected to eq "a_message" - #message - is expected to eq "a_message" - -Grape::API::Helpers - non overriding subclass - with lack of expected params - returns missing error - given expected params - inherits helpers from a superclass - overriding subclass - with lack of expected params - returns missing error - given expected params - overrides helpers from a superclass - example subclass - given expected params - inherits helpers from a superclass - with lack of expected params - returns missing error - -Grape::Util::StackableValues - #to_hash - returns a Hash representation - #clone - copies all values - complex (i.e. not primitive) data types (ex. middleware, please see bug #930) - copies values; does not duplicate them - #[]= - can handle array values - pushes further values - sets a value - #[] - returns parent value when no value is set - returns an array of values - parent values are not changed - combines parent and actual values - #keys - returns merged keys with parent - returns all keys - #delete - deletes a key - does not delete parent values - -Grape::API::Instance - boolean constant - sets Boolean as a type - Params endpoint type - params type is a boolean - -Grape::Validations - using a custom length validator - specified in the query string - over 140 characters - under 140 characters - using a custom body-only validator - allows field in body - ignores field in query - using a custom request/param validator - does not fail when we send non-admin fields only - fails when we send admin fields and we are not admin - fail when non-admin user sets an admin field - does not fail when we send non-admin and admin=false fields only - does not fail when we send admin fields and we are admin - using a custom validator with message_key - fails with message - Grape::Validations::Base - behaves like deprecated class - raises an ActiveSupport::DeprecationException + allows multiple calls with modules and blocks +Grape::API + allows for modules +Grape::API + is scopable +Grape::API + is reopenable +Grape::API + is accessible from the endpoint -Grape::Middleware::Base - is able to access the response - calls through to the app - has the app as an accessor - callbacks on error - calls #after - callbacks - calls #before - calls #after - #response - when Rack::Response - returns the memoized Rack::Response instance - body - header - status - when Array - status - returns the memoized Rack::Response instance - body - header - after callback - overwrites application response - after callback with errors - does not overwrite the application response - with patched warnings - does show a warning - options - persists options passed at initialization - defaults - persists the default options - overrides default options when provided - header - is able to set a header - header overwrite - overwrites header by after headers - #context - allows access to response context +Grape::Endpoint + put + responds + get + responds -Grape::Middleware::Versioner::Path - does not cut the version out of the path - provides a nil version if no path is given - sets the API version based on the first path - with a pattern - ignores the version if it fails to match - sets the version if it matches - with specified versions as [:v1, :v2] - allows versions that have been specified - throws an error if a non-allowed version is specified - with specified versions as ["v1", "v2"] - allows versions that have been specified - throws an error if a non-allowed version is specified - with mount path - recognizes potential version - with specified versions as [:v1, "v2"] +Grape::Middleware::Versioner::Param + cuts (only) the version out of the params + sets the API version based on the default param (apiver) + provides a nil version if no version is given + when no version is set + returns a 200 (matches the first version found) + when there are multiple versions with a custom param + responds correctly to a v2 request + responds correctly to a v1 request + when there are multiple versions without a custom param + responds correctly to a v1 request + responds correctly to a v2 request + with specified parameter name + sets the API version based on the custom parameter name + does not set the API version based on the default param + with specified versions allows versions that have been specified throws an error if a non-allowed version is specified - with specified versions as ["v1", :v2] - throws an error if a non-allowed version is specified - allows versions that have been specified - with prefix, but requested version is not matched - recognizes potential version - -Grape::Exceptions::UnsupportedGroupType - Grape::Exceptions::UnsupportedGroupTypeError - behaves like deprecated class - raises an ActiveSupport::DeprecationException - #message - is expected to include "group type must be Array, Hash, JSON or Array[JSON]" - -Grape::Util::InheritableValues - #[]= - sets a value - #[] - returns parent value when no value is set - overwrites parent value with the current one - returns a value - parent values are not changed - #clone - complex (i.e. not primitive) data types (ex. entity classes, please see bug #891) - copies values; does not duplicate them - #delete - does not delete parent values - deletes a key - #to_hash - returns a Hash representation - -Grape::Util::InheritableSetting - #namespace - sets a value until the end of a namespace - uses new values when a new namespace starts - #namespace_reverse_stackable - works with reverse stackable values - #global - handles different parents - overrides global values - sets the global inherited values - sets a global value - #namespace_stackable - works with stackable values - #route - sets a value until the next route - works with route values - #api_class - is specific to the class - #to_hash - return all settings as a hash - #inherit_from - notifies clones - #api_class - is specific to the class - #namespace_inheritable - works with inheritable values - handles different parents - #point_in_time_copy - decouples namespace stackable values - decouples namespace reverse stackable values - decouples namespace inheritable values - decouples namespace values - resets point_in_time_copies - adds itself to original as clone - decouples route values - -Grape::Validations - params - nested optional Array blocks - handles validation within arrays - adds to declared parameters - exactly_one_of - handles deep nesting - does internal validations if the outer group is present - all_or_none_of - does no internal validations if the outer group is blank - at_least_one_of - Issue occurs whenever: -* param structure with at least three levels -* 1st level item is a required Array that has >1 entry with an optional item present and >1 entry with an optional item missing -* 2nd level is an optional Array or Hash -* 3rd level is a required item (can be any type) -* additional levels do not effect the issue from occuring - example based off actual real world use case - simplest example using Array -> Hash -> String - simplest example using Array -> Array -> Hash -> String - correctly indexes invalida data - multiple levels of optional and requires settings - with invalid data - with valid data - all or none - optional params - with a custom validation message - works when all params are present - works when none are present - errors when any one is present - multiple validation errors - throws the validation errors - requires :all or :none but except a non-existent field using Grape::Entity documentation - requires :all - adds only the entity documentation to declared params, nothing more - requires :none - adds only the entity documentation to declared params, nothing more - group params with nested params which has a type - errors when group param is invalid - required with a Hash block - errors when param not present - errors when nested param not present - doesn't throw a missing param when param is present - adds to declared parameters - errors when param is not a Hash - validation within arrays - errors when a parameter is not present in array within array - safely handles empty arrays and blank parameters - errors when a parameter is not present - can handle new scopes within child elements - errors when param is not an Array - handle errors for all array elements - validation within arrays with JSON - errors when a parameter is not present - safely handles empty arrays and blank parameters - can handle new scopes within child elements - required with an Array block - doesn't throw a missing param when param is present - errors when param not present - adds to declared parameters - errors when param is not an Array - doesn't throw a missing param when param is present but empty - at least one of - params - does not error when two are present - errors when none are present - does not error when one is present - with a custom validation message - does not error when one is present - does not error when two are present - errors when none are present - nested params - does not error when one is present - errors when none are present - does not error when two are present - hash with a required param with validation - errors when param is not a Hash - works when all params match - requires with nested params - validates correctly in deep nested params - required - works when required field is present but nil - errors when param not present - doesn't throw a missing param when param is present - adds to declared parameters - custom validator for a Hash - which is optional - doesn't throw an error if the validation passes - errors if the validation fails - which is required - errors if the validation fails - doesn't throw an error if the validation passes - custom validation - when using optional with a custom validator - validates when param is present - skips validation when parameter isn't present - validates with custom validator when param present and incorrect type - when using options on param - validates param with custom validator with options - when using requires with a custom validator - validates when param is not present - validates when param is present - nested namespaces - peer namespaces does not have the validator - when nested, specifying a route should clear out the validations for deeper nested params - namespaces nested in peers should also not have the validator - the parent namespace uses the validator - the nested namespace inherits the custom validator - optional - validates when params is present - doesn't validate when param not present - adds to declared parameters - with block param - group defaults to Array type - requires defaults to Array type - optional defaults to Array type - with block and empty args - works - requires :all using Grape::Entity documentation - works when required_field is present - errors when required_field is not present - adds entity documentation to declared params - requires :none using Grape::Entity documentation - works when required_field is present - errors when required_field is not present - adds entity documentation to declared params - optional using Grape::Entity documentation - works when field_a is present - adds entity documentation to declared params - works when field_a and field_b are not present - works when field_b is present - exactly one of - nested params - errors when two or more are present - succeeds when one is present - errors when none are present - params - errors when none are present - succeeds when one is present - errors when two or more are present - with a custom validation message - errors when two or more are present - errors when none are present - succeeds when one is present - named - with block - overrides default value for order_by - overrides default value for order - returns defaults - fails with invalid value - can be included in usual params - by #use with multiple params - by #use - can be defined - in helpers - in helper module which kind of Grape::DSL::Helpers::BaseHelper - optional with an Array block - doesn't throw a missing param when both group and param are given - adds to declared parameters - errors when group is present, but required param is not - errors when param is present but isn't an Array - doesn't throw a missing param when the group isn't present - mutually exclusive - more than one set of mutually exclusive params - errors for all sets - with a custom validation message - errors for all sets - optional params - errors when two or more are present - with custom validation message - errors when two or more are present - in a group - errors when more than one from the set is present - works when only one from the set is present - mutually exclusive params inside Hash group - invalidates if request param is invalid type - required with an Array and a Hash block - does not output index [0] for Hash types - group - doesn't throw a missing param when param is present - errors when param not present - adds to declared parameters - in a group - errors when no parameter from the set is present - works when only one from the set is present - errors when more than one from the set is present - does not falsely think the param is there if it is provided outside the block - with block and keyword argument - works - require_validator - when found - is expected to equal Grape::Validations::Validators::PresenceValidator - when not found - raises an error - -Grape::Endpoint - #version - returns env[api.version] - defaults to nil - #status - raises error if status is not a integer or symbol - returns status set - defaults to 200 on DELETE with a body present - defaults to 201 on POST - raises error if unknow symbol is passed - defaults to 200 on GET - defaults to 204 on DELETE - defaults to 200 on GET - defaults to 200 on GET - accepts unknown Integer status codes - accepts symbol for status - #redirect - default - sets location header - sets status to 302 - permanent - sets status to 301 - sets location header - #file - set - as file path -DEPRECATION WARNING: Use sendfile or stream to send files. (called from block (5 levels) in at /build/reproducible-path/ruby-grape-2.0.0/spec/grape/dsl/inside_route_spec.rb:219) - forwards the call to sendfile - emits a warning that this method is deprecated - as object (backward compatibility) - emits a warning that this method is deprecated -DEPRECATION WARNING: Use stream to use a Stream object. (called from block (5 levels) in at /build/reproducible-path/ruby-grape-2.0.0/spec/grape/dsl/inside_route_spec.rb:235) - forwards the call to stream - get -DEPRECATION WARNING: Use sendfile or stream to send files. (called from block (4 levels) in at /build/reproducible-path/ruby-grape-2.0.0/spec/grape/dsl/inside_route_spec.rb:250) - fowards call to sendfile - emits a warning that this method is deprecated - #sendfile - returns default - set - as object - raises an error that only a file path is supported - as file path - returns value wrapped in StreamResponse - does not change the Content-Length header - sends no deprecation warnings - does not change the Transfer-Encoding header - does not change the Cache-Control header - #route - returns route_info - #stream - returns default - set - as a stream object - returns value wrapped in StreamResponse - sets Transfer-Encoding header to nil - emits no deprecation warnings - sets Content-Length header to nil - sets Cache-Control header to no-cache - as a file path - emits no deprecation warnings - sets Cache-Control header to no-cache - returns file body wrapped in StreamResponse - sets Content-Length header to nil - does not change Cache-Control header - sets Transfer-Encoding header to nil - as a non-stream object - raises an error that the object must implement :each - #return_no_content - sets the status code and body - #cookies - returns an instance of Cookies - #declared - is not available by default - #body - returns default - set - returns value - false - sets status to 204 - #content_type - returns default - set - returns value - #error! - throws :error - default_error_status - sets status to default_error_status - thrown - sets status - #present - dummy - presents dummy object - multiple entities - instance - presents both dummy objects - non mergeable entity - instance - fails - with - entity - instance - presents dummy object -Grape::Exceptions::InvalidVersionerOption - #message - contains the problem in the message - -Grape::Endpoint - post - 405 - -Grape::Validations::ParamsScope::AttributesDoc - #document - documentation is disabled - does not document attributes - documentation is enabled - documents attributes - behaves like an optional doc attribute - does not mention it - false as a default value - is still documented - behaves like an optional doc attribute - does not mention it - the description key instead of desc - adds the given description - behaves like an optional doc attribute - does not mention it - behaves like an optional doc attribute - does not mention it - behaves like an optional doc attribute - does not mention it - nil as a default value - is still documented - #extract_details - does not clean up doc attrs mandatory for validators - cleans up doc attrs needed for documentation only - tells when attributes are required - -Grape::DSL::Headers - when headers are set - #header - get - returns a specifc value - returns all set headers - delete - deletes a header key-value pair - set - returns value - when no headers are set - #header - returns nil - -Grape::Exceptions::InvalidFormatter +Grape::Exceptions::MissingMimeType #message + contains the resolution in the message contains the problem in the message -Grape::API - remounting an API - with dynamic configuration - when mounting an endpoint conditional on a configuration - mounts the endpoints only when configured to do so - when the configuration is read within a namespace - will use the dynamic configuration on all routes - on the ParamScope - mounts the endpoint in the location it is configured - on dynamic checks - can read the configuration on lambdas - when the configuration is read within the response block - will use the dynamic configuration on all routes - when the configuration is part of the arguments of a method - mounts the endpoint in the location it is configured - when the configuration is the value in a key-arg pair - takes the param from the configuration - when the configuration is read in a helper - will use the dynamic configuration on all routes - when the params are configured via a configuration - when the configured param is my_attr - requires the configured params - on the DescSCope - mounts the endpoint with the appropiate tags - when using an expression derived from a configuration - mounts the endpoint with the name - does not mount the endpoint with a null name - when the expression lives in a namespace - does not mount the endpoint with a null name - mounts the endpoint with the name - a very complex configuration example - when it should not be mounted - gets a response - when should be mounted is nil - gets a response - when the namespace should be mounted - gets a response - when executing a standard block within a `mounted` block with all dynamic params - mounts the API and obtains the description and headers definition - when executing a custom block on mount - mounts the endpoints only when configured to do so - with a defined route - when mounting on namespace - can access the votes in both places - when mounting twice - can access the votes in both places - when mounting one instance - can access the endpoint +Rack + correctly populates params from a Tempfile + when the app is mounted + finds the app on the namespace -Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder - in an endpoint - #params - is of type Hash - in an api - #params - is a Hash - parses sub hash params - params are indifferent to symbol or string keys - responds to string keys +Grape::Middleware::Auth::DSL + .auth + sets auth parameters + can be called multiple times + .http_digest + when realm is not hash + sets auth parameters + when realm is a hash + sets auth parameters + .http_basic + sets auth parameters Grape::Validations::Validators::ExactlyOneOfValidator #validate! + when params are nested inside array + returns a validation error with full names of the params + when a subset of params are present + returns a validation error when none of the params are present returns a validation error + when params are deeply nested + returns a validation error with full names of the params when params are nested inside required hash returns a validation error with full names of the params when params are nested inside optional hash @@ -5062,302 +3765,1130 @@ returns a validation error with full names of the params when params are empty does not return a validation error - when a subset of params are present - returns a validation error - when params are nested inside array - returns a validation error with full names of the params when custom message is specified returns a validation error - when exacly one param is present - does not return a validation error - when params are deeply nested - returns a validation error with full names of the params when all params are present returns a validation error mixed with other params returns a validation error + when exacly one param is present + does not return a validation error -Grape::Validations::Types::ArrayCoercer - #call - an array of primitives - coerces elements in the array - an array of sets - coerces elements in the nested set - an array of arrays - coerces elements in the nested array - -Grape::Middleware::Error - - is possible to return errors in jsonapi format - - is possible to return the backtrace and the original exception in xml format - with rescue_options :backtrace and :exception set to true - is possible to return the backtrace and the original exception in json format - - does not trap regular error! codes - - is possible to return hash errors in xml format - - is possible to specify a custom formatter - - is possible to return errors in xml format - Non-StandardError exception with a provided rescue handler - custom error response - rescues the exception using the provided handler - default error response - rescues the exception using the default handler - - is possible to specify a different default status code - - responds to custom Grape exceptions appropriately - - is possible to return hash errors in json format - - is possible to return errors in json format - with defaults - does not trap errors by default - - is possible to return hash errors in jsonapi format - with rescue_all - Non-StandardError exception - does not trap errors other than StandardError - StandardError exception - sets the message appropriately - defaults to a 500 status - - is possible to return the backtrace and the original exception in txt format - -Grape::API - an endpoint without documentation - does not document parameters for the endpoint - still declares params internally - an endpoint with documentation - allows documentation with a hash - documents parameters - -Grape::Validations::Types::PrimitiveCoercer - #call - a type unknown in Dry-types - raises error on init - Numeric - coerces an empty string to nil - accepts a non-nil value - String - coerces to String - does not coerce an empty string to nil - DateTime - coerces an empty string to nil - the strict mode - BigDecimal - returns an error when the given value is not BigDecimal - returns a value as it is when the given value is BigDecimal - Boolean - returns a value as it is when the given value is Boolean - returns an error when the given value is not Boolean - Symbol - coerces an empty string to nil - Float - coerces an empty string to nil - BigDecimal - coerces to BigDecimal - coerces an empty string to nil - Boolean - returns an error when the given value cannot be coerced - coerces 'true' to true - coerces 'false' to false - coerces 'true' to true - coerces '0' to false - coerces '1' to true - coerces an empty string to nil - coerces 'false' to false - Time - coerces an empty string to nil - Integer - coerces an empty string to nil - accepts non-nil value +Grape::Validations::MultipleAttributesIterator + #each + when params is an array + yields each element of the array without the list of attrs + when params is a hash + yields the whole params hash without the list of attrs + when params is empty optional placeholder + does not yield it -Grape::DSL::Desc - .desc - sets a description - can be set with a block - can be set with options and a block +Grape::Middleware::Versioner::AcceptVersionHeader + succeeds if :strict is set to false + succeeds if :strict is not set + when :strict and cascade: false + fails with 406 Not Acceptable if header is not set + succeeds if proper header is set + fails with 406 Not Acceptable if header is empty + api.version + is set + is set if format provided + fails with 406 Not Acceptable if version is not supported + when :strict is set + fails with 406 Not Acceptable if header is empty + succeeds if proper header is set + fails with 406 Not Acceptable if header is not set -Grape::Endpoint - get - responds - put - responds +Grape::Validations::Validators::PresenceValidator + with reused parameter documentation once required and once optional + works with optional + works with required + with a required non-empty string + requires when empty + valid when set + requires when missing + with required parameters and no type + validates name, company + with multiple parameters per requires + validates for all defined params + with nested parameters + validates nested parameters + with a custom type + does not validate their type when it is missing + with a custom validation message + requires when empty + requires when missing + valid when set + without validation + does not validate for any params + with a required regexp parameter supplied in the POST body + validates id + with triply nested required parameters + validates triple nested parameters Grape::Endpoint - does not persist params between calls sets itself in the env upon call + does not persist params between calls allows explicit return calls resets all instance variables (except block) between calls - #redirect - redirects to a url with status 302 - allows for an optional redirect body override - support permanent redirect - has status code 303 if it is not get request and it is http 1.1 - #status - is callable from within a block - is set as default to 200 for get - is set as default to 201 for post + #headers + includes headers passed as symbols + includes additional request headers + includes request headers binary DEPRECATION WARNING: Use stream to use a Stream object. (called from block (4 levels) in at /build/reproducible-path/ruby-grape-2.0.0/spec/grape/endpoint_spec.rb:1001) suports stream objects in response - validation errors - returns the errors, and passes headers + request + includes version v1 + is set to the url requested + includes version v1 + includes prefix + instrumentation + notifies AS::N + #cookies + deletes cookies with path + sets and update browser cookies + deletes cookie + is callable from within a block + sets browser cookies and does not set response cookies anchoring - delete 204, with empty array has return value (no explicit body) + delete 200, with a return value (no explicit body) responds to /example delete method - delete 204 - anchors paths by default for the delete method - responds to /example/and/some/more for the non-anchored delete method - allows for the anchoring option with a delete method all other - anchors paths by default for the OPTIONS method - anchors paths by default for the HEAD method - responds to /example/and/some/more for the non-anchored OPTIONS method anchors paths by default for the PATCH method - allows for the anchoring option with a OPTIONS method - anchors paths by default for the POST method - responds to /example/and/some/more for the non-anchored POST method - allows for the anchoring option with a HEAD method - responds to /example/and/some/more for the non-anchored GET method - responds to /example/and/some/more for the non-anchored PUT method + responds to /example/and/some/more for the non-anchored OPTIONS method + responds to /example/and/some/more for the non-anchored PATCH method allows for the anchoring option with a GET method + responds to /example/and/some/more for the non-anchored GET method + responds to /example/and/some/more for the non-anchored HEAD method allows for the anchoring option with a PATCH method + anchors paths by default for the OPTIONS method allows for the anchoring option with a POST method - allows for the anchoring option with a PUT method - responds to /example/and/some/more for the non-anchored PATCH method + allows for the anchoring option with a HEAD method anchors paths by default for the GET method + allows for the anchoring option with a OPTIONS method + allows for the anchoring option with a PUT method + anchors paths by default for the HEAD method + anchors paths by default for the POST method + responds to /example/and/some/more for the non-anchored POST method + responds to /example/and/some/more for the non-anchored PUT method anchors paths by default for the PUT method - responds to /example/and/some/more for the non-anchored HEAD method + delete 204, with nil has return value (no explicit body) + responds to /example delete method + delete 204 + anchors paths by default for the delete method + allows for the anchoring option with a delete method + responds to /example/and/some/more for the non-anchored delete method delete 200, with response body responds to /example/and/some/more for the non-anchored delete method - delete 200, with a return value (no explicit body) - responds to /example delete method - delete 204, with nil has return value (no explicit body) + delete 204, with empty array has return value (no explicit body) responds to /example delete method - #cookies - deletes cookie - is callable from within a block - sets browser cookies and does not set response cookies - deletes cookies with path - sets and update browser cookies - #headers - includes request headers - includes headers passed as symbols - includes additional request headers - #error! - accepts a message - accepts an object and render it in format - can specifiy headers - accepts a code - does not merges additional headers with headers set after call - merges additional headers with headers set before call - sets the status code for the endpoint - accepts a frozen object - #header - is callable from within a block - #initialize - takes a settings stack, options, and a block #params - does not accept text/plain in JSON format if application/json is specified as content type parses from path segments + deeply converts nested params is available to the caller responds with a 415 for an unsupported content-type - deeply converts nested params - with special requirements - parses many params with provided regexps - parses email param with provided requirements for params - namespace requirements - overrides outer namespace's requirements - parse email param with provided requirements for params + does not accept text/plain in JSON format if application/json is specified as content type content type with params - does not response with 406 for same type without params responses with given content type in headers - sets a value to params - params - precedence - route string params have higher precedence than body params - route string params have higher precedence than URL params + does not response with 406 for same type without params from body parameters - does not convert empty JSON bodies to params converts JSON bodies to params - returns a 400 if given an invalid multipart body - converts XML bodies to params does not include parameters not defined by the body converts XML bodies to params - when the limit on multipart files is exceeded - returns a 413 if given too many multipart files - #params + returns a 400 if given an invalid multipart body + converts XML bodies to params + does not convert empty JSON bodies to params sets a value to params params - default class - is a ActiveSupport::HashWithIndifferentAccess - version headers - result in a 406 response if they cannot be parsed by rack-accept - result in a 406 response if they are invalid - instrumentation - notifies AS::N + with special requirements + parses email param with provided requirements for params + parses many params with provided regexps + namespace requirements + overrides outer namespace's requirements + parse email param with provided requirements for params + when the limit on multipart files is exceeded + returns a 413 if given too many multipart files + precedence + route string params have higher precedence than body params + route string params have higher precedence than URL params filters allows adding to response with present after filters - overrides the response body if it sets it does not override the response body with its return + overrides the response body if it sets it when terminating the response with error! - allows prior and parent filters of same type to run breaks normal call chain + allows prior and parent filters of same type to run before filters runs the before filter if set - request - includes version v1 - includes prefix - is set to the url requested - includes version v1 + version headers + result in a 406 response if they cannot be parsed by rack-accept + result in a 406 response if they are invalid + .before_each + is settable via reference + is able to stack helper + is able to override a helper + is settable via block + #initialize + takes a settings stack, options, and a block + #status + is set as default to 200 for get + is callable from within a block + is set as default to 201 for post + .generate_api_method + raises ArgumentError if a block is not given + returns a Proc + raises NameError if the method name is already in use + #header + is callable from within a block + #error! + does not merges additional headers with headers set after call + merges additional headers with headers set before call + accepts a code + accepts an object and render it in format + accepts a message + can specifiy headers + accepts a frozen object + sets the status code for the endpoint + validation errors + returns the errors, and passes headers + #params + default class + is a ActiveSupport::HashWithIndifferentAccess + sets a value to params + params #method_missing when referencing an undefined local variable raises NoMethodError but stripping the internals of the Grape::Endpoint class and including the API route when performing an undefined method of an instance inside the API raises NoMethodError but stripping the internals of the Object class - .generate_api_method - returns a Proc - raises ArgumentError if a block is not given - raises NameError if the method name is already in use - .before_each - is able to stack helper - is settable via block - is settable via reference - is able to override a helper + #redirect + redirects to a url with status 302 + support permanent redirect + has status code 303 if it is not get request and it is http 1.1 + allows for an optional redirect body override -Grape::Endpoint - get - invalid format - no format - json format +Grape::Validations::Validators::DefaultValidator + allows optional arrays to be omitted + sets default values for grouped arrays + lets you leave required values nested inside an optional blank + does not allows faulty optional arrays + set default values for optional params and allow to use required fields in the same time + allows optional arrays with optional params + set default value for optional param + set default values for missing params in the request + sets lambda based defaults at the time of call + set default values for optional params + array with default values and given conditions + applies the default values only if the conditions are met + optional group with defaults + optional hash without default value includes optional param with default value + does not fail even if invalid params is passed to default validator + returns nil for optional hash if param is not provided + optional array with default value includes optional param with default value + sets default value for optional array if param is not provided + optional array without default value includes optional param with default value + returns nil for optional array if param is not provided + optional hash with default value includes optional param with default value + sets own default value for inner param if parent param is provided + sets default value from parent defaults for inner param if parent param is not provided + sets default value for optional hash if param is not provided + optional with nil as value + structures types + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + primitive types + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + special types + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + respects the default value + variant-member-type collections + respects the default value + respects the default value + respects the default value + respects the default value + +Grape::API + with a global namespace function + works + +Grape::Validations::Validators::RegexpValidator + accepts valid input + accepts nil + custom validation message + accepts nil + accepts valid input + regexp with array + accepts nil instead of array + accepts valid items + refuses nil items + refuses empty items + refuses inapppopriate items + with invalid input + refuses inapppopriate + refuses empty + regexp with array + refuses inapppopriate items + refuses nil items + accepts nil instead of array + accepts valid items + refuses empty items + invalid input + refuses inapppopriate + refuses empty + nested regexp with array + refuses inapppopriate + +Grape::API::Helpers + overriding subclass + with lack of expected params + returns missing error + given expected params + overrides helpers from a superclass + non overriding subclass + given expected params + inherits helpers from a superclass + with lack of expected params + returns missing error + example subclass + with lack of expected params + returns missing error + given expected params + inherits helpers from a superclass + +Grape::Util::StackableValues + #[]= + can handle array values + sets a value + pushes further values + #[] + returns parent value when no value is set + parent values are not changed + returns an array of values + combines parent and actual values + #keys + returns all keys + returns merged keys with parent + #clone + copies all values + complex (i.e. not primitive) data types (ex. middleware, please see bug #930) + copies values; does not duplicate them + #delete + does not delete parent values + deletes a key + #to_hash + returns a Hash representation + +Grape::Validations::Validators::AllowBlankValidator + valid input + accepts empty when date allow_blank + accepts empty input when allow_blank is false + allows missing optional strings + accepts false when boolean allow_blank + accepts value when time allow_blank + accepts empty when symbol allow_blank + accepts empty when boolean allow_blank + accepts empty when datetime allow_blank + accepts empty input + accepts valid input + allow_blank when Numeric + accepts empty when float allow_blank + accepts empty when integer allow_blank + accepts empty when integer allow_blank + custom validation message + with invalid input + refuses empty string for an optional param + refuses empty string + refuses nil + refuses only whitespaces + with valid input + accepts false when boolean allow_blank + accepts empty when datetime allow_blank + accepts empty when symbol allow_blank + accepts valid input + accepts empty when date allow_blank + accepts empty input when allow_blank is false + accepts empty when boolean allow_blank + accepts empty input + allow_blank when Numeric + accepts empty when integer allow_blank + accepts empty when float allow_blank + accepts empty when integer allow_blank + in an optional group + as an optional param + accepts a nested missing optional value + accepts a missing group, even with a disallwed blank param + refuses a blank existing value in an existing scope + as a required param + refuses a blank value in an existing group + accepts a missing group, even with a disallwed blank param + accepts a nested missing date value + in a required group + as an optional param + refuses a blank existing value in an existing scope + refuses a string value in an optional hash group + accepts a nested missing value + as a required param + refuses a string value in a required hash group + refuses a blank value in a required existing group + in a required group + as an optional param + refuses a string value in an optional hash group + refuses a blank existing value in an existing scope + accepts a nested missing value + as a required param + refuses a string value in a required hash group + refuses a blank value in a required existing group + invalid input + refuses empty string + refuses nil + refuses missing + refuses only whitespaces + in an optional group + as a required param + accepts a nested missing date value + accepts a missing group, even with a disallwed blank param + refuses a blank value in an existing group + as an optional param + accepts a missing group, even with a disallwed blank param + refuses a blank existing value in an existing scope + accepts a nested missing optional value + +Grape::Util::ReverseStackableValues + #keys + returns merged keys with parent + returns all keys + #delete + does not delete parent values + deletes a key + #clone + copies all values + complex (i.e. not primitive) data types (ex. middleware, please see bug #930) + copies values; does not duplicate them + #[]= + can handle array values + sets a value + pushes further values + #to_hash + returns a Hash representation + #[] + returns an array of values + parent values are not changed + returns parent value when no value is set + combines parent and actual values (actual first) Grape::Parser + .builtin_parsers + includes json and xml parsers by default + returns an instance of Hash .parser_for calls .parsers returns parser correctly - when parser is available - returns registered parser if available when parser is an instance of Symbol returns an instance of Method returns object which can be called when parser does not exist returns nil - .builtin_parsers - returns an instance of Hash - includes json and xml parsers by default + when parser is available + returns registered parser if available .parsers includes built-in parsers returns an instance of Hash - with :parsers option - includes passed :parsers values with added parser by using `register` keyword includes added parser + with :parsers option + includes passed :parsers values + +Grape::DSL::Validations + .params + evaluates block + returns a ParamsScope + .reset_validations! + resets params + does not reset documentation description + resets declared params + resets validations + +Grape::Endpoint + get + routes to a path with multiple params with dots + routes to namespace and path params with dots, with merged requirements + routes to namespace and path params with dots, with overridden requirements + routes to a namespace param with dots + +Rack::Sendfile + when calling sendfile + contains Sendfile headers + when streaming non file content + not contains Sendfile headers + +Grape::Middleware::Stack + #use + pushes a middleware class with arguments onto the stack + pushes a middleware class onto the stack + pushes a middleware class with block arguments onto the stack + #insert_after + raises an error on an invalid index + inserts a middleware after another middleware class + inserts a middleware after an anonymous class given by its superclass + #concat + adds non :use specs to @others + calls +merge_with+ with the :use specs + #merge_with + applies a collection of operations and middlewares + middleware spec with proc declaration exists + properly forwards spec arguments + #insert + inserts a middleware class at the integer index + #insert_before + inserts a middleware before another middleware class + raises an error on an invalid index + inserts a middleware before an anonymous class given by its superclass + #build + returns a rack builder instance + when @others are present + applies the middleware specs stored in @others + +Grape +/build/reproducible-path/ruby-grape-2.0.0/lib/grape/eager_load.rb:20: warning: possibly useless use of :: in void context + eager_load! + compile! + +Grape::Validations::Validators::SameAsValidator + /custom-message + is the same + is expected to eq "" + is not the same + is expected to eq "password_confirmation not match" + / + is not the same + is expected to eq "password_confirmation is not the same as password" + is the same + is expected to eq "" + +Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder + in an api + #params + parses sub hash params + params are indifferent to symbol or string keys + responds to string keys + is a Hash + in an endpoint + #params + is of type Hash + +Grape::Endpoint + #declared; with multiple route_param + return :filter and :id parameters in declared for second enpoint inside route_param + return only :id without :artist_id + return only :artist_id without :id + return :compositor_id for mounter in route_param + #declared + has a optional param with default value all the time + does not include missing attributes if that option is passed + builds nested params + builds nested params when given array + builds arrays correctly + does not include missing attributes when there are nested hashes + shows nil for multiple allowed types if include_missing is true + stringifies if that option is passed + includes attributes with value that evaluates to nil + does not include renamed missing attributes if that option is passed + filters out any additional params that are given + includes attributes with value that evaluates to false + has as many keys as there are declared params + does not work in a before filter + includes missing attributes with defaults when there are nested hashes + shows nil for nested params if include_missing is true + when the param is missing and include_missing=true + includes all declared children when type=Hash + sets objects with type=Set to be a set + sets objects with type=Hash to be a hash + sets objects with type=Array to be an array + when the param is missing and include_missing=false + sets nested objects to be nil + when params are not built with default class + returns an object that corresponds with the params class - hash with indifferent access +W, [2025-05-31T15:36:00.113167 #1239600] WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#first defined in Enumerable. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method. +W, [2025-05-31T15:36:00.113853 #1239600] WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#first defined in Enumerable. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method. + returns an object that corresponds with the params class - hashie mash + returns an object that corresponds with the params class - hash + #declared; call from child namespace + is expected to eq 200 + without declaration + returns all requested parameters + with include_parent_namespaces: true + returns declared parameters from every parent namespace + with include_parent_namespaces: false + returns declared parameters only from current namespace + #declared; mixed nesting + can access parent route_param + #declared; from a nested mounted endpoint + can access parent attributes + parameter renaming + with a renamed hash with nested parameters + generates the correct parameter names for documentation + validates the renamed parameter correctly (original name) + maps the renamed parameter correctly (original name) + ignores the renamed parameter (as name) + with a deeply nested parameter structure + maps no parameters when none are given + maps the renamed parameter correctly + generates the correct parameter names for documentation + does not modify the request params + with a renamed hash with nested renamed parameter + ignores the renamed parameter (as name, 1) + ignores the renamed parameter (as name, 3) + ignores the renamed parameter (as name, 2) + maps the renamed parameter correctly (original name) + generates the correct parameter names for documentation + validates the renamed parameter correctly (original name) + with a renamed root parameter + ignores the renamed parameter (as name) + validates the renamed parameter correctly (original name) + generates the correct parameter names for documentation + maps the renamed parameter correctly (original name) + +Grape::Path + #path + uses the raw path after the namespace + uses the namespace after the mount path and root prefix + root_prefix + is not included when it is nil + is included after the mount path + mount_path + is not included when it is nil + is included when it is not nil + #path_with_suffix + combines the path and suffix + when using a specific format + might have a suffix with specified format + #uses_path_versioning? + is true when the version option is path + is false when the version option is header + is false when the version setting is nil + #initialize + remembers the namespace + remebers the settings + remembers the path + #suffix + when path versioning is not used + does not include a '/' when the path has a namespace + includes a '/' otherwise + does not include a '/' when the path has a path + when using a specific format + accepts specified format + when path versioning is used + includes a '/' + #root_prefix + splits the mount path + is nil when no root prefix setting exists + is nil when the mount path is nil + #namespace? + is false when the namespace is the root path + is false when the namespace is nil + is false when the namespace starts with whitespace + is true otherwise + #path? + is false when the path is the root path + is false when the path starts with whitespace + is true otherwise + is false when the path is nil + #mount_path + is nil when the mount path is nil + is nil when no mount path setting exists + splits the mount path + +Grape::API + an endpoint without documentation + does not document parameters for the endpoint + still declares params internally + an endpoint with documentation + documents parameters + allows documentation with a hash + +Grape::Middleware::Versioner + recognizes :param + recognizes :header + recognizes :path + recognizes :accept_version_header + +Grape::Endpoint + get + no format + invalid format + json format + +Grape::Exceptions::Validation + fails when params are missing + when message is a String + does not store the message_key + when message is a symbol + stores message_key + +Grape::Validations::ParamsScope + raises an error if the dependent parameter was never specified + includes deeply nested parameters within #declared(params) + returns a sensible error message within a nested context + includes the nested parameter within #declared(params) + includes level 2 nested parameters outside the given within #declared(params) + coercing values validation with proc + allows the proc to pass validation without checking +DEPRECATION WARNING: The values validator except option is deprecated. Use the except validator instead. (called from new at /build/reproducible-path/ruby-grape-2.0.0/lib/grape/validations/validator_factory.rb:7) + allows the proc to pass validation without checking in except + allows the proc to pass validation without checking in value + when validations are dependent on a parameter + allows renaming of dependent parameters + includes the parameter within #declared(params) + returns a sensible error message within a nested context + does not raise if the dependent parameter is not the renamed one + includes the nested parameter within #declared(params) + allows renaming of dependent on parameter + applies the validations of multiple parameters + applies the validations only if the parameter is present + does not raise an error if when using nested given + includes level 2 nested parameters outside the given within #declared(params) + does not raise an error if the dependent parameter is a Hash + applies only the appropriate validation + detect unmet nested dependency + allows nested dependent parameters + raises an error if the dependent parameter was never specified + raises an error if the dependent parameter is the renamed one + does not validate nested requires when given is false + when the dependent parameter is not present #declared(params) + nested given parameter within an array param + evaluate_given_false + evaluate_given_true + lateral parameter within lateral hash parameter + evaluate_given_true + evaluate_given_false + lateral parameter + evaluate_given_false + evaluate_given_true + lateral parameter within an array param + evaluate_given_true + evaluate_given_false + lateral hash parameter + evaluate_given_true + evaluate_given_false + nested given parameter within a nested given parameter within an array param + evaluate_given_false + evaluate_given_true + nested given parameter + evaluate_given_true + evaluate_given_false + parameters in group + allows Hash as type + handles missing optional Array type + allows Array as type + errors when no type is provided + errors with an unsupported type + when validations are dependent on a parameter with specific value + (case 12) + includes the parameter within #declared(params) + skips validation when base param does not have a specified value + applies the validation when base param has the specific value + (case 1) + skips validation when base param is missing + applies the validation when base param has the specific value + skips validation when base param does not have a specified value + includes the parameter within #declared(params) + (case 4) + skips validation when base param does not have a specified value + skips validation when base param is missing + includes the parameter within #declared(params) + applies the validation when base param has the specific value + (case 2) + includes the parameter within #declared(params) + skips validation when base param does not have a specified value + skips validation when base param is missing + applies the validation when base param has the specific value + (case 13) + includes the parameter within #declared(params) + skips validation when base param does not have a specified value + applies the validation when base param has the specific value + (case 7) + skips validation when base param is missing + applies the validation when base param has the specific value + skips validation when base param does not have a specified value + includes the parameter within #declared(params) + (case 0) + skips validation when base param is missing + skips validation when base param does not have a specified value + applies the validation when base param has the specific value + includes the parameter within #declared(params) + (case 14) + applies the validation when base param has the specific value + skips validation when base param does not have a specified value + includes the parameter within #declared(params) + (case 10) + skips validation when base param does not have a specified value + includes the parameter within #declared(params) + applies the validation when base param has the specific value + (case 11) + applies the validation when base param has the specific value + includes the parameter within #declared(params) + skips validation when base param does not have a specified value + (case 6) + applies the validation when base param has the specific value + includes the parameter within #declared(params) + skips validation when base param does not have a specified value + skips validation when base param is missing + (case 8) + skips validation when base param does not have a specified value + includes the parameter within #declared(params) + applies the validation when base param has the specific value + (case 9) + includes the parameter within #declared(params) + skips validation when base param does not have a specified value + applies the validation when base param has the specific value + (case 3) + skips validation when base param is missing + applies the validation when base param has the specific value + includes the parameter within #declared(params) + skips validation when base param does not have a specified value + (case 15) + applies the validation when base param has the specific value + skips validation when base param does not have a specified value + includes the parameter within #declared(params) + (case 5) + applies the validation when base param has the specific value + includes the parameter within #declared(params) + skips validation when base param is missing + skips validation when base param does not have a specified value + when validations are dependent on a parameter within an array param + passes none Hash params + array without coerce type explicitly given + raises exception when range values have different endpoint types + fails to call API without Array type + sets the type based on first element + raises exception when values are of different type + param renaming + is expected to eq "foo is empty" + is expected to eq "{\"baz\":{\"qux\":\"any\"}}" + renaming can be defined before default + is expected to eq "any-any2" + renaming can be defined after default + is expected to eq 200 + is expected to eq "-there we go" + default value in given block + when dependency does not meet + does not set default value for dependent parameter + when dependency meets + sets default value for dependent parameter + with exactly_one_of validation for optional parameters within an Hash param + when correct data is provided + returns a successful response + when invalid data is provided + returns a failure response + when params have group attributes + with types + when created_at receives a valid date + returns a date + returns a successful response + when invalid date provided + returns a validation error + responds with HTTP error + with nested groups + when data is invalid + returns a validation error + responds with HTTP error + when correct data is provided + returns a successful response + with several group attributes + when data is invalid + responds with HTTP error + returns a validation error + when correct data is provided + returns a successful response + with validations + when parameter has the same validator as a group + prioritizes parameter validation over group validation + returns a successful response + when data is invalid + applies group validations for every parameter + returns a validation error + when validations are dependent on a parameter within an array param within #declared(params).to_json + applies the constraint within each value + when using custom types + coerces the parameter via the type's parse method + with range values + when both range endpoints are #kind_of? the type + accepts values in the range + rejects values outside the range + when the default is an array + and is the entire range of allowed values + does not raise an exception + and is a subset of allowed values + does not raise an exception + when right range endpoint isn't #kind_of? the type + raises exception + when left range endpoint isn't #kind_of? the type + raises exception + failing fast + when fail_fast is not defined + does not stop validation + when fail_fast is defined it stops the validation + of other params + for a single param + +Grape::Validations::Validators::AtLeastOneOfValidator + #validate! + when a subset of restricted params are present + does not return a validation error + when all restricted params are present + does not return a validation error + mixed with other params + does not return a validation error + when exactly one of the restricted params is selected + does not return a validation error + when none of the restricted params is selected + returns a validation error + when custom message is specified + returns a validation error + when restricted params are nested inside hash + when none of them are present + returns a validation error with full names of the params + when at least one of them is present + does not return a validation error + when restricted params are deeply nested + when at least one of them is present + does not return a validation error + when none of them are present + returns a validation error with full names of the params + when restricted params are nested inside array + when at least one of them is present + does not return a validation error + when none of them are present + returns a validation error with full names of the params + +Grape::Middleware::Auth::Base + throws a 401 is wrong auth is given + authenticates if given valid creds + +Grape::Validations::Types + ::custom? + returns true if the type responds to :parse with one argument + returns false if the type's #parse method takes other than one argument + returns false if the type does not respond to :parse + ::structure? + recognizes Array as a structure + recognizes Hash as a structure + recognizes Set as a structure + ::primitive? + recognizes Time as a primitive + recognizes DateTime as a primitive + recognizes Symbol as a primitive + recognizes Numeric as a primitive + identifies unknown types + recognizes Grape::API::Boolean as a primitive + recognizes Date as a primitive + recognizes Float as a primitive + recognizes String as a primitive + recognizes BigDecimal as a primitive + recognizes Integer as a primitive + ::special? + provides special handling for JSON + provides special handling for Rack::Multipart::UploadedFile + provides special handling for [JSON] + provides special handling for File + special types + when Array[JSON] + is expected to eq Grape::Validations::Types::JsonArray + when Rack::Multipart::UploadedFile + is expected to eq Grape::Validations::Types::File + when File + is expected to eq Grape::Validations::Types::File + when JSON + is expected to eq Grape::Validations::Types::Json + ::build_coercer + has internal cache variables + caches the result of the build_coercer method + +Grape::DSL::Settings + #unset + deletes a key from settings + #namespace_setting + delegates to get_or_set + sets a value until the end of a namespace + resets values after leaving nested namespaces + #api_class_setting + delegates to get_or_set + #get_or_set + sets a values + returns a value when nil is new value is provided + #route_setting + sets a value until the next route + delegates to get_or_set + #namespace_stackable + stacks values from surrounding namespace + delegates to get_or_set + #global_setting + delegates to get_or_set + #unset_global_setting + delegates to unset + #unset_namespace_setting + delegates to unset + #unset_namespace_stackable + delegates to unset + #namespace_inheritable + inherits values from surrounding namespace + delegates to get_or_set + complex scenario + plays well + #unset_api_class_setting + delegates to unset + #within_namespace + calls start and end for a namespace + returns the last result + #unset_namespace_inheritable + delegates to unset + #unset_route_setting + delegates to unset + +Grape::Http::Headers + is expected to eq "Transfer-Encoding" + is expected to eq "Allow" + is expected to eq "Location" + is expected to eq "X-Cascade" + +Grape::API + remounting an API + with a defined route + when mounting twice + can access the votes in both places + when mounting one instance + can access the endpoint + when mounting on namespace + can access the votes in both places + with dynamic configuration + when the configuration is read in a helper + will use the dynamic configuration on all routes + a very complex configuration example + when should be mounted is nil + gets a response + when it should not be mounted + gets a response + when the namespace should be mounted + gets a response + when the configuration is part of the arguments of a method + mounts the endpoint in the location it is configured + when the configuration is the value in a key-arg pair + takes the param from the configuration + when using an expression derived from a configuration + does not mount the endpoint with a null name + mounts the endpoint with the name + when the expression lives in a namespace + mounts the endpoint with the name + does not mount the endpoint with a null name + when mounting an endpoint conditional on a configuration + mounts the endpoints only when configured to do so + when executing a custom block on mount + mounts the endpoints only when configured to do so + when the configuration is read within a namespace + will use the dynamic configuration on all routes + when the params are configured via a configuration + when the configured param is my_attr + requires the configured params + on the DescSCope + mounts the endpoint with the appropiate tags + on the ParamScope + mounts the endpoint in the location it is configured + on dynamic checks + can read the configuration on lambdas + when the configuration is read within the response block + will use the dynamic configuration on all routes + when executing a standard block within a `mounted` block with all dynamic params + mounts the API and obtains the description and headers definition + +Grape::Endpoint + put + responds + get + responds without ext + responds with ext + +Grape::DSL::Helpers + .helpers + uses many provided modules + uses provided modules + adds a module with the given block + with an external file + sets Boolean as a Grape::API::Boolean + in child classes + is available + +Grape::Validations::Validators::Base + #inherited + when validator's underscored name ends with _validator + registers the custom validator with short name not ending with validator + when validator is anonymous + does not register the validator + when validator's underscored name does not end with _validator + registers the custom validator with a short name + +Grape::Util::InheritableValues + #to_hash + returns a Hash representation + #delete + deletes a key + does not delete parent values + #[] + parent values are not changed + returns parent value when no value is set + returns a value + overwrites parent value with the current one + #clone + complex (i.e. not primitive) data types (ex. entity classes, please see bug #891) + copies values; does not duplicate them + #[]= + sets a value + +Grape::Exceptions::UnsupportedGroupType + Grape::Exceptions::UnsupportedGroupTypeError + behaves like deprecated class + raises an ActiveSupport::DeprecationException + #message + is expected to include "group type must be Array, Hash, JSON or Array[JSON]" + +Grape::Middleware::Error + sets the error message appropriately + has a default message + defaults to a 500 status + sets the status code appropriately + sets the status code based on the rack util status code symbol + with http code + presents an error message + adds the status code if wanted Grape::Extensions::Hashie::Mash::ParamBuilder in an endpoint @@ -5370,46 +4901,551 @@ in a nested namespace api is Hashie::Mash -Grape::Middleware::Versioner - recognizes :param - recognizes :accept_version_header - recognizes :path - recognizes :header +Grape::Exceptions::MissingOption + #message + contains the problem in the message -Grape::API - works for specified format - works for unspecified format - doesn't work for format different than specified +Grape::Exceptions::InvalidFormatter + #message + contains the problem in the message -Grape::Exceptions::ValidationErrors - message - is not repeated - is expected to eq 1 - is expected to include "FooBar is invalid" - initialize - assigns headers through base class - #full_messages - with errors - returns an array with each errors full message - when attributes is an array of symbols - returns an array with an error full message - api - can return structured json with separate fields +Validator with instance variables + passes validation every time + +Grape::Endpoint + #file + set + as object (backward compatibility) + emits a warning that this method is deprecated +DEPRECATION WARNING: Use stream to use a Stream object. (called from block (5 levels) in at /build/reproducible-path/ruby-grape-2.0.0/spec/grape/dsl/inside_route_spec.rb:235) + forwards the call to stream + as file path + emits a warning that this method is deprecated +DEPRECATION WARNING: Use sendfile or stream to send files. (called from block (5 levels) in at /build/reproducible-path/ruby-grape-2.0.0/spec/grape/dsl/inside_route_spec.rb:219) + forwards the call to sendfile + get +DEPRECATION WARNING: Use sendfile or stream to send files. (called from block (4 levels) in at /build/reproducible-path/ruby-grape-2.0.0/spec/grape/dsl/inside_route_spec.rb:250) + fowards call to sendfile + emits a warning that this method is deprecated + #declared + is not available by default + #redirect + default + sets status to 302 + sets location header + permanent + sets status to 301 + sets location header + #cookies + returns an instance of Cookies + #content_type + returns default + set + returns value + #body + returns default + set + returns value + false + sets status to 204 + #route + returns route_info + #present + multiple entities + instance + presents both dummy objects + dummy + presents dummy object + with + entity + instance + presents dummy object + non mergeable entity + instance + fails + #version + returns env[api.version] + defaults to nil + #return_no_content + sets the status code and body + #sendfile + returns default + set + as file path + returns value wrapped in StreamResponse + does not change the Content-Length header + does not change the Transfer-Encoding header + sends no deprecation warnings + does not change the Cache-Control header + as object + raises an error that only a file path is supported + #error! + throws :error + default_error_status + sets status to default_error_status + thrown + sets status + #status + raises error if unknow symbol is passed + defaults to 200 on GET + defaults to 200 on DELETE with a body present + defaults to 200 on GET + accepts unknown Integer status codes + raises error if status is not a integer or symbol + defaults to 200 on GET + returns status set + accepts symbol for status + defaults to 204 on DELETE + defaults to 201 on POST + #stream + returns default + set + as a non-stream object + raises an error that the object must implement :each + as a stream object + sets Cache-Control header to no-cache + emits no deprecation warnings + sets Transfer-Encoding header to nil + returns value wrapped in StreamResponse + sets Content-Length header to nil + as a file path + sets Cache-Control header to no-cache + sets Content-Length header to nil + emits no deprecation warnings + does not change Cache-Control header + returns file body wrapped in StreamResponse + sets Transfer-Encoding header to nil + +Grape::Exceptions::Base + #message + is expected to eq "a_message" + #to_s + is expected to eq "a_message" + #compose_message + when I18n does not enforce available locales + when the fallback locale is available + returns the translated message + when the fallback locale is not available + returns the translated message + when I18n enforces available locales + when the fallback locale is not available + returns the translation string + when the fallback locale is available + returns the translated message + +Grape::Exceptions::MissingGroupType + Grape::Exceptions::MissingGroupTypeError + behaves like deprecated class + raises an ActiveSupport::DeprecationException + #message + is expected to include "group type is required" + +Grape::DSL::Middleware + .insert_before + adds a middleware with the right operation + .use + adds a middleware with the right operation + .insert_after + adds a middleware with the right operation + .insert + adds a middleware with the right operation + .middleware + returns the middleware stack Grape::Exceptions::UnknownOptions #message contains the problem in the message +Grape::Validations + using a custom validator with message_key + fails with message + using a custom request/param validator + fails when we send admin fields and we are not admin + does not fail when we send admin fields and we are admin + does not fail when we send non-admin and admin=false fields only + fail when non-admin user sets an admin field + does not fail when we send non-admin fields only + using a custom length validator + specified in the query string + under 140 characters + over 140 characters + Grape::Validations::Base + behaves like deprecated class + raises an ActiveSupport::DeprecationException + using a custom body-only validator + ignores field in query + allows field in body + +Grape::Extensions::Hash::ParamBuilder + in an api + symbolizes params keys + symbolizes the params + #params + is Hash + in an endpoint + #params + is of type Hash + +Grape::Validations::SingleAttributeIterator + #each + when params is a hash + yields params and every single attribute from the list + when params is an array + yields every single attribute from the list for each of the array elements + empty values + marks params with empty values + when missing optional value + does not yield skipped values + +Grape::Exceptions::InvalidAcceptHeader + API with cascade=true and with rescue_from :all handler and http_codes + that receives + an invalid vendor in the request + behaves like a cascaded request + does not find a matching route + an invalid version in the request + behaves like a cascaded request + does not find a matching route + that received a request with correct vendor and version + behaves like a valid request + does return with status 200 + does return the expected result + API with cascade=true and without a rescue handler + that receives + an invalid version in the request + behaves like a cascaded request + does not find a matching route + an invalid vendor in the request + behaves like a cascaded request + does not find a matching route + that received a request with correct vendor and version + behaves like a valid request + does return with status 200 + does return the expected result + API with cascade=true and rescue_from :all handler + that received a request with correct vendor and version + behaves like a valid request + does return with status 200 + does return the expected result + that receives + an invalid version in the request + behaves like a cascaded request + does not find a matching route + an invalid vendor in the request + behaves like a cascaded request + does not find a matching route + API with cascade=false and without a rescue handler + that receives + an invalid vendor in the request + behaves like a not-cascaded request + does not include the X-Cascade=pass header + does not accept the request + an invalid version in the request + behaves like a not-cascaded request + does not include the X-Cascade=pass header + does not accept the request + that received a request with correct vendor and version + behaves like a valid request + does return with status 200 + does return the expected result + API with cascade=true, http_codes but without a rescue handler + that receives + an invalid version in the request + behaves like a cascaded request + does not find a matching route + an invalid vendor in the request + behaves like a cascaded request + does not find a matching route + that received a request with correct vendor and version + behaves like a valid request + does return the expected result + does return with status 200 + API with cascade=false, http_codes but without a rescue handler + that receives + an invalid vendor in the request + behaves like a not-cascaded request + does not accept the request + does not include the X-Cascade=pass header + an invalid version in the request + behaves like a not-cascaded request + does not include the X-Cascade=pass header + does not accept the request + that received a request with correct vendor and version + behaves like a valid request + does return with status 200 + does return the expected result + API with cascade=false and with rescue_from :all handler and http_codes + that receives + an invalid vendor in the request + behaves like a rescued request + does not include the X-Cascade=pass header + does show rescue handler processing + that received a request with correct vendor and version + behaves like a valid request + does return with status 200 + does return the expected result + API with cascade=false and rescue_from :all handler + that receives + an invalid vendor in the request + behaves like a rescued request + does not include the X-Cascade=pass header + does show rescue handler processing + that received a request with correct vendor and version + behaves like a valid request + does return the expected result + does return with status 200 + +Grape::DSL::Desc + .desc + sets a description + can be set with a block + can be set with options and a block + +Grape::Middleware::Formatter + serialization + looks at the bodies for possibly serializable data + xml + calls #to_xml if the content type is xml + default format + calls #to_json since default format is json + jsonapi + calls #to_json if the content type is jsonapi + custom parser raises exception and rescue options are enabled for backtrace and original_exception + adds the backtrace and original_exception to the error output + input + ignores multipart/related + ignores multipart/form-data + ignores multipart/mixed + rewinds IO + ignores multipart/related + ignores multipart/related + ignores multipart/mixed + rewinds IO + rewinds IO + parses the chunked body from DELETE and copies values into rack.request.from_hash + ignores multipart/mixed + parses the chunked body from POST and copies values into rack.request.from_hash + ignores application/x-www-form-urlencoded + ignores multipart/related + rewinds IO + ignores application/x-www-form-urlencoded + parses the chunked body from PATCH and copies values into rack.request.from_hash + parses the body from an xml PUT and copies values into rack.request.from_hash + parses the chunked body from PUT and copies values into rack.request.from_hash + parses the body from an xml DELETE and copies values into rack.request.from_hash + ignores multipart/form-data + ignores multipart/form-data + ignores application/x-www-form-urlencoded + ignores application/x-www-form-urlencoded + ignores multipart/mixed + ignores multipart/form-data + parses the body from an xml POST and copies values into rack.request.from_hash + parses the body from an xml PATCH and copies values into rack.request.from_hash + when body is empty + does not read and parse the body + when body is nil + does not read and parse the body + application/json + parses the body from PUT and copies values into rack.request.form_hash + when body is nil + does not read and parse the body + when body is not nil or empty + when Content-Type is supported + parses the body from PUT and copies values into rack.request.form_hash + when Content-Type is not supported + returns a 415 HTTP error status + application/json + parses the body from PATCH and copies values into rack.request.form_hash + application/json; charset=utf-8 + parses the body from PATCH and copies values into rack.request.form_hash + application/json + parses the body from POST and copies values into rack.request.form_hash + when body is empty + does not read and parse the body + application/json + parses the body from DELETE and copies values into rack.request.form_hash + when body is empty + does not read and parse the body + application/json; charset=utf-8 + parses the body from PUT and copies values into rack.request.form_hash + when body is nil + does not read and parse the body + when body is empty + does not read and parse the body + when body is nil + does not read and parse the body + when body is not nil or empty + when Content-Type is not supported + returns a 415 HTTP error status + when Content-Type is supported + parses the body from POST and copies values into rack.request.form_hash + application/json; charset=utf-8 + parses the body from DELETE and copies values into rack.request.form_hash + when body is not nil or empty + when Content-Type is supported + parses the body from PATCH and copies values into rack.request.form_hash + when Content-Type is not supported + returns a 415 HTTP error status + when body is not nil or empty + when Content-Type is not supported + returns a 415 HTTP error status + when Content-Type is supported + parses the body from DELETE and copies values into rack.request.form_hash + application/json; charset=utf-8 + parses the body from POST and copies values into rack.request.form_hash + error handling + rescues formatter-specific exceptions +caught error of type StandardError in after callback inside Grape::Middleware::Formatter : StandardError + does not rescue other exceptions + format + uses custom formatter + uses custom json formatter + default + uses default json formatter + detection + uses the json extension if one is provided + uses the file extension format if provided before headers + uses the xml extension if one is provided + uses the format parameter if one is provided + uses the requested format if provided in headers + uses the default format if none is provided + content-type + is set for json + is set for xml + is set for txt + is set for vendored with registered type + is set for custom + is set to closest generic for custom vendored/versioned without registered type + inheritable formatters + returns response by invalid formatter + no content responses + does not modify a 132 response + does not modify a 160 response + does not modify a 157 response + does not modify a 156 response + does not modify a 149 response + does not modify a 166 response + does not modify a 183 response + does not modify a 154 response + does not modify a 174 response + does not modify a 120 response + does not modify a 144 response + does not modify a 102 response + does not modify a 187 response + does not modify a 122 response + does not modify a 172 response + does not modify a 198 response + does not modify a 121 response + does not modify a 155 response + does not modify a 167 response + does not modify a 124 response + does not modify a 148 response + does not modify a 178 response + does not modify a 108 response + does not modify a 182 response + does not modify a 125 response + does not modify a 173 response + does not modify a 304 response + does not modify a 101 response + does not modify a 146 response + does not modify a 126 response + does not modify a 165 response + does not modify a 196 response + does not modify a 116 response + does not modify a 119 response + does not modify a 104 response + does not modify a 195 response + does not modify a 135 response + does not modify a 136 response + does not modify a 163 response + does not modify a 175 response + does not modify a 188 response + does not modify a 179 response + does not modify a 152 response + does not modify a 204 response + does not modify a 123 response + does not modify a 129 response + does not modify a 150 response + does not modify a 113 response + does not modify a 112 response + does not modify a 114 response + does not modify a 169 response + does not modify a 127 response + does not modify a 191 response + does not modify a 151 response + does not modify a 110 response + does not modify a 162 response + does not modify a 107 response + does not modify a 177 response + does not modify a 137 response + does not modify a 117 response + does not modify a 105 response + does not modify a 128 response + does not modify a 192 response + does not modify a 143 response + does not modify a 164 response + does not modify a 118 response + does not modify a 106 response + does not modify a 159 response + does not modify a 158 response + does not modify a 186 response + does not modify a 130 response + does not modify a 142 response + does not modify a 145 response + does not modify a 181 response + does not modify a 138 response + does not modify a 109 response + does not modify a 103 response + does not modify a 153 response + does not modify a 131 response + does not modify a 147 response + does not modify a 189 response + does not modify a 134 response + does not modify a 193 response + does not modify a 197 response + does not modify a 161 response + does not modify a 111 response + does not modify a 133 response + does not modify a 115 response + does not modify a 139 response + does not modify a 185 response + does not modify a 199 response + does not modify a 180 response + does not modify a 141 response + does not modify a 168 response + does not modify a 176 response + does not modify a 171 response + does not modify a 140 response + does not modify a 170 response + does not modify a 184 response + does not modify a 190 response + does not modify a 194 response + does not modify a 100 response + send file + returns a file response + accept header detection + parses headers with symbols as hash keys + ignores invalid quality rankings + ensures that a quality of 0 is less preferred than any other content type + parses headers with other attributes + handles quality rankings mixed with nothing + detects from the Accept header + handles quality rankings that have a default 1.0 value + uses quality rankings to determine formats + parses headers with vendor and api version + with custom vendored content types + uses the custom type + Pending: (Failures listed here are expected and do not affect your suite's status) 1) MultiJson uses multi_json # Temporarily skipped with xit # ./spec/integration/multi_json/json_spec.rb:4 -Finished in 21.69 seconds (files took 3.87 seconds to load) +Finished in 7.36 seconds (files took 1.35 seconds to load) 2171 examples, 0 failures, 1 pending -Randomized with seed 64893 +Randomized with seed 11886 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -5440,12 +5476,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/1217687/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/1217687/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/2162559 and its subdirectories -I: Current time: Fri May 30 13:35:09 -12 2025 -I: pbuilder-time-stamp: 1748655309 +I: removing directory /srv/workspace/pbuilder/1217687 and its subdirectories +I: Current time: Sat May 31 15:36:06 +14 2025 +I: pbuilder-time-stamp: 1748655366