summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #534 from voke/patch-1Daniel Doubrovkine (dB.) @dblockdotorg2020-10-161-1/+1
|\ | | | | Fix typo in README for PredefinedValues
| * Fix typo in README for PredefinedValuesGustav2020-10-161-1/+1
|/
* Merge pull request #533 from gnomex/fix-json-specs-errorDaniel Doubrovkine (dB.) @dblockdotorg2020-10-052-0/+2
|\ | | | | require json at spec_helper to fix #532
| * require json at spec_helper to fix #532kenner kliemann2020-10-052-0/+2
|/
* Add hash slice using IndifferentAccess.kenner kliemann2020-10-035-5/+30
|
* Merge pull request #530 from caalberts/dash-allowed-valuesDaniel Doubrovkine (dB.) @dblockdotorg2020-09-245-0/+163
|\ | | | | Hashie::Extensions::Dash::PredefinedValues
| * Add Hashie::Extensions::Dash::AllowListAlbert Salim2020-09-205-0/+163
|/ | | | | | | Extends a Dash with the ability to accept only predefined values on a property. #61
* Merge pull request #527 from dblock/copyright-2020Daniel Doubrovkine (dB.) @dblockdotorg2020-06-123-2/+3
|\ | | | | Updated Copyright to 2020.
| * Updated Copyright to (c) 2009-2020 Intridea, Inc., and Contributors.dblock2020-06-113-2/+3
|/
* Merge pull request #525 from yogeshjain999/indifferent-convert-changeDaniel Doubrovkine (dB.) @dblockdotorg2020-06-113-2/+42
|\ | | | | | | Small amendments for Hash#merge with IndifferentAccess
| * Small amendments for Hash#merge with IndifferentAccessYogesh Khater2020-06-102-2/+41
| | | | | | | | | | | | | | | | | | 1. Use `indifferent_writer` in `convert!` so that when `indifferent_writer`, `convert_key` or `indifferent_value` is overridden in included class, `merge` can use those. 2. `convert!` was calling twice if `other` hash was lacking indifference. `IndifferentAccess.inject!` already does conversion.
* | Merge pull request #524 from aried3r/patch-2Daniel Doubrovkine (dB.) @dblockdotorg2020-05-292-18/+16
|\ \ | | | | | | Test with Ruby 2.7
| * | Set fast_finish: trueAnton Rieder2020-05-291-0/+1
| | | | | | | | | | | | Report success even before allowed_failures finish
| * | Run danger, integration with Ruby 2.7Anton Rieder2020-05-291-2/+2
| | |
| * | Rest with TruffleRuby, allow failureAnton Rieder2020-05-291-4/+2
| | |
| * | Try testing JRuby 9.0 on xenialAnton Rieder2020-05-291-2/+1
| | |
| * | Add changelog entryAnton Rieder2020-05-291-0/+1
| | |
| * | Test with JRuby 9.2Anton Rieder2020-05-291-2/+2
| | | | | | | | | Also switch testing jruby-head from EOL Ubuntu to Travis default (xenial).
| * | Test with Ruby 2.7Anton Rieder2020-05-291-10/+9
|/ / | | | | | | | | `sudo: false` is deprecated. https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
* | Merge pull request #523 from dblock/danger-tocDaniel Doubrovkine (dB.) @dblockdotorg2020-05-115-100/+93
|\ \ | | | | | | Added TOC and upgraded danger-changelog to verify the keep-a-changelog formatted CHANGELOG.
| * | Added TOC and upgraded danger-changelog to verify the keep-a-changelog ↵dblock2020-05-085-100/+93
|/ / | | | | | | formatted CHANGELOG.
* | Hashie mascot (#522)Caroline Artz2020-05-083-1/+77
| |
* | Changes to `Mash` initialization key string conversion. (#521)Caroline Artz2020-05-0412-41/+127
|/
* Elasticsearch integration spec fix (#520)Jitendra Rajpurohit2020-04-121-1/+5
|
* Merge pull request #517 from aried3r/patch-1Daniel Doubrovkine (dB.) @dblockdotorg2020-04-101-1/+1
|\ | | | | Correct link to PR in CHANGELOG.md
| * 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-012-1/+34
|
* Preparing for release, 4.1.0v4.1.0Bobby McDonald2020-02-013-23/+5
|
* Merge pull request #513 from koic/suppress_ruby_warning_for_ruby_2_6Daniel Doubrovkine (dB.) @dblockdotorg2020-01-203-15/+20
|\ | | | | Suppress a Ruby's warning when using Ruby 2.6.0+
| * Suppress a Ruby's warning when using Ruby 2.6.0+Koichi ITO2020-01-183-15/+20
|/ | | | | | | | | | | | | | | | | | | 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 ```
* Merge pull request #512 from ↵Daniel Doubrovkine (dB.) @dblockdotorg2020-01-164-6/+7
|\ | | | | | | | | koic/suppress_integer_unification_warning_for_ruby_2_4_0 Suppress an integer unification warning for Ruby 2.4.0+
| * Suppress an integer unification warning for Ruby 2.4.0+Koichi ITO2020-01-164-6/+7
|/ | | | | | | | | | | | | | | | | 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-152-1/+2
|\ | | | | Suppress keyword arguments warning for Ruby 2.7.0
| * Suppress keyword arguments warning for Ruby 2.7.0Koichi ITO2020-01-152-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-155-1/+43
|/ | | | | | | | | | | | | | | | | | | | | 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-1412-283/+403
|
* Merge pull request #510 from BobbyMcWho/fix-compact-definitionBobby McDonald2020-01-133-27/+28
|\ | | | | Only define compact on ruby >= 2.4
| * Only define compact on ruby >= 2.4Bobby McDonald2020-01-133-27/+28
|/
* Merge pull request #507 from koic/suppress_warn_for_psych_3_1_0_or_higherDaniel Doubrovkine (dB.) @dblockdotorg2020-01-132-2/+20
|\ | | | | Suppress `Psych.safe_load` arg warn when using Psych 3.1.0+
| * Suppress `Psych.safe_load` arg warn when using Psych 3.1.0+Koichi ITO2020-01-132-2/+20
|/ | | | | | | | | | | | | | | | | | | | | | | 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 ```
* Merge pull request #505 from michaelherold/fix-multiple-array-conversionDaniel Doubrovkine (dB.) @dblockdotorg2019-12-143-2/+10
|\ | | | | Ensure that Hashie::Arrays are not deconverted
| * Ensure that Hashie::Arrays are not deconvertedMichael Herold2019-12-133-2/+10
|/ | | | | | | 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 #502 from jmanian/masterDaniel Doubrovkine (dB.) @dblockdotorg2019-11-251-1/+2
|\ | | | | update comment for Mash truthiness methods
| * update comment for Mash truthiness methodsJeff Manian2019-11-251-1/+2
|/
* Merge pull request #499 from michaelherold/permissive-respond-toBobby McDonald2019-11-187-0/+176
|\ | | | | Add a PermissiveRespondTo extension for Mashes
| * Add a PermissiveRespondTo extension for MashesMichael Herold2019-11-177-0/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-184-6/+93
|\ \ | | | | | | Prevent deep_merge from mutating nested hashes
| * | Prevent deep_merge from mutating nested hashesMichael Herold2019-11-174-6/+93
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #498 from michaelherold/gemspec-updatesDaniel Doubrovkine (dB.) @dblockdotorg2019-11-185-19/+42
|\ \ | |/ |/| Update the gemspec for improved information and installation size/speed