Class: JBundler::Cli

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

Instance Method Summary collapse

Instance Method Details

#consoleObject



93
94
95
# File 'lib/jbundler/cli.rb', line 93

def console
  # dummy - never executed !!!
end

#installObject



79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/jbundler/cli.rb', line 79

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

#lock_downObject



111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/jbundler/cli.rb', line 111

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



143
144
145
146
# File 'lib/jbundler/cli.rb', line 143

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

#treeObject

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



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

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

#updateObject



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

def update
  msg = JBundler::LockDown.new( config ).update( options[ :debug ] ,
                                                 options[ :verbose ] )

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