summaryrefslogtreecommitdiff
path: root/.rubocop_todo.yml
diff options
context:
space:
mode:
authorMichael Herold <github@michaeljherold.com>2017-02-22 19:37:07 -0600
committerGitHub <noreply@github.com>2017-02-22 19:37:07 -0600
commitc071e4f9fdcd41b078e6be405f9cf54480b76c8e (patch)
treefe18b8cb2dadf6818dd2b4bc31ffaf33de55d627 /.rubocop_todo.yml
parentb36de9402e80140248c74ea2ce08f7db94375c66 (diff)
downloadhashie-c071e4f9fdcd41b078e6be405f9cf54480b76c8e.tar.gz
Add an extension to maintain original Mash keys (#326)
One of the behaviors of Mash that we see regularly surprise users is that Mash stringifies any keys passed into it. This leads to unexpected lack of synergy between Mash and its cousins (particularly Dash), since the property DSLs do not handle indifferent key access. This extension ensures that the original keys are kept inside the Mash's data structure, at the expense of more costly logic for fetching information indifferently. I have included a benchmark that compares the two. The benchmark shows that when you are passing string keys into a Mash, using this extension will actually be _faster_ than the default implementation, but that the reverse is true when passing symbol keys. In #296, I tried to do this universally for all Mashes, which slowed down the fetching behavior for Mash significantly. I like this attempt much better because it allows users to opt into the new behavior if they want it, while still keeping the default implementation as-is. Fixes #196 by giving the option of keeping the original structure of the Mash when using it with Dash. Fixes #246 by giving the option of opting into keeping the original keys. Closes #296 by giving a more flexible path forward that doesn't change the semantics of the main Mash class.
Diffstat (limited to '.rubocop_todo.yml')
-rw-r--r--.rubocop_todo.yml8
1 files changed, 4 insertions, 4 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index d7d21a5..06bb1e1 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
-# on 2017-02-10 18:48:03 -0600 using RuboCop version 0.34.2.
+# on 2017-02-22 17:31:41 -0600 using RuboCop version 0.34.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@@ -18,13 +18,13 @@ Metrics/AbcSize:
# Offense count: 2
# Configuration parameters: CountComments.
Metrics/ClassLength:
- Max: 204
+ Max: 205
# Offense count: 8
Metrics/CyclomaticComplexity:
Max: 11
-# Offense count: 242
+# Offense count: 246
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 170
@@ -43,7 +43,7 @@ Style/CaseEquality:
Exclude:
- 'lib/hashie/hash.rb'
-# Offense count: 36
+# Offense count: 37
# Configuration parameters: Exclude.
Style/Documentation:
Enabled: false