hashie/CHANGELOG.md

36 KiB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning. Any violations of this scheme are considered to be bugs.

Unreleased

Added

  • Your contribution here.

Changed

Deprecated

  • Your contribution here.

Removed

  • Your contribution here.

Fixed

  • Your contribution here.

Security

  • Your contribution here.

Miscellaneous

  • Your contribution here.

5.0.0 - 2021-11-08

Added

Changed

  • #521: Do not convert keys that cannot be represented as symbols to String in Mash initialization - @carolineartz.
  • #524: Test with Ruby 2.7 - @aried3r.
  • #525: Use indifferent_writer in IndifferentAccess#convert! - @yogeshjain999.
  • #527: Updated Copyright to (c) 2009-2020 Intridea, Inc., and Contributors - @dblock.
  • #555: Test with Ruby 3.0 - @dblock.

Removed

Fixed

  • #516: Fixed NoMethodError raised when including Hashie::Extensions::Mash::SymbolizeKeys and Hashie::Extensions::SymbolizeKeys in mashes/hashes with non string or symbol keys - @carolineartz.
  • #531: Fixed slice doesn't work using symbols using hash with IndifferentAccess extension - @gnomex.
  • #533: Fixed NoMethodError: undefined method 'to_json' at hashie/dash_spec - @gnomex.
  • #535: Restored the exporting of all properties as part of Dash#to_h and Dash#to_hash - @michaelherold.
  • #537: Fixed inconsistencies with handling defaults in Dash with and without IgnoreUnclared mixed in - @michaelherold.
  • #547: Fixed issue where a source hash key can be used in translating multiple properties - @danwa5.

4.1.0 - 2020-02-01

Added

  • #545: Add Hashie::Mash#except and Hashie::Extensions::IndifferentAccess#except when running under Ruby 3 to match newly added Ruby stdlib method - @jackjennings.
  • #499: Add Hashie::Extensions::Mash::PermissiveRespondTo to make specific subclasses of Mash fully respond to messages for use with SimpleDelegator - @michaelherold.

Changed

  • #498: Exclude tests from the gem release to reduce installation size and improve installation speed - @michaelherold.

Fixed

  • #467: Fixed DeepMerge#deep_merge mutating nested values within the receiver - @michaelherold.
  • #505: Ensure that Hashie::Arrays are not deconverted within Hashie::Mashes to make Mash#dig work properly - @michaelherold.
  • #507: Suppress Psych.safe_load arg warn when using Psych 3.1.0+ - @koic.
  • #508: Fixed Mash.load no longer uses Rails-only #except - @bobbymcwho.
  • #508: Fixed Hashie::Extensions::DeepMerge #deep_merge not correctly dup'ing sub-hashes if active_support hash extensions were not present - @bobbymcwho.
  • #500: Do not warn when setting Mash keys that look like underbang, bang, and query methods - @michaelherold.
  • #510: Ensure that Hashie::Mash#compact is only defined on Ruby version >= 2.4.0 - @bobbymcwho.
  • #511: Suppress keyword arguments warning for Ruby 2.7.0 - @koic.
  • #512: Suppress an integer unification warning for using Ruby 2.4.0+ - @koic.
  • #513: Suppress a Ruby's warning when using Ruby 2.6.0+ - @koic.

4.0.0 - 2019-10-30

Added

  • #323: Added Hashie::Extensions::Mash::DefineAccessors - @marshall-lee.
  • #474: Expose YAML#safe_load options in Mash#load - @riouruma, @dblock.
  • #478: Added optional array parameter to Hashie::Mash.disable_warnings - @bobbymcwho.
  • #481: Ruby 2.6 - Support Hash#merge and #merge! called with multiple Hashes/Mashes - @bobbymcwho.
  • #488: Added ability to create an anonymous Hashie::Mash subclass with key conflict errors silenced using Hashie::Mash.quiet.new - @bobbymcwho.

Changed

  • #481: Implement non-destructive standard Hash methods - @bobbymcwho.
  • #482: Update Travis configs to make jruby builds run on trusty dist - @BobbyMcWho.

