Diff of the two buildlogs: -- --- b1/build.log 2024-05-10 22:28:48.217175526 +0000 +++ b2/build.log 2024-05-10 22:31:02.427462708 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Fri May 10 10:25:35 -12 2024 -I: pbuilder-time-stamp: 1715379935 +I: Current time: Fri Jun 13 18:51:51 +14 2025 +I: pbuilder-time-stamp: 1749790311 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration @@ -31,51 +31,83 @@ 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/2260379/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/3047605/tmp/hooks/D01_modify_environment starting +debug: Running on infom02-amd64. +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 Jun 13 04:52 /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/3047605/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/3047605/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='amd64' - 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]="x86_64-pc-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=amd64 + DEBIAN_FRONTEND=noninteractive DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=12 ' - DISTRIBUTION='unstable' - HOME='/root' - HOST_ARCH='amd64' + DIRSTACK=() + DISTRIBUTION=unstable + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=x86_64 + HOST_ARCH=amd64 IFS=' ' - INVOCATION_ID='4e4704eed3d7474ea661763025d30ca5' - 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='2260379' - PS1='# ' - PS2='> ' + INVOCATION_ID=85ebce29daca47cf902eb5610e387ae3 + LANG=C + LANGUAGE=et_EE:et + LC_ALL=C + MACHTYPE=x86_64-pc-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=3047605 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.meBaaJHO/pbuilderrc_jle6 --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.meBaaJHO/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' + 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.meBaaJHO/pbuilderrc_xlbV --distribution unstable --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.meBaaJHO/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' I: uname -a - Linux infom01-amd64 6.1.0-21-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64 GNU/Linux + Linux i-capture-the-hostname 6.6.13+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.6.13-1~bpo12+1 (2024-02-15) x86_64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 May 10 07:49 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/2260379/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Jun 12 14:07 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/3047605/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -323,7 +355,7 @@ Get: 176 http://deb.debian.org/debian unstable/main amd64 ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.3 kB] Get: 177 http://deb.debian.org/debian unstable/main amd64 ruby-rspec all 3.13.0c0e0m0s1-2 [5184 B] Get: 178 http://deb.debian.org/debian unstable/main amd64 ruby-test-prof all 0.12.2+dfsg-1 [42.8 kB] -Fetched 49.9 MB in 2s (25.0 MB/s) +Fetched 49.9 MB in 1s (58.4 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libpython3.11-minimal:amd64. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19700 files and directories currently installed.) @@ -910,8 +942,8 @@ Setting up tzdata (2024a-4) ... Current default time zone: 'Etc/UTC' -Local time is now: Fri May 10 22:27:45 UTC 2024. -Universal Time is now: Fri May 10 22:27:45 UTC 2024. +Local time is now: Fri Jun 13 04:53:24 UTC 2025. +Universal Time is now: Fri Jun 13 04:53:24 UTC 2025. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up autotools-dev (20220109.1) ... @@ -1069,7 +1101,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/3047605/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for unstable +I: user script /srv/workspace/pbuilder/3047605/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 @@ -1101,7 +1137,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/d20240510-2277425-f6sf9e/gemspec +/usr/bin/ruby3.1 -S gem build --config-file /dev/null --verbose /tmp/d20250613-3061905-25ygw4/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: @@ -1121,7 +1157,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/d20240510-2277425-f6sf9e/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/d20250613-3061905-25ygw4/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 @@ -1304,2944 +1340,793 @@ /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 13818 +Randomized with seed 8025 -Grape::Validations::Validators::SameAsValidator - / - is the same - is expected to eq "" - is not the same - is expected to eq "password_confirmation is not the same as password" - /custom-message - is the same - is expected to eq "" - is not the same - is expected to eq "password_confirmation not match" - -Grape::API - execute first request in reasonable time - -Grape::Exceptions::UnknownOptions +Grape::Exceptions::MissingMimeType #message contains the problem in the message + contains the resolution in the message -Grape::Validations - 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 - does not fail when we send admin fields and we are admin - 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 - using a custom length validator - under 140 characters - over 140 characters - specified in the query string - using a custom validator with message_key - fails with message - Grape::Validations::Base - behaves like deprecated class - raises an ActiveSupport::DeprecationException - -Grape::Util::ReverseStackableValues - #keys - returns merged keys with parent - returns all keys - #to_hash - returns a Hash representation - #delete - deletes a key - does not delete parent values - #clone - copies all values - complex (i.e. not primitive) data types (ex. middleware, please see bug #930) - copies values; does not duplicate them - #[] - parent values are not changed - returns parent value when no value is set - combines parent and actual values (actual first) - returns an array of values - #[]= - sets a value - pushes further values - can handle array values - -Grape::Middleware::Versioner::Header - succeeds if :strict is set to false and given an invalid header - succeeds if :strict is not set - succeeds if :strict is set to false - 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 application/xml - fails with 406 Not Acceptable if header is empty - fails with 406 Not Acceptable if header contains a single invalid accept - when multiple versions are specified - fails with another version - succeeds with v1 - succeeds with v2 - api.type and api.subtype - sets preferred type - sets preferred type and subtype - sets type and subtype to first choice of content type if no preference given - api.version - is set - fails with 406 Not Acceptable if version is invalid - is set if format provided - api.vendor - is set - fails with 406 Not Acceptable if vendor is invalid - is set if format provided - when version is set - is set - is set if format provided - fails with 406 Not Acceptable if vendor is invalid - api.format - is nil if not provided - is set - when version is set to v1 - is set - is nil if not provided - when version is set to v1 - is set - is nil if not provided - with missing vendor option - fails - when :strict is set - succeeds if proper header is set - fails with 406 Not Acceptable if header is not set - fails with 406 Not Acceptable if header is empty - 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 v2 request - responds correctly to a v1 request - -Grape::API::Helpers - overriding subclass - given expected params - overrides helpers from a superclass - with lack of expected params - returns missing error - non overriding subclass - with lack of expected params - returns missing error - given expected params - inherits helpers from a superclass - example subclass - given expected params - inherits helpers from a superclass - with lack of expected params - returns missing error - -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::API + with a global namespace function + works -Grape::DSL::Parameters - #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 - #group - is alias to #requires - #mutually_exclusive - adds an mutally exclusive parameter validation - #includes - is alias to #use - #all_or_none_of - adds an all or none of parameter validation - #use_scope - is alias to #use - #with - creates a scope with group attributes - #at_least_one_of - adds an at least one of parameter validation - #requires - adds a required parameter - #use - calls processes associated with named params - raises error when non-existent named param is called - #exactly_one_of - adds an exactly of one parameter validation - #optional - adds an optional parameter +Grape::Middleware::Error + sets the status code appropriately + has a default message + defaults to a 500 status + sets the error message appropriately + sets the status code based on the rack util status code symbol + with http code + adds the status code if wanted + presents an error message 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" + is expected to eq "Allow" + is expected to eq "Transfer-Encoding" -Grape::Endpoint - get - responds without ext - responds with ext - put - responds - -Grape::Exceptions::InvalidResponse - #message - contains the problem in the message - -Grape::Exceptions::InvalidVersionerOption - #message - contains the problem in the message - -Grape::Endpoint - #declared - shows nil for multiple allowed types if include_missing is true - includes missing attributes with defaults when there are nested hashes - has as many keys as there are declared params - filters out any additional params that are given - includes attributes with value that evaluates to false - builds nested params when given array - includes attributes with value that evaluates to nil - builds arrays correctly - shows nil for nested params if include_missing is true - stringifies if that option is passed - does not include renamed missing attributes if that option is passed - builds nested params - does not include missing attributes when there are nested hashes - does not work in a before filter - does not include missing attributes if that option is passed - has a optional param with default value all the time - when the param is missing and include_missing=true - sets objects with type=Array to be an array - 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 - when params are not built with default class - returns an object that corresponds with the params class - hash with indifferent access - returns an object that corresponds with the params class - hash -W, [2024-05-10T10:28:35.211926 #2277570] 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, [2024-05-10T10:28:35.212522 #2277570] 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 - when the param is missing and include_missing=false - sets nested objects to be nil - #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; 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 - parameter renaming - with a renamed root parameter - ignores the renamed parameter (as name) - generates the correct parameter names for documentation - maps the renamed parameter correctly (original name) - validates the renamed parameter correctly (original name) - with a renamed hash with nested renamed parameter - validates the renamed parameter correctly (original name) - maps the renamed parameter correctly (original name) - generates the correct parameter names for documentation - ignores the renamed parameter (as name, 1) - ignores the renamed parameter (as name, 3) - ignores the renamed parameter (as name, 2) - with a renamed hash with nested parameters - validates the renamed parameter correctly (original name) - generates the correct parameter names for documentation - maps the renamed parameter correctly (original name) - ignores the renamed parameter (as name) - with a deeply nested parameter structure - maps the renamed parameter correctly - does not modify the request params - generates the correct parameter names for documentation - maps no parameters when none are given - #declared; mixed nesting - can access parent route_param - #declared; from a nested mounted endpoint - can access parent attributes - -Grape::Endpoint - get - responds - put - responds - -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 - when missing optional value - does not yield skipped values - empty values - marks params with empty values - -Grape::Exceptions::Base - #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 - #to_s - is expected to eq "a_message" - #message - is expected to eq "a_message" - -Grape::DSL::Validations - .reset_validations! - resets declared params - resets params - does not reset documentation description - resets validations - .params - evaluates block - returns a ParamsScope +Grape::DSL::Helpers + .helpers + adds a module with the given block + uses provided modules + uses many provided modules + with an external file + sets Boolean as a Grape::API::Boolean + in child classes + is available -Grape::Validations::Validators::CoerceValidator - coerce - error on malformed input (Array) - error on malformed input - converter - does not build a coercer multiple times - multiple types - fails when no coercion is possible - coerces to first possible type - may not be supplied together with a single type - custom coercion rules - still validates type - respects :coerce_with - performs no additional coercion - for primitive collections - allows multiple collection types - allows singular form declaration - allows collections with multiple types - when params is Hashie::Mash - for primitive collections - allows collections with multiple types - allows singular form declaration - allows multiple collection types - first-class JSON - doesn't make sense using coerce_with - works when declared optional - parses objects, hashes, and arrays - accepts Array[JSON] shorthand - with a custom validation message - errors on malformed input - on custom coercion rules - respects :coerce_with - still validates type - performs no additional coercion - coerces - Nests integers - String - Grape::API::Boolean - Integer - BigDecimal - a custom type - coerces the given value - returning the InvalidValue instance when invalid - uses a custom message added to the invalid value - File - collection - Rack::Multipart::UploadedFile - File - Array - Array of Bools - Array of type implementing parse - Set of type implementing parse - Array of a custom type - Array of Integers - empty string - structures types - is coerced to nil for type Set - is coerced to nil for type Array - special types - 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] - is coerced to nil for type [Integer, String, [Integer, String]] - primitive types - is coerced to nil for type FalseClass - is coerced to nil for type Date - is coerced to nil for type Grape::API::Boolean - is coerced to nil for type Float - is coerced to nil for type Numeric - is coerced to nil for type Time - is coerced to nil for type Symbol - is coerced to nil for type TrueClass - is not coerced to nil for type String - is coerced to nil for type BigDecimal - is coerced to nil for type DateTime - is coerced to nil for type Integer - json - Grape::API::Boolean - BigDecimal - nil values - primitive types - respects the nil value - respects the nil value - respects the nil value - respects the nil value - respects the nil value - respects the nil value - respects the nil value - respects the nil value - respects the nil value - 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 - special types - respects the nil value - respects the nil value - respects the nil value - respects the nil value - variant-member-type collections - respects the nil value - respects the nil value - Set - Set of Integers - Set of Bools - using coerce_with - parses parameters with Array[Integer] type - must be supplied with :type or :coerce - uses parse where available - parses parameters even if type is valid - parses parameters with Array type - parses parameters with Array[String] type - accepts any callable - parses parameters with Array[Array[String]] type and coerce_with - Integer type and coerce_with potentially returning nil - coerces to Integer - accepts value that coerces to nil - returns invalid value if coercion returns a wrong type - Array type and coerce_with should - coerce array as array - coerce nil value to array - not coerce missing field - Integer type and coerce_with should - not coerce missing field - coerce integer as integer - coerce nil value to integer - i18n - gives an english fallback error when default locale message is blank - i18n error on malformed input +Grape::Validations::Validators::RegexpValidator + accepts nil + accepts valid input + regexp with array + accepts valid items + refuses inapppopriate items + accepts nil instead of array + refuses nil items + refuses empty items + invalid input + refuses empty + refuses inapppopriate + custom validation message + accepts valid input + accepts nil + regexp with array + refuses empty items + refuses inapppopriate items + refuses nil items + accepts nil instead of array + accepts valid items + with invalid input + refuses empty + refuses inapppopriate + nested regexp with array + refuses inapppopriate Grape::Validations::Validators::ExceptValuesValidator - 7: opt_except_default - - 0: req_except - valid-type + 11: opt_except_array_type_coerce_default - ["3"] + 9: req_except_type_coerce - 11 + 5: req_except_lambda - invalid-type1 + 8: opt_except_lambda_default - 10: opt_except_type_coerce_default - 3 - 11: opt_except_array_type_coerce_default - 10 + 5: req_except_lambda - invalid-type4 + 7: opt_except_default - invalid-type1 10: opt_except_type_coerce_default - 3 - 8: opt_except_lambda_default - invalid-type1 + 6: req_except_lambda_custom_message - invalid-type1 11: opt_except_array_type_coerce_default - [10] - 5: req_except_lambda - valid-type - 9: req_except_type_coerce - 3 - raises IncompatibleOptionValues when a default array has excluded values - 10: opt_except_type_coerce_default - invalid-type1 - 3: req_except_no_value - invalid-type1 11: opt_except_array_type_coerce_default - invalid-type1 - raises IncompatibleOptionValues on a default value in exclude - 12: req_except_range - 11 - 11: opt_except_array_type_coerce_default - ["3"] - 1: req_except_hash - invalid-type1 - 7: opt_except_default - invalid-type1 - 6: req_except_lambda_custom_message - valid-type - 10: opt_except_type_coerce_default - 1: req_except_hash - invalid-type3 - 9: req_except_type_coerce - 11 + 0: req_except - valid-type 6: req_except_lambda_custom_message - invalid-type4 - 9: req_except_type_coerce - 3 - 6: req_except_lambda_custom_message - invalid-type1 - 2: req_except_custom_message - invalid-type3 - 2: req_except_custom_message - invalid-type1 - 12: req_except_range - 13 + 11: opt_except_array_type_coerce_default - 10 2: req_except_custom_message - valid-type - 11: opt_except_array_type_coerce_default - [3] - raises IncompatibleOptionValues when type is incompatible with values array - 10: opt_except_type_coerce_default - 10 - 5: req_except_lambda - invalid-type4 + 10: opt_except_type_coerce_default - invalid-type1 + 3: req_except_no_value - invalid-type1 + 10: opt_except_type_coerce_default - + 0: req_except - invalid-type1 + 1: req_except_hash - valid-type + raises IncompatibleOptionValues on a default value in exclude + raises IncompatibleOptionValues when a default array has excluded values 11: opt_except_array_type_coerce_default - + 10: opt_except_type_coerce_default - 10 + raises IncompatibleOptionValues when type is incompatible with values array + 4: req_except_empty - invalid-type1 + 5: req_except_lambda - valid-type + 8: opt_except_lambda_default - valid-type + 8: opt_except_lambda_default - invalid-type1 + 6: req_except_lambda_custom_message - valid-type + 12: req_except_range - 11 7: opt_except_default - invalid-type3 + 2: req_except_custom_message - invalid-type3 + 7: opt_except_default - + 11: opt_except_array_type_coerce_default - [3] 7: opt_except_default - valid-type - 8: opt_except_lambda_default - valid-type - 0: req_except - invalid-type1 - 9: req_except_type_coerce - 11 + 2: req_except_custom_message - invalid-type1 + 9: req_except_type_coerce - 3 + 8: opt_except_lambda_default - invalid-type3 + 9: req_except_type_coerce - 3 + 1: req_except_hash - invalid-type1 0: req_except - invalid-type3 9: req_except_type_coerce - invalid-type1 - 5: req_except_lambda - invalid-type1 - 8: opt_except_lambda_default - - 1: req_except_hash - valid-type - 4: req_except_empty - invalid-type1 - 8: opt_except_lambda_default - invalid-type3 - -Grape::Validations::Validators::ValuesValidator -Error 'comparison of String with 0 failed' raised while validating attribute 'number' - does not allow non-numeric string value for int value using lambda - allows a proc for values - allows a valid default value - raises IncompatibleOptionValues when type is incompatible with values array - rejects all values if values is an empty array - does not allow invalid value using lambda -Error 'undefined method `>' for nil:NilClass + 9: req_except_type_coerce - 11 + 12: req_except_range - 13 - requires :number, type: Integer, values: ->(v) { v > 0 } - ^' raised while validating attribute 'number' - does not allow nil for int value using lambda - does not allow an invalid value for a parameter using an endless range -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 - allows values to be a kind of the coerced type not just an instance of it - validates default value from proc against values in a proc - allows value using lambda - validates against values in an endless range - allows numeric string for int value using lambda - allows a valid value for a parameter - does not allow an invalid value for a parameter using lambda - 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 - does not allow an invalid value for a parameter - validates default value from proc - validates against an empty array in a proc - raises IncompatibleOptionValues on an invalid default value from proc - allows a blank value when the allow_blank option is true - raises IncompatibleOptionValues when values contains a value that is not a kind of the type - does not validate updated values without proc - validates against values in a proc - allows a valid default value - raises IncompatibleOptionValues on an invalid default value - 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 -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) - 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 when type is included - with a lambda values - only evaluates values dynamically with each request - chooses default - 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 - 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 - does not allow for root params scope - accepts for an optional param with a list of values - allows for a required param in child scope - 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 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 -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 - 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 - 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 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) - 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 - 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 - 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 - boolean values - rejects a value which is not in the list - allows a value from the list - with a range of values - allows an array of values inside of the range - rejects a single value outside the range - allows a single value inside of the range - rejects an array of values if any of them are outside the range +Grape::Validations::Validators::PresenceValidator + with nested parameters + validates nested parameters + with reused parameter documentation once required and once optional + works with optional + works with required + with a required non-empty string + valid when set + requires when missing + requires when empty + with triply nested required parameters + validates triple nested parameters + with required parameters and no type + validates name, company + with a custom type + does not validate their type when it is missing with a custom validation message - allows a valid value for a parameter - validates against values in a proc - does not allow an invalid value for a parameter - does not allow an invalid value for a parameter using lambda - 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 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 -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 - -MultiXml - uses multi_xml - -Grape::Endpoint - #declared - is not available by default - #version - defaults to nil - returns env[api.version] - #cookies - returns an instance of Cookies - #redirect - permanent - sets status to 301 - sets location header - default - sets status to 302 - sets location header - #status - defaults to 201 on POST - defaults to 200 on DELETE with a body present - accepts symbol for status - 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 - raises error if unknow symbol is passed - defaults to 200 on GET - returns status set - defaults to 204 on DELETE - #route - returns route_info - #return_no_content - sets the status code and body - #content_type - returns default - set - returns value - #sendfile - returns default - set - as object - raises an error that only a file path is supported - as file path - does not change the Cache-Control header - sends no deprecation warnings - does not change the Content-Length header - does not change the Transfer-Encoding header - returns value wrapped in StreamResponse - #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 - emits a warning that this method is deprecated -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 - #body - returns default - set - returns value - false - sets status to 204 - #stream - returns default - set - as a file path - emits no deprecation warnings - does not change Cache-Control header - sets Cache-Control header to no-cache - returns file body wrapped in StreamResponse - sets Content-Length header to nil - sets Transfer-Encoding header to nil - as a stream object - returns value wrapped in StreamResponse - sets Cache-Control header to no-cache - emits no deprecation warnings - sets Transfer-Encoding header to nil - sets Content-Length header to nil - as a non-stream object - raises an error that the object must implement :each - #error! - throws :error - default_error_status - sets status to default_error_status - thrown - sets status - #present - multiple entities - instance - presents both dummy objects - non mergeable entity - instance - fails - with - entity - instance - presents dummy object - dummy - presents dummy object - -Grape::API - works for unspecified format - works for specified format - doesn't work for format different than specified - -A named API - can access the name of the API - -Grape - .config - is expected to eq {:param_builder=>Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder} - -StrictHashConfiguration - set nested configs - -Grape::Middleware::Error - sets the status code appropriately - defaults to a 500 status - sets the error message appropriately - has a default message - sets the status code based on the rack util status code symbol - with http code - adds the status code if wanted - presents an error message - -Grape::Exceptions::MissingMimeType - #message - contains the resolution in the message - contains the problem in the message - -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 :all handler - with no specific content_type - 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 content_type xml - can recover from failed body parsing - 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 without a rescue handler - with content_type xml - can recover from failed body parsing - and with no specific content_type - can recover from failed body parsing - and with content_type json - can recover from failed body parsing - with content_type text - can recover from failed body parsing - -Grape::Validations::Types::ArrayCoercer - #call - an array of sets - coerces elements in the nested set - an array of arrays - coerces elements in the nested array - an array of primitives - coerces elements in the array - -Grape::API - with a global namespace function - works - -Grape::Middleware::Auth::DSL - .http_digest - when realm is a hash - sets auth parameters - when realm is not hash - sets auth parameters - .http_basic - sets auth parameters - .auth - can be called multiple times - sets auth parameters - -Grape::DSL::Settings - #global_setting - delegates to get_or_set - #unset_namespace_stackable - delegates to unset - #unset_global_setting - delegates to unset - #api_class_setting - delegates to get_or_set - complex scenario - plays well - #unset_namespace_setting - delegates to unset - #get_or_set - returns a value when nil is new value is provided - sets a values - #within_namespace - calls start and end for a namespace - returns the last result - #unset_route_setting - delegates to unset - #route_setting - sets a value until the next route - delegates to get_or_set - #namespace_setting - delegates to get_or_set - sets a value until the end of a namespace - resets values after leaving nested namespaces - #unset_api_class_setting - delegates to unset - #unset - deletes a key from settings - #namespace_inheritable - inherits values from surrounding namespace - delegates to get_or_set - #namespace_stackable - delegates to get_or_set - stacks values from surrounding namespace - #unset_namespace_inheritable - delegates to unset - -Grape::Endpoint - when route modifies param value - param default should not change - -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 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 a subset of restricted params are present - does not return a validation error - 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 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 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::Util::InheritableValues - #[] - parent values are not changed - returns a value - overwrites parent value with the current one - returns parent value when no value is set - #to_hash - returns a Hash representation - #clone - complex (i.e. not primitive) data types (ex. entity classes, please see bug #891) - copies values; does not duplicate them - #[]= - sets a value - #delete - does not delete parent values - deletes a key - -Grape::Validations::Validators::DefaultValidator - sets default values for grouped arrays - allows optional arrays with optional params - does not allows faulty optional arrays - lets you leave required values nested inside an optional blank - set default values for optional params - set default values for optional params and allow to use required fields in the same time - set default value for optional param - allows optional arrays to be omitted - sets lambda based defaults at the time of call - set default values for missing params in the request - optional with nil as 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 - 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 - variant-member-type collections - respects the default value - respects the default value - respects the default value - respects the default value - array with default values and given conditions - applies the default values only if the conditions are met - optional group with defaults - 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 array without default value includes optional param with default value - returns nil for optional array 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 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 - -MultiJson - uses multi_json (PENDING: Temporarily skipped with xit) - -Grape::Util::InheritableSetting - #global - sets the global inherited values - sets a global value - overrides global values - handles different parents - #point_in_time_copy - decouples namespace stackable values - decouples namespace inheritable values - decouples namespace values - decouples namespace reverse stackable values - decouples route values - adds itself to original as clone - resets point_in_time_copies - #api_class - is specific to the class - #namespace_inheritable - handles different parents - works with inheritable values - #namespace - sets a value until the end of a namespace - uses new values when a new namespace starts - #namespace_stackable - works with stackable values - #namespace_reverse_stackable - works with reverse stackable values - #inherit_from - notifies clones - #to_hash - return all settings as a hash - #api_class - is specific to the class - #route - sets a value until the next route - works with route values - -Grape::DSL::Logger - .logger - sets a logger - returns a logger + requires when missing + valid when set + requires when empty + with multiple parameters per requires + validates for all defined params + with a required regexp parameter supplied in the POST body + validates id + without validation + does not validate for any params -Grape::Middleware::Base - has the app as an accessor - calls through to the app - is able to access the 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 - overrides default options when provided - persists the default options - after callback - overwrites application response - callbacks on error - calls #after - header - is able to set a header - callbacks - calls #before - calls #after - #context - allows access to response context - #response - when Rack::Response - header - body - returns the memoized Rack::Response instance - status - when Array - returns the memoized Rack::Response instance - body - status - header - header overwrite - overwrites header by after headers +Grape::Path + #path_with_suffix + combines the path and suffix + when using a specific format + might have a suffix with specified format + #mount_path + is nil when the mount path is nil + splits the mount path + is nil when no mount path setting exists + #uses_path_versioning? + is false when the version setting is nil + is true when the version option is path + is false when the version option is header + #namespace? + is false when the namespace is the root path + is true otherwise + is false when the namespace starts with whitespace + is false when the namespace is nil + #suffix + when using a specific format + accepts specified format + when path versioning is used + includes a '/' + when path versioning is not used + does not include a '/' when the path has a path + includes a '/' otherwise + does not include a '/' when the path has a namespace + #root_prefix + is nil when the mount path is nil + is nil when no root prefix setting exists + splits the mount path + #path + uses the namespace after the mount path and root prefix + uses the raw path after the namespace + mount_path + is included when it is not nil + is not included when it is nil + root_prefix + is included after the mount path + is not included when it is nil + #initialize + remembers the namespace + remembers the path + remebers the settings + #path? + is true otherwise + is false when the path is the root path + is false when the path starts with whitespace + is false when the path is nil -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::Validators::Base + #inherited + 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 + when validator is anonymous + does not register the validator Grape::API::Helpers - can access helpers from a mounted resource in a nested resource can access helpers from a mounted resource - -Grape::Endpoint - sets itself in the env upon call - allows explicit return calls - does not persist params between calls - resets all instance variables (except block) between calls - instrumentation - notifies AS::N - .generate_api_method - raises ArgumentError if a block is not given - raises NameError if the method name is already in use - returns a Proc - #initialize - takes a settings stack, options, and a block - .before_each - is able to override a helper - is able to stack helper - is settable via reference - is settable via block - 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 - #method_missing - when performing an undefined method of an instance inside the API - raises NoMethodError but stripping the internals of the Object class - when referencing an undefined local variable - raises NoMethodError but stripping the internals of the Grape::Endpoint class and including the API route - filters - allows adding to response with present - before filters - runs the before filter if set - when terminating the response with error! - breaks normal call chain - allows prior and parent filters of same type to run - after filters - overrides the response body if it sets it - does not override the response body with its return - #headers - includes headers passed as symbols - includes request headers - includes additional request headers - validation errors - returns the errors, and passes headers - #status - is callable from within a block - is set as default to 200 for get - is set as default to 201 for post - #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 - request - includes version v1 - includes prefix - is set to the url requested - includes version v1 - #header - is callable from within a block - #params - does not accept text/plain in JSON format if application/json is specified as content type - responds with a 415 for an unsupported content-type - is available to the caller - parses from path segments - deeply converts nested 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 - sets a value to params - params - with special requirements - parses many params with provided regexps - parses email param with provided requirements for params - namespace requirements - parse email param with provided requirements for params - overrides outer namespace's requirements - from body parameters - converts XML bodies to params - returns a 400 if given an invalid multipart body - converts XML bodies to params - does not convert empty JSON bodies to params - converts JSON bodies to params - does not include parameters not defined by the body - content type with params - does not response with 406 for same type without params - responses with given content type in headers - anchoring - delete 204, with nil has return value (no explicit body) - responds to /example delete method - delete 200, with response body - responds to /example/and/some/more for the non-anchored delete method - all other - anchors paths by default for the PUT method - responds to /example/and/some/more for the non-anchored GET method - allows for the anchoring option with a POST method - allows for the anchoring option with a PATCH method - anchors paths by default for the POST method - responds to /example/and/some/more for the non-anchored HEAD method - anchors paths by default for the OPTIONS method - allows for the anchoring option with a PUT method - allows for the anchoring option with a HEAD method - responds to /example/and/some/more for the non-anchored OPTIONS method - allows for the anchoring option with a GET method - responds to /example/and/some/more for the non-anchored PATCH method - anchors paths by default for the GET 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 HEAD method - allows for the anchoring option with a OPTIONS method - anchors paths by default for the PATCH method - delete 204, with empty array has return value (no explicit body) - responds to /example delete method - delete 204 - allows for the anchoring option with a delete method - anchors paths by default for the delete method - 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 - #error! - merges additional headers with headers set before call - sets the status code for the endpoint - accepts a message - accepts an object and render it in format - accepts a frozen object - does not merges additional headers with headers set after call - accepts a code - can specifiy headers - version headers - result in a 406 response if they cannot be parsed by rack-accept - result in a 406 response if they are invalid - #cookies - sets browser cookies and does not set response cookies - deletes cookie - sets and update browser cookies - is callable from within a block - deletes cookies with path - #params - default class - is a ActiveSupport::HashWithIndifferentAccess - sets a value to params - params - -Grape::Presenters::Presenter - present - instance - presents dummy hash - multiple presenter - instance - presents both dummy presenter - represent - represent object - -Grape::DSL::Callbacks - .after_validation - adds a block to "after_validation" - .before_validation - adds a block to "before_validation" - .before - adds a block to "before" - .after - adds a block to "after" - -Grape::Middleware::Versioner::Path - sets the API version based on the first path - provides a nil version if no path is given - does not cut the version out of the path - with prefix, but requested version is not matched - recognizes potential version - with specified versions as ["v1", "v2"] - throws an error if a non-allowed version is specified - allows versions that have been specified - with a pattern - ignores the version if it fails to match - sets the version if it matches - with specified versions as [:v1, :v2] - throws an error if a non-allowed version is specified - allows versions that have been specified - with specified versions as [:v1, "v2"] - throws an error if a non-allowed version is specified - allows versions that have been 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 - -Grape::Exceptions::UnsupportedGroupType - #message - is expected to include "group type must be Array, Hash, JSON or Array[JSON]" - Grape::Exceptions::UnsupportedGroupTypeError - 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 mounted on the root - can call the instance endpoint - when an instance is the root - can call the instance endpoint - with multiple moutes - does not raise a FrozenError on second instance - responds the correct body at the second instance - responds the correct body at the first instance - does not raise a FrozenError on first instance - -Grape::Middleware::Versioner::AcceptVersionHeader - succeeds if :strict is set to false - succeeds if :strict is not set - when :strict is set - succeeds if proper header is set - fails with 406 Not Acceptable if header is not set - fails with 406 Not Acceptable if header is empty - 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 - fails with 406 Not Acceptable if version is not supported - is set if format provided - is set - -Grape::Middleware::Versioner - recognizes :param - recognizes :path - recognizes :header - recognizes :accept_version_header - -Grape::Exceptions::ValidationErrors - message - is not repeated - is expected to eq 1 - is expected to include "FooBar is invalid" - api - can return structured json with separate fields - #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 - initialize - assigns headers through base class - -Grape::API - .recognize_path - returns nil if given path does not match with registered routes - fetches endpoint by given path - -Grape::Validations::Validators::RegexpValidator - accepts nil - accepts valid input - custom validation message - accepts valid input - accepts nil - with invalid input - refuses inapppopriate - refuses empty - regexp with array - refuses nil items - accepts nil instead of array - refuses inapppopriate items - refuses empty items - accepts valid items - invalid input - refuses inapppopriate - refuses empty - nested regexp with array - refuses inapppopriate - regexp with array - refuses inapppopriate items - accepts valid items - refuses empty items - refuses nil items - accepts nil instead of array - -Grape::DSL::RequestResponse - .formatter - sets the formatter for a content type - .parser - sets a parser for a content type - .content_types - returns all content types - .format - sets a new format - .content_type - sets a content type for a format - .default_error_status - sets a default error status - .default_error_formatter - sets a new error formatter - .error_formatter - sets a error_formatter - understands syntactic sugar - .default_format - sets the default format - returns the format without paramter - .represent - sets a presenter for a class - .rescue_from - :all - abort if :with option value is not Symbol, String or Proc - sets given proc as rescue handler - 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 - list of exceptions is passed - 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 - 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 rescue all to true - sets given block as rescue handler - sets a rescue handler declared through :with option - sets given proc as rescue handler - -Grape::Endpoint - get - responds without ext - put - responds + can access helpers from a mounted resource in a nested resource Grape::Validations::Validators::AllowBlankValidator + in an optional group + as an optional param + refuses a blank existing value in an existing scope + accepts a nested missing optional value + accepts a missing group, even with a disallwed blank param + as a required param + accepts a nested missing date value + refuses a blank value in an existing group + accepts a missing group, even with a disallwed blank param + invalid input + refuses nil + refuses missing + refuses only whitespaces + refuses empty string + valid input + accepts empty when date allow_blank + accepts empty when boolean allow_blank + accepts empty when symbol allow_blank + accepts empty when datetime allow_blank + allows missing optional strings + accepts empty input + accepts value when time allow_blank + accepts empty input when allow_blank is false + accepts false when boolean allow_blank + accepts valid input + allow_blank when Numeric + accepts empty when integer allow_blank + accepts empty when float allow_blank + accepts empty when integer allow_blank custom validation message - in an optional group - 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 - 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 with valid input - accepts empty when symbol allow_blank - accepts false when boolean allow_blank - accepts valid input accepts empty input accepts empty when boolean allow_blank accepts empty input when allow_blank is false + accepts false when boolean allow_blank + accepts empty when symbol allow_blank + accepts valid input accepts empty when datetime allow_blank accepts empty when date allow_blank allow_blank when Numeric accepts empty when integer allow_blank - accepts empty when float allow_blank accepts empty when integer allow_blank + accepts empty when float allow_blank + 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 string value in an optional hash group + refuses a blank existing value in an existing scope with invalid input - refuses only whitespaces refuses empty string for an optional param refuses empty string + refuses only whitespaces refuses nil - in a required group + in an optional group + as a required param + accepts a nested missing date value + refuses a blank value in an existing group + accepts a missing group, even with a disallwed blank param 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 value - refuses a string value in an optional hash group - as a required param - refuses a string value in a required hash group - refuses a blank value in a required existing group + accepts a nested missing optional value 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 - invalid input - refuses nil - refuses missing - refuses empty string - refuses only whitespaces - valid input - accepts empty when symbol allow_blank - accepts empty input - accepts empty when datetime allow_blank - allows missing optional strings - accepts empty when date allow_blank - accepts empty input when allow_blank is false - accepts empty when boolean allow_blank - accepts false when boolean allow_blank - accepts valid input - accepts value when time allow_blank - 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 + accepts a nested missing value as a required param - accepts a nested missing date value - refuses a blank value in an existing group - accepts a missing group, even with a disallwed blank param - -Grape::DSL::Middleware - .insert_after - adds a middleware with the right operation - .insert_before - adds a middleware with the right operation - .middleware - returns the middleware stack - .use - adds a middleware with the right operation - .insert - adds a middleware with the right operation - -Validator with instance variables - passes validation every time - -Grape::Request - #params - by default returns stringified parameter keys - when build_params_with: Grape::Extensions::Hash::ParamBuilder is specified - returns symbolized params - with grape.routing_args - cuts version and route_info - #headers - with non-HTTP_* stuff in env - does not include them - with http headers in env - cuts HTTP_ prefix and capitalizes header name words - with symbolic header names - converts them to string - 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 - -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 a namespace param with dots - routes to namespace and path params with dots, with overridden requirements - -Grape::Validations::ParamsScope::AttributesDoc - #extract_details - cleans up doc attrs needed for documentation only - does not clean up doc attrs mandatory for validators - tells when attributes are required - #document - documentation is disabled - does not document attributes - documentation is enabled - documents attributes - behaves like an optional doc attribute - does not mention it - 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 - behaves like an optional doc attribute - does not mention it - nil 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 - -Grape::Validations::Types::SetCoercer - #call - a set of sets of arrays - coerces elements in the nested set - a set of sets - coerces elements in the nested set - a set of primitives - coerces elements to the set - -Grape::API::Helpers - defines parameters - -Grape::Exceptions::MissingOption - #message - contains the problem in the message - -Grape::Extensions::Hashie::Mash::ParamBuilder - in an endpoint - #params - is of type Hashie::Mash - in an api - is indifferent to key or symbol access - #params - is Hashie::Mash - in a nested namespace api - is Hashie::Mash - -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::Middleware::Auth::Base - authenticates if given valid creds - throws a 401 is wrong auth is given - -Grape::Validations::Types - special types - when JSON - is expected to eq Grape::Validations::Types::Json - when Rack::Multipart::UploadedFile - is expected to eq Grape::Validations::Types::File - when Array[JSON] - is expected to eq Grape::Validations::Types::JsonArray - when File - is expected to eq Grape::Validations::Types::File - ::structure? - recognizes Array as a structure - recognizes Hash as a structure - recognizes Set as a structure - ::primitive? - identifies unknown types - recognizes Date as a primitive - recognizes BigDecimal as a primitive - recognizes Symbol as a primitive - recognizes Numeric as a primitive - recognizes Float as a primitive - recognizes Grape::API::Boolean as a primitive - recognizes Integer as a primitive - recognizes Time as a primitive - recognizes String as a primitive - recognizes DateTime as a primitive - ::special? - provides special handling for JSON - provides special handling for Rack::Multipart::UploadedFile - provides special handling for File - provides special handling for [JSON] - ::custom? - returns false if the type's #parse method takes other than one argument - returns true if the type responds to :parse with one argument - returns false if the type does not respond to :parse - ::build_coercer - has internal cache variables - caches the result of the build_coercer method - -Grape::Middleware::Formatter - error handling -caught error of type StandardError in after callback inside Grape::Middleware::Formatter : StandardError - does not rescue other exceptions - rescues formatter-specific exceptions - accept header detection - parses headers with vendor and api version - handles quality rankings that have a default 1.0 value - parses headers with other attributes - uses quality rankings to determine formats - 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 - handles quality rankings mixed with nothing - ignores invalid quality rankings - with custom vendored content types - uses the custom type - send file - returns a file response - content-type - is set for txt - is set for xml - is set for json - is set for vendored with registered type - is set to closest generic for custom vendored/versioned without registered type - is set for custom - format - uses custom formatter - uses custom json formatter - default - uses default json formatter - 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 - serialization - looks at the bodies for possibly serializable data - default format - calls #to_json since default format is json - xml - calls #to_xml if the content type is xml - jsonapi - calls #to_json if the content type is jsonapi - input - ignores multipart/mixed - ignores application/x-www-form-urlencoded - ignores application/x-www-form-urlencoded - ignores multipart/mixed - parses the chunked body from PATCH and copies values into rack.request.from_hash - ignores multipart/related - ignores multipart/form-data - ignores application/x-www-form-urlencoded - ignores multipart/related - rewinds IO - ignores multipart/related - parses the body from an xml PATCH and copies values into rack.request.from_hash - ignores multipart/mixed - ignores multipart/form-data - ignores multipart/mixed - ignores application/x-www-form-urlencoded - ignores multipart/related - parses the chunked body from PUT and copies values into rack.request.from_hash - rewinds IO - parses the body from an xml PUT and copies values into rack.request.from_hash - rewinds IO - rewinds IO - 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 - parses the body from an xml DELETE and copies values into rack.request.from_hash - ignores multipart/form-data - parses the chunked body from POST and copies values into rack.request.from_hash - ignores multipart/form-data - 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 - 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 - 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 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 - parses the body from PUT 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 - 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 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 not supported - returns a 415 HTTP error status - when Content-Type is supported - parses the body from PATCH 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 PATCH and copies values into rack.request.form_hash - application/json - 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 - 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 - application/json; charset=utf-8 - parses the body from PATCH and copies values into rack.request.form_hash - no content responses - does not modify a 154 response - does not modify a 184 response - does not modify a 144 response - does not modify a 153 response - does not modify a 165 response - does not modify a 188 response - does not modify a 109 response - does not modify a 194 response - does not modify a 156 response - does not modify a 110 response - does not modify a 148 response - does not modify a 187 response - does not modify a 199 response - does not modify a 123 response - does not modify a 197 response - does not modify a 171 response - does not modify a 117 response - does not modify a 101 response - does not modify a 121 response - does not modify a 192 response - does not modify a 167 response - does not modify a 145 response - does not modify a 178 response - does not modify a 129 response - does not modify a 193 response - does not modify a 141 response - does not modify a 304 response - does not modify a 160 response - does not modify a 133 response - does not modify a 195 response - does not modify a 136 response - does not modify a 130 response - does not modify a 107 response - does not modify a 139 response - does not modify a 196 response - does not modify a 164 response - does not modify a 122 response - does not modify a 173 response - does not modify a 181 response - does not modify a 150 response - does not modify a 125 response - does not modify a 172 response - does not modify a 105 response - does not modify a 128 response - does not modify a 170 response - does not modify a 126 response - does not modify a 106 response - does not modify a 146 response - does not modify a 102 response - does not modify a 118 response - does not modify a 166 response - does not modify a 177 response - does not modify a 179 response - does not modify a 111 response - does not modify a 174 response - does not modify a 161 response - does not modify a 198 response - does not modify a 108 response - does not modify a 149 response - does not modify a 180 response - does not modify a 189 response - does not modify a 131 response - does not modify a 137 response - does not modify a 132 response - does not modify a 155 response - does not modify a 158 response - does not modify a 100 response - does not modify a 185 response - does not modify a 157 response - does not modify a 151 response - does not modify a 135 response - does not modify a 143 response - does not modify a 113 response - does not modify a 138 response - does not modify a 191 response - does not modify a 124 response - does not modify a 119 response - does not modify a 140 response - does not modify a 104 response - does not modify a 190 response - does not modify a 115 response - does not modify a 116 response - does not modify a 168 response - does not modify a 175 response - does not modify a 120 response - does not modify a 147 response - does not modify a 103 response - does not modify a 159 response - does not modify a 163 response - does not modify a 176 response - does not modify a 182 response - does not modify a 186 response - does not modify a 183 response - does not modify a 152 response - does not modify a 204 response - does not modify a 114 response - does not modify a 162 response - does not modify a 142 response - does not modify a 127 response - does not modify a 134 response - does not modify a 169 response - does not modify a 112 response - detection - uses the file extension format if provided before headers - uses the format parameter if one is provided - uses the default format if none is provided - uses the json extension if one is provided - uses the requested format if provided in headers - uses the xml extension if one is provided - -Grape::Validations::Validators::Base - #inherited - 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 - when validator's underscored name ends with _validator - registers the custom validator with short name not ending with validator - -Grape::Validations::Validators::AllOrNoneOfValidator - #validate! - when restricted 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 mutually exclusive params are deeply nested - 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 no restricted params are present - does not return a validation error - when a subset of restricted params are present - returns a validation error - -Grape::DSL::Routing - .scope - create a scope without affecting the URL - .route_param - does not modify options parameter - nests requirements option under param name - calls #namespace with given params - .segment - is alias to #namespace - .head - delegates to .route - .do_not_route_head! - sets do not route head option - .patch - delegates to .route - .resources - is alias to #namespace - .version - sets a version for route - .mount - mounts multiple routes at once - mounts on a nested path - .get - delegates to .route - .options - delegates to .route - .route - defines a new endpoint - resets validations - marks end of the route - generates correct endpoint options - does not duplicate identical endpoints - .do_not_route_options! - sets do not route options option - .resource - is alias to #namespace - .post - delegates to .route - .prefix - sets a prefix for route - .versions - returns last defined version - .delete - delegates to .route - .put - delegates to .route - .namespace - calls #joined_space_path on Namespace - creates a new namespace with given name and options - .group - is alias to #namespace - .routes - returns value received from #prepare_routes - when #routes was already called once - does not call prepare_routes again - -Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder - in an api - #params - is a Hash - responds to string keys - parses sub hash params - params are indifferent to symbol or string keys - in an endpoint - #params - is of type Hash - -Rack::Sendfile - when calling sendfile - contains Sendfile headers - when streaming non file content - not contains Sendfile headers - -Grape::Middleware::Stack - #build - returns a rack builder instance - when @others are present - applies the middleware specs stored in @others - #insert - inserts a middleware class at the integer index - #use - pushes a middleware class with block arguments onto the stack - pushes a middleware class with arguments onto the stack - pushes a middleware class onto the stack - #insert_before - inserts a middleware before an anonymous class given by its superclass - raises an error on an invalid index - inserts a middleware before another middleware class - #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 another middleware class - raises an error on an invalid index - inserts a middleware after an anonymous class given by its superclass - #concat - calls +merge_with+ with the :use specs - adds non :use specs to @others - -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 mounting an endpoint conditional on a configuration - mounts the endpoints only when configured to do so - 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 - does not mount the endpoint with a null name - mounts the endpoint with the name - when the configuration is read within a namespace - 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 - on the DescSCope - mounts the endpoint with the appropiate tags - when executing a custom block on mount - mounts the endpoints only when configured to do so - on the ParamScope - mounts the endpoint in the location it is configured - on dynamic checks - can read the configuration on lambdas - when executing a standard block within a `mounted` block with all dynamic params - mounts the API and obtains the description and headers definition - when the configuration is read within the response block - will use the dynamic configuration on all routes - 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 the params are configured via a configuration - when the configured param is my_attr - requires the configured params - -Grape::API::Helpers - defines parameters - -Grape::Parser - .parsers - includes built-in parsers - returns an instance of Hash - with added parser by using `register` keyword - includes added parser - with :parsers option - includes passed :parsers values - .parser_for - calls .parsers - returns parser correctly - when parser does not exist - returns nil - 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 - .builtin_parsers - returns an instance of Hash - includes json and xml parsers by default - -Grape::Util::StackableValues - #[] - parent values are not changed - combines parent and actual values - returns an array of values - returns parent value when no value is set - #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 - #keys - returns all keys - returns merged keys with parent - #delete - does not delete parent values - deletes a key - #[]= - pushes further values - sets a value - can handle array values - -Grape::Endpoint - get - json format - invalid format - no format - -Grape::API::Instance - boolean constant - sets Boolean as a type - Params endpoint type - params type is a boolean - -Grape::Validations::ParamsScope - includes the nested parameter within #declared(params) - raises an error if the dependent parameter was never specified - returns a sensible error message within a nested context - includes level 2 nested parameters outside the given within #declared(params) - includes deeply nested parameters within #declared(params) - with range values - when both range endpoints are #kind_of? the type - rejects values outside the range - accepts values in 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 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 - 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 - 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 - parameters in group - errors when no type is provided - allows Array as type - handles missing optional Array type - allows Hash as type - errors with an unsupported type - param renaming - renaming can be defined after default - is expected to eq "-there we go" - is expected to eq "any-any2" - is expected to eq "{\"baz\":{\"qux\":\"any\"}}" - renaming can be defined before default - is expected to eq 200 - is expected to eq "foo is empty" - failing fast - when fail_fast is defined it stops the validation - for a single param - of other params - when fail_fast is not defined - does not stop validation - when using custom types - coerces the parameter via the type's parse method - when validations are dependent on a parameter - does not raise if the dependent parameter is not the renamed one - includes the nested parameter within #declared(params) - applies only the appropriate validation - returns a sensible error message within a nested context - includes the parameter within #declared(params) - allows nested dependent parameters - raises an error if the dependent parameter was never specified - detect unmet nested dependency - does not raise an error if when using nested given - allows renaming of dependent parameters - includes level 2 nested parameters outside the given within #declared(params) - allows renaming of dependent on parameter - applies the validations only if the parameter is present - applies the validations of multiple parameters - does not raise an error if the dependent parameter is a Hash - does not validate nested requires when given is false - raises an error if the dependent parameter is the renamed one - when the dependent parameter is not present #declared(params) - lateral parameter within an array param - evaluate_given_false - evaluate_given_true - lateral parameter within lateral hash parameter - evaluate_given_true - evaluate_given_false - nested given parameter - evaluate_given_false - evaluate_given_true - lateral hash parameter - evaluate_given_false - evaluate_given_true - lateral parameter - evaluate_given_false - evaluate_given_true - nested given parameter within a nested given parameter within an array param - evaluate_given_false - evaluate_given_true - nested given parameter within an array param - evaluate_given_true - evaluate_given_false - when validations are dependent on a parameter within an array param - passes none Hash params - when params have group attributes - with validations - when data is invalid - applies group validations for every parameter - returns a validation error - when parameter has the same validator as a group - returns a successful response - prioritizes parameter validation over group validation - with nested groups - when correct data is provided - returns a successful response - when data is invalid - responds with HTTP error - returns a validation error - with several group attributes - when correct data is provided - returns a successful response - when data is invalid - responds with HTTP error - returns a validation error - with types - when created_at receives a valid date - returns a successful response - returns a date - when invalid date provided - returns a validation error - responds with HTTP error - when validations are dependent on a parameter within an array param within #declared(params).to_json - applies the constraint within each value - 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 - 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 validations are dependent on a parameter with specific value - (case 5) - 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 - includes the parameter within #declared(params) - (case 0) - 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 - (case 1) - skips validation when base param is missing - 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 - skips validation when base param does not have a specified value - includes the parameter within #declared(params) - (case 14) - 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 13) - 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 3) - 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) - skips validation when base param is missing - (case 2) - 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 12) - 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 7) - 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 8) - 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 15) - 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) - 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 9) - 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 4) - skips validation when base param is missing - 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 10) - 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) - -Grape::Endpoint - post - 405 - -Grape::DSL::Headers - when no headers are set - #header - returns nil - when headers are set - #header - set - returns value - delete - deletes a header key-value pair - get - returns a specifc value - returns all set headers - -Grape::Validations::Validators::ExactlyOneOfValidator - #validate! - when none of the params are present - returns a validation error - when a subset of params are present - returns a validation error - when 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 - when custom message is specified - returns a validation error - when params are nested inside required hash - returns a validation error with full names of the params - when params are deeply nested - returns a validation error with full names of the params - when exacly one param is present - does not return a validation error - when params are nested inside array - 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 - -Grape::Middleware::Globals - calls through to the app - environment - sets the grape.request.params environment - sets the grape.request environment - sets the grape.request.headers environment - -Grape::API - an endpoint without documentation - still declares params internally - does not document parameters for the endpoint - an endpoint with documentation - allows documentation with a hash - documents parameters - -Grape::Validations::Validators::PresenceValidator - with a custom type - does not validate their type when it is missing - with required parameters and no type - validates name, company - with triply nested required parameters - validates triple nested parameters - with a custom validation message - requires when missing - valid when set - requires when empty - with reused parameter documentation once required and once optional - works with required - works with optional - with a required non-empty string - requires when missing - valid when set - requires when empty - without validation - does not validate for any params - with nested parameters - validates nested parameters - with multiple parameters per requires - validates for all defined params - with a required regexp parameter supplied in the POST body - validates id - -Grape::Middleware::Versioner::Param - sets the API version based on the default param (apiver) - cuts (only) the version out of the params - provides a nil version if no version is given - 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 - sets the API version based on the custom parameter name - does not set the API version based on the default param - with specified versions - throws an error if a non-allowed version is specified - allows versions that have been specified - when there are multiple versions with a custom param - responds correctly to a v1 request - responds correctly to a v2 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::Exceptions::InvalidFormatter - #message - contains the problem in the message + refuses a blank value in a required existing group + refuses a string value in a required hash group Grape::API - .rescue_from klass, rescue_subclasses: boolean -Grape::API - sets rescue_subclasses to true by default -Grape::API - rescues error as well as subclass errors with rescue_subclasses option set -Grape::API - does not rescue child errors if rescue_subclasses is false - .format - :txt only -Grape::API - accepts specified extension -Grape::API - forces txt without an extension -Grape::API - forces txt from a non-accepting header -Grape::API - does not accept extensions other than specified - :xml -Grape::API - string + .default_format Grape::API - hash + parses data in default format Grape::API - raised :error from middleware + returns data in default format + .rescue_from :grape_exceptions Grape::API - array - :serializable_hash + rescues grape exceptions with a user-defined handler Grape::API - instance + rescues grape exceptions + .version + when not defined Grape::API - root + returns nil + when defined Grape::API - array - :json + returns version value + .formatter + custom formatter class Grape::API - can be overwritten with an explicit content type + uses custom formatter Grape::API - does not force json with an extension + uses json + multiple formatters Grape::API - raised :error from middleware + sets one formatter Grape::API - forces json from a non-accepting header + sets another formatter + custom formatter Grape::API - forces json without an extension - :txt + uses json Grape::API - forces txt from a non-accepting header + uses custom formatter + const_missing + raises an error + .default_error_status Grape::API - does not force txt with an extension + uses the default error status in error! Grape::API - forces txt without an extension - .rescue_from :grape_exceptions + has a default error status Grape::API - rescues grape exceptions with a user-defined handler + allows setting default_error_status + .route + with desc Grape::API - rescues grape exceptions - .error_format + returns route description Grape::API - rescues all errors and return :txt + returns route parameters + plain Grape::API - rescues all errors and return :json + provides access to route info + body + plain text Grape::API - rescues all errors and return :json with backtrace + returns blank body + false Grape::API - rescues all errors and return :txt with backtrace + returns blank body + .route Grape::API - defaults the error formatter to format + allows for format in namespace with no path Grape::API - rescues all errors with a default formatter + allows for no path Grape::API - rescues error! and return txt - with json format + handles empty calls Grape::API - rescues error! called with a string and returns json + allows for multiple paths Grape::API - rescues error! called with a symbol and returns json + runs before filter exactly once on 405 bad method Grape::API - rescues error! called with a hash and returns json - with - class + runs all filters and body with a custom OPTIONS method Grape::API - 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 + allows and properly constrain a HEAD method Grape::API - returns a custom error format - lifecycle - when the api_call fails validation + allows and properly constrain a POST method Grape::API - follows the failed_validation cycle (skips after_validation, api_call & after) - when the api_call has an exception + returns a 201 response code for POST by default Grape::API - follows the errored life_cycle (skips after) - when the api_call has a controlled error + allows and properly constrain a PATCH method Grape::API - follows the errored life_cycle (skips after) - when the api_call succeeds + allows for catch-all in a namespace Grape::API - follows the standard life_cycle - .version using accept_version_header - behaves like versioning + overwrites the default HEAD request Grape::API - does not overwrite version parameter with API version + allows and properly constrain a DELETE method Grape::API - sets the API version + allows and properly constrain a OPTIONS method Grape::API - adds the prefix before the API version + returns a 405 for an unsupported method with an X-Custom-Header Grape::API - is able to specify multiple versions + runs only the before filter on 405 bad method Grape::API - is able to specify version as a nesting - with before block defined within a version block + 405 responses includes an Allow header specifying supported methods Grape::API - calls before block that is defined within the version block - with different versions for the same endpoint - without a prefix + allows for format without corrupting a param Grape::API - allows the same endpoint to be implemented - with a prefix + allows and properly constrain a PUT method Grape::API - allows the same endpoint to be implemented - with catch-all - v1 + allows for :any as a verb Grape::API - finds endpoint + allows for multiple verbs Grape::API - finds catch all - v2 + allows and properly constrain a GET method Grape::API - finds endpoint + 405 responses includes an Content-Type header Grape::API - finds catch all - .represent + allows for multipart paths + post Grape::API - adds the association to the :representations setting + allows a(n) TrueClass json object in params Grape::API - requires a :with option - custom middleware - .middleware + stores input in api.request.input Grape::API - includes all middleware from stacked settings + allows a(n) Float json object in params Grape::API - includes middleware arguments from settings - .insert_after + stores input in api.request.input Grape::API - runs after a given middleware - .insert_before + allows a(n) Hash json object in params Grape::API - runs before a given middleware - .use + stores input in api.request.input Grape::API - mounts behind error middleware + stores input in api.request.input Grape::API - calls the middleware + allows a(n) FalseClass json object in params Grape::API - adds a block if one is given + allows a(n) Integer json object in params Grape::API - does not show up outside the namespace + allows a(n) Array json object in params Grape::API - adds middleware + allows a(n) NilClass json object in params Grape::API - does not destroy the middleware settings on multiple runs + allows a(n) Symbol json object in params Grape::API - uses a block if one is given - routes - api with a custom route setting + stores input in api.request.input Grape::API - exposed - empty api structure + stores input in api.request.input Grape::API - returns an empty array of routes - api structure with an api without params + stores input in api.request.input Grape::API - sets params - api structure with multiple apis + allows a(n) String json object in params Grape::API - sets params - single method api structure + stores input in api.request.input Grape::API - returns one route - api structure with additional parameters + stores input in api.request.input + chunked transfer encoding Grape::API - splits a string + stores input in api.request.input + chunked transfer encoding Grape::API - splits a string with limit + stores input in api.request.input + chunked transfer encoding Grape::API - sets params - status + stores input in api.request.input + chunked transfer encoding Grape::API - can be set with a status code symbol + stores input in api.request.input + chunked transfer encoding Grape::API - can be set to arbitrary Integer value - api structure with two versions and a namespace + stores input in api.request.input + chunked transfer encoding Grape::API - sets route versions + stores input in api.request.input + chunked transfer encoding Grape::API - returns versions + stores input in api.request.input + chunked transfer encoding Grape::API - returns the latest version set + stores input in api.request.input + chunked transfer encoding Grape::API - sets prefix + stores input in api.request.input + when format is xml Grape::API - sets a nested namespace + returns a 405 for an unsupported method + format Grape::API - sets route paths - .call - it does not add to the app setup + allows .txt Grape::API - calls the app - .endpoints + allows .json + root routes should work with Grape::API - adds one for each route created - .helpers + Accept-Version header versioned APIs Grape::API - is accessible from the endpoint + unversioned APIs Grape::API - allows multiple calls with modules and blocks + param versioned APIs Grape::API - allows for modules + header versioned APIs Grape::API - is scopable + header versioned APIs with multiple headers + path versioned APIs + when array of versions provided Grape::API - is reopenable - with json default_error_formatter + is expected to eql "root" Grape::API - returns json error - .rescue_from + is expected to eql "root" + when a single version provided Grape::API - rescues all errors with a json formatter + without a format Grape::API - uses default_rescue_handler to handle invalid response from rescue_from + with a format + put Grape::API - does not rescue errors when rescue_from is not set + stores input in api.request.input Grape::API - uses custom helpers defined by using #helpers method + allows a(n) Array json object in params Grape::API - mimics default ruby "rescue" handler + stores input in api.request.input Grape::API -caught error of type StandardError in after callback inside Grape::Middleware::Formatter : StandardError - can rescue exceptions raised in the formatter + stores input in api.request.input Grape::API - rescues all errors if rescue_from :all is called + allows a(n) TrueClass json object in params 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 + allows a(n) FalseClass json object in params Grape::API - rescues custom grape exceptions + stores input in api.request.input Grape::API - does not re-raise exceptions of type Grape::Exceptions::Base - .insert + allows a(n) Symbol json object in params Grape::API - inserts middleware in a specific location in the stack - .endpoint + allows a(n) Float json object in params Grape::API - path - .route - plain + allows a(n) Integer json object in params Grape::API - provides access to route info - with desc + stores input in api.request.input Grape::API - returns route description + allows a(n) String json object in params Grape::API - returns route parameters - .compile + allows a(n) NilClass json object in params Grape::API - sets the instance - custom route helpers on nested APIs - returns the given id when it is valid - returns an error when the id is bad - .finally - when the ensure block has no exceptions - when no API call is made + allows a(n) Hash json object in params Grape::API - has not executed the ensure code - when a handled error occurs inside the API call + stores input in api.request.input Grape::API - executes the ensure code - when an unhandled occurs inside the API call + stores input in api.request.input Grape::API - executes the ensure code - when no errors occurs + stores input in api.request.input Grape::API - executes the ensure code - with a helper + stores input in api.request.input + chunked transfer encoding Grape::API - has access to the helper - do_not_route_head! + stores input in api.request.input + chunked transfer encoding Grape::API - does not allow HEAD on a GET request + stores input in api.request.input + chunked transfer encoding Grape::API - options does not contain HEAD - .version - when not defined + stores input in api.request.input + chunked transfer encoding Grape::API - returns nil - when defined + stores input in api.request.input + chunked transfer encoding Grape::API - returns version value - normal class methods - is equal to itself - can find the appropiate name - .rescue_from klass, with: :method_name + stores input in api.request.input + chunked transfer encoding Grape::API - correctly chooses exception handler if :all handler is specified + stores input in api.request.input + chunked transfer encoding Grape::API - aborts if the specified method name does not exist + stores input in api.request.input + chunked transfer encoding Grape::API - rescues an error with the specified method name - .mount - mounting an API + stores input in api.request.input + chunked transfer encoding Grape::API - responds to options with path versioning + stores input in api.request.input + when hook behaviour is controlled by attributes on the route + when HTTP method is defined and everything is like the before hooks expect Grape::API - applies auth to a mounted API with nested resources + ends up in the endpoint + when HTTP method is defined and the underlying before hook expectation is not met Grape::API - mounts on a nested path + ends up in the endpoint + when HEAD is called for the defined GET Grape::API - responds to options + responds with 401 because before expectations in before hooks are not met + when HTTP method is defined with attribute Grape::API - mounts a versioned API with nested resources + responds with the defined error in the before hook + when HTTP method is not defined Grape::API - mounts on a path + responds with a 405 status + when HEAD is called for the defined GET Grape::API - mounts a prefixed API with nested resources + responds with 200 because before hooks are not called + allows HEAD on a GET request that Grape::API - applies the settings of the mounting api + returns a 200 Grape::API - applies format to a mounted API with nested resources + has an empty body + adds an OPTIONS route for namespaced endpoints that Grape::API - applies the settings to nested mounted apis + has no Content-Length Grape::API - collects the routes of the mounted api + calls the inner before filter Grape::API - mounts multiple versioned APIs with nested resources + has no Content-Type Grape::API - recognizes potential versions with mounted path - when some rescues are defined by mounted + has an empty body Grape::API - prefers rescues defined by mounted if they rescue similar error class + has an Allow header Grape::API - prefers rescues defined by mounted even if outer is more specific + returns a 204 Grape::API - inherits parent rescues + calls the outer before filter + when accessing env Grape::API - prefers more specific rescues defined by mounted - 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 - with a bare rack app + returns a 405 for an unsupported method + when a resource routes by POST, GET, PATCH, PUT, and DELETE + it adds an OPTIONS route for namespaced endpoints that Grape::API - anchors the routes, passing all subroutes to it + has an Allow header Grape::API - makes a bare Rack app available at the endpoint + has an empty body Grape::API - is able to cascade - without a hash + returns a 204 + adds an OPTIONS route that Grape::API - calls through setting the route to "/" - catch-all + has no Content-Length Grape::API - anchor=false + does not call after_validation hook Grape::API - anchor=true - .compile! + calls before hook Grape::API - requires the grape/eager_load file + calls after hook Grape::API - compiles the instance for rack! - do_not_route_options! + has an empty body Grape::API - does not create an OPTIONS route + returns a 204 Grape::API - does not include OPTIONS in Allow header - .formatter - custom formatter class + has an Allow header Grape::API - uses custom formatter + does not call before_validation hook Grape::API - uses json - multiple formatters + has no Content-Type + adds a 405 Not Allowed route that Grape::API - sets one formatter + has a X-Custom-Header Grape::API - sets another formatter - custom formatter + returns a 405 Grape::API - uses custom formatter + contains error message in body Grape::API - uses json - .rescue_from klass, lambda + has an Allow header + .scope Grape::API - can execute the lambda with an argument + scopes the various settings + .inherited + does not override methods inherited from Class + overriding via composition + allows overriding the hook + overriding within class + allows overriding the hook + .compile Grape::API - rescues an error with the lambda - .http_basic + sets the instance + catch-all Grape::API - is callable via .auth as well + anchor=true Grape::API - protects any resources on the same scope + anchor=false + with unsafe HTML format specified Grape::API - has access to the current endpoint + escapes the HTML + .endpoints Grape::API - can set instance variables accessible to routes + adds one for each route created + with non-UTF-8 characters in specified format Grape::API - is scopable + converts the characters + format Grape::API - has access to helper methods - const_missing - raises an error - http_codes + does not include extension in id Grape::API - presented with + sets content type for xml error Grape::API - is used as presenter - .version using param - behaves like versioning + includes extension in format Grape::API - is able to specify version as a nesting + sets content type for serializable hash format Grape::API - sets the API version + sets content type for binary format Grape::API - adds the prefix before the API version + sets content type for error Grape::API - is able to specify multiple versions + sets content type for txt format Grape::API - does not overwrite version parameter with API version - with catch-all - v2 +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 - finds catch all + sets content type for json Grape::API - finds endpoint - v1 + returns raw data when content type binary Grape::API - finds endpoint + streams the content of the file with stream Grape::API - finds catch all - with before block defined within a version block + sets content type for xml Grape::API - calls before block that is defined within the version block - with different versions for the same endpoint - with a prefix + sets content type for json error Grape::API - allows the same endpoint to be implemented - without a prefix + does not set Cache-Control + env["api.format"] Grape::API - allows the same endpoint to be implemented - cascading - via version + uploads and downloads a Ruby file Grape::API - cascades + uploads and downloads a PNG file via /attachment.png Grape::API - does not cascade - via endpoint + uploads and downloads a PNG file via attachment + with a custom content_type Grape::API - does not cascade + sets content type for error Grape::API - cascades - with non-UTF-8 characters in specified format + sets content type + .configure Grape::API - converts the characters - .inherited - does not override methods inherited from Class - overriding via composition - allows overriding the hook - overriding within class - allows overriding the hook - .parser + allows configuring the api + when not given a block Grape::API - parses data in format requested by content-type - multi_xml + returns a configuration object + when given a block Grape::API - doesn't parse yaml - none parser class + returns self Grape::API - does not parse data - lambda parser + calls the block passing the config + .rescue_from klass, lambda Grape::API - uses parser for text/custom + rescues an error with the lambda Grape::API - uses parser for text/custom; charset=UTF-8 - custom parser class + can execute the lambda with an argument + routes + empty api structure Grape::API - uses custom parser - desc + returns an empty array of routes + api with a custom route setting Grape::API - uses full name of parameters in nested groups + exposed + api structure with an api without params Grape::API - describes methods separately + sets params + api structure with two versions and a namespace Grape::API - has params which does not include format and version as named captures + returns the latest version set 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 + sets a nested namespace 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 + sets route paths Grape::API - does not symbolize params + sets prefix Grape::API - merges the parameters of the namespace with the parameters of the method + sets route versions Grape::API - allows to set the type attribute on :group element + returns versions + api structure with additional parameters Grape::API - describes a method with parameters + sets params Grape::API - does not inherit param descriptions in consequent namespaces + splits a string Grape::API - groups nested params and prevents overwriting of params with same name in different groups + splits a string with limit + status Grape::API - empty array of routes + can be set to arbitrary Integer value Grape::API - parses parameters when no description is given + can be set with a status code symbol + api structure with multiple apis Grape::API - resets desc + sets params + single method api structure Grape::API - includes details + returns one route + .route_param Grape::API - empty array of routes + adds a parameterized route segment namespace Grape::API - merges the parameters of nested namespaces - filters + defines requirements with a single hash + with param type definitions Grape::API - adds a before filter + is used by passing to options + .version using header + behaves like versioning Grape::API - adds a before filter to current and child namespaces only + sets the API version Grape::API - adds a after filter + adds the prefix before the API version Grape::API - calls filters in the correct order + is able to specify version as a nesting Grape::API - adds a after_validation filter + does not overwrite version parameter with API version Grape::API - calls only before filters when validation fails + is able to specify multiple versions + with different versions for the same endpoint + with a prefix Grape::API - calls all filters when validation passes - .prefix + allows the same endpoint to be implemented + without a prefix Grape::API - routes through with the prefix + allows the same endpoint to be implemented + with catch-all + v2 Grape::API - routes root through with the prefix + finds catch all Grape::API - supports OPTIONS + finds endpoint + v1 Grape::API - disallows POST - .default_format + finds endpoint Grape::API - parses data in default format + finds catch all + with before block defined within a version block Grape::API - returns data in default format + calls before block that is defined within the version block instance_for_rack when the app was not mounted Grape::API @@ -4249,609 +2134,3018 @@ when the app was mounted Grape::API returns the first mounted instance - format + .helpers Grape::API - streams the content of the file with stream + allows multiple calls with modules and blocks 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 + is scopable Grape::API - sets content type for xml + is reopenable Grape::API - sets content type for json + allows for modules Grape::API - sets content type for txt format + is accessible from the endpoint + normal class methods + can find the appropiate name + is equal to itself + lifecycle + when the api_call fails validation Grape::API - sets content type for error + follows the failed_validation cycle (skips after_validation, api_call & after) + when the api_call has an exception Grape::API - sets content type for xml error + follows the errored life_cycle (skips after) + when the api_call has a controlled error Grape::API - does not include extension in id + follows the errored life_cycle (skips after) + when the api_call succeeds Grape::API - sets content type for json error + follows the standard life_cycle + .mount + without a hash Grape::API - returns raw data when content type binary + calls through setting the route to "/" + with a bare rack app Grape::API - sets content type for binary format + makes a bare Rack app available at the endpoint Grape::API - sets content type for serializable hash format + anchors the routes, passing all subroutes to it Grape::API - includes extension in format + is able to cascade + mounting an API Grape::API - does not set Cache-Control - with a custom content_type + mounts on a path Grape::API - sets content type + responds to options with path versioning Grape::API - sets content type for error - env["api.format"] + responds to options Grape::API - uploads and downloads a PNG file via /attachment.png + applies auth to a mounted API with nested resources Grape::API - uploads and downloads a Ruby file + mounts a prefixed API with nested resources Grape::API - uploads and downloads a PNG file via attachment - .version using path - behaves like versioning + mounts multiple versioned APIs with nested resources Grape::API - is able to specify multiple versions + mounts a versioned API with nested resources Grape::API - sets the API version + applies format to a mounted API with nested resources Grape::API - does not overwrite version parameter with API version + mounts on a nested path Grape::API - is able to specify version as a nesting + applies the settings to nested mounted apis Grape::API - adds the prefix before the API version - with different versions for the same endpoint - with a prefix + recognizes potential versions with mounted path Grape::API - allows the same endpoint to be implemented - without a prefix + collects the routes of the mounted api Grape::API - allows the same endpoint to be implemented - with before block defined within a version block + applies the settings of the mounting api + when some rescues are defined by mounted Grape::API - calls before block that is defined within the version block - with catch-all - v1 + inherits parent rescues Grape::API - finds endpoint + prefers rescues defined by mounted even if outer is more specific Grape::API - finds catch all - v2 + prefers more specific rescues defined by mounted Grape::API - finds endpoint + prefers rescues defined by mounted if they rescue similar error class + when including a module + correctlies include module in nested mount + when mounting class extends a subclass of Grape::API + mounts APIs with the same superclass + .parser Grape::API - finds catch all - .change! + parses data in format requested by content-type + custom parser class Grape::API - invalidates any compiled instance - .route_param + uses custom parser + multi_xml Grape::API - defines requirements with a single hash + doesn't parse yaml + lambda parser Grape::API - adds a parameterized route segment namespace - with param type definitions + uses parser for text/custom Grape::API - is used by passing to options - .version using header - behaves like versioning + uses parser for text/custom; charset=UTF-8 + none parser class Grape::API - does not overwrite version parameter with API version + does not parse data + .namespace Grape::API - sets the API version + is callable with nil just to push onto the stack Grape::API - adds the prefix before the API version + `.resource` is an alias Grape::API - is able to specify multiple versions + is retrievable and converted to a path Grape::API - is able to specify version as a nesting - with before block defined within a version block + comes after the prefix and version Grape::API - calls before block that is defined within the version block - with different versions for the same endpoint - without a prefix + cancels itself after the block is over Grape::API - allows the same endpoint to be implemented - with a prefix + accepts path segments correctly Grape::API - allows the same endpoint to be implemented - with catch-all - v1 + is stackable Grape::API - finds catch all + `.group` is an alias Grape::API - finds endpoint - v2 + `.resources` is an alias Grape::API - finds endpoint + `.segment` is an alias + desc Grape::API - finds catch all - .logger + empty array of routes Grape::API - does not unnecessarily retain duplicate setup blocks + has params which does not include format and version as named captures Grape::API - returns an instance of Logger class by default - with a custom logger - exposes its interaface - .default_error_status + does not symbolize params Grape::API - has a default error status +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 the default error status in error! + allows to set the type attribute on :group element Grape::API - allows setting default_error_status - body - false +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 - returns blank body - plain text + groups nested params and prevents overwriting of params with same name in different groups Grape::API - returns blank body - .namespace + merges the parameters of the namespace with the parameters of the method Grape::API - is callable with nil just to push onto the stack + empty array of routes Grape::API - comes after the prefix and version + merges the parameters of nested namespaces Grape::API - `.segment` is an alias + resets desc Grape::API - is retrievable and converted to a path + parses parameters when no description is given Grape::API - `.group` is an alias + uses full name of parameters in nested groups Grape::API - cancels itself after the block is over + describes a method with parameters Grape::API - `.resource` is an alias + includes details Grape::API - accepts path segments correctly + describes methods separately Grape::API - `.resources` is an alias + does not inherit param descriptions in consequent namespaces + do_not_route_head! Grape::API - is stackable - .content_type + options does not contain HEAD Grape::API - sets additional content-type + does not allow HEAD on a GET request + .rescue_from klass, with: :method_name Grape::API - allows to override content-type + rescues an error with the specified method name Grape::API - removes existing content types - .scope + correctly chooses exception handler if :all handler is specified Grape::API - scopes the various settings + aborts if the specified method name does not exist + custom route helpers on nested APIs + returns an error when the id is bad + returns the given id when it is valid + .call + it does not add to the app setup +Grape::API + calls the app .rescue_from klass, block Grape::API rescues Exception custom errors Grape::API - rescues a subclass of an error by default + does not rescue a different error Grape::API - rescues an error via rescue_from :all + rescues a subclass of an error by default Grape::API rescues a specific error Grape::API + rescues an error via rescue_from :all +Grape::API rescues multiple specific errors + .rescue_from klass, rescue_subclasses: boolean Grape::API - does not rescue a different error - .configure + rescues error as well as subclass errors with rescue_subclasses option set Grape::API - allows configuring the api - when given a block + does not rescue child errors if rescue_subclasses is false Grape::API - returns self + sets rescue_subclasses to true by default + .http_basic Grape::API - calls the block passing the config - when not given a block + protects any resources on the same scope Grape::API - returns a configuration object - with unsafe HTML format specified + is scopable Grape::API - escapes the HTML - .route + is callable via .auth as well Grape::API - allows for no path + has access to helper methods Grape::API - allows and properly constrain a OPTIONS method + has access to the current endpoint Grape::API - returns a 405 for an unsupported method with an X-Custom-Header + can set instance variables accessible to routes + .version using path + behaves like versioning Grape::API - allows for catch-all in a namespace + is able to specify multiple versions Grape::API - allows for multiple verbs + does not overwrite version parameter with API version Grape::API - runs all filters and body with a custom OPTIONS method + sets the API version Grape::API - allows for :any as a verb + is able to specify version as a nesting Grape::API - overwrites the default HEAD request + adds the prefix before the API version + with different versions for the same endpoint + without a prefix Grape::API - allows for multiple paths + allows the same endpoint to be implemented + with a prefix Grape::API - runs before filter exactly once on 405 bad method + allows the same endpoint to be implemented + with catch-all + v1 Grape::API - runs only the before filter on 405 bad method + finds catch all Grape::API - 405 responses includes an Content-Type header + finds endpoint + v2 Grape::API - 405 responses includes an Allow header specifying supported methods + finds endpoint Grape::API - handles empty calls + finds catch all + with before block defined within a version block Grape::API - allows for format without corrupting a param + calls before block that is defined within the version block + filters Grape::API - returns a 201 response code for POST by default + calls filters in the correct order Grape::API - allows and properly constrain a GET method + adds a before filter Grape::API - allows and properly constrain a PUT method + adds a after_validation filter Grape::API - allows and properly constrain a PATCH method + calls only before filters when validation fails Grape::API - allows for format in namespace with no path + adds a before filter to current and child namespaces only Grape::API - allows for multipart paths + adds a after filter Grape::API - allows and properly constrain a HEAD method + calls all filters when validation passes + .insert Grape::API - allows and properly constrain a DELETE method + inserts middleware in a specific location in the stack + .compile! Grape::API - allows and properly constrain a POST method - when a resource routes by POST, GET, PATCH, PUT, and DELETE - it adds an OPTIONS route for namespaced endpoints that + requires the grape/eager_load file Grape::API - has an empty body + compiles the instance for rack! + .version using accept_version_header + behaves like versioning Grape::API - returns a 204 + does not overwrite version parameter with API version Grape::API - has an Allow header - format + is able to specify version as a nesting Grape::API - allows .txt + sets the API version Grape::API - allows .json - adds a 405 Not Allowed route that + adds the prefix before the API version Grape::API - has a X-Custom-Header + is able to specify multiple versions + with different versions for the same endpoint + with a prefix Grape::API - has an Allow header + allows the same endpoint to be implemented + without a prefix Grape::API - contains error message in body + allows the same endpoint to be implemented + with before block defined within a version block Grape::API - returns a 405 - allows HEAD on a GET request that + calls before block that is defined within the version block + with catch-all + v2 Grape::API - returns a 200 + finds endpoint Grape::API - has an empty body - root routes should work with + finds catch all + v1 Grape::API - Accept-Version header versioned APIs + finds catch all Grape::API - unversioned APIs + finds endpoint + cascading + via version Grape::API - header versioned APIs + does not cascade Grape::API - param versioned APIs + cascades + via endpoint Grape::API - header versioned APIs with multiple headers - path versioned APIs - when a single version provided + does not cascade Grape::API - with a format + cascades + do_not_route_options! Grape::API - without a format - when array of versions provided + does not create an OPTIONS route Grape::API - is expected to eql "root" + does not include OPTIONS in Allow header + .rescue_from Grape::API - is expected to eql "root" - adds an OPTIONS route for namespaced endpoints that + uses default_rescue_handler to handle invalid response from rescue_from Grape::API - has an empty body + mimics default ruby "rescue" handler Grape::API - has no Content-Type +caught error of type StandardError in after callback inside Grape::Middleware::Formatter : StandardError + can rescue exceptions raised in the formatter Grape::API - calls the outer before filter + rescues only certain errors if rescue_from is called with specific errors Grape::API - returns a 204 + rescues all errors if rescue_from :all is called Grape::API - has an Allow header + rescues all errors with a json formatter Grape::API - calls the inner before filter + does not rescue errors when rescue_from is not set Grape::API - has no Content-Length - post + uses custom helpers defined by using #helpers method + CustomError subclass of Grape::Exceptions::Base Grape::API - stores input in api.request.input + does not re-raise exceptions of type Grape::Exceptions::Base Grape::API - allows a(n) String json object in params + rescues custom grape exceptions + with multiple apis + avoids polluting global namespace + .finally + when the ensure block has no exceptions + when no errors occurs Grape::API - allows a(n) Float json object in params + executes the ensure code + with a helper Grape::API - stores input in api.request.input + has access to the helper + when an unhandled occurs inside the API call Grape::API - allows a(n) TrueClass json object in params + executes the ensure code + when no API call is made Grape::API - stores input in api.request.input + has not executed the ensure code + when a handled error occurs inside the API call Grape::API - stores input in api.request.input + executes the ensure code + .prefix Grape::API - stores input in api.request.input + routes root through with the prefix Grape::API - stores input in api.request.input + routes through with the prefix Grape::API - allows a(n) Array json object in params + supports OPTIONS Grape::API - allows a(n) Symbol json object in params + disallows POST + .format + :serializable_hash Grape::API - allows a(n) FalseClass json object in params + array Grape::API - stores input in api.request.input + instance Grape::API - allows a(n) Hash json object in params + root + :json Grape::API - allows a(n) Integer json object in params + can be overwritten with an explicit content type Grape::API - stores input in api.request.input + does not force json with an extension Grape::API - stores input in api.request.input + forces json without an extension Grape::API - allows a(n) NilClass json object in params - chunked transfer encoding + forces json from a non-accepting header Grape::API - stores input in api.request.input - chunked transfer encoding + raised :error from middleware + :txt only Grape::API - stores input in api.request.input - chunked transfer encoding + forces txt from a non-accepting header Grape::API - stores input in api.request.input - chunked transfer encoding + forces txt without an extension Grape::API - stores input in api.request.input - chunked transfer encoding + does not accept extensions other than specified Grape::API - stores input in api.request.input - chunked transfer encoding + accepts specified extension + :txt Grape::API - stores input in api.request.input - chunked transfer encoding + forces txt without an extension Grape::API - stores input in api.request.input - chunked transfer encoding + forces txt from a non-accepting header Grape::API - stores input in api.request.input - chunked transfer encoding + does not force txt with an extension + :xml Grape::API - stores input in api.request.input - when format is xml + array Grape::API - returns a 405 for an unsupported method - put + string Grape::API - allows a(n) Symbol json object in params + raised :error from middleware Grape::API - allows a(n) NilClass json object in params + hash + custom middleware + .insert_after Grape::API - allows a(n) Integer json object in params + runs after a given middleware + .insert_before Grape::API - allows a(n) String json object in params + runs before a given middleware + .use Grape::API - stores input in api.request.input + adds a block if one is given Grape::API - stores input in api.request.input + does not destroy the middleware settings on multiple runs Grape::API - allows a(n) TrueClass json object in params + adds middleware Grape::API - stores input in api.request.input + does not show up outside the namespace Grape::API - stores input in api.request.input + calls the middleware Grape::API - allows a(n) Array json object in params + uses a block if one is given Grape::API - stores input in api.request.input + mounts behind error middleware + .middleware Grape::API - allows a(n) Hash json object in params + includes all middleware from stacked settings Grape::API - stores input in api.request.input + includes middleware arguments from settings + .version using param + behaves like versioning Grape::API - stores input in api.request.input + is able to specify multiple versions Grape::API - stores input in api.request.input + is able to specify version as a nesting Grape::API - allows a(n) FalseClass json object in params + adds the prefix before the API version Grape::API - stores input in api.request.input + sets the API version Grape::API - allows a(n) Float json object in params - chunked transfer encoding + does not overwrite version parameter with API version + with before block defined within a version block Grape::API - stores input in api.request.input - chunked transfer encoding + calls before block that is defined within the version block + with different versions for the same endpoint + with a prefix Grape::API - stores input in api.request.input - chunked transfer encoding + allows the same endpoint to be implemented + without a prefix Grape::API - stores input in api.request.input - chunked transfer encoding + allows the same endpoint to be implemented + with catch-all + v2 Grape::API - stores input in api.request.input - chunked transfer encoding + finds endpoint Grape::API - stores input in api.request.input - chunked transfer encoding + finds catch all + v1 Grape::API - stores input in api.request.input - chunked transfer encoding + finds endpoint Grape::API - stores input in api.request.input - chunked transfer encoding + finds catch all + .content_type Grape::API - stores input in api.request.input - chunked transfer encoding + removes existing content types Grape::API - stores input in api.request.input - when accessing env + sets additional content-type Grape::API - returns a 405 for an unsupported method - when hook behaviour is controlled by attributes on the route - when HTTP method is defined and the underlying before hook expectation is not met + allows to override content-type + .represent Grape::API - ends up in the endpoint - when HEAD is called for the defined GET + adds the association to the :representations setting Grape::API - responds with 200 because before hooks are not called - when HEAD is called for the defined GET + requires a :with option + .logger Grape::API - responds with 401 because before expectations in before hooks are not met - when HTTP method is defined with attribute + returns an instance of Logger class by default Grape::API - responds with the defined error in the before hook - when HTTP method is not defined + does not unnecessarily retain duplicate setup blocks + with a custom logger + exposes its interaface + .change! Grape::API - responds with a 405 status - when HTTP method is defined and everything is like the before hooks expect + invalidates any compiled instance + with json default_error_formatter Grape::API - ends up in the endpoint - adds an OPTIONS route that + returns json error + .error_format Grape::API - has no Content-Type + rescues all errors and return :txt Grape::API - calls after hook + rescues all errors and return :json with backtrace Grape::API - returns a 204 + rescues error! and return txt Grape::API - has no Content-Length + defaults the error formatter to format Grape::API - does not call after_validation hook + rescues all errors with a default formatter Grape::API - has an empty body + rescues all errors and return :json Grape::API - has an Allow header + rescues all errors and return :txt with backtrace + class Grape::API - does not call before_validation hook + returns a custom error format + with json format Grape::API - calls before hook + rescues error! called with a hash and returns json +Grape::API + rescues error! called with a symbol and returns json +Grape::API + rescues error! called with a string and returns json + 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 +Grape::API + returns a custom error format + http_codes +Grape::API + is used as presenter +Grape::API + presented with + .endpoint +Grape::API + path -Grape::Validations::Validators::MutualExclusionValidator +Grape::Request + #params + by default returns stringified parameter keys + when build_params_with: Grape::Extensions::Hash::ParamBuilder is specified + returns symbolized params + with grape.routing_args + cuts version and route_info + 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 + #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 + +Grape::API::Helpers + non overriding subclass + given expected params + inherits helpers from a superclass + with lack of expected params + returns missing error + overriding subclass + given expected params + overrides 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::Middleware::Auth::DSL + .http_basic + sets auth parameters + .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 + +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 + the description key instead of desc + adds the given description + false as a default value + is still documented + nil 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 + behaves like an optional doc attribute + does not mention it + behaves like an optional doc attribute + does not mention it + #extract_details + cleans up doc attrs needed for documentation only + tells when attributes are required + does not clean up doc attrs mandatory for validators + +MultiJson + uses multi_json (PENDING: Temporarily skipped with xit) + +Rack::Sendfile + when calling sendfile + contains Sendfile headers + when streaming non file content + not contains Sendfile headers + +Grape::Endpoint + when route modifies param value + param default should not change + +Grape::DSL::Desc + .desc + can be set with options and a block + can be set with a block + sets a description + +Grape::Validations::Types::ArrayCoercer + #call + an array of primitives + coerces elements in the array + an array of arrays + coerces elements in the nested array + an array of sets + coerces elements in the nested set + +Grape::Util::StackableValues + #clone + copies all values + complex (i.e. not primitive) data types (ex. middleware, please see bug #930) + copies values; does not duplicate them + #keys + returns merged keys with parent + returns all keys + #[] + combines parent and actual values + parent values are not changed + returns an array of values + returns parent value when no value is set + #[]= + sets a value + pushes further values + can handle array values + #delete + deletes a key + does not delete parent values + #to_hash + returns a Hash representation + +Grape::Parser + .builtin_parsers + includes json and xml parsers by default + returns an instance of Hash + .parsers + returns an instance of Hash + includes built-in parsers + with added parser by using `register` keyword + includes added parser + with :parsers option + includes passed :parsers values + .parser_for + returns parser correctly + calls .parsers + when parser is available + returns registered parser if available + when parser is an instance of Symbol + returns object which can be called + returns an instance of Method + when parser does not exist + returns nil + +Grape::Endpoint + put + responds + get + responds + +Grape::Validations::Validators::AtLeastOneOfValidator #validate! - 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 required hash - returns a validation error with full names of the params - when no mutually exclusive params are present + when all restricted params are present does not return a validation error - when mutually exclusive params are nested inside optional hash - when params are empty + mixed with other params does not return a validation error - when params are passed + 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 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 custom message is specified - returns a validation error - when a subset of mutually exclusive params are present + 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 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 none of the restricted params is selected returns a validation error + when custom message is specified + returns a validation error + when exactly one of the restricted params is selected + does not return a validation error + when a subset of restricted params are present + does not return a validation error + +Grape::Endpoint + #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 :compositor_id for mounter in route_param + return only :artist_id without :id + return :filter and :id parameters in declared for second enpoint inside route_param + return only :id without :artist_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) + validates the renamed parameter correctly (original name) + maps the renamed parameter correctly (original name) + ignores the renamed parameter (as name, 2) + generates the correct parameter names for documentation + ignores the renamed parameter (as name, 3) + with a deeply nested parameter structure + does not modify the request params + maps no parameters when none are given + generates the correct parameter names for documentation + maps the renamed parameter correctly + with a renamed root parameter + maps the renamed parameter correctly (original name) + generates the correct parameter names for documentation + validates the renamed parameter correctly (original name) + ignores the renamed parameter (as name) + with a renamed hash with nested parameters + 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) + #declared + builds nested params + has as many keys as there are declared params + builds arrays correctly + has a optional param with default value all the time + shows nil for nested params if include_missing is true + stringifies if that option is passed + includes missing attributes with defaults when there are nested hashes + shows nil for multiple allowed types if include_missing is true + filters out any additional params that are given + does not work in a before filter + includes attributes with value that evaluates to false + builds nested params when given array + does not include renamed missing attributes if that option is passed + includes attributes with value that evaluates to nil + does not include missing attributes if that option is passed + does not include missing attributes when there are nested hashes + when the param is missing and include_missing=false + sets nested objects to be nil + when the param is missing and include_missing=true + sets objects with type=Array to be an array + sets objects with type=Hash to be a hash + includes all declared children when type=Hash + sets objects with type=Set to be a set + when params are not built with default class + returns an object that corresponds with the params class - hash +W, [2025-06-13T18:53:52.791650 #3061948] 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-06-13T18:53:52.792233 #3061948] 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 + +Grape::API + an endpoint with documentation + documents parameters + allows documentation with a hash + an endpoint without documentation + still declares params internally + does not document parameters for the endpoint Grape::API::Helpers - default - default - private - public - patch - public - default - private + defines parameters Grape::Middleware::Error - is possible to return errors in xml format - with defaults - does not trap errors by default + does not trap regular error! codes + 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 specify a different default status code + is possible to return the backtrace and the original exception in txt format + 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 - is possible to return hash errors in xml format + is possible to return errors in json format - is possible to return the backtrace and the original exception in xml format + is possible to return errors in xml format - is possible to return the backtrace and the original exception in txt format + is possible to specify a custom formatter + + is possible to return hash errors in json format + + is possible to return hash errors in xml format is possible to return errors in jsonapi 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 hash errors in jsonapi format + with defaults + does not trap errors by default with rescue_all StandardError exception - sets the message appropriately defaults to a 500 status + sets the message appropriately Non-StandardError exception does not trap errors other than StandardError - does not trap regular error! codes - - is possible to specify a custom formatter - - is possible to return errors in json 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 return hash errors in jsonapi format + 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 the backtrace and the original exception in xml format -Rack - correctly populates params from a Tempfile - when the app is mounted - finds the app on the namespace +Grape::Middleware::Globals + calls through to the app + environment + sets the grape.request.headers environment + sets the grape.request.params environment + sets the grape.request environment -Grape::Middleware::Auth::Strategies - Basic Auth - throws a 401 if no auth is given - authenticates if given valid creds - throws a 401 is wrong auth is given +Grape::Middleware::Formatter + content-type + is set for custom + is set for json + is set for vendored with registered type + is set for xml + is set to closest generic for custom vendored/versioned without registered type + is set for txt + format + uses custom formatter + uses custom json formatter + default + uses default json formatter + input + rewinds IO + parses the chunked body from DELETE and copies values into rack.request.from_hash + parses the chunked body from POST and copies values into rack.request.from_hash + ignores multipart/mixed + parses the body from an xml PATCH 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/related + rewinds IO + ignores application/x-www-form-urlencoded + ignores multipart/form-data + ignores multipart/related + ignores multipart/related + ignores multipart/form-data + ignores multipart/related + ignores multipart/mixed + ignores multipart/mixed + ignores application/x-www-form-urlencoded + ignores application/x-www-form-urlencoded + parses the body from an xml PUT and copies values into rack.request.from_hash + ignores multipart/form-data + parses the body from an xml POST and copies values into rack.request.from_hash + parses the chunked body from PATCH and copies values into rack.request.from_hash + ignores multipart/mixed + ignores multipart/form-data + rewinds IO + rewinds IO + ignores application/x-www-form-urlencoded + parses the chunked body from PUT and copies values into rack.request.from_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 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 PATCH 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 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 + 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 + 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 + 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 empty + does not read and parse the body + application/json; charset=utf-8 + parses the body from DELETE and copies values into rack.request.form_hash + application/json + 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 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 + send file + returns a file response + accept header detection + parses headers with symbols as hash keys + parses headers with other attributes + ignores invalid quality rankings + uses quality rankings to determine formats + handles quality rankings that have a default 1.0 value + ensures that a quality of 0 is less preferred than any other content type + parses headers with vendor and api version + handles quality rankings mixed with nothing + detects from the Accept header + with custom vendored content types + uses the custom type + detection + uses the default format if none 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 json extension if one is provided + serialization + looks at the bodies for possibly serializable data + jsonapi + calls #to_json if the content type is jsonapi + xml + calls #to_xml if the content type is xml + default format + calls #to_json since default format is json + custom parser raises exception and rescue options are enabled for backtrace and original_exception + adds the backtrace and original_exception to the error output + error handling + rescues formatter-specific exceptions +caught error of type StandardError in after callback inside Grape::Middleware::Formatter : StandardError + does not rescue other exceptions + inheritable formatters + returns response by invalid formatter + no content responses + does not modify a 186 response + does not modify a 121 response + does not modify a 181 response + does not modify a 124 response + does not modify a 204 response + does not modify a 128 response + does not modify a 140 response + does not modify a 189 response + does not modify a 132 response + does not modify a 118 response + does not modify a 179 response + does not modify a 111 response + does not modify a 110 response + does not modify a 172 response + does not modify a 123 response + does not modify a 174 response + does not modify a 176 response + does not modify a 138 response + does not modify a 185 response + does not modify a 177 response + does not modify a 153 response + does not modify a 150 response + does not modify a 129 response + does not modify a 178 response + does not modify a 182 response + does not modify a 173 response + does not modify a 184 response + does not modify a 115 response + does not modify a 151 response + does not modify a 141 response + does not modify a 187 response + does not modify a 134 response + does not modify a 196 response + does not modify a 143 response + does not modify a 133 response + does not modify a 304 response + does not modify a 104 response + does not modify a 158 response + does not modify a 149 response + does not modify a 197 response + does not modify a 131 response + does not modify a 183 response + does not modify a 102 response + does not modify a 148 response + does not modify a 159 response + does not modify a 137 response + does not modify a 191 response + does not modify a 100 response + does not modify a 155 response + does not modify a 164 response + does not modify a 120 response + does not modify a 175 response + does not modify a 154 response + does not modify a 180 response + does not modify a 145 response + does not modify a 142 response + does not modify a 161 response + does not modify a 190 response + does not modify a 156 response + does not modify a 188 response + does not modify a 114 response + does not modify a 157 response + does not modify a 166 response + does not modify a 195 response + does not modify a 192 response + does not modify a 198 response + does not modify a 160 response + does not modify a 165 response + does not modify a 116 response + does not modify a 119 response + does not modify a 117 response + does not modify a 146 response + does not modify a 171 response + does not modify a 108 response + does not modify a 162 response + does not modify a 147 response + does not modify a 169 response + does not modify a 168 response + does not modify a 152 response + does not modify a 194 response + does not modify a 122 response + does not modify a 199 response + does not modify a 136 response + does not modify a 107 response + does not modify a 135 response + does not modify a 167 response + does not modify a 103 response + does not modify a 127 response + does not modify a 112 response + does not modify a 101 response + does not modify a 170 response + does not modify a 163 response + does not modify a 130 response + does not modify a 109 response + does not modify a 139 response + does not modify a 113 response + does not modify a 144 response + does not modify a 193 response + does not modify a 125 response + does not modify a 126 response + does not modify a 105 response + does not modify a 106 response -Grape::DSL::Desc - .desc - sets a description - can be set with a block - can be set with options and a block +Grape::Endpoint + put + responds + get + responds with ext + responds without ext + +Grape::Endpoint + post + 405 + +Grape::Validations::Validators::MutualExclusionValidator + #validate! + when mutually exclusive params are deeply nested + returns a validation error with full names of the params + 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 all mutually exclusive params are present + returns a validation error + mixed with other params + returns a validation error + when custom message is specified + returns a validation error + 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 mutually exclusive params are nested inside array + returns a validation error with full names of the params + when no mutually exclusive params are present + does not return a validation error + +Grape::Extensions::Hashie::Mash::ParamBuilder + in an endpoint + #params + is of type Hashie::Mash + in an api + is indifferent to key or symbol access + #params + is Hashie::Mash + in a nested namespace api + is Hashie::Mash + +Grape::Exceptions::Base + #message + is expected to eq "a_message" + #to_s + is expected to eq "a_message" + #compose_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 + 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 + +Grape::Validations::Validators::CoerceValidator + coerce + error on malformed input (Array) + error on malformed input + first-class JSON + accepts Array[JSON] shorthand + doesn't make sense using coerce_with + parses objects, hashes, and arrays + works when declared optional + using coerce_with + parses parameters with Array[String] type + parses parameters with Array[Array[String]] type and coerce_with + parses parameters with Array[Integer] type + parses parameters even if type is valid + uses parse where available + must be supplied with :type or :coerce + parses parameters with Array type + accepts any callable + Integer type and coerce_with potentially returning nil + coerces to Integer + returns invalid value if coercion returns a wrong type + accepts value that coerces to nil + Array type and coerce_with should + coerce nil value to array + coerce array as array + not coerce missing field + Integer type and coerce_with should + not coerce missing field + coerce nil value to integer + coerce integer as integer + converter + does not build a coercer multiple times + with a custom validation message + errors on malformed input + on custom coercion rules + performs no additional coercion + still validates type + respects :coerce_with + multiple types + fails when no coercion is possible + may not be supplied together with a single type + coerces to first possible type + when params is Hashie::Mash + for primitive collections + allows collections with multiple types + allows singular form declaration + allows multiple collection types + custom coercion rules + performs no additional coercion + still validates type + respects :coerce_with + for primitive collections + allows collections with multiple types + allows singular form declaration + allows multiple collection types + coerces + Nests integers + BigDecimal + String + Grape::API::Boolean + Integer + a custom type + coerces the given value + returning the InvalidValue instance when invalid + uses a custom message added to the invalid value + empty string + special types + 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] + is coerced to nil for type [Integer, String, [Integer, String]] + primitive types + is coerced to nil for type Float + is coerced to nil for type Date + is coerced to nil for type FalseClass + is coerced to nil for type Grape::API::Boolean + is coerced to nil for type DateTime + is coerced to nil for type Numeric + is coerced to nil for type Symbol + is coerced to nil for type BigDecimal + is coerced to nil for type Integer + is not coerced to nil for type String + is coerced to nil for type Time + is coerced to nil for type TrueClass + structures types + is coerced to nil for type Array + is coerced to nil for type Set + 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 + respects the nil value + respects the nil value + variant-member-type collections + respects the nil value + respects the nil value + primitive types + respects the nil value + respects the nil value + respects the nil value + respects the nil value + respects the nil value + respects the nil value + respects the nil value + respects the nil value + respects the nil value + respects the nil value + respects the nil value + respects the nil value + json + BigDecimal + Grape::API::Boolean + File + Rack::Multipart::UploadedFile + collection + File + Set + Set of Bools + Set of Integers + Array + Array of Bools + Array of type implementing parse + Array of Integers + Set of type implementing parse + Array of a custom type + i18n + i18n error on malformed input + gives an english fallback error when default locale message is blank + +Grape::API + execute first request in reasonable time + +Grape::Validations::Types::PrimitiveCoercer + #call + Integer + coerces an empty string to nil + accepts non-nil value + Boolean + returns an error when the given value cannot be coerced + coerces '1' to true + coerces 'true' to true + coerces 'false' to false + coerces 'true' to true + coerces 'false' to false + coerces an empty string to nil + coerces '0' to false + a type unknown in Dry-types + raises error on init + DateTime + coerces an empty string to nil + Numeric + coerces an empty string to nil + accepts a non-nil value + Float + coerces an empty string to nil + BigDecimal + coerces an empty string to nil + coerces to BigDecimal + Symbol + coerces an empty string to nil + String + does not coerce an empty string to nil + coerces to String + the strict mode + BigDecimal + returns a value as it is when the given value is BigDecimal + returns an error when the given value is not BigDecimal + Boolean + returns an error when the given value is not Boolean + returns a value as it is when the given value is Boolean + Time + coerces an empty string to nil + +Grape::Endpoint + sets itself in the env upon call + allows explicit return calls + resets all instance variables (except block) between calls + does not persist params between calls + #headers + includes request headers + includes additional request headers + includes headers passed as symbols + #header + is callable from within a block + .before_each + is able to stack helper + is settable via block + is able to override a helper + is settable via reference + #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 + anchoring + all other + responds to /example/and/some/more for the non-anchored PUT method + allows for the anchoring option with a OPTIONS method + allows for the anchoring option with a GET method + responds to /example/and/some/more for the non-anchored POST method + responds to /example/and/some/more for the non-anchored OPTIONS method + allows for the anchoring option with a PATCH method + anchors paths by default for the OPTIONS method + anchors paths by default for the GET method + responds to /example/and/some/more for the non-anchored HEAD method + anchors paths by default for the POST method + allows for the anchoring option with a HEAD method + allows for the anchoring option with a PUT method + responds to /example/and/some/more for the non-anchored PATCH method + anchors paths by default for the PATCH method + responds to /example/and/some/more for the non-anchored GET method + anchors paths by default for the PUT method + allows for the anchoring option with a POST method + anchors paths by default for the HEAD method + delete 200, with response body + responds to /example/and/some/more for the non-anchored delete method + delete 204, with nil has return value (no explicit body) + responds to /example delete method + delete 200, with a return value (no explicit body) + responds to /example delete method + delete 204, with empty array has 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 + filters + allows adding to response with present + before filters + runs the before filter if set + when terminating the response with error! + breaks normal call chain + allows prior and parent filters of same type to run + after filters + overrides the response body if it sets it + does not override the response body with its return + #initialize + takes a settings stack, options, and 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 frozen object + can specifiy headers + accepts a message + sets the status code for the endpoint + 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 + .generate_api_method + raises NameError if the method name is already in use + returns a Proc + raises ArgumentError if a block is not given + #status + is callable from within a block + is set as default to 201 for post + is set as default to 200 for get + #params + default class + is a ActiveSupport::HashWithIndifferentAccess + sets a value to params + params + #cookies + deletes cookies with path + sets browser cookies and does not set response cookies + deletes cookie + is callable from within a block + sets and update browser cookies + #redirect + has status code 303 if it is not get request and it is http 1.1 + support permanent redirect + redirects to a url with status 302 + allows for an optional redirect body override + version headers + result in a 406 response if they are invalid + result in a 406 response if they cannot be parsed by rack-accept + instrumentation + notifies AS::N + validation errors + returns the errors, and passes headers + #params + does not accept text/plain in JSON format if application/json is specified as content type + is available to the caller + responds with a 415 for an unsupported content-type + parses from path segments + deeply converts nested params + precedence + route string params have higher precedence than body params + route string params have higher precedence than URL params + with special requirements + parses many params with provided regexps + parses email param with provided requirements for params + namespace requirements + parse email param with provided requirements for params + overrides outer namespace's requirements + when the limit on multipart files is exceeded + returns a 413 if given too many multipart files + content type with params + responses with given content type in headers + does not response with 406 for same type without params + from body parameters + converts XML bodies to params + does not convert empty JSON bodies to params + returns a 400 if given an invalid multipart body + does not include parameters not defined by the body + converts JSON bodies to params + converts XML bodies to params + sets a value to params + params + request + includes version v1 + is set to the url requested + includes prefix + includes version v1 + +Grape::DSL::RequestResponse + .default_error_status + sets a default error status + .rescue_from + list of exceptions is passed + sets given proc as rescue handler for each key in hash + rescues only base handlers if rescue_subclasses: false option is passed + 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 + :grape_exceptions + sets rescue all to true + sets given block as rescue handler + sets given proc as rescue handler + sets a rescue handler declared through :with option + :all + sets given proc as rescue handler + abort if both :with option and block are passed + sets a rescue handler declared through :with option + sets rescue all to true + abort if :with option value is not Symbol, String or Proc + sets given block as rescue handler + .parser + sets a parser for a content type + .format + sets a new format + .default_error_formatter + sets a new error formatter + .default_format + returns the format without paramter + sets the default format + .represent + sets a presenter for a class + .content_type + sets a content type for a format + .error_formatter + understands syntactic sugar + sets a error_formatter + .formatter + sets the formatter for a content type + .content_types + returns all content types + +Grape::DSL::Settings + #unset_api_class_setting + delegates to unset + #unset_global_setting + delegates to unset + #global_setting + delegates to get_or_set + #route_setting + sets a value until the next route + delegates to get_or_set + #within_namespace + calls start and end for a namespace + returns the last result + #unset + deletes a key from settings + #namespace_setting + sets a value until the end of a namespace + delegates to get_or_set + resets values after leaving nested namespaces + #namespace_stackable + stacks values from surrounding namespace + delegates to get_or_set + #namespace_inheritable + inherits values from surrounding namespace + delegates to get_or_set + #unset_namespace_setting + delegates to unset + #unset_route_setting + delegates to unset + complex scenario + plays well + #get_or_set + returns a value when nil is new value is provided + sets a values + #unset_namespace_stackable + delegates to unset + #api_class_setting + delegates to get_or_set + #unset_namespace_inheritable + delegates to unset + +Grape::DSL::Logger + .logger + returns a logger + sets a logger + +Grape::Validations::ParamsScope + includes the nested parameter within #declared(params) + includes level 2 nested parameters outside the given within #declared(params) + includes deeply nested parameters within #declared(params) + returns a sensible error message within a nested context + raises an error if the dependent parameter was never specified + when validations are dependent on a parameter with specific value + (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 6) + 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 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 + (case 0) + 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 + includes the parameter within #declared(params) + (case 9) + 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 4) + 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 + skips validation when base param is missing + (case 3) + skips validation when base param does not have a specified value + includes the parameter within #declared(params) + skips validation when base param is missing + applies the validation when base param has the specific value + (case 15) + 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 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 2) + 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) + skips validation when base param is missing + (case 11) + 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 12) + 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 13) + 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) + 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 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 7) + 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 + 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 + when params have group attributes + with several group attributes + when correct data is provided + returns a successful response + when data is invalid + responds with HTTP error + returns a validation error + 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 nested groups + when data is invalid + responds with HTTP error + returns a validation error + when correct data is provided + returns a successful response + with validations + when data is invalid + applies group validations for every parameter + returns a validation error + when parameter has the same validator as a group + returns a successful response + prioritizes parameter validation over group validation + 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 in value + allows the proc to pass validation without checking + param renaming + renaming can be defined after default + is expected to eq 200 + is expected to eq "-there we go" + is expected to eq "any-any2" + renaming can be defined before default + is expected to eq "foo is empty" + is expected to eq "{\"baz\":{\"qux\":\"any\"}}" + 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 + array without coerce type explicitly given + fails to call API without Array type + raises exception when values are of different type + sets the type based on first element + raises exception when range values have different endpoint types + 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 + when using custom types + coerces the parameter via the type's parse method + when validations are dependent on a parameter + applies the validations only if the parameter is present + detect unmet nested dependency + does not raise an error if when using nested given + allows nested dependent parameters + allows renaming of dependent on parameter + includes level 2 nested parameters outside the given within #declared(params) + includes the parameter within #declared(params) + allows renaming of dependent parameters + does not raise if the dependent parameter is not the renamed one + raises an error if the dependent parameter is the renamed one + raises an error if the dependent parameter was never specified + returns a sensible error message within a nested context + applies only the appropriate validation + does not raise an error if the dependent parameter is a Hash + includes the nested parameter within #declared(params) + does not validate nested requires when given is false + applies the validations of multiple parameters + when the dependent parameter is not present #declared(params) + lateral hash parameter + evaluate_given_false + evaluate_given_true + nested given parameter within an array param + evaluate_given_false + evaluate_given_true + nested given parameter + evaluate_given_false + evaluate_given_true + nested given parameter within a nested given parameter within an array param + evaluate_given_true + evaluate_given_false + lateral parameter + evaluate_given_true + evaluate_given_false + lateral parameter within an array param + evaluate_given_false + evaluate_given_true + lateral parameter within lateral hash parameter + evaluate_given_false + evaluate_given_true + parameters in group + errors when no type is provided + allows Hash as type + handles missing optional Array type + allows Array as type + errors with an unsupported type + when validations are dependent on a parameter within an array param + passes none Hash params + when validations are dependent on a parameter within an array param within #declared(params).to_json + applies the constraint within each value + with range values + when right range endpoint isn't #kind_of? the type + raises exception + 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 a subset of allowed values + does not raise an exception + and is the entire range of allowed values + does not raise an exception + when left range endpoint isn't #kind_of? the type + raises exception + +Grape::Exceptions::InvalidResponse + #message + contains the problem in the message + +A named API + can access the name of the API + +Grape::Middleware::Versioner + recognizes :param + recognizes :accept_version_header + recognizes :header + recognizes :path + +Grape::Validations::Types + ::primitive? + recognizes Date as a primitive + recognizes Symbol as a primitive + recognizes DateTime as a primitive + recognizes Integer as a primitive + recognizes Numeric as a primitive + recognizes String as a primitive + recognizes Grape::API::Boolean as a primitive + recognizes BigDecimal as a primitive + recognizes Time as a primitive + recognizes Float as a primitive + identifies unknown types + ::structure? + recognizes Hash as a structure + recognizes Set as a structure + recognizes Array as a structure + ::special? + provides special handling for Rack::Multipart::UploadedFile + provides special handling for File + provides special handling for [JSON] + provides special handling for JSON + ::custom? + returns false if the type does not respond to :parse + returns false if the type's #parse method takes other than one argument + returns true if the type responds to :parse with one argument + ::build_coercer + has internal cache variables + caches the result of the build_coercer method + special types + when File + is expected to eq Grape::Validations::Types::File + 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 + +Validator with instance variables + passes validation every time + +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 + +Grape::Util::InheritableSetting + #namespace_inheritable + works with inheritable values + handles different parents + #api_class + is specific to the class + #point_in_time_copy + decouples namespace stackable values + decouples namespace values + decouples namespace reverse stackable values + decouples route values + adds itself to original as clone + resets point_in_time_copies + decouples namespace inheritable values + #to_hash + return all settings as a hash + #inherit_from + notifies clones + #namespace_stackable + works with stackable values + #route + works with route values + sets a value until the next route + #namespace_reverse_stackable + works with reverse stackable values + #global + sets a global value + sets the global inherited values + handles different parents + overrides global values + #api_class + is specific to the class + #namespace + uses new values when a new namespace starts + sets a value until the end of a namespace + +Grape::API + remounting an API + with a defined route + when mounting on namespace + can access the votes in both places + when mounting one instance + can access the endpoint + when mounting twice + can access the votes in both places + with dynamic configuration + on the DescSCope + mounts the endpoint with the appropiate tags + when mounting an endpoint conditional on a configuration + mounts the endpoints only when configured to do so + 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 executing a custom block on mount + mounts the endpoints only when configured to do so + 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 + 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 executing a standard block within a `mounted` block with all dynamic params + mounts the API and obtains the description and headers definition + a very complex configuration example + when the namespace should be mounted + gets a response + when should be mounted is nil + gets a response + when it should not be mounted + gets a response + 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 + +Grape::API::Helpers + defines parameters + +Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder + in an api + #params + parses sub hash params + is a Hash + params are indifferent to symbol or string keys + responds to string keys + in an endpoint + #params + is of type Hash + +Grape::Exceptions::MissingOption + #message + contains the problem in the message + +Grape::Validations::MultipleAttributesIterator + #each + 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 + when params is empty optional placeholder + does not yield it + +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 not set + succeeds if proper header is set + fails with 406 Not Acceptable if header is empty + when :strict and cascade: false + succeeds if proper header is set + fails with 406 Not Acceptable if header is empty + fails with 406 Not Acceptable if header is not set + api.version + is set if format provided + is set + fails with 406 Not Acceptable if version is not supported + +Grape::DSL::Parameters + #params + inherits params from parent + when params argument is a hash + returns value for @element key + 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 + #requires + adds a required parameter + #use_scope + is alias to #use + #use + calls processes associated with named params + raises error when non-existent named param is called + #at_least_one_of + adds an at least one of parameter validation + #group + is alias to #requires + #optional + adds an optional parameter + #mutually_exclusive + adds an mutally exclusive parameter validation + #exactly_one_of + adds an exactly of one parameter validation + #with + creates a scope with group attributes + #includes + is alias to #use + #all_or_none_of + adds an all or none of parameter validation + +Grape::API + .recognize_path + fetches endpoint by given path + returns nil if given path does not match with registered routes + +Grape::Middleware::Base + calls through to the app + has the app as an accessor + is able to access the response + header overwrite + overwrites header by after headers + #context + allows access to response context + callbacks on error + calls #after + #response + when Array + header + status + returns the memoized Rack::Response instance + body + when Rack::Response + header + body + returns the memoized Rack::Response instance + status + callbacks + calls #after + calls #before + after callback with errors + does not overwrite the application response + with patched warnings + does show a warning + 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 + +Grape::Util::InheritableValues + #[] + returns a value + returns parent value when no value is set + parent values are not changed + overwrites parent value with the current one + #[]= + sets a value + #clone + complex (i.e. not primitive) data types (ex. entity classes, please see bug #891) + copies values; does not duplicate them + #to_hash + returns a Hash representation + #delete + deletes a key + does not delete parent values + +Grape::Endpoint + #redirect + default + sets status to 302 + sets location header + permanent + sets location header + sets status to 301 + #sendfile + returns default + set + as file path + does not change the Content-Length header + returns value wrapped in StreamResponse + 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 + #route + returns route_info + #file + 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 + set + 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 + as object (backward compatibility) +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 + emits a warning that this method is deprecated + #cookies + returns an instance of Cookies + #present + non mergeable entity + instance + fails + with + entity + instance + presents dummy object + multiple entities + instance + presents both dummy objects + dummy + presents dummy object + #status + raises error if status is not a integer or symbol + accepts symbol for status + raises error if unknow symbol is passed + defaults to 200 on GET + accepts unknown Integer status codes + defaults to 204 on DELETE + returns status set + defaults to 200 on GET + defaults to 201 on POST + defaults to 200 on DELETE with a body present + defaults to 200 on GET + #body + returns default + set + returns value + false + sets status to 204 + #error! + throws :error + default_error_status + sets status to default_error_status + thrown + sets status + #declared + is not available by default + #return_no_content + sets the status code and body + #version + returns env[api.version] + defaults to nil + #content_type + returns default + set + returns value + #stream + returns default + set + as a stream object + emits no deprecation warnings + returns value wrapped in StreamResponse + sets Transfer-Encoding header to nil + sets Cache-Control header to no-cache + sets Content-Length header to nil + as a non-stream object + raises an error that the object must implement :each + as a file path + returns file body wrapped in StreamResponse + emits no deprecation warnings + sets Content-Length header to nil + does not change Cache-Control header + sets Transfer-Encoding header to nil + sets Cache-Control header to no-cache + +Grape::Validations::Validators::AllOrNoneOfValidator + #validate! + when restricted params are nested inside required hash + returns a validation error with full names of the params + when no restricted params are present + does not return a validation error + when custom message is specified + returns a validation error + when mutually exclusive params are nested inside array + returns a validation error with full names of the params + 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 + when all restricted params are present + does not return a validation error + mixed with other params + does not return a validation error + +Grape::DSL::Callbacks + .after_validation + adds a block to "after_validation" + .after + adds a block to "after" + .before + adds a block to "before" + .before_validation + adds a block to "before_validation" + +Grape::Validations + using a custom length validator + under 140 characters + over 140 characters + specified in the query string + Grape::Validations::Base + behaves like deprecated class + raises an ActiveSupport::DeprecationException + using a custom validator with message_key + fails with message + 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 + fail when non-admin user sets an admin field + 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 + +Grape::Exceptions::InvalidVersionerOption + #message + contains the problem in the message + +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 + with missing vendor option + fails + api.format + is nil if not provided + is set + when version is set to v1 + is set + is nil if not provided + when version is set to v1 + is set + is nil if not provided + api.vendor + is set if format provided + is set + fails with 406 Not Acceptable if vendor is invalid + when version is set + is set + fails with 406 Not Acceptable if vendor is invalid + is set if format provided + when multiple versions are specified + succeeds with v2 + fails with another version + succeeds with v1 + 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 is set + succeeds if proper header is set + fails with 406 Not Acceptable if header is empty + fails with 406 Not Acceptable if header is not set + api.version + is set + is set if format provided + fails with 406 Not Acceptable if version is invalid + 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 application/xml + fails with 406 Not Acceptable if header contains a single invalid accept + fails with 406 Not Acceptable if header is empty + api.type and api.subtype + sets type and subtype to first choice of content type if no preference given + sets preferred type and subtype + sets preferred type + +Grape + .config + is expected to eq {:param_builder=>Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder} + +Grape::API::Instance + when an instance is the root + can call the instance endpoint + with multiple moutes + responds the correct body at the second instance + does not raise a FrozenError on first instance + does not raise a FrozenError on second instance + responds the correct body at the first instance + when an instance is mounted on the root + can call the instance endpoint + top level setting + does not inherit settings from the superclass (Grape::API::Instance) + +Grape::Validations::Validators::ValuesValidator + does not allow an invalid value for a parameter + does not allow invalid value using lambda +Error 'comparison of String with 0 failed' raised while validating attribute 'number' + does not allow non-numeric string value for int value using lambda + raises IncompatibleOptionValues when values contains a value that is not a kind of the type +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 + allows a valid default value + rejects all values if values is an empty array + raises IncompatibleOptionValues on an invalid default value + does not allow an invalid value for a parameter using lambda + does not allow an invalid value for a parameter using an endless range + validates against values in a proc + does not validate updated values without 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 proc for values + raises IncompatibleOptionValues when except contains a value that is not a kind of the type + allows a valid default value + allows numeric string for int value using lambda + validates against an empty array in a proc + validates default value from proc + raises IncompatibleOptionValues when type is incompatible with values array + validates default value from proc against values in a proc + allows a valid value for a parameter + raises IncompatibleOptionValues on an invalid default value from proc + validates against values in an endless range + allows values to be a kind of the coerced type not just an instance of it + allows a blank value when the allow_blank option is true + allows values to be a kind of the coerced type in an array + allows value using lambda + 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) + 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 + 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) + 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) + 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) + 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) + 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) + accepts a single 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 + when proc has an arity of 1 + accepts a valid value + rejects an invalid value + 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 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 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 + 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 + does not allow for root params scope + allows for a required param in child scope + with a range of values + allows a single value inside of the range + rejects an array of values if any of them are outside the range + allows an array of values inside of the range + rejects a single value outside the range + 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 +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) + 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 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 + boolean values + rejects a value which is not in the list + allows a value from the list + with a custom validation message + does not allow an invalid value for a parameter using lambda + does not allow an invalid value for a parameter + allows a valid value for a parameter + validates against values in a proc + with a lambda values + only evaluates values dynamically with each request + chooses default + 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 +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 + +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::Endpoint + get + no format + json format + invalid format Grape::Extensions::Hash::ParamBuilder in an endpoint #params is of type Hash in an api - symbolizes params keys symbolizes the params + symbolizes params keys #params is Hash +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::ExactlyOneOfValidator + #validate! + when params are deeply nested + returns a validation error with full names of the params + when exacly one param is present + does not return a validation error + when 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 params are present + returns a validation error + mixed with other params + returns a validation error + when none of the params are present + returns a validation error + when a subset of params are present + returns a validation error + when 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 + when params are nested inside array + returns a validation error with full names of the params + +Grape::API::Instance + boolean constant + sets Boolean as a type + Params endpoint type + params type is a boolean + +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::API::Helpers + patch + private + public + default + default + private + public + default + +Grape::Exceptions::ValidationErrors + message + is not repeated + is expected to include "FooBar is invalid" + is expected to eq 1 + api + can return structured json with separate fields + initialize + assigns headers through base class + #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 + +Grape::Validations::Types::SetCoercer + #call + a set of primitives + coerces elements to the set + a set of sets of arrays + coerces elements in the nested set + a set of sets + coerces elements in the nested set + +Grape::Exceptions::UnknownValidator + #message + contains the problem in the message + +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 +/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::Middleware::Auth::Base + throws a 401 is wrong auth is given + authenticates if given valid creds + +Grape::Validations + require_validator + when found + is expected to equal Grape::Validations::Validators::PresenceValidator + when not found + raises an error + params + required with a Hash block + errors when nested param not present + errors when param is not a Hash + errors when param not present + doesn't throw a missing param when param is present + adds to declared parameters + validation within arrays with JSON + can handle new scopes within child elements + errors when a parameter is not present + safely handles empty arrays and blank parameters + with block param + group defaults to Array type + optional defaults to Array type + requires defaults to Array type + optional using Grape::Entity documentation + works when field_a and field_b are not present + adds entity documentation to declared params + works when field_a is present + works when field_b is present + required with an Array block + adds to declared parameters + errors when param is not an Array + errors when param not present + doesn't throw a missing param when param is present but empty + doesn't throw a missing param when param is present + custom validator for a Hash + which is optional + errors if the validation fails + doesn't throw an error if the validation passes + which is required + doesn't throw an error if the validation passes + errors if the validation fails + exactly one of + params + succeeds when one is present + errors when none are present + errors when two or more are present + with a custom validation message + errors when two or more are present + succeeds when one is present + errors when none are present + nested params + errors when two or more are present + errors when none are present + succeeds when one is present + optional + doesn't validate when param not present + adds to declared parameters + validates when params is present + with block and keyword argument + works + required with an Array and a Hash block + does not output index [0] for Hash types + requires :none using Grape::Entity documentation + errors when required_field is not present + adds entity documentation to declared params + works when required_field is present + multiple validation errors + throws the validation errors + optional with an Array block + adds to declared parameters + errors when param is present but isn't an Array + doesn't throw a missing param when both group and param are given + errors when group is present, but required param is not + doesn't throw a missing param when the group isn't present + requires with nested params + validates correctly in deep nested params + with block and empty args + works + validation within arrays + 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 + safely handles empty arrays and blank parameters + errors when a parameter is not present + handle errors for all array elements + all or none + optional params + with a custom validation message + errors when any one is present + works when none are present + works when all params are 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 + group params with nested params which has a type + errors when group param is invalid + group + errors when param not present + adds to declared parameters + doesn't throw a missing param when param is present + mutually exclusive + mutually exclusive params inside Hash group + invalidates if request param is invalid type + in a group + works when only one from the set is present + errors when more than one from the set is present + optional params + errors when two or more are present + with custom validation message + errors when two or more are present + more than one set of mutually exclusive params + errors for all sets + with a custom validation message + errors for all sets + 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 present + validates when param is not present + nested namespaces + when nested, specifying a route should clear out the validations for deeper nested params + the parent namespace uses the validator + the nested namespace inherits the custom validator + namespaces nested in peers should also not have the validator + peer namespaces does not have the validator + in a group + 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 + errors when no parameter from the set is present + works when only one from the set is present + hash with a required param with validation + works when all params match + errors when param is not a Hash + named + with block + overrides default value for order_by + fails with invalid value + returns defaults + overrides default value for order + can be included in usual params + by #use + by #use with multiple params + can be defined + in helpers + in helper module which kind of Grape::DSL::Helpers::BaseHelper + at least one of + nested params + does not error when one is present + errors when none are present + does not error when two are present + params + does not error when one is present + does not error when two are present + errors when none 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 + 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 + required + errors when param not present + works when required field is present but nil + doesn't throw a missing param when param is present + adds to declared parameters + nested optional Array blocks + adds to declared parameters + handles deep nesting + does internal validations if the outer group is present + handles validation within arrays + does no internal validations if the outer group is blank + all_or_none_of + at_least_one_of + exactly_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 -> Array -> Hash -> String + simplest example using Array -> Hash -> String + correctly indexes invalida data + multiple levels of optional and requires settings + with invalid data + with valid data + +Grape::Presenters::Presenter + present + multiple presenter + instance + presents both dummy presenter + instance + presents dummy hash + represent + represent object + +Grape::Endpoint + put + responds + get + responds without ext + +Grape::DSL::Validations + .reset_validations! + resets validations + resets params + does not reset documentation description + resets declared params + .params + returns a ParamsScope + evaluates block + +Grape::Validations::Validators::DefaultValidator + allows optional arrays to be omitted + set default value for optional param + allows optional arrays with optional params + 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 + set default values for optional params + sets lambda based defaults at the time of call + set default values for missing params in the request + does not allows faulty optional arrays + sets default values for grouped arrays + 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 + 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 + 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 + array with default values and given conditions + applies the default values only if the conditions are met + 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 + does not fail even if invalid params is passed to default validator + returns nil for optional hash if param is not provided + optional hash with default value includes optional param with default value + sets default value from parent defaults for inner param if parent param is not provided + sets own default value for inner param if parent param is provided + sets default value for optional hash if param is not provided + +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 without a rescue handler + and with content_type json + can recover from failed body parsing + with content_type xml + can recover from failed body parsing + and with no specific content_type + can recover from failed body parsing + with content_type text + can recover from failed body parsing + api with rescue_from :all handler + 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 + with content_type json + can recover from failed body parsing + 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 + +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 + throws an error if a non-allowed version is specified + allows versions that have been specified + when no version is set + returns a 200 (matches the first version found) + 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 without a custom param + responds correctly to a v1 request + responds correctly to a v2 request + when there are multiple versions with a custom param + responds correctly to a v2 request + responds correctly to a v1 request + +Grape::Exceptions::UnsupportedGroupType + #message + is expected to include "group type must be Array, Hash, JSON or Array[JSON]" + Grape::Exceptions::UnsupportedGroupTypeError + behaves like deprecated class + raises an ActiveSupport::DeprecationException + +Grape::Exceptions::InvalidFormatter + #message + contains the problem in the message + +StrictHashConfiguration + set nested configs + +Grape::Util::ReverseStackableValues + #[] + returns an array of values + combines parent and actual values (actual first) + returns parent value when no value is set + parent values are not changed + #to_hash + returns a Hash representation + #delete + deletes a key + does not delete parent values + #clone + copies all values + complex (i.e. not primitive) data types (ex. middleware, please see bug #930) + copies values; does not duplicate them + #[]= + sets a value + pushes further values + can handle array values + #keys + returns all keys + returns merged keys with parent + +Grape::Exceptions::UnknownOptions + #message + contains the problem in the message + +Grape::DSL::Headers + when no headers are set + #header + returns nil + when headers are set + #header + set + returns value + get + returns a specifc value + returns all set headers + delete + deletes a header key-value pair + +Grape::Exceptions::MissingGroupType + Grape::Exceptions::MissingGroupTypeError + behaves like deprecated class + raises an ActiveSupport::DeprecationException + #message + is expected to include "group type is required" + +Grape::Middleware::Versioner::Path + sets the API version based on the first path + provides a nil version if no path is given + does not cut the version out of the path + 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 specified versions as ["v1", :v2] + throws an error if a non-allowed version is specified + allows versions that have been specified + 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 a pattern + ignores the version if it fails to match + sets the version if it matches + with specified versions as ["v1", "v2"] + throws an error if a non-allowed version is specified + allows versions that have been specified + +Grape::DSL::Routing + .post + delegates to .route + .resource + is alias to #namespace + .resources + is alias to #namespace + .group + is alias to #namespace + .segment + is alias to #namespace + .version + sets a version for route + .delete + delegates to .route + .options + delegates to .route + .patch + delegates to .route + .namespace + creates a new namespace with given name and options + calls #joined_space_path on Namespace + .get + delegates to .route + .mount + mounts on a nested path + mounts multiple routes at once + .routes + returns value received from #prepare_routes + when #routes was already called once + does not call prepare_routes again + .versions + returns last defined version + .prefix + sets a prefix for route + .head + delegates to .route + .do_not_route_options! + sets do not route options option + .scope + create a scope without affecting the URL + .route + generates correct endpoint options + resets validations + defines a new endpoint + does not duplicate identical endpoints + marks end of the route + .route_param + nests requirements option under param name + does not modify options parameter + calls #namespace with given params + .put + delegates to .route + .do_not_route_head! + sets do not route head option + +Grape::API + works for specified format + doesn't work for format different than specified + works for unspecified format + +MultiXml + uses multi_xml + Grape::Exceptions::InvalidAcceptHeader - API with cascade=false, http_codes but without a rescue handler + API with cascade=true, http_codes but without a rescue handler that receives 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 + behaves like a cascaded request + does not find a matching route 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 + 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 + does return with status 200 + 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 @@ -4861,388 +5155,130 @@ 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=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 - API with cascade=false and with rescue_from :all handler and http_codes + does return the expected result that receives + 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 an invalid vendor in the request - behaves like a rescued request - does show rescue handler processing + behaves like a not-cascaded request does not include the X-Cascade=pass header - that received a request with correct vendor and version - behaves like a valid request - does return the expected result - does return with status 200 + does not accept the request 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 + 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, 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 - API with cascade=false and without a rescue handler that receives 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 + does not include the X-Cascade=pass header 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 + 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=true and rescue_from :all handler that receives - an invalid vendor in the request + an invalid version in the request behaves like a cascaded request does not find a matching route - an invalid version in the request + 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, http_codes but 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 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 + 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 the expected result does return with status 200 that receives - an invalid vendor in the request + an invalid version in the request behaves like a cascaded request does not find a matching route - an invalid version in the request + an invalid vendor in the request behaves like a cascaded request does not find a matching route -Grape::Validations - params - nested optional Array blocks - handles deep nesting - does no internal validations if the outer group is blank - adds to declared parameters - handles validation within arrays - exactly_one_of - all_or_none_of - at_least_one_of - does internal validations if the outer group is present - 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 - simplest example using Array -> Array -> Hash -> String - example based off actual real world use case - simplest example using Array -> Hash -> String - correctly indexes invalida data - multiple levels of optional and requires settings - with valid data - with invalid data - at least one of - nested params - does not error when two are present - errors when none are present - does not error when one is present - params - does not error when one is present - does not error when two are present - errors when none are present - with a custom validation message - errors when none are present - does not error when two are present - does not error when one is present - requires with nested params - validates correctly in deep nested params - validation within arrays - errors when a parameter is not present in array within array - safely handles empty arrays and blank parameters - handle errors for all array elements - errors when param is not an Array - can handle new scopes within child elements - errors when a parameter is not present - exactly one of - nested params - succeeds when one is present - errors when none are present - errors when two or more are present - params - succeeds when one is present - errors when two or more are present - errors when none are present - with a custom validation message - succeeds when one is present - errors when none are present - errors when two or more are present - in a group - does not falsely think the param is there if it is provided outside the block - works when only one from the set is present - errors when more than one from the set is present - errors when no parameter from the set is present - with block param - group defaults to Array type - optional defaults to Array type - requires defaults to Array type - named - can be defined - in helper module which kind of Grape::DSL::Helpers::BaseHelper - in helpers - can be included in usual params - by #use - by #use with multiple params - with block - overrides default value for order - returns defaults - overrides default value for order_by - fails with invalid value - 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 - with block and empty args - works - optional using Grape::Entity documentation - works when field_a and field_b are not present - adds entity documentation to declared params - works when field_b is present - works when field_a is present - required with an Array block - errors when param not present - adds to declared parameters - doesn't throw a missing param when param is present but empty - doesn't throw a missing param when param is present - errors when param is not an Array - required - errors when param not present - works when required field is present but nil - adds to declared parameters - doesn't throw a missing param when param is present - requires :none using Grape::Entity documentation - adds entity documentation to declared params - works when required_field is present - errors when required_field is not present - required with an Array and a Hash block - does not output index [0] for Hash types - custom validation - 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 - when nested, specifying a route should clear out the validations for deeper nested params - namespaces nested in peers should also not have the validator - peer namespaces does not have the validator - the nested namespace inherits the custom validator - the parent namespace uses the validator - when using optional with a custom validator - validates with custom validator when param present and incorrect type - skips validation when parameter isn't present - validates when param is present - required with a Hash block - errors when param not present - doesn't throw a missing param when param is present - adds to declared parameters - errors when param is not a Hash - errors when nested param not present - hash with a required param with validation - errors when param is not a Hash - works when all params match - requires :all using Grape::Entity documentation - adds entity documentation to declared params - errors when required_field is not present - works when required_field is present - 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 - group params with nested params which has a type - errors when group param is invalid - multiple validation errors - throws the validation errors - validation within arrays with JSON - safely handles empty arrays and blank parameters - errors when a parameter is not present - can handle new scopes within child elements - 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 - optional with an Array block - doesn't throw a missing param when both group and param are given - errors when param is present but isn't an Array - 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 - with block and keyword argument - works - mutually exclusive - in a group - errors when more than one from the set is present - works when only one from the set is present - optional params - errors when two or more are present - with custom validation message - errors when two or more are present - mutually exclusive params inside Hash group - invalidates if request param is invalid type - more than one set of mutually exclusive params - errors for all sets - with a custom validation message - errors for all sets - group - doesn't throw a missing param when param is present - adds to declared parameters - errors when param not present - optional - validates when params is present - doesn't validate when param not present - adds to declared parameters - require_validator - when not found - raises an error - when found - is expected to equal Grape::Validations::Validators::PresenceValidator - -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::Exceptions::MissingGroupType - Grape::Exceptions::MissingGroupTypeError - behaves like deprecated class - raises an ActiveSupport::DeprecationException - #message - is expected to include "group type is required" +Rack + correctly populates params from a Tempfile + when the app is mounted + finds the app on the namespace -Grape::Validations::Types::PrimitiveCoercer - #call - Boolean - coerces 'true' to true - coerces an empty string to nil - returns an error when the given value cannot be coerced - coerces '1' to true - coerces 'false' to false - coerces 'false' to false - coerces '0' to false - coerces 'true' to true - Float - coerces an empty string to nil - a type unknown in Dry-types - raises error on init - Numeric - coerces an empty string to nil - accepts a non-nil value - 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 - Symbol - coerces an empty string to nil - Time - coerces an empty string to nil - String - does not coerce an empty string to nil - coerces to String - BigDecimal - coerces an empty string to nil - coerces to BigDecimal - Integer - accepts non-nil value - coerces an empty string to nil - DateTime - coerces an empty string to nil +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 -Grape::Path - #path - uses the raw path after the namespace - uses the namespace after the mount path and root prefix - mount_path - is included when it is not nil - is not included when it is nil - root_prefix - is not included when it is nil - is included after the mount 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 - #root_prefix - splits the mount path - is nil when no root prefix setting exists - is nil when the mount path is nil - #path? - is false when the path starts with whitespace - is true otherwise - is false when the path is nil - is false when the path is the root path - #namespace? - is false when the namespace is the root path - is false when the namespace is nil - is true otherwise - is false when the namespace starts with whitespace - #mount_path - is nil when the mount path is nil - is nil when no mount path setting exists - splits the mount path - #suffix - when using a specific format - accepts specified format - when path versioning is used - includes a '/' - when path versioning is not used - does not include a '/' when the path has a path - does not include a '/' when the path has a namespace - includes a '/' otherwise - #uses_path_versioning? - is false when the version setting is nil - is true when the version option is path - is false when the version option is header +Grape::Middleware::Auth::Strategies + Basic Auth + authenticates if given valid creds + throws a 401 if no auth is given + throws a 401 is wrong auth is given -Grape::DSL::Helpers - .helpers - adds a module with the given block - uses many provided modules - uses provided modules - in child classes - is available - with an external file - sets Boolean as a Grape::API::Boolean +Grape::Middleware::Stack + #insert_before + raises an error on an invalid index + inserts a middleware before another middleware class + inserts a middleware before an anonymous class given by its superclass + #use + pushes a middleware class with arguments onto the stack + pushes a middleware class with block arguments onto the stack + pushes a middleware class onto the stack + #build + returns a rack builder instance + when @others are present + applies the middleware specs stored in @others + #insert_after + raises an error on an invalid index + inserts a middleware after an anonymous class given by its superclass + 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 + #merge_with + applies a collection of operations and middlewares + middleware spec with proc declaration exists + properly forwards spec arguments Pending: (Failures listed here are expected and do not affect your suite's status) @@ -5250,10 +5286,10 @@ # Temporarily skipped with xit # ./spec/integration/multi_json/json_spec.rb:4 -Finished in 6.54 seconds (files took 1.73 seconds to load) +Finished in 5.87 seconds (files took 1.6 seconds to load) 2171 examples, 0 failures, 1 pending -Randomized with seed 13818 +Randomized with seed 8025 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -5284,12 +5320,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/3047605/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/3047605/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/2260379 and its subdirectories -I: Current time: Fri May 10 10:28:47 -12 2024 -I: pbuilder-time-stamp: 1715380127 +I: removing directory /srv/workspace/pbuilder/3047605 and its subdirectories +I: Current time: Fri Jun 13 18:54:01 +14 2025 +I: pbuilder-time-stamp: 1749790441