Class: JBundler::Cli

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

Instance Method Summary collapse

Instance Method Details

#consoleObject



118
119
120
# File 'lib/jbundler/cli.rb', line 118

def console
  # dummy - never executed !!!
end

#executableObject



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

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

#installObject



94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/jbundler/cli.rb', line 94

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

#jruby_completeObject



62
63
64
65
66
67
68
69
# File 'lib/jbundler/cli.rb', line 62

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

#lock_downObject



136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/jbundler/cli.rb', line 136

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



166
167
168
169
# File 'lib/jbundler/cli.rb', line 166

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

#treeObject

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



73
74
75
# File 'lib/jbundler/cli.rb', line 73

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

#updateObject



153
154
155
156
157
158
159
160
161
162
163
# File 'lib/jbundler/cli.rb', line 153

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