Class: JBundler::Cli
- Inherits:
-
Thor
- Object
- Thor
- JBundler::Cli
- Defined in:
- lib/jbundler/cli.rb
Instance Method Summary collapse
- #console ⇒ Object
- #executable ⇒ Object
- #install ⇒ Object
- #show ⇒ Object
-
#tree ⇒ Object
method_option :details, :type => :boolean, :default => false.
- #update ⇒ Object
Instance Method Details
#console ⇒ Object
72 73 74 |
# File 'lib/jbundler/cli.rb', line 72 def console # dummy - never executed !!! end |
#executable ⇒ Object
66 67 68 69 |
# File 'lib/jbundler/cli.rb', line 66 def executable ex = JBundler::Executable.new( [ 'bootstrap' ], config, [ 'compile' ], [ :verbose ], *( [ 'groups' ] || [:default] ) ) ex.packit end |
#install ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/jbundler/cli.rb', line 79 def install require 'jbundler' if [ :no_deployment ] vendor = JBundler::Vendor.new( config.vendor_dir ) vendor.clear end if [ :deployment ] vendor = JBundler::Vendor.new( config.vendor_dir ) if vendor.vendored? raise "already vendored. please 'jbundle install --no-deployment before." else vendor.setup( JBundler::ClasspathFile.new( config.classpath_file ) ) end end do_show puts 'Your jbundle is complete! Use `jbundle show` to see where the bundled jars are installed.' end |
#show ⇒ Object
112 113 114 115 116 |
# File 'lib/jbundler/cli.rb', line 112 def show if ARGV.size == 1 do_show end end |
#tree ⇒ Object
method_option :details, :type => :boolean, :default => false
57 58 59 |
# File 'lib/jbundler/cli.rb', line 57 def tree JBundler::Tree.new( config ).show_it end |
#update ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/jbundler/cli.rb', line 98 def update if ARGV.size == 1 require 'java' config = JBundler::Config.new FileUtils.rm_f(config.jarfile_lock) require 'jbundler' do_show puts '' puts 'Your jbundle is updated! Use `jbundle show` to see where the bundled jars are installed.' end end |