Bringing versioning of CmdParser in line with Gem.
This commit is contained in:
parent
84018b56af
commit
558863a224
|
@ -1,26 +1,5 @@
|
|||
#!/usr/bin/env ruby
|
||||
require 'rubygems'
|
||||
require 'cmdparse'
|
||||
|
||||
PMVC_GEN_LIB = File.join(File.dirname(__FILE__), '..', 'lib', 'pure_m_v_c_gen')
|
||||
require File.join(PMVC_GEN_LIB, 'ant_checker')
|
||||
|
||||
unless PureMVCGen::AntChecker.has_ant_installed?
|
||||
err = <<-EOL
|
||||
You must have ANT installed to run puremvc-gen.
|
||||
Install it! ==> http://ant.apache.org
|
||||
If you have it installed, ensure it is on your path.
|
||||
EOL
|
||||
puts err
|
||||
exit 1
|
||||
end
|
||||
|
||||
CMD_PATH = File.join(PMVC_GEN_LIB, 'commands')
|
||||
|
||||
require File.join(CMD_PATH, 'command_extensions')
|
||||
require File.join(CMD_PATH, 'check_command')
|
||||
require File.join(CMD_PATH, 'initialize_command')
|
||||
require File.join(CMD_PATH, 'new_command')
|
||||
require 'pure_m_v_c_gen'
|
||||
|
||||
include PureMVCGen::Commands
|
||||
|
||||
|
@ -33,7 +12,7 @@ end
|
|||
|
||||
cmd = CmdParse::CommandParser.new(true, true)
|
||||
cmd.program_name = "puremvc-gen "
|
||||
cmd.program_version = [0, 0, 1]
|
||||
cmd.program_version = PureMVCGen::Version::ARRAY
|
||||
|
||||
cmd.add_command(CmdParse::HelpCommand.new)
|
||||
cmd.add_command(CmdParse::VersionCommand.new)
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
require 'rubygems'
|
||||
require 'cmdparse'
|
||||
require 'pure_m_v_c_gen/version'
|
||||
|
||||
PMVC_GEN_LIB = File.join(File.dirname(__FILE__), '..', 'lib', 'pure_m_v_c_gen')
|
||||
require File.join(PMVC_GEN_LIB, 'ant_checker')
|
||||
|
||||
unless PureMVCGen::AntChecker.has_ant_installed?
|
||||
err = <<-EOL
|
||||
You must have ANT installed to run puremvc-gen.
|
||||
Install it! ==> http://ant.apache.org
|
||||
If you have it installed, ensure it is on your path.
|
||||
EOL
|
||||
puts err
|
||||
exit 1
|
||||
end
|
||||
|
||||
CMD_PATH = File.join(PMVC_GEN_LIB, 'commands')
|
||||
|
||||
require File.join(CMD_PATH, 'command_extensions')
|
||||
require File.join(CMD_PATH, 'check_command')
|
||||
require File.join(CMD_PATH, 'initialize_command')
|
||||
require File.join(CMD_PATH, 'new_command')
|
|
@ -14,7 +14,8 @@ module PureMVCGen
|
|||
MINOR = 1
|
||||
TINY = 0
|
||||
|
||||
STRING = [MAJOR, MINOR, TINY].join(".")
|
||||
ARRAY = [MAJOR, MINOR, TINY]
|
||||
STRING = ARRAY.join(".")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue