• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ruby-grape / grape
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: revisit_validators
DEFAULT BRANCH: master
Repo Added 04 Apr 2013 06:08AM UTC
Files 153
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH revisit_validators
branch: revisit_validators
CHANGE BRANCH
x
Reset
  • revisit_validators
  • DateFormat
  • Handle_json_array
  • ISSUE-2321
  • Issue-1908
  • active_support_6_1_minimal
  • add_irb_in_gemfile_for_bundle_console_warning
  • add_rack_3_2_gemfile
  • add_rails_8_1_on_ci
  • add_ruby_3_4
  • add_ruby_4_0_cli
  • api_override_singleton_methods
  • body-metadata
  • bugfix/1577
  • bugfix/1970
  • bugfix/1986
  • bugfix/2041
  • bugfix/autoload
  • bugfix/memory-leak
  • build_with_registry
  • chore/cleanup-on-compilation
  • chore/coercion-tests
  • chore/primitive-coercer-spec
  • clean_up_useless_dependencies
  • cleanup-deprecated-code
  • compiled_endpoints
  • cookies_delegation
  • crush_desclared_params
  • custom-validator-namespace-lookup
  • declared_params_optional_array
  • deprecated_endpoint_return
  • doc
  • doc/remove_manual_toc_and_toc_danger_check
  • doc/remove_toc
  • doc/update_reload_documentation_for_current_Rails_versions
  • drop_ruby_3_0_as_7_0
  • drop_support_ruby_2_7_0
  • dynamic_registration
  • empty_string_and_bool
  • enable_branch_coverage
  • enable_frozen_string_literal_ci
  • entity-dsl
  • erik/remove-faulty-documentation-about-blank-values
  • exposes-to-s
  • failing_spec_for_1967
  • faster_normalize_path
  • feature/grape-api-setup-var-array
  • feature/return_of_return
  • feature_rack_lint
  • fix-636
  • fix-badges
  • fix-before-each-nil-nomethoderror
  • fix-docs
  • fix-helper-inheritance
  • fix-typo
  • fix/avoid_multiple_mounts_pollution
  • fix/cascade_reading_api_level
  • fix/reduce_base_route_array_allocation
  • fix/sendfile_test_fix
  • fix_2566_memory_leak
  • fix_all_media_types_regression
  • fix_before_each_no_method_error
  • fix_coercer_cache
  • fix_danger_workflow
  • fix_endpoint_status_when_not_calling_error!
  • fix_helpers_methods_in_public_scope
  • fix_leaky_slash
  • fix_middleware_keywords
  • fix_registry_warning_message
  • fix_require_logger
  • fix_routes_memoization
  • fix_shared_params_empty_args
  • format_header_best_q_match
  • funding
  • happy_rubocop
  • hook-readme
  • instance_to_s_delegation
  • issue-1775
  • lazy_block
  • lazy_compile
  • less_active_support_concern
  • less_parse_nested_query
  • master
  • migrate-danger-pr-comment
  • migrate-to-dry-configurable
  • mountable_apis
  • namespace_route_param_explicit_kwargs
  • optimize/parameters-extract-options-non-mutating
  • optimize_api_documentation
  • private_namespace_reverse_stackable_with_hash
  • private_within_namespace
  • real-api-integration-test
  • reduce_array_alloc_on_setup
  • refactor/api-instance-dsl-modules
  • refactor/declared_availability
  • refactor/dsl-group-validators-dry
  • refactor/router-pattern-delegation
  • refactor/router-simplification
  • refactor_available_media_types_in_header_middleware
  • refactor_declared_params_handling
  • refactor_http_headers
  • refactor_mime_type_for
  • refactor_route_setting_internal_usage
  • refactor_setting_get_or_set
  • refs/heads/master
  • refs/tags/v1.7.1
  • refs/tags/v1.8.0
  • refs/tags/v2.0.0
  • remove-unused-constant
  • remove_deprecated_param_builder_extensions
  • remove_instance_variable_defined
  • remove_namespace_reverse_stackable_from_public_interface
  • remove_namespace_stackable_and_inheritable_from_public_space
  • remove_namespace_stackable_with_hash_from_public_interface
  • remove_non_supported_jsonapi
  • remove_obsolete_docker_compose_version
  • remove_path_dup
  • remove_settings_unset_functions
  • remove_strict_hash_configuration
  • replace_try_by_respond_to
  • rescue_from
  • resolve_performace_issue_with_given
  • revert-1953-chore/micto-optimization-3
  • revert-wrong-commit
  • revisit_auth_middleware
  • revisit_endpoint_helpers_and_new
  • revisit_middleware_default_options
  • ruby3_handling_argument_delegation
  • ruby_style_send
  • small_refactor_versioner_middleware
  • spec-only-rack-class
  • try_pattern_instead_of_respond_to
  • update_min_ruby_version_and_rubocop
  • update_return_upgrading_notes_and_simplify_execute
  • update_rubocop
  • update_rubocop_1_71_2
  • upgrade-mustermann
  • upgrade-rubocop
  • upgrading-description
  • use_forwardable
  • use_require_relative_in_gemspec
  • v0.19.2
  • v1.0.0
  • v1.0.1
  • v1.0.2
  • v1.0.3
  • v1.1.0
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.2.3
  • v1.2.4
  • v1.2.5
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v2.1.0
  • v2.1.1
  • v2.1.2
  • v2.1.3
  • v2.2.0
  • v2.3.0
  • v2.4.0
  • v3.0.0
  • v3.0.1
  • v3.1.0
  • v3.1.1
  • valid_encoding_before_scrubing
  • validators_bad_encoding

20 Feb 2026 10:40PM UTC coverage: 96.839% (-0.07%) from 96.906%
22244022029

Pull #2657

github

ericproulx
Instantiate validators at definition time

- Store validator instances in ParamsScope/ContractScope and have
  Endpoint#run_validators read them directly
- Remove ValidatorFactory indirection and eagerly compute validator
  messages/options in constructors
- Freeze validator instances after initialization via Base.new to
  prevent mutation across shared requests (shallow freeze)
- Extract Grape::Util::Translation module shared by Exceptions::Base
  and Validators::Base for I18n translate with fallback locale
- Support Hash messages in translate_message for deferred translation
  with interpolation parameters (e.g. { key: :length, min: 2 })
- Normalize Grape::Exceptions::Validation params handling and refactor
  validator specs to define routes per example group
- Use case/when for message_key extraction in Exceptions::Validation
- Guard LengthValidator against missing constraints and extract option
  validation into private methods to stay within complexity limits
- Store zero-arity procs directly in ValuesValidator (consistent with
  ExceptValuesValidator) and document DB-backed lazy evaluation intent
- Drop test-prof dependency and its spec config
Pull Request #2657: Instantiate validators at definition time

1061 of 1147 branches covered (92.5%)

Branch coverage included in aggregate %.

186 of 188 new or added lines in 22 files covered. (98.94%)

1 existing line in 1 file now uncovered.

3320 of 3377 relevant lines covered (98.31%)

37644.66 hits per line

Relevant lines Covered
Build:
Build:
3377 RELEVANT LINES 3320 COVERED LINES
37644.66 HITS PER LINE
Source Files on revisit_validators
  • Tree
  • List 153
  • Changed 22
  • Source Changed 21
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
22244022029 revisit_validators Instantiate validators at definition time - Store validator instances in ParamsScope/ContractScope and have Endpoint#run_validators read them directly - Remove ValidatorFactory indirection and eagerly compute validator messages/options in con... Pull #2657 20 Feb 2026 10:41PM UTC ericproulx github
96.84
22160203285 revisit_validators Instantiate validators at definition time - Store validator instances in ParamsScope/ContractScope and have Endpoint#run_validators read them directly - Remove ValidatorFactory indirection and eagerly compute validator messages/option... Pull #2657 18 Feb 2026 10:27PM UTC ericproulx github
96.87
22159706640 revisit_validators Instantiate validators at definition time - Store validator instances in ParamsScope/ContractScope and have Endpoint#run_validators read them directly - Remove ValidatorFactory indirection and eagerly compute validator messages/option... Pull #2657 18 Feb 2026 10:11PM UTC ericproulx github
96.87
22159207956 revisit_validators Instantiate validators at definition time - Store validator instances in ParamsScope/ContractScope and have Endpoint#run_validators read them directly - Remove ValidatorFactory indirection and eagerly compute validator messages/option... Pull #2657 18 Feb 2026 09:56PM UTC ericproulx github
96.87
22158918715 revisit_validators Instantiate validators at definition time - Store validator instances in ParamsScope/ContractScope and have Endpoint#run_validators read them directly - Remove ValidatorFactory indirection and eagerly compute validator messages/option... Pull #2657 18 Feb 2026 09:46PM UTC ericproulx github
96.85
22158904849 revisit_validators Instantiate validators at definition time - Store validator instances in ParamsScope/ContractScope and have Endpoint#run_validators read them directly - Remove ValidatorFactory indirection and eagerly compute validator messages/option... Pull #2657 18 Feb 2026 09:46PM UTC ericproulx github
96.85
21997725638 revisit_validators Instantiate validators at definition time - Store validator instances in ParamsScope/ContractScope and have Endpoint#run_validators read them directly - Remove ValidatorFactory indirection and eagerly compute validator messages/option... Pull #2657 13 Feb 2026 06:14PM UTC ericproulx github
96.85
21997165833 revisit_validators Instantiate validators at definition time - Store validator instances in ParamsScope/ContractScope and have Endpoint#run_validators read them directly - Remove ValidatorFactory indirection and eagerly compute validator messages/option... Pull #2657 13 Feb 2026 05:56PM UTC ericproulx github
96.85
21997041261 revisit_validators Instantiate validators at definition time - Store validator instances in ParamsScope/ContractScope and have Endpoint#run_validators read them directly - Remove ValidatorFactory indirection and eagerly compute validator messages/option... Pull #2657 13 Feb 2026 05:52PM UTC ericproulx github
96.85
21997006904 revisit_validators Instantiate validators at definition time - Store validator instances in ParamsScope/ContractScope and have Endpoint#run_validators read them directly - Remove ValidatorFactory indirection and eagerly compute validator messages/option... Pull #2657 13 Feb 2026 05:50PM UTC ericproulx github
96.85
See All Builds (2597)
  • Repo on GitHub
  • CI Project
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc