nirenjan / vmlib Goto Github PK
View Code? Open in Web Editor NEWVersion Manager Library
Version Manager Library
According to SemVer 2.0.0, leading zeroes are acceptable in build identifiers. However, current version of vmlib strips any leading zeroes and stores the identifiers as numbers (if the identifier has only digits).
There is nothing in format to prevent the user from passing in a string such as %3M.%2m.%p%M
In this case, the format code assumes that there is only 1 %(\d*)M
element, and uses that to determine the format for the entire string. So while the user may be expecting 001.02.3.1
, he would actually get 001.02.3.001
(note the final 00 padding).
The vmlib wrapper script serves to automate some of the common tasks implemented by the VMLib module. The issue is that if it prints out any help, the entire path is printed out, such as the line below
Usage: /Users/nirenjan/.rvm/gems/ruby-1.9.3-p429/bin/vmlib <command> [arguments]
What we would expect is to strip out the path and simply print
Usage: vmlib <command> [arguments]
As a result of this bug, you can see the full path being printed everywhere, and it throws off the formatting.
Based on SemVer v2.0.0, prerelease identifiers that are numeric MUST NOT contain leading zeroes. Currently, vmlib accepts a prerelease identifier of the form 01.002.0003, but stores it as 1.2.3 - which is compliant with the specification.
However, there is a corner case if the user expects to retrieve the number exactly as stored. There are three possible ways to address this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.