bin/nuri in nuri-0.5.4 vs bin/nuri in nuri-0.5.5

- old
+ new

@@ -1,9 +1,9 @@ #!/usr/bin/env ruby -dir = File.expand_path('../../', __FILE__) -require "#{dir}/lib/nuri" +home = File.expand_path('../', File.dirname(__FILE__)) +require "#{home}/lib/nuri" Version = File.read(File.dirname(__FILE__) + "/../VERSION").strip About = "Nuri #{Version} (c) 2013" class Nuri::Console @@ -74,11 +74,11 @@ opt :apply, 'generate and execute a plan', :short => '-a' opt :json, 'print the plan in JSON' opt :color, 'enable colorized output' opt :no_interactive, 'disable interactive input' opt :no_push_module, 'disable automatic push module' - opt :image, 'image graph of the generated plan', :default => '' #Dir.home + '/.nuri/plan.png' + opt :image, 'image graph of the generated plan', :default => '' end help, args = check_help(args) opts = process_args args, parser if help @@ -455,12 +455,12 @@ Usage: <command> [options] when <command> is: state get current state plan generate a plan bsig deployment with distributed mechanism - agent manage Nuri agent - edit edit file + agent manage the agent + edit edit model file help print this help exit exit this console EOS end @@ -563,12 +563,13 @@ where [command] is: model get compilation result of the model state get the current state plan generate the plan bsig deployment with distributed mechanism - agent manage Nuri agent + agent manage the agent console enter console + version print the version EOS if ARGV.length > 0 success = false @@ -585,19 +586,21 @@ do_console when 'e', 'edit' do_edit when 'm', 'model' do_model + when 'v', 'version' + puts About else puts banner end else puts banner end end end -if $0 == __FILE__ +if File.basename($0) == File.basename(__FILE__) Nuri.init Nuri::Console.new.run end