Class: JBundler::Show

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

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Show

Returns a new instance of Show.



11
12
13
14
# File 'lib/jbundler/show.rb', line 11

def initialize( config )
  @config = config
  @classpath_file = JBundler::ClasspathFile.new( @config.classpath_file )
end

Instance Method Details

#show_classpathObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/jbundler/show.rb', line 16

def show_classpath
  return if ! @config.verbose
  vendor = JBundler::Vendor.new(@config.vendor_dir)
  if vendor.vendored?
    vendor.require_jars
    warn "complete classpath:"
    $CLASSPATH.each do |path|
      warn "\t#{path}"
    end
  else
    @classpath_file.load_classpath
    warn ''
    warn 'jbundler provided classpath:'
    warn '----------------'
    JBUNDLER_JRUBY_CLASSPATH.each do |path|
      warn "#{path}"
    end
    warn ''
    warn 'jbundler runtime classpath:'
    warn '---------------------------'
    JBUNDLER_CLASSPATH.each do |path|
      warn "#{path}"
    end
    warn ''
    warn 'jbundler test classpath:'
    warn '------------------------'
    if JBUNDLER_TEST_CLASSPATH.empty?
      warn "\t--- empty ---"
    else
      JBUNDLER_TEST_CLASSPATH.each do |path|
        warn "#{path}"
      end
    end
    warn ''
  end
end