colin (owner)

Fork Of

Revisions

gist: 96280 Download_button fork
public
Public Clone URL: git://gist.github.com/96280.git
Embed All Files: show embed
app.rb #
1
2
3
4
5
6
7
require 'rubygems'
require 'sinatra'
 
get '/' do
  "Hello from Sinatra running on Java!"
end
 
appengine-web.xml #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application>YOUR-APPLICATION-ID</application>
    <version>1</version>
    <static-files />
    <resource-files />
    <sessions-enabled>false</sessions-enabled>
    <system-properties>
      <property name="jruby.management.enabled" value="false" />
      <property name="os.arch" value="" />
      <property name="jruby.compile.mode" value="JIT"/> <!-- JIT|FORCE|OFF -->
      <property name="jruby.compile.fastest" value="true"/>
      <property name="jruby.compile.frameless" value="true"/>
      <property name="jruby.compile.positionless" value="true"/>
      <property name="jruby.compile.threadless" value="false"/>
      <property name="jruby.compile.fastops" value="false"/>
      <property name="jruby.compile.fastcase" value="false"/>
      <property name="jruby.compile.chainsize" value="500"/>
      <property name="jruby.compile.lazyHandles" value="false"/>
      <property name="jruby.compile.peephole" value="true"/>
   </system-properties>
</appengine-web-app>
 
config.ru #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'rubygems'
require 'sinatra'
 
root_dir = File.dirname(__FILE__)
 
set :environment, :development
set :root, root_dir
set :app_file, File.join(root_dir, 'app.rb')
disable :run
 
require 'app'
 
run Sinatra::Application
 
warble.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Warbler::Config.new do |config|
  config.staging_dir = 'app'
  config.gems = ['sinatra']
  config.dirs = []
  config.gem_dependencies = true
 
  config.webxml.booter = :rack
 
  config.webxml.jruby.min.runtimes = 1
  config.webxml.jruby.max.runtimes = 1
  config.webxml.jruby.init.serial = true
 
  config.java_libs = []
end