Module: JBundler

Defined in:
lib/jbundler/classpath_file.rb,
lib/jbundler.rb,
lib/jbundler/cli.rb,
lib/jbundler/pom.rb,
lib/jbundler/show.rb,
lib/jbundler/tree.rb,
lib/jbundler/aether.rb,
lib/jbundler/config.rb,
lib/jbundler/vendor.rb,
lib/jbundler/context.rb,
lib/jbundler/lock_down.rb,
lib/jbundler/pom_runner.rb,
lib/jbundler/configurator.rb,
lib/jbundler/gemfile_lock.rb,
lib/jbundler/jarfile_lock.rb,
lib/jbundler/jruby_complete.rb

Overview

Copyright © 2013 Christian Meier

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Defined Under Namespace

Classes: AetherRuby, ClasspathFile, Cli, Config, Configurator, Context, GemfileLock, JRubyComplete, JarfileLock, LockDown, Pom, PomRunner, Show, Tree, Vendor

Constant Summary collapse

Thor =

As of v1.9.0, bundler’s vendored version of thor is namespaced

Bundler::Thor

Class Method Summary collapse

Class Method Details

.contextObject



27
28
29
# File 'lib/jbundler.rb', line 27

def self.context
  @context ||= JBundler::Context.new
end

.install(debug = false, verbose = false) ⇒ Object



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

def self.install( debug = false, verbose = false )
  jbundler = JBundler::LockDown.new( context.config )
  msg = jbundler.lock_down( false, debug, verbose )
  puts msg if msg
end

.require_jarsObject



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/jbundler.rb', line 36

def self.require_jars
  if context.vendor.vendored?
    jars = context.vendor.require_jars
    if context.config.verbose
      warn "jbundler classpath:"
      jars.each do |path|
        warn "\t#{path}"
      end
    end
  elsif context.classpath.exists? && context.jarfile.exists_lock?
    require 'java'
    context.classpath.require_classpath
    if context.config.verbose
      warn "jbundler classpath:"
      JBUNDLER_CLASSPATH.each do |path|
          warn "\t#{path}"
      end
    end
    Jars.no_more_warnings
  end
end

.setupObject



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

def self.setup
  if context.config.skip
    warn "skip jbundler setup" if context.config.verbose
  else
    require_jars
  end
end

.setup_testObject



31
32
33
34
# File 'lib/jbundler.rb', line 31

def self.setup_test
  context.classpath.require_test_classpath
  context.config
end