Repository URL to install this package:
|
Version:
1.0.4 ▾
|
module Buildgem
class MajorVersion < Version
def new_version
current_version.gsub(/(?:\d+\.){2}\d+"/,
"#{new_major_version}\"")
end
def new_major_version
v = current_major_version + 1
"#{v}.0.0"
end
def current_major_version
current_version.match(/"(\d+)\./) { |m|
m[1]
}.to_i
end
end
end