bin/jbundle in jbundler-0.6.1 vs bin/jbundle in jbundler-0.6.2
- old
+ new
@@ -1,12 +1,11 @@
#!/usr/bin/env ruby
-require 'rubygems'
-# ensure we use the right version
-gem 'ruby-maven', '>=3.1.0'
-
if ARGV[0] == 'help'
+ # ensure we use the right version
+ gem 'ruby-maven', '>=3.1.0'
+
require 'jbundler/cli'
JBundler::Cli.start
else
@@ -14,54 +13,47 @@
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
- end
- require 'jbundler/config'
- config = JBundler::Config.new
+ ARGV.shift
+ require 'jbundler'
+ if defined? JBUNDLER_CLASSPATH
+ warn 'Jarfile dependencies loaded'
+ else
+ warn 'Could not locate a Jarfile'
+ end
- if ['lock_down', 'install', 'update', 'show', 'console'].member?( ARGV[0] )
- begin
+ IRB.start
+
+ else
+ if ['lock_down', 'install', 'update', 'show'].member?( ARGV[0] )
+
is_lock_down = ARGV.delete( 'lock_down' )
- ARGV.delete( 0 ) if is_lock_down
is_vendor = ARGV.delete( '--vendor' )
- is_debug = ARGV.delete( '--debug' )
- is_verbose = ARGV.delete( '--verbose' )
+ is_debug = ARGV.delete( '--debug' )
ARGV.delete( '--skip-vendor' )
ARGV.delete( '--skip-debug' )
ARGV.delete( '--skip-verbose' )
-
+
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
- ARGV.insert( 1, '--verbose' ) if is_verbose
-
- require 'jbundler/cli'
- JBundler::Cli.start
- rescue Exception => e
- if ARGV[0] == 'console'
- ARGV.shift
- require 'jbundler'
- if defined? JBUNDLER_CLASSPATH
- warn 'Jarfile dependencies loaded'
- else
- warn 'Could not locate Jarfile'
-
- end
- IRB.start
- else
- raise e
- end
end
- else
+
+ # ensure we use the right version
+ gem 'ruby-maven', '>=3.1.0'
+
require 'jbundler/cli'
JBundler::Cli.start
end
end