lib/jbundler/cli.rb in jbundler-0.5.2 vs lib/jbundler/cli.rb in jbundler-0.5.3
- old
+ new
@@ -49,15 +49,17 @@
#method_option :details, :type => :boolean, :default => false
def tree
JBundler::Tree.new( config ).show_it
end
- desc 'executable', 'create an executable jar with a given bootstrap.rb file'
- method_option :bootstrap, :type => :string, :aliases => '-b', :required => true, :desc => 'file which will be executed when the jar gets executed'
+ desc 'executable', 'create an executable jar with a given bootstrap.rb file\nLIMITATION: only for jruby 1.6.x and newer'
+ method_option :bootstrap, :type => :string, :aliases => '-b'#, :required => true, :desc => 'file which will be executed when the jar gets executed'
+ method_option :compile, :type => :boolean, :aliases => '-c', :default => false, :desc => 'compile the ruby files from the lib directory'
+ method_option :verbose, :type => :boolean, :aliases => '-v', :default => false, :desc => 'more output'
method_option :groups, :type => :array, :aliases => '-g', :desc => 'bundler groups to use for determine the gems to include in the jar file'
def executable
- ex = JBundler::Executable.new( options[ :bootstrap ], config )
+ ex = JBundler::Executable.new( options[ 'bootstrap' ], config, options[ 'compile' ], options[ :verbose ], *( options[ 'groups' ] || [:default] ) )
ex.packit
end
desc 'console', 'irb session with gems and/or jars and with lazy jar loading.'
def console
@@ -73,10 +75,9 @@
desc 'update', "first `bundle update` is called and if there are no options then the jar dependencies will be updated. for more details see `bundle help update`."
def update
if ARGV.size == 1
require 'java'
- require 'jbundler/config'
config = JBundler::Config.new
FileUtils.rm_f(config.jarfile_lock)
require 'jbundler'
do_show