lib/vamper.rb in code_tools-4.1.0 vs lib/vamper.rb in code_tools-4.2.0
- old
+ new
@@ -1,32 +1,33 @@
require 'tzinfo'
require 'nokogiri'
require 'ostruct'
require 'optparse'
+require 'colorize'
require_relative './vamper/version_file.rb'
require_relative './vamper/version_config_file.rb'
require_relative './core_ext.rb'
-$VERSION='4.1.0-20151225.0'
+$VERSION='4.2.0-20151225.0'
class Vamper
def parse(args)
options = OpenStruct.new
options.do_update = false
options.version_file_name = ''
opt_parser = OptionParser.new do |opts|
- opts.banner = %Q(Version Stamper. Version #{$VERSION}
+ opts.banner = %Q(Vamper Version Stamper. Version #{$VERSION}
Copyright (c) John Lyon-Smith, 2016.
Usage: #{File.basename(__FILE__)} [options]
)
opts.separator %Q(Options:
)
- opts.on("-u", "--update", "Increment the build number and update all files") do |dir|
- options.do_update = true
+ opts.on("-u", "--update", "Increment the build number and update all files") do |update|
+ options.do_update = update
end
opts.on_tail("-?", "--help", "Show this message") do
puts opts
exit
@@ -187,9 +188,9 @@
def get_jdate(now, start_year)
(((now.year - start_year + 1) * 10000) + (now.month * 100) + now.mday).to_s
end
def error(msg)
- puts "error: ".red + "#{msg}"
+ puts "error: #{msg}".colorize(:red)
end
end