summaryrefslogtreecommitdiff
path: root/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Add Ruby 3.1 to CI (#558)Peter Goldstein2022-01-271-0/+1
| | | | | | | | | | | | | | | | | | * Add Ruby 3.1 to CI Update Rubocop for recent Rubies Disable Rubocop run for Rubies before Ruby 2.4 Quote '3.0' in the CI configuration to ensure it loads a 3.0.x Ruby Set RUBYOPT="--disable_error_highlight" so Ruby 3.1 error matchers pass * Add CHANGELOG.md entry * Re-add deleted line from CHANGELOG.md * Set minimum supported Ruby version to 2.4. Remove a number of code bits designed to support Rubies below version 2.4 * Bump version. Remove unneeded require from Gemfile. Add require to spec/support file
* Preparing for next development iteration, 5.0.1.dblock2021-11-081-0/+32
|
* Preparing for release, 5.0.0.v5.0.0dblock2021-11-081-14/+2
|
* Test with Ruby 3.0.dblock2021-11-071-0/+1
| | | | Signed-off-by: dblock <dblock@dblock.org>
* Merge branch 'dash-nil-keys' of https://github.com/michaelherold/hashie into ↵dblock2021-11-071-0/+1
|\ | | | | | | michaelherold-dash-nil-keys
| * Ensure all properties are set on exported DashMichael Herold2020-10-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When exporting a Dash via `#to_h` or `#to_hash`, we expect all properties to be exported whether or not they are set. However, in the change that allows codependent properties to be nilified, we regressed the behavior of exporting all properties. There is a gotcha here, which I note in the tests for the specs. For posterity, MRI does not send the `#to_hash` method to anything that subclasses `Hash` when you double-splat it. Thus, we cannot override the behavior within MRI. For more information, see [this comment][1] where I detail the behavior of double-splat within MRI. Currently, JRuby also follows this behavior, but it's not guaranteed that other Rubies will. [1]: https://github.com/hashie/hashie/issues/353#issuecomment-363294886
* | Merge pull request #545 from jackjennings/masterDaniel Doubrovkine (dB.)2021-11-081-1/+2
|\ \ | | | | | | Add #except under Ruby 3
| * | Add #except under Ruby 3Jack Jennings2021-11-021-0/+1
| | | | | | | | | | | | | | | | | | Ruby 3 adds the Hash#except method, which should return the correct Hashie object instance when called on a Mash or object using the Hashie::Extensions::IndifferentAccess mixin.
| * | Fix CHANGELOG formattingJack Jennings2021-11-021-1/+1
| |/
* | Fixed issue where a source hash key can be used in translating multiple ↵Daniel Lee2021-06-171-0/+1
|/ | | | properties
* Merge pull request #537 from michaelherold/dash-consistencyMichael Herold2020-10-291-0/+1
|\ | | | | Fix inconsistencies with Dash defaults
| * Fix inconsistencies with Dash defaultsMichael Herold2020-10-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | The normal behavior of Dash with respect to property defaults differed from the behavior of a Dash/Trash with IgnoreUndeclared mixed in. This is because some situations called the defaults and some did not. This change normalizes the behavior so that all situations where the defaults should be used to override unset values behave consistently, as well as all situations where the default should not override a `nil` value.
* | Merge pull request #539 from anakinj/run-27-ci-only-onceMichael Herold2020-10-291-0/+1
|\ \ | |/ |/| * Run 2.7 tests once
| * Drop jruby-9.0.5.0 from build matrixJoakim Antman2020-10-261-1/+1
| |
| * Run 2.7 tests onceJoakim Antman2020-10-261-0/+1
| |
* | Drop testing for unsupported RubiesMichael Herold2020-10-261-0/+1
|/ | | | | | | | | | | | | | Per the [JRuby security policy][1], JRuby 9.2 is supported, but 9.0 is not any longer. JRuby 9.0 has been flaky on builds, so it's now causing a maintenance burden. This isn't a declaration that we won't support this version, but I don't think it makes sense to test on them any more. In the next major release, I would like to define a support policy. [1]: https://github.com/jruby/jruby/blob/4fd5e619f9d1f36d7bbca8f0013bb55e4ad57e8f/SECURITY.md
* Allow exporting a normal, not-indifferent HashMichael Herold2020-10-221-0/+1
| | | | | | | Following the conventions in `activesupport` and the semantics of the `#to_hash` method in Ruby's standard library, the `#to_hash` method for a hash that has mixed in `IndifferentAccess` will now export the hash as a normal, not-indifferent hash.
* require json at spec_helper to fix #532kenner kliemann2020-10-051-0/+1
|
* Add hash slice using IndifferentAccess.kenner kliemann2020-10-031-0/+1
|
* Add Hashie::Extensions::Dash::AllowListAlbert Salim2020-09-201-0/+1
| | | | | | | Extends a Dash with the ability to accept only predefined values on a property. #61
* Updated Copyright to (c) 2009-2020 Intridea, Inc., and Contributors.dblock2020-06-111-0/+1
|
* Merge pull request #525 from yogeshjain999/indifferent-convert-changeDaniel Doubrovkine (dB.) @dblockdotorg2020-06-111-0/+1
|\ | | | | | | Small amendments for Hash#merge with IndifferentAccess
* | Add changelog entryAnton Rieder2020-05-291-0/+1
| |
* | Added TOC and upgraded danger-changelog to verify the keep-a-changelog ↵dblock2020-05-081-56/+30
| | | | | | | | formatted CHANGELOG.
* | Hashie mascot (#522)Caroline Artz2020-05-081-0/+1
| |
* | Changes to `Mash` initialization key string conversion. (#521)Caroline Artz2020-05-041-0/+2
|/
* Correct link to PR in CHANGELOG.mdAnton Rieder2020-02-281-1/+1
|
* Remove text I missed during releaseBobby McDonald2020-02-011-1/+0
|
* Preparing for next development iteration, 4.1.1.Bobby McDonald2020-02-011-0/+32
|
* Preparing for release, 4.1.0v4.1.0Bobby McDonald2020-02-011-20/+2
|
* Suppress a Ruby's warning when using Ruby 2.6.0+Koichi ITO2020-01-181-0/+1
| | | | | | | | | | | | | | | | | | | This PR suppresses the following warning that `deep_merge` method and `deep_update` method are defined twice when using Ruby 2.6.0+. ```console % bundle exec rake (snip) /Users/koic/src/github.com/hahie/hashie/lib/hashie/mash.rb:226: warning: method redefined; discarding old deep_merge /Users/koic/src/github.com/hahie/hashie/lib/hashie/mash.rb:212: warning: previous definition of deep_merge was here /Users/koic/src/github.com/hahie/hashie/lib/hashie/mash.rb:232: warning: method redefined; discarding old deep_update /Users/koic/src/github.com/hahie/hashie/lib/hashie/mash.rb:218: warning: previous definition of deep_update was here ```
* Suppress an integer unification warning for Ruby 2.4.0+Koichi ITO2020-01-161-0/+1
| | | | | | | | | | | | | | | | | This PR suppresss the following integer unification warning for Ruby 2.4.0+ ```console % ruby -v ruby 2.4.9p362 (2019-10-02 revision 67824) [x86_64-darwin17] % bundle exec rspec spec/hashie/extensions/deep_merge_spec.rb Hashie::Extensions::DeepMerge /Users/koic/src/github.com/hahie/hashie/lib/hashie/utils.rb:38: warning: constant ::Fixnum is deprecated /Users/koic/src/github.com/hahie/hashie/lib/hashie/utils.rb:38: warning: constant ::Bignum is deprecated ```
* Merge pull request #511 from koic/suppress_kwargs_warning_for_ruby_2_7_0Daniel Doubrovkine (dB.) @dblockdotorg2020-01-151-0/+1
|\ | | | | Suppress keyword arguments warning for Ruby 2.7.0
| * Suppress keyword arguments warning for Ruby 2.7.0Koichi ITO2020-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR suppresses the following keyword arguments warning for Ruby 2.7.0. ```console % bundle exec rspec spec/hashie/extensions/mash/symbolize_keys_spec.rb (snip) /Users/koic/src/github.com/hahie/hashie/spec/hashie/extensions/mash/symbolize_keys_spec.rb:29: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /Users/koic/src/github.com/hahie/hashie/spec/hashie/extensions/mash/symbolize_keys_spec.rb:21: warning: The called method `call' is defined here ``` For Ruby 2.8.0-dev (Ruby 3.0) the warning will be `ArgumentError`. ruby/ruby#2794
* | Don't warn when setting most affixed keys (#500)Michael Herold2020-01-151-0/+1
|/ | | | | | | | | | | | | | | | | | | | | Due to how we have implemented the bang/underbang/query behavior within Mash, setting keys that have those affixes in them actually allow overwriting the behavior of those affixes. As such, we shouldn't warn when setting a key that matches those patterns. When it comes to setter-like keys, I believe we still _do_ want to warn for two reasons: 1. Trying to access the key via method access is a syntax error. Ruby expects any method ending in `=` to be a 2+-arity method due to the infix notation of setter methods. This is unexpected behavior unless you're very familiar with Ruby parsing. 2. You can still retrieve the key via the normal `Hash#[]` reader, but it prevents setting a similar key without the equal sign. You can see this in the test about setters. I'd say that is unexpected and surprising behavior. Because of these two gotchas, I think we should still warn in cases where you try to set a key that looks like a setter.
* Fix except use in Mash#load (#508)Bobby McDonald2020-01-141-0/+2
|
* Only define compact on ruby >= 2.4Bobby McDonald2020-01-131-0/+1
|
* Suppress `Psych.safe_load` arg warn when using Psych 3.1.0+Koichi ITO2020-01-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This PR suppresses the following `Psych.safe_load` args warn when using Psych 3.1.0 (Ruby 2.6+). ```console % bundle exec rake spec (snip) /Users/koic/src/github.com/intridea/hashie/lib/hashie/extensions/parsers/yaml_erb_parser.rb:22: Passing permitted_classes with the 2nd argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, permitted_classes: ...) instead. /Users/koic/src/github.com/intridea/hashie/lib/hashie/extensions/parsers/yaml_erb_parser.rb:22: Passing permitted_symbols with the 3rd argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, permitted_symbols: ...) instead. /Users/koic/src/github.com/intridea/hashie/lib/hashie/extensions/parsers/yaml_erb_parser.rb:22: Passing aliases with the 4th argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, aliases: ...) instead ```
* Ensure that Hashie::Arrays are not deconvertedMichael Herold2019-12-131-0/+1
| | | | | | | In order for `#dig` to work properly, we need Arrays to be `Hashie::Array`s to be aware of the key conversion. Our original `Mash#convert_value` method was deconverting `Hashie::Array`s into normal Arrays and causing `#dig` to behave in an unexpected manner.
* Merge pull request #499 from michaelherold/permissive-respond-toBobby McDonald2019-11-181-0/+1
|\ | | | | Add a PermissiveRespondTo extension for Mashes
| * Add a PermissiveRespondTo extension for MashesMichael Herold2019-11-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | By default, Mashes don't state that they respond to unset keys. This causes unexpected behavior when you try to use a Mash with a SimpleDelegator. This new extension allows you create a permissive subclass of Mash that will be fully compatible with SimpleDelegator and allow you to fully do thunk-oriented programming with Mashes. This comes with the trade-off of a ~19KB cache for each of these subclasses and a ~20% performance penalty on any of those subclasses.
* | Merge pull request #467 from michaelherold/deep-merge-bugDaniel Doubrovkine (dB.) @dblockdotorg2019-11-181-0/+1
|\ \ | | | | | | Prevent deep_merge from mutating nested hashes
| * | Prevent deep_merge from mutating nested hashesMichael Herold2019-11-171-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `DeepMerge` extension has two methods of mutating hashes: a destructive one and a non-destructive one. The `#deep_merge` version should not mutate the original hash or any hash nested within it. The `#deep_merge!` version is free to mutate the receiver. Without deeply duplicating the values contained within the hash, the invariant of immutability cannot be held for the original hash. In order to preserve that invariant, we need to introduce a method of deeply duplicating the hash. The trick here is that we cannot rely on a simple call to `Object#dup`. Some classes within the Ruby standard library are not duplicable in particular versions of Ruby. Newer versions of Ruby allow these classes to be "duplicated" in a way that returns the original value. These classes represent value objects, so it is safe to return the original value ... unless the classes are monkey-patched, but that isn't something we can protect against. This implementation does a best-effort to deeply duplicate an entire hash by relying on these value object classes being able to return themselves without violating immutability.
* | Exclude tests from the gem releaseMichael Herold2019-11-171-0/+1
|/ | | | | | | | | | | | | | | | | | | | | When you're installing a gem in a production environment, you want it to install as fast it can. One of the ways you can speed up the installation of the gem is by making it smaller. We currently ship the test suite with the gem, increasing the size of the built gem significantly. By not shipping the test suite, we can shrink the size of the gem by 38%. Below are the measurements I took for that statement. **The size of the gem with the test suite** $ du -b hashie-4.0.1.gem 80384 hashie-4.0.1.gem **The size of the gem without the test suite** $ du -b hashie-4.0.1.gem 50176 hashie-4.0.1.gem
* Update github urls to hashie/hashie (#497)Bobby McDonald2019-11-171-188/+188
| | | | | | | | | | | | | | | | * Update github urls to hashie/hashie * Point omniauth in integration tests at master. Until omniauth releases the changes merged from https://github.com/omniauth/omniauth/pull/977 , we must point at master branch. * revert incorrect change of gem email Co-Authored-By: Michael Herold <github@michaeljherold.com> * Reference open issue for release
* Preparing for next development iteration, 4.0.1.Bobby McDonald2019-10-301-0/+32
|
* Preparing for release, 4.0.0.v4.0.0Bobby McDonald2019-10-301-18/+2
|
* Updated README.mdJean-Francis Bastien2019-10-151-0/+1
| | | | SymbolizeKeys and Keywords argument behavior.
* Allow mash error silencing (#488)Bobby McDonald2019-10-141-1/+2
|
* Make Hashie play nice with Rails 6 Hash#except method (#479)Bobby McDonald2019-10-021-0/+1
|