Commit 5732fa3
committed
[MODEL] Added a
Since Hashie now prints out a warning whenever a key which clashes with a built-in method
is added, such as `sort`, the logs are flooded.
Hashie has a `disable_warnings` method in hashie/hashie@b2f94a4 to supress
the logging, so a simple sub-class has been added to allow calling it cleanly,
and to serve as a possible extension point in the future.
Many thanks to @michaelherold for the pointers to a similar implementation
in the Omniauth gem and adding quickly the infrastructure in the Hashie gem!
Closes #666HashWrapper class to wrap Hash structures instead of raw Hashie::Mash
1 parent 6987856 commit 5732fa3
File tree
2 files changed
+28
-0
lines changed- elasticsearch-model
- lib/elasticsearch/model
- test/unit
2 files changed
+28
-0
lines changedLines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments