Coder Social home page Coder Social logo

Comments (10)

aaronbbrown avatar aaronbbrown commented on August 23, 2024 2

Would be super sweet to see this get fixed, as I'm running into the same problem.

from diplomat.

johnhamelink avatar johnhamelink commented on August 23, 2024

Well spotted. The question is - should we detect if the path is recursive and return a different result or should we make it an explicit option that you set?

from diplomat.

johnhamelink avatar johnhamelink commented on August 23, 2024

I've decided I'm going to return the hash, but I will do this as part of a breaking change, which according to Semver will bump the version number up to 1.0.0. I'll do this after I've merged everything else that's non-breaking in and released 0.13.0.

from diplomat.

chaos95 avatar chaos95 commented on August 23, 2024

@johnhamelink According to Semver, major version 0 (that is, 0.y.z) is for initial development and does not guarantee any protection against breaking changes. You should feel free to break things between minor revisions when you're still in pre-release.

from diplomat.

johnhamelink avatar johnhamelink commented on August 23, 2024

@chaos95 Agreed, but considering the amount of people using this gem, we are now in release whether we like it or not 😄

from diplomat.

EugenMayer avatar EugenMayer commented on August 23, 2024

Iam bumping this issue, since with 1.1.0 we have now convert_to_hash: true and this we can implement a good behavior here.

Right now, if you ask for test/this/out/key = 'test' with

Diplomat::Kv.get('test/', {convert_to_hash: true, recurse: true}, :return)

You get a plain parse exception that test cannot be "eached"

undefined method `each' for "test":String

@johnhamelink it seemed to be on the 1.0.0 roadmap but either it got forgotten or this issue is not the right home for my described bug. Could you tell me whether to create a new context for this?

For more cleanup to this ssue:
Pull request #51 should be closed since it is not based on the current hash-parser or was not aware back then in 2015, that it will be existing. I think, the patch for the issue above is far more trivial

from diplomat.

snoremac avatar snoremac commented on August 23, 2024

If it helps anyone, our fork changes behaviour such that single-valued results are packaged the same way as multi-valued ones.

https://github.com/caradvice/diplomat

from diplomat.

EugenMayer avatar EugenMayer commented on August 23, 2024

@snoremac wondering why you did not create a pull request? Thank you for your work!

from diplomat.

pklingem avatar pklingem commented on August 23, 2024

@snoremac thoughts on PRing?

from diplomat.

pierresouchay avatar pierresouchay commented on August 23, 2024

This has been added in 2.1.0

from diplomat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.