Fixed

  • #459: Fixed a regression in Mash.load that disallowed aliases - @arekt and @michaelherold.
  • #465: Fixed deep_update to call any readers when a key exists - @laertispappas.
  • #479: Fixed an issue with Hash#except not returning a Mash in Rails 6 - @bobbymcwho.
  • #489: Updated the documentation to exlain the behavior of Mash and keyword arguments - @Bhacaz.
  • #465: Clean up our RuboCop configuration and fix the outstanding line length violations. This involved some minor refactoring on Hashie::Extensions::Coercion, Hashie::Extensions::Dash::IndifferentAccess, Hashie::Extensions::DeepLocate, Hashie::Extensions::Mash::SafeAssignment, and Hashie::Hash, but none that were detectable via the test suite - @michaelherold.

3.6.0 - 2018-08-13

Added

Changed

Fixed

  • #435: Mash default_procs are now propagated down to nested sub-Hashes - @michaelherold.
  • #436: Ensure that Hashie::Extensions::IndifferentAccess injects itself after a non-destructive merge - @michaelherold.
  • #437: Allow codependent properties to be set on Dash - @michaelherold.
  • #438: Fix: NameError (uninitialized constant Hashie::Extensions::Parsers::YamlErbParser::Pathname) in Hashie::Mash.load - @onk.
  • #457: Fix Trash to allow it to copy properties from other properties - @michaelherold.

3.5.7 - 2017-12-19

Fixed

  • #430: Fix Hashie::Rash randomly losing items - @Antti.

Changed

3.5.6 - 2017-07-12

Fixed

  • #416: Fix warning: instance variable @disable_warnings not initialized - @axfcampos.

3.5.5 - 2017-02-24

Added

  • #326: Added Hashie::Extensions::Mash::KeepOriginalKeys to give Mashes the ability to keep the original structure given to it - @michaelherold.

Fixed

  • #415: Fixed Mash logging keys multiple times which lead to a bad user experience or, in some cases, errors - @michaelherold.

3.5.4 - 2017-02-22

Added

  • #412: Added a Hashie::Extensions::Mash::SymbolizeKeys extension that overrides the default stringification behavior for keys - @michaelherold.

Fixed

  • #409: Fixed Railtie detection for projects where Rails is defined but Railties are not availble - @CallumD.
  • #411: Fixed a performance regression from 3.4.3 that caused a 10x slowdown in OmniAuth - @michaelherold.

3.5.3 - 2017-02-11

Fixed

  • #402: Use a Railtie to set Hashie.logger on rails boot - @matthewrudy.
  • #406: Ensure that subclasses that disable warnings propagate that setting to grandchild classes - @michaelherold.
  • Your contribution here.

3.5.2 - 2017-02-10

Added

  • #395: Add the ability to disable warnings in Mash subclasses - @michaelherold.
  • #400: Fix Hashie.logger load and set the Hashie logger to the Rails logger in a Rails environment - @michaelherold.
  • #397: Add the integration specs harness into the main test tasks - @michaelherold.

Fixed

  • #396: Fix for specs in #381: Incorrect use of shared context meant example was not being run - @biinari.
  • #399: Fix passing Pathname object to Hashie::Mesh.load() - @albb0920.

3.5.1 - 2017-01-31

  • #392: Fix for #391: Require all dependencies of Hashie::Mash - @dblock.

3.5.0 - 2017-01-31

  • #386: Fix for #385: Make deep_merge always deep_dup nested hashes before merging them in so that there are no shared references between the two hashes being merged. - @mltsy.
  • #389: Support Ruby 2.4.0 - @camelmasa.

Added

  • #381: Add a logging layer that lets us report potential issues to our users. As the first logged issue, report when a Hashie::Mash is attempting to overwrite a built-in method, since that is one of our number one questions - @michaelherold.

Changed

Fixed

  • #369: If a translation for a property exists when using IndifferentAccess and IgnoreUndeclared, use the translation to find the property - @whitethunder.
  • #376: Leave string index unchanged if it can't be converted to integer for Array#dig - @sazor.
  • #377: Dont use Rubygems to check ruby version - @sazor.
  • #378: Deep find all searches inside all nested hashes - @sazor.
  • #380: Evaluate procs default values of Dash in object initialization - @sazor.
  • #387: Fixed builds failing due to Rake 11 having a breaking change - @michaelherold.

3.4.6 - 2016-09-16

Fixed

  • #368: Since hashie/mash can be required alone, require its dependencies - @jrafanie.

3.4.5 - 2016-09-16

Added

Deprecated

  • #366: Hashie is no longer tested on Ruby < 2 - @dblock.

Fixed

  • #358: Fixed support for Array#dig - @modosc.
  • #365: Ensured ActiveSupport::HashWithIndifferentAccess is defined before use in #deep_locate - @mikejarema.

3.4.4 - 2016-04-29

Added

  • #349: Convert Hashie::Mash#dig arguments for Ruby 2.3.0 - @k0kubun.

Fixed

3.4.3 - 2015-10-25

Added

  • #306: Added Hashie::Extensions::Dash::Coercion - @marshall-lee.
  • #314: Added a StrictKeyAccess extension that will raise an error whenever a key is accessed that does not exist in the hash - @pboling.

Fixed

  • #304: Ensured compatibility of Hash extensions with singleton objects - @regexident.
  • #310: Fixed Hashie::Extensions::SafeAssignment bug with private methods - @marshall-lee.

Changed

  • #313: Restrict pending spec to only Ruby versions 2.2.0-2.2.2 - @pboling.
  • #315: Default bin/ scripts: console and setup - @pboling.

3.4.2 - 2015-06-02

Added

  • #297: Extracted Trash's behavior into a new Dash::PropertyTranslation extension - @michaelherold.

Removed

3.4.1 - 2015-03-31

Added

  • #269: Added Hashie::Extensions::DeepLocate - @msievers.
  • #281: Added #reverse_merge to Mash to override ActiveSupport's version - @mgold.

Fixed

3.4.0 - 2015-02-02

Added

  • #251: Added block support to indifferent access #fetch - @jgraichen.
  • #252: Added support for conditionally required Hashie::Dash attributes - @ccashwell.
  • #254: Added public utility methods for stringify and symbolize keys - @maxlinc.
  • #260: Added block support to Extensions::DeepMerge - @galathius.
  • #271: Added ability to define defaults based on current hash - @gregory.

Changed

  • #249: SafeAssignment will now also protect hash-style assignments - @jrochkind.
  • #264: Methods such as abc? return true/false with Hashie::Extensions::MethodReader - @Zloy.

Fixed

  • #247: Fixed #stringify_keys and #symbolize_keys collision with ActiveSupport - @bartoszkopinski.
  • #256: Inherited key coercions - @Erol.
  • #259: Fixed handling of default proc values in Mash - @Erol.
  • #261: Fixed bug where Dash.property modifies argument object - @d-tw.
  • #269: Added #extractable_options? so ActiveSupport Array#extract_options! can extract it - @ridiculous.

3.3.2 - 2014-11-26

Added

  • #231: Added support for coercion on class type that inherit from Hash - @gregory.
  • #233: Custom error messages for required properties in Hashie::Dash subclasses - @joss.
  • #245: Added Hashie::Extensions::MethodAccessWithOverride to autoloads - @Fritzinger.

Fixed

  • #221: Reduced amount of allocated objects on calls with suffixes in Hashie::Mash - @kubum.
  • #224: Merging Hashie::Mash now correctly only calls the block on duplicate values - @amysutedja.
  • #228: Made Hashie::Extensions::Parsers::YamlErbParser pass template filename to ERB - @jperville.

3.3.1 - 2014-08-26

Added

Fixed

3.2.0 - 2014-07-10

Added

  • #177: Added support for coercing enumerables and collections - @gregory.

Changed

  • #179: Mash#values_at will convert each key before doing the lookup - @nahiluhmot.
  • #184: Allow ranges on Rash to match all Numeric types - @medcat.

Fixed

  • #164, #165, #166: Fixed stack overflow when coercing mashes that contain ActiveSupport::HashWithIndifferentAccess values - @numinit, @kgrz.
  • #187: Automatically require version - @medcat.
  • #190: Fixed coerce_key with from Trash feature and Coercion extension - @gregory.
  • #192: Fixed StringifyKeys#stringify_keys! to recursively stringify keys of embedded ::Hash types - @dblock.

3.1.0 - 2014-06-25

Added

Changed

  • #169: Hash#to_hash will also convert nested objects that implement to_hash - @gregory.
  • #173: Auto include Dash::IndifferentAccess when IndifferentAccess is included in Dash - @gregory.

Fixed

  • #171: Include Trash and Dash class name when raising NoMethodError - @gregory.
  • #174: Fixed from and transform_with Trash features when IndifferentAccess is included - @gregory.

3.0.0 - 2014-06-03

Added

  • #149: Allow IgnoreUndeclared and DeepMerge to be used with undeclared properties - @jhaesus.

Changed

  • #152: Do not convert keys to String in Hashie::Dash and Hashie::Trash, use Hashie::Extensions::Dash::IndifferentAccess to achieve backward compatible behavior - @dblock.
  • #152: Do not automatically stringify keys in Hashie::Hash#to_hash, pass :stringify_keys to achieve backward compatible behavior - @dblock.

Fixed

  • #146: Mash#respond_to? inconsistent with #method_missing and does not respond to #permitted? - @dblock.
  • #148: Consolidated Hashie::Hash#stringify_keys implementation - @dblock.
  • #159: Handle nil intermediate object on deep fetch - @stephenaument.

2.1.2 - 2014-05-12

Changed

  • #169: Hash#to_hash will also convert nested objects that implement to_hash - @gregory.

2.1.1 - 2014-04-12

Fixed

  • #131: Added IgnoreUndeclared, an extension to silently ignore undeclared properties at intialization - @righi.
  • #138: Added Hashie::Rash, a hash whose keys can be regular expressions or ranges - @epitron.
  • #144: Fixed regression invoking to_hash with no parameters - @mbleigh.

2.1.0 - 2014-04-06

Added

Changed

  • #89: Do not respond to every method with suffix in Hashie::Mash, fixes Rails strong_parameters - @Maxim-Filimonov.
  • Ruby style now enforced with Rubocop - @dblock.

Removed

  • Removed support for Ruby 1.8.7 - @dblock.
  • #136: Removed Hashie::Extensions::Structure - @markiz.

Fixed

  • #69: Fixed assigning multiple properties in Hashie::Trash - @einzige.
  • #99: Hash#deep_merge raises errors when it encounters integers - @defsprite.
  • #100: IndifferentAccess#store will respect indifference - @jrochkind.
  • #103: Fixed support for Hashie::Dash properties that end in bang - @thedavemarshall.
  • #107: Fixed excessive value conversions, poor performance of deep merge in Hashie::Mash - @davemitchell, @dblock.
  • #110: Correctly use Hash#default from Mash#method_missing - @ryansouza.
  • #111: Trash#translations correctly maps original to translated names - @artm.
  • #113: Fixed Hash#merge with Hashie::Dash - @spencer1248.
  • #120: Pass options to recursive to_hash calls - @pwillett.
  • #129: Added Trash#permitted_input_keys and inverse_translations - @artm.
  • #130: IndifferentAccess now works without MergeInitializer - @npj.
  • #133: Fixed Hash##to_hash with symbolize_keys - @mhuggins.

2.0.5 - 2013-05-10

Fixed

  • #96: Made coercion work better with non-symbol keys in Hashie::Mash - @wapcaplet.

2.0.4 - 2013-04-24

Fixed

  • #94: Made #fetch method consistent with normal Hash - @markiz.

Changed

2.0.3 - 2013-03-18

Fixed

  • #68: Fixed #replace - @jimeh.
  • #88: Hashie::Mash.new(abc: true).respond_to?(:abc?) works - @7even.

2.0.2 - 2013-02-26

Fixed

2.0.1 - 2013-02-26

Removed

2.0.0 - 2013-02-16

Added

Changed

  • #28: Hashie::Extensions::Coercion coerce_keys takes arguments - @mattfawcett.
  • #77: Removed id, type, and object_id as special allowable keys - @jch.

Fixed

  • #27: Initialize with merge coerces values - @mattfawcett.
  • #39: Trash removes translated values on initialization - @sleverbor.
  • #49: Hashie::Hash inherits from ::Hash to avoid ambiguity - @meh, @orend.
  • #62: Updated respond_to? method signature to match ruby core definition - @dlupu.
  • #63: Dash defaults are dup'ed before assigned - @ohrite.
  • #66: Mash#fetch works with symbol or string keys - @arthwood.