Class: JBundler::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/jbundler/cli.rb

Instance Method Summary collapse

Instance Method Details

#consoleObject


63
64
65
# File 'lib/jbundler/cli.rb', line 63

def console
  # dummy - never executed !!!
end

#executableObject


57
58
59
60
# File 'lib/jbundler/cli.rb', line 57

def executable
  ex = JBundler::Executable.new( options[ :bootstrap ], config )
  ex.packit
end

#installObject


68
69
70
71
72
# File 'lib/jbundler/cli.rb', line 68

def install
  require 'jbundler'
  do_show
  puts 'Your jbundle is complete! Use `jbundle show` to see where the bundled jars are installed.'
end

#showObject


90
91
92
93
94
# File 'lib/jbundler/cli.rb', line 90

def show
  if ARGV.size == 1
    do_show
 end
end

#treeObject

method_option :details, :type => :boolean, :default => false


50
51
52
# File 'lib/jbundler/cli.rb', line 50

def tree
  JBundler::Tree.new( config ).show_it
end

#updateObject


75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/jbundler/cli.rb', line 75

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
    puts ''
    puts 'Your jbundle is updated! Use `jbundle show` to see where the bundled jars are installed.'
  end
end