Skip to content

Commit

Permalink
Bump version to 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
liufengyun committed Aug 2, 2024
1 parent b96fee0 commit 5ad32a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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
Expand All @@ -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`

Expand Down
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/hashdiff/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Hashdiff
VERSION = '1.1.0'.freeze
VERSION = '1.1.1'.freeze
end

0 comments on commit 5ad32a9

Please sign in to comment.