[appengine-jruby] push by mando.woodie - changes for 1.3.6, move app.yaml to WEB-INF on 2010-09-04 07:32 GMT

0 views
Skip to first unread message

appengi...@googlecode.com

unread,
Sep 4, 2010, 3:33:36 AM9/4/10
to appengine-j...@googlegroups.com
Revision: eee3ff5451
Author: John Woodell <woo...@google.com>
Date: Sat Sep 4 00:26:39 2010
Log: changes for 1.3.6, move app.yaml to WEB-INF
http://code.google.com/p/appengine-jruby/source/detail?r=eee3ff5451

Added:
/demos/rails2/WEB-INF/app.yaml
Deleted:
/demos/rails2/app.yaml
/demos/rails2/rails2_appengine.rb
Modified:
/demos/rails2/rails238_appengine.rb

=======================================
--- /dev/null
+++ /demos/rails2/WEB-INF/app.yaml Sat Sep 4 00:26:39 2010
@@ -0,0 +1,38 @@
+application: application-id
+version: 1
+runtime: jruby
+
+handlers:
+- url: /remote_api/*
+ login: admin
+ servlet: com.google.apphosting.utils.remoteapi.RemoteApiServlet
+
+- url: /contacts/*
+ login: required
+
+resource_files:
+- exclude: /README
+- exclude: /Rakefile
+- exclude: /db/**
+- exclude: /doc/**
+- exclude: /bin/**
+- exclude: /log/**
+- exclude: /script/**
+- exclude: /test/**
+- exclude: /tmp/**
+
+static_files:
+ - include: /**/*.ico
+ expiration: 365d
+ - include: /**/*.gif
+ expiration: 365d
+ - include: /**/*.jpeg
+ expiration: 365d
+ - include: /**/*.jpg
+ expiration: 365d
+ - include: /**/*.png
+ expiration: 365d
+ - include: /**/*.js
+ expiration: 365d
+ - include: /**/*.css
+ expiration: 365d
=======================================
--- /demos/rails2/app.yaml Sun Aug 1 11:07:35 2010
+++ /dev/null
@@ -1,38 +0,0 @@
-application: application-id
-version: 1
-runtime: jruby
-
-handlers:
-- url: /remote_api/*
- login: admin
- servlet: com.google.apphosting.utils.remoteapi.RemoteApiServlet
-
-- url: /contacts/*
- login: required
-
-resource_files:
-- exclude: /README
-- exclude: /Rakefile
-- exclude: /db/**
-- exclude: /doc/**
-- exclude: /bin/**
-- exclude: /log/**
-- exclude: /script/**
-- exclude: /test/**
-- exclude: /tmp/**
-
-static_files:
- - include: /**/*.ico
- expiration: 365d
- - include: /**/*.gif
- expiration: 365d
- - include: /**/*.jpeg
- expiration: 365d
- - include: /**/*.jpg
- expiration: 365d
- - include: /**/*.png
- expiration: 365d
- - include: /**/*.js
- expiration: 365d
- - include: /**/*.css
- expiration: 365d
=======================================
--- /demos/rails2/rails2_appengine.rb Mon Apr 12 15:06:26 2010
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/ruby
-#
-# Copyright:: Copyright 2009 Google Inc.
-# Original Author:: John Woodell (mailto:woo...@google.com)
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'fileutils'
-require 'open-uri'
-
-def composite(source, fragment, index = nil)
- File.open(source, 'r+') do |f|
- lines = f.readlines
- f.pos = 0
- File.open(fragment) do |z|
- section = z.readlines
- if index and index.size < lines.size
- f.print lines[0,index] + section + lines[index..-1]
- else
- f.print lines + section
- end
- end
- f.truncate(f.pos)
- end
- FileUtils.rm fragment
-end
-
-def download_file(path, url)
- open(url) do |r|
- FileUtils.mkpath(File.dirname(path))
- open(path,"w"){|f| f.write(r.read) }
- end
-end
-SET_CMD = RUBY_PLATFORM.include?('mswin32') ? 'set' : 'export'
-SKIP_APIS = 'SKIP_LOCAL_SERVICE_APIS' # checked by appengine-apis
-MORE_GEMS = 'rails_appengine/active_support_vendored'
-FILE_BASE = 'http://appengine-jruby.googlecode.com/hg/demos/rails2/'
-MOD_FILES = %w{ app/controllers/rails/info_controller.rb
- config.ru config/boot_rb config/environment_rb
- config/initializers/gae_init_patch.rb config/database.yml
- config/initializers/session_store_rb public/favicon.ico
- script/console.sh script/publish.sh script/server.sh }
-# Install Rails 2.3.5
-FileUtils.touch 'config.ru'
-gemsrc = ARGV[0].eql?('tiny_ds') ? 'Gemfile_td' : 'Gemfile'
-download_file("Gemfile", "#{FILE_BASE}#{gemsrc}")
-system 'appcfg.rb bundle --update .'
-# Remove dups and generate Rails app
-FileUtils.rm 'public/robots.txt'
-# Generate rails, and skip APIs to escape the shell
-system "#{SET_CMD} #{SKIP_APIS}=1"
-system "appcfg.rb run -rthread -r#{MORE_GEMS} bin/rails ."
-# Fetch configuration files
-FileUtils.mkdir_p 'app/controllers/rails'
-MOD_FILES.each { |path| download_file(path, "#{FILE_BASE}#{path}") }
-if ARGV[0].eql? 'tiny_ds'
-
download_file("config/environment_rb", "#{FILE_BASE}config/environment_td")
-end
-# Merge configs into boot.rb
-composite('config/boot.rb', 'config/boot_rb', 108)
-# Merge configs into environment.rb
-composite('config/environment.rb', 'config/environment_rb', 30)
-# Merge session_store initializer
-composite('config/initializers/session_store.rb',
- 'config/initializers/session_store_rb')
-# Set permissions on scripts
-%w{console server}.each {|f| FileUtils.chmod 0644, "script/#{f}" }
-%w{console server publish}.each {|f| FileUtils.chmod
0744, "script/#{f}.sh" }
-# install the nulldb adapter
-system 'ruby script/plugin install http://svn.avdi.org/nulldb/trunk/'
-puts "##"
-puts "## Now type './script/server.sh'"
-puts "##"
=======================================
--- /demos/rails2/rails238_appengine.rb Thu Jun 24 09:17:11 2010
+++ /demos/rails2/rails238_appengine.rb Sat Sep 4 00:26:39 2010
@@ -55,7 +55,8 @@
download_file("Gemfile", "#{FILE_BASE}#{gemsrc}")
download_file("gems_238", "#{FILE_BASE}gems_238")
composite('Gemfile', 'gems_238', nil, -2)
-download_file("app.yaml", "#{FILE_BASE}app.yaml")
+FileUtils.mkdir_p 'WEB-INF'
+download_file("WEB-INF/app.yaml", "#{FILE_BASE}WEB-INF/app.yaml")
system 'appcfg.rb bundle --update .'
# Remove dups and generate Rails app
FileUtils.rm 'public/robots.txt'

Reply all
Reply to author
Forward
0 new messages