Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(51)

Side by Side Diff: lib/appengine-tools/genxml.rb

Issue 89083: Start the appengine-tools gem (Closed) SVN Base: http://appengine-jruby.googlecode.com/svn/trunk/appengine-tools/
Patch Set: Clean up xml formatting. Created 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/ruby1.8 -w
2 #
3 # Copyright:: Copyright 2009 Google Inc.
4 # Original Author:: Ryan Brown (mailto:ribrdb@google.com)
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17
18 require 'appengine-tools/web-xml'
19 require 'appengine-tools/rack'
20 require 'appengine-tools/xml-formatter'
21
22 Dir.mkdir('WEB-INF') unless File.exists?('WEB-INF')
23 rackup = File.read('config.ru')
24 builder = WebXmlBuilder.new do
25 eval rackup, nil, 'config.ru', 1
26 end
27 open('WEB-INF/web.xml', 'w') do |webxml|
28 xml = AppEngine::Rack::XmlFormatter.format(builder.to_xml)
29 webxml.write(xml)
30 end
31 open('WEB-INF/appengine-web.xml', 'w') do |aeweb|
32 xml = AppEngine::Rack::XmlFormatter.format(AppEngine::Rack.app.to_xml)
33 aeweb.write(xml)
34 end
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r497