You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 21, 2018. It is now read-only.
These are in conflict. So, I encounter many errors in ridley.
Hash#dig should be renamed.
But the above is breaking change...
What do you think ?
Output of RSpec with Ruby 2.3
$ bundle exec rspec
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
Buff::Extensions::Hash::DottedPaths
ClassMethods
::from_dotted_path
returns a new Hash
returns a hash containing the nested keys
sets a nil value for the deepest nested item
handles a symbol as the dotted path
when given a seed value
sets the value of the deepest nested item to the seed
#dig
returns nil if given a blank string
returns 'false' nested values as 'false' and not 'nil' (FAILED - 1)
when the Hash contains the nested path
returns the value at the dotted path (FAILED - 2)
when the Hash does not contain the nested path
returns a nil value
when the Hash contains symbols for keys
returns the value at the dotted path (FAILED - 3)
#dotted_paths
returns an array
given a hash with only top level keys
returns an array of the top level keys as strings
given a hash with empty hashes as values
returns an array of the top level keys as strings
given a hash with nested keys
returns an array of dotted paths including the nested Hash keys
Failures:
1) Buff::Extensions::Hash::DottedPaths#dig returns 'false' nested values as 'false' and not 'nil'
Failure/Error: expect(hash.dig('ssl.verify')).to eql(false)
expected: false
got: nil
(compared using eql?)
# ./spec/buff/extensions/hash/dotted_paths_spec.rb:94:in `block (3 levels) in <top (required)>'
2) Buff::Extensions::Hash::DottedPaths#dig when the Hash contains the nested path returns the value at the dotted path
Failure/Error: expect(subject.dig("we.found.something")).to eql(true)
expected: true
got: nil
(compared using eql?)
# ./spec/buff/extensions/hash/dotted_paths_spec.rb:57:in `block (4 levels) in <top (required)>'
3) Buff::Extensions::Hash::DottedPaths#dig when the Hash contains symbols for keys returns the value at the dotted path
Failure/Error: expect(subject.dig("we.found.something")).to eql(:symbol_value)
expected: :symbol_value
got: nil
(compared using eql?)
# ./spec/buff/extensions/hash/dotted_paths_spec.rb:79:in `block (4 levels) in <top (required)>'
1 deprecation warning total
Finished in 0.02242 seconds (files took 0.078 seconds to load)
14 examples, 3 failures
Failed examples:
rspec ./spec/buff/extensions/hash/dotted_paths_spec.rb:87 # Buff::Extensions::Hash::DottedPaths#dig returns 'false' nested values as 'false' and not 'nil'
rspec ./spec/buff/extensions/hash/dotted_paths_spec.rb:56 # Buff::Extensions::Hash::DottedPaths#dig when the Hash contains the nested path returns the value at the dotted path
rspec ./spec/buff/extensions/hash/dotted_paths_spec.rb:78 # Buff::Extensions::Hash::DottedPaths#dig when the Hash contains symbols for keys returns the value at the dotted path
The text was updated successfully, but these errors were encountered:
pocke
added a commit
to skyarch-networks/skyhopper
that referenced
this issue
Jan 7, 2016
Hi. I use https://github.com/berkshelf/ridley . and I encounter many errors with ruby 2.3 .
Hash#dig
is defined in ruby 2.3.However,
buff-extensions
also definesdig
method.These are in conflict. So, I encounter many errors in ridley.
Hash#dig
should be renamed.But the above is breaking change...
What do you think ?
Output of RSpec with Ruby 2.3
The text was updated successfully, but these errors were encountered: