Class: JBundler::Cli

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

Instance Method Summary collapse

Instance Method Details

#consoleObject



111
112
113
# File 'lib/jbundler/cli.rb', line 111

def console
  # dummy - never executed !!!
end

#executableObject



105
106
107
108
# File 'lib/jbundler/cli.rb', line 105

def executable
  ex = JBundler::Executable.new( options[ 'bootstrap' ], config, options[ 'compile' ], options[ :verbose ], *( options[ 'groups' ] || [:default] ) )
  ex.packit
end

#installObject



91
92
93
94
95
96
97
98
# File 'lib/jbundler/cli.rb', line 91

def install
  JBundler::LockDown.new( config ).lock_down( options[ :vendor ],
                                              options[ :debug ] ,
                                              options[ :verbose ] )
  config.verbose = ! options[ :quiet ]
  Show.new( config ).show_classpath
  puts 'jbundle complete' unless options[ :quiet ]
end

#jruby_completeObject



59
60
61
62
63
64
65
66
# File 'lib/jbundler/cli.rb', line 59

def jruby_complete
  jc = JBundler::JRubyComplete.new( config, options )
  if options[ :show ]
    jc.show_versions
  else
    jc.packit
  end
end

#lock_downObject



129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/jbundler/cli.rb', line 129

def lock_down
  require 'jbundler'

  unvendor if options[ :no_deployment ]

  vendor if options[ :deployment ]

  config.verbose = ! options[ :quiet ]

  Show.new( config ).show_classpath

  say_bundle_complete unless options[ :quiet ]
end

#showObject



159
160
161
162
# File 'lib/jbundler/cli.rb', line 159

def show
  config.verbose = true
  Show.new( config ).show_classpath
end

#treeObject

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



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

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

#updateObject



146
147
148
149
150
151
152
153
154
155
156
# File 'lib/jbundler/cli.rb', line 146

def update
  return unless ARGV.size == 1
    
  JBundler::LockDown.new( config ).update( options[ :debug ] ,
                                           options[ :verbose ] )

  config.verbose = ! options[ :quiet ]
  Show.new( config ).show_classpath
  puts ''
  puts 'Your jbundle is updated! Use `jbundle show` to see where the bundled jars are installed.'
end