lib/appengine-tools/bundler.rb in appengine-tools-0.0.5 vs lib/appengine-tools/bundler.rb in appengine-tools-0.0.6
- old
+ new
@@ -99,13 +99,15 @@
EXISTING_JRUBY = /^(jruby-abridged|appengine-jruby)-.*jar$/
EXISTING_RACK = /jruby-rack.*jar$/
EXISTING_APIS = /^appengine-api.*jar$/
JRUBY_RACK = 'jruby-rack-0.9.5.jar'
JRUBY_RACK_URL = "http://kenai.com/downloads/jruby-rack/#{JRUBY_RACK}"
- RACKUP = %q{Dir.chdir('..') if Dir.pwd =~ /WEB-INF$/;} +
+ RACKUP = %q{Dir.chdir('..') if Dir.pwd =~ /WEB-INF$/; } +
+ %q{begin; require 'bundler_gems/environment'; } +
+ %q{rescue LoadError; end;} +
%q{eval IO.read('config.ru'), nil, 'config.ru', 1}
-
+
def initialize(root_path)
@app = Application.new(root_path)
end
def bundle(args=[])
@@ -186,11 +188,11 @@
end
end
def copy_sdk
require 'appengine-sdk'
- glob = "appengine-api-1.0-sdk-*.jar"
+ glob = "appengine-api-{1.0-sdk,labs}-*.jar"
jars = Dir.glob("#{AppEngine::SDK::SDK_ROOT}/lib/user/#{glob}")
update_jars('appengine-sdk', EXISTING_APIS, jars)
end
private
@@ -255,9 +257,10 @@
app_root = app.root
builder = WebXmlBuilder.new do
# First read the user's rackup file
# TODO generate a skeleton if it's missing
Dir.chdir(app_root) do
+ require '.gems/bundler_gems/environment'
eval IO.read('config.ru'), nil, 'config.ru', 1
end
# Now configure the basic jruby-rack settings.
add_jruby_rack_defaults(RACKUP)