Giter VIP home page Giter VIP logo

Comments (2)

joonty avatar joonty commented on June 28, 2024

Hi @shoutsid! Great to hear from you.

You should check out the token-parsing branch, which should fix the problem. Basically, the master branch uses the old parsing method, which loads the Gemfile and hijacks the method calls to try and work out how to piece it all back together again, but some information gets lost (e.g. comments, the position of original code fragments, etc). The token-parsing branch splits the Gemfile up into tokens and can keep the exact position of the original tokens.

It's not perfect, hence why I haven't merged it into master. It works for 99% of cases, but if you had some unusual but perfectly valid syntax in your Gemfile then it would throw a wobbler. I've got a plan to implement a better parser soon, just need a bit of time ;)

I'll keep this issue open until I can get something working and release a new gem, because it's technically valid for the most recent version.

Thanks

from pessimize.

joonty avatar joonty commented on June 28, 2024

Hi again @shoutsid,

This has been fixed in version 0.2.0 and even more fixed (hehe) in the very latest version 0.3.0.

This version should keep the Gemfile syntax exactly the same, but insert or replace versions as expected.

Thanks

from pessimize.

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.