diff --git a/README.md b/README.md index 3b35e9f..07866ff 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Hashdiff [![Build Status](https://secure.travis-ci.org/liufengyun/hashdiff.svg)](http://travis-ci.org/liufengyun/hashdiff) [![Build Status](https://github.com/liufengyun/hashdiff/workflows/ci/badge.svg)](https://github.com/liufengyun/hashdiff/actions?query=workflow%3Aci) [![Gem Version](https://badge.fury.io/rb/hashdiff.svg)](http://badge.fury.io/rb/hashdiff) +# Hashdiff [![Build Status](https://github.com/liufengyun/hashdiff/workflows/ci/badge.svg)](https://github.com/liufengyun/hashdiff/actions?query=workflow%3Aci) [![Gem Version](https://badge.fury.io/rb/hashdiff.svg)](http://badge.fury.io/rb/hashdiff) Hashdiff is a ruby library to compute the smallest difference between two hashes. @@ -127,7 +127,7 @@ b = { b: { a: 7, c: 3, f: 1 }, d: 8 } diff = Hashdiff.diff(a, b, ignore_keys: %i[a f]) diff.should == [['-', 'g', 0], ['-', 'b.e', 1], ['~', 'b.c', 6, 3], ['+', 'd', 8]] ``` -If you wish instead to ignore keys at a particlar level you should +If you wish instead to ignore keys at a particlar level you should use a [custom comparison method](https://github.com/liufengyun/hashdiff#specifying-a-custom-comparison-method) instead. For example to diff only at the 2nd level of both hashes: ```ruby @@ -138,7 +138,7 @@ diff = Hashdiff.diff(a, b) do |path, _e, _a| true if %w[a f].include?(arr.last) && arr.size == 2 # note '.' is the default delimiter end diff.should == [['-', 'a', 4], ['-', 'g', 0], ['-', 'b.e', 1], ['~', 'b.c', 6, 3], ['+', 'd', 8]] -``` +``` #### `:indifferent` diff --git a/changelog.md b/changelog.md index 95e507b..e6e847b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,9 @@ # Change Log -* Fix bug in ignore_keys option #88 +## v1.1.1 2024-08-02 + +* Fix bug in ignore_keys option #88 (@Matzfan) +* Exclude spec files from gem package #94 (@amatsuda) ## v1.1.0 2023-12-14 diff --git a/lib/hashdiff/version.rb b/lib/hashdiff/version.rb index 310b3a0..a907145 100644 --- a/lib/hashdiff/version.rb +++ b/lib/hashdiff/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Hashdiff - VERSION = '1.1.0'.freeze + VERSION = '1.1.1'.freeze end