# File lib/jeweler/version_helper.rb, line 100 def bump_major @major += 1 @minor = 0 @patch = 0 @build = nil end
# File lib/jeweler/version_helper.rb, line 107 def bump_minor @minor += 1 @patch = 0 @build = nil end
# File lib/jeweler/version_helper.rb, line 113 def bump_patch @patch += 1 @build = nil end
# File lib/jeweler/version_helper.rb, line 135 def plaintext_path denormalized_path = File.join(@base_dir, 'VERSION') absolute_path = File.expand_path(denormalized_path) absolute_path.gsub(Dir.getwd + File::SEPARATOR, '') end
# File lib/jeweler/version_helper.rb, line 125 def to_s [major, minor, patch, build].compact.join('.') end
# File lib/jeweler/version_helper.rb, line 118 def update_to(major, minor, patch, build=nil) @major = major @minor = minor @patch = patch @build = build end
# File lib/jeweler/version_helper.rb, line 129 def yaml_path denormalized_path = File.join(@base_dir, 'VERSION.yml') absolute_path = File.expand_path(denormalized_path) absolute_path.gsub(Dir.getwd + File::SEPARATOR, '') end
# File lib/jeweler/version_helper.rb, line 86 def initialize(base_dir) self.base_dir = base_dir if File.exists?(yaml_path) extend YamlExtension parse_yaml else extend PlaintextExtension if File.exists?(plaintext_path) parse_plaintext end end end