Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
buildgem / lib / buildgem / version / patch_version.rb
Size: Mime:
module Buildgem
  class PatchVersion < Version
    def new_version
      current_version.gsub(/\d+"/,
                           "#{new_patch_version}\"")
    end

    def new_patch_version
      current_patch_version + 1
    end

    def current_patch_version
      current_version.match(/(\d+)"/) { |m|
        m[0]
      }.to_i
    end
  end
end