github hashie/hashie v5.2.0

4 hours ago

Added

  • #644: Added rubocop-spellcheck to the lint task for Ruby and documentation, with reviewed project vocabulary - @dblock.
  • #636: Added opt-in per-property lazy loaders for Dash and Trash, with transformations, coercion, defaults, and required-property validation deferred until access, following #587 - @dblock.
  • #635: Parse README Ruby examples with Kramdown and execute them in CI with isolated optional dependencies - @dblock.
  • #623: Documented Dash validation with ActiveModel and added integration coverage, following #300, reported by @SkyCrawl, with the ActiveModel approach suggested by @martinstreicher and endorsed by @dblock.
  • #625: Added an opt-in YamlParser that parses YAML without evaluating ERB, while preserving Mash.load's existing ERB-enabled default for compatibility, following #575 - @bo-tato, @dblock.
  • #626: Added executable YARD examples for every public class, module, and method, with public API example coverage enforced in Rake and CI, following the documentation work in #421 - @michaelherold, @dblock.
  • #621: Added Mash::UnderscoreKeys on top of TransformKeys for camel-case and hyphenated key normalization, following #566 - @arianf, @dblock.
  • #620: Added configurable Mash::TransformKeys key normalization as a foundation for #566 - @arianf, @dblock.
  • #618: Added Hashie::Extensions::DeepGrep for regular-expression searches of nested hashes and arrays, following #528 - @vmarutha, @dblock.
  • #617: Documented nil coercion bypass versus Dash defaults and added initialization, assignment, update, and inheritance regression coverage, following #472 - @bobbytables, @dblock.
  • #611: Added callable coercers, including bound methods and dry-types objects, following #379 and #239 - @mkcode, @dblock.
  • #612: Added Hashie::Extensions::DeepMergeInitializer to recursively initialize Hash subclasses, including hashes inside arrays, following #382 - @sazor, @dblock.
  • #592: Added support for Ruby 4.0 - @dblock.
  • #595: Added test coverage reporting with Coveralls - @dblock.
  • #597: Fixed coverage reporting to Coveralls to work on pull requests via GITHUB_TOKEN - @dblock.
  • #599: Added Hashie::Extensions::Mash::StrictKeyAccess to raise a KeyError for undefined keys, including in nested Mashes - @dblock.
  • #601: Added Hashie::Extensions::KernelCoercion to coerce core types using stricter Kernel methods (e.g. Kernel#Integer) instead of lenient conversion methods (e.g. #to_i) - @dblock.
  • #605: Added Hashie::Extensions::Mash::RequiredKeys, allowing a Mash to require specific keys to be set while still allowing arbitrary keys - @dblock.
  • #608: Added Hashie::Extensions::BlockAccess for block-style construction of nested hashes, completing #109 as a reusable extension - @ryansouza, @dblock.
  • #610: Added opt-in Hashie::Extensions::Persistable for safe YAML loading and atomic file saves, following #262 - @maxlinc, @michaelherold, @dblock.

Changed

  • #630: Enabled project-wide RuboCop with new cops, Rake and RSpec plugins, frozen string literals, autocorrections, and a refreshed baseline for remaining offenses - @dblock.
  • #615: Reduced allocations in Mash array conversion while preserving Hashie::Array behavior, and reused symbol names in indifferent and original-key access when available - @dblock.
  • #607: Standardized exception message casing and punctuation and enforced the convention with RuboCop - @dblock.
  • #607: Upgraded RuboCop to 1.91.0 and consolidated exception-message checks into one CI lint job - @dblock.
  • #590: Migrated Danger to use danger-pr-comment workflow - @dblock.
  • #613: Mash converts symbol keys with Symbol#name on Ruby 3.0+, so reads and writes with a symbol key no longer allocate a string - @sampokuokkanen.

Removed

  • Reverted #619's deep_merge_new_hash hook in favor of the breaking-change proposal in #632, which preserves incoming hash subclasses directly - @dblock.
  • #622: Dropped Ruby 2.7 support, raised the minimum to Ruby 3.0, and removed obsolete Ruby version gates and symbol-conversion fallbacks, following #613 - @dblock.

Fixed

  • #642: Fixed Clash Marshal serialization on MRI by no longer advertising unimplemented serialization hooks - @dblock.
  • #640: Fixed Dash key transformation skipping hashes inside ordinary Ruby arrays - @dblock.
  • #638: Fixed Dash and Trash properties named required? colliding with required-property validation, following #276, reported by @maxlinc - @dblock.
  • #616: Fixed indifferent Trash initialization dropping source keys translated into multiple properties when ignoring undeclared fields, following #518 and #514 - @jitendra1998, @dblock.
  • #609: Fixed Clash YAML serialization losing stored keys and values, preserving subclasses and parent links - @dblock.
  • #593: Fix trash subclasses changing superclass transformers - @complex857.
  • #606: Fix Hashie::Mash#dup for subclasses including MethodAccessWithOverride, preserving default values and procs - @Boulea7.
  • #596: Fixed Hashie::Extensions::Mash::DefineAccessors raising an ArgumentError when a Mash key literally matched a suffixed accessor name (e.g. foo=, foo?, foo!, foo_) - @dblock.
  • #602: Fixed Hashie::Extensions::Coercion's coerce_value not triggering for nested Hashes inside a Mash, since Mash's own recursive Hash-to-Mash conversion ran first - @dblock.
  • #603: Fixed Trash/PropertyTranslation incorrectly allowing :from to match the property name when the types differ (e.g. a symbol property translated from: a string of the same name), causing a "method redefined" warning instead of the intended ArgumentError - @dblock.
  • #604: Fixed Dash#deep_transform_keys (and Trash) raising ArgumentError for required properties under Rails 7+, since ActiveSupport::Hash#deep_transform_keys builds its result via self.class.new - @dblock.
  • #614: Fixed Hashie::Mash#dup allocating six extra objects on every call since #606, by looking up Hash#default and Hash#default_proc once and calling them with bind_call - @sampokuokkanen.

Don't miss a new hashie release

NewReleases is sending notifications on new releases.