# File lib/jeweler/version_helper.rb, line 61 def parse_plaintext plaintext = read_plaintext.chomp # http://rubular.com/regexes/10467 -> 3.5.4.a1 # http://rubular.com/regexes/10468 -> 3.5.4 if plaintext =~ %r^(\d+)\.(\d+)\.(\d+)(?:\.(.*?))?$/ @major = $1.to_i @minor = $2.to_i @patch = $3.to_i @build = $4 end end
# File lib/jeweler/version_helper.rb, line 81 def path plaintext_path end
# File lib/jeweler/version_helper.rb, line 73 def read_plaintext File.read(plaintext_path) end
# File lib/jeweler/version_helper.rb, line 77 def refresh parse_plaintext end
# File lib/jeweler/version_helper.rb, line 55 def write File.open(plaintext_path, 'w') do |file| file.write to_s end end