LEFT | RIGHT |
1 #!/usr/bin/ruby | 1 #!/usr/bin/ruby |
2 # Copyright:: Copyright 2009 Google Inc. | 2 # Copyright:: Copyright 2009 Google Inc. |
3 # Original Author:: John Woodell (mailto:woodie@google.com) | 3 # Original Author:: John Woodell (mailto:woodie@google.com) |
4 # | 4 # |
5 # Licensed under the Apache License, Version 2.0 (the "License"); | 5 # Licensed under the Apache License, Version 2.0 (the "License"); |
6 # you may not use this file except in compliance with the License. | 6 # you may not use this file except in compliance with the License. |
7 # You may obtain a copy of the License at | 7 # You may obtain a copy of the License at |
8 # | 8 # |
9 # http://www.apache.org/licenses/LICENSE-2.0 | 9 # http://www.apache.org/licenses/LICENSE-2.0 |
10 # | 10 # |
11 # Unless required by applicable law or agreed to in writing, software | 11 # Unless required by applicable law or agreed to in writing, software |
12 # distributed under the License is distributed on an "AS IS" BASIS, | 12 # distributed under the License is distributed on an "AS IS" BASIS, |
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
14 # See the License for the specific language governing permissions and | 14 # See the License for the specific language governing permissions and |
15 # limitations under the License. | 15 # limitations under the License. |
16 | 16 |
17 require 'appengine-apis/sdk' | 17 require 'appengine-apis/sdk' |
18 require 'appengine-tools/bundler' | 18 require 'appengine-tools/bundler' |
19 | 19 |
20 module AppEngine | 20 module AppEngine |
21 module Developer | 21 module Development |
22 DEV_APPSERVER = 'com.google.appengine.tools.development.DevAppServerMain' | 22 DEV_APPSERVER = 'com.google.appengine.tools.development.DevAppServerMain' |
23 class JRubyDevAppserver | 23 class JRubyDevAppserver |
24 class << self | 24 class << self |
25 def run(args) | 25 def run(args) |
26 if args.length > 0 and File::directory?(args[-1]) | 26 if args.length > 0 and File::directory?(args[-1]) |
27 puts "=> Booting DevAppServer" | 27 puts "=> Booting DevAppServer" |
28 puts "=> Press Ctrl-C to shutdown server" | 28 puts "=> Press Ctrl-C to shutdown server" |
29 print "=> " | 29 print "=> " |
30 AppEngine::Admin.bundle args[-1] | 30 AppEngine::Admin.bundle args[-1] |
31 end | 31 end |
32 args.unshift(DEV_APPSERVER) | 32 args.unshift(DEV_APPSERVER) |
33 AppEngine::SDK.load_kickstart.main(args.to_java(:string)) | 33 AppEngine::SDK.load_kickstart.main(args.to_java(:string)) |
34 end | 34 end |
35 end | 35 end |
36 end | 36 end |
37 end | 37 end |
38 end | 38 end |
LEFT | RIGHT |