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

#do_it(debug = false) ⇒ Object



16
17
18
19
20
21
# File 'lib/jbundler/show.rb', line 16

def do_it( debug = false )
  jarfile = Maven::Tools::Jarfile.new( @config.jarfile )
  vendor = JBundler::Vendor.new( @config.vendor_dir )
  gemfile_lock = JBundler::GemfileLock.new( jarfile, 
                                            @config.gemfile_lock )
end

#show_classpathObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/jbundler/show.rb', line 23

def show_classpath
  @classpath_file.require_classpath
  warn "jruby core classpath:"
  JBUNDLER_JRUBY_CLASSPATH.each do |path|
    warn "\t#{path}"
  end
  warn "jbundler runtime classpath:"
  JBUNDLER_CLASSPATH.each do |path|
    warn "\t#{path}"
  end
  warn "jbundler test classpath:"
  if JBUNDLER_TEST_CLASSPATH.empty?
    warn "\t--- empty ---"
  else
    JBUNDLER_TEST_CLASSPATH.each do |path|
      warn "\t#{path}"
    end
  end
end