Sha256: 0c00bb5cccdd1bb396669fcb5fd7e16e0c2de91227129d837f893b163895767d

Contents?: true

Size: 1.54 KB

Versions: 1

Compression:

Stored size: 1.54 KB

Contents

#!/usr/bin/env ruby
if ARGV[0] == 'help'

  # ensure we use the right version
  gem 'ruby-maven', '>=3.1.0'

  require 'jbundler/cli'

  JBundler::Cli.start

else

  if ARGV == [] || ARGV.all?{ |a| a.match( /^-/ ) }
    ARGV.unshift 'install'
  end

  if ARGV[0] == 'console'
    # ensure we use the right version
    gem 'ruby-maven', '>=3.1.0'

    require 'irb'
    require 'jbundler'
    require 'jbundler/lazy'
    include JBundler::Lazy

    ARGV.shift
    require 'jbundler'
    if defined? JBUNDLER_CLASSPATH
      warn 'Jarfile dependencies loaded'
    else
      warn 'Could not locate a Jarfile'
    end

    IRB.start

  else
    if ['lock_down', 'install', 'update', 'show'].member?( ARGV[0] )

      is_lock_down = ARGV.delete( 'lock_down' )
      is_vendor = ARGV.delete( '--vendor' ) 
      is_debug = ARGV.delete( '--debug' )
      ARGV.delete( '--skip-vendor' )
      ARGV.delete( '--skip-debug' )
      ARGV.delete( '--skip-verbose' )
      
      # HACK get the module-class hierachy in place
      gem 'bundler'
      if Gem.loaded_specs['bundler'].version >= Gem::Version.new('1.9.0')
        module Bundler
          class Thor
            module Actions
            end
          end
        end
      end
      load Gem.bin_path('bundler', 'bundle') 
      
      ARGV.insert( 0, 'lock_down' ) if is_lock_down
      ARGV.insert( 1, '--debug' ) if is_debug
      ARGV.insert( 1, '--vendor' ) if is_vendor
    end

    # ensure we use the right version
    gem 'ruby-maven', '>=3.1.0'
    
    require 'jbundler/cli'
    JBundler::Cli.start
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jbundler-0.7.4 bin/jbundle