Commit e2edd467 authored by John E. Vincent's avatar John E. Vincent

stubbing out some jruby support

parent 62e67ad6
...@@ -16,4 +16,7 @@ platforms :mri do ...@@ -16,4 +16,7 @@ platforms :mri do
end end
platforms :jruby do platforms :jruby do
gem "json-jruby", "= 1.4.6", :require => "json" gem "json-jruby", "= 1.4.6", :require => "json"
gem "kirk", :git => "git://github.com/strobecorp/kirk.git"
gem "warbler", "= 1.2.1"
gem "jruby-openssl", "= 0.7.3"
end end
GIT
remote: git://github.com/strobecorp/kirk.git
revision: 561ae9cf0108a9bda675c8d0fd07cfba3f670ee8
specs:
kirk (0.1.0.beta.1-java)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
backports (1.18.2) backports (1.18.2)
bouncy-castle-java (1.5.0145.2)
diff-lcs (1.1.2) diff-lcs (1.1.2)
haml (3.0.25) haml (3.0.25)
jruby-jars (1.5.6)
jruby-openssl (0.7.3)
bouncy-castle-java
jruby-rack (1.0.5)
json (1.4.6-java) json (1.4.6-java)
json-jruby (1.4.6-java) json-jruby (1.4.6-java)
json (= 1.4.6) json (= 1.4.6)
...@@ -30,6 +41,7 @@ GEM ...@@ -30,6 +41,7 @@ GEM
rspec-expectations (2.4.0) rspec-expectations (2.4.0)
diff-lcs (~> 1.1.2) diff-lcs (~> 1.1.2)
rspec-mocks (2.4.0) rspec-mocks (2.4.0)
rubyzip (0.9.4)
sinatra (1.1.2) sinatra (1.1.2)
rack (~> 1.1) rack (~> 1.1)
tilt (~> 1.2) tilt (~> 1.2)
...@@ -46,6 +58,11 @@ GEM ...@@ -46,6 +58,11 @@ GEM
monkey-lib (~> 0.5.0) monkey-lib (~> 0.5.0)
sinatra (~> 1.0) sinatra (~> 1.0)
tilt (1.2.1) tilt (1.2.1)
warbler (1.2.1)
jruby-jars (>= 1.4.0)
jruby-rack (>= 1.0.0)
rake (>= 0.8.7)
rubyzip (>= 0.9.4)
yajl-ruby (0.7.9) yajl-ruby (0.7.9)
PLATFORMS PLATFORMS
...@@ -54,7 +71,9 @@ PLATFORMS ...@@ -54,7 +71,9 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
haml (= 3.0.25) haml (= 3.0.25)
jruby-openssl (= 0.7.3)
json-jruby (= 1.4.6) json-jruby (= 1.4.6)
kirk!
ohm (= 0.1.3) ohm (= 0.1.3)
ohm-contrib (= 0.1.0) ohm-contrib (= 0.1.0)
rack-test (= 0.5.7) rack-test (= 0.5.7)
...@@ -64,4 +83,5 @@ DEPENDENCIES ...@@ -64,4 +83,5 @@ DEPENDENCIES
sinatra (= 1.1.2) sinatra (= 1.1.2)
sinatra-namespace (= 0.6.1) sinatra-namespace (= 0.6.1)
sinatra-reloader (= 0.5.0) sinatra-reloader (= 0.5.0)
warbler (= 1.2.1)
yajl-ruby (= 0.7.9) yajl-ruby (= 0.7.9)
# Disable automatic framework detection by uncommenting/setting to false
# Warbler.framework_detection = false
# Warbler web application assembly configuration file
Warbler::Config.new do |config|
# Features: additional options controlling how the jar is built.
# Currently the following features are supported:
# - gemjar: package the gem repository in a jar file in WEB-INF/lib
# config.features = %w(gemjar)
# Application directories to be included in the webapp.
config.dirs = %w(config lib views)
# Additional files/directories to include, above those in config.dirs
config.includes = FileList["README.md", "config.ru", "noah.rb"]
# Additional files/directories to exclude
# config.excludes = FileList["lib/tasks/*"]
# Additional Java .jar files to include. Note that if .jar files are placed
# in lib (and not otherwise excluded) then they need not be mentioned here.
# JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your
# own versions if you directly set the value
# config.java_libs += FileList["lib/java/*.jar"]
# Loose Java classes and miscellaneous files to be placed in WEB-INF/classes.
# config.java_classes = FileList["target/classes/**.*"]
# One or more pathmaps defining how the java classes should be copied into
# WEB-INF/classes. The example pathmap below accompanies the java_classes
# configuration above. See http://rake.rubyforge.org/classes/String.html#M000017
# for details of how to specify a pathmap.
# config.pathmaps.java_classes << "%{target/classes/,}p"
# Path to the pre-bundled gem directory inside the war file. Default
# is 'WEB-INF/gems'. Specify path if gems are already bundled
# before running Warbler. This also sets 'gem.path' inside web.xml.
# config.gem_path = "WEB-INF/vendor/bundler_gems"
# Bundler support is built-in. If Warbler finds a Gemfile in the
# project directory, it will be used to collect the gems to bundle
# in your application. If you wish to explicitly disable this
# functionality, uncomment here.
config.bundler = true
# An array of Bundler groups to avoid including in the war file.
# Defaults to ["development", "test"].
config.bundle_without = ["development", "test"]
# Files for WEB-INF directory (next to web.xml). This contains
# web.xml by default. If there is an .erb-File it will be processed
# with webxml-config. You may want to exclude this file via
# config.excludes.
# config.webinf_files += FileList["jboss-web.xml"]
# Other gems to be included. You need to tell Warbler which gems
# your application needs so that they can be packaged in the war
# file.
# The Rails gems are included by default unless the vendor/rails
# directory is present.
# config.gems += ["activerecord-jdbcmysql-adapter", "jruby-openssl"]
# config.gems << "tzinfo"
# Uncomment this if you don't want to package rails gem.
# config.gems -= ["rails"]
# The most recent versions of gems are used.
# You can specify versions of gems by using a hash assignment:
# config.gems["rails"] = "2.0.2"
# You can also use regexps or Gem::Dependency objects for flexibility or
# fine-grained control.
# config.gems << /^merb-/
# config.gems << Gem::Dependency.new("merb-core", "= 0.9.3")
# Include gem dependencies not mentioned specifically. Default is
# true, uncomment to turn off.
# config.gem_dependencies = false
# Array of regular expressions matching relative paths in gems to be
# excluded from the war. Defaults to empty, but you can set it like
# below, which excludes test files.
# config.gem_excludes = [/^(test|spec)\//]
# Files to be included in the root of the webapp. Note that files in public
# will have the leading 'public/' part of the path stripped during staging.
# config.public_html = FileList["public/**/*", "doc/**/*"]
# Pathmaps for controlling how public HTML files are copied into the .war
# config.pathmaps.public_html = ["%{public/,}p"]
# Pathmaps for controlling how application files are copied into the .war
# config.pathmaps.application = ["WEB-INF/%p"]
# Name of the war file (without the .war) -- defaults to the basename
# of RAILS_ROOT
config.war_name = "noah"
# Name of the MANIFEST.MF template for the war file. Defaults to a simple
# MANIFEST.MF that contains the version of Warbler used to create the war file.
# config.manifest_file = "config/MANIFEST.MF"
# When using the 'compiled' feature and specified, only these Ruby
# files will be compiled. Default is to compile all \.rb files in
# the application.
# config.compiled_ruby_files = FileList['app/**/*.rb']
# Value of RAILS_ENV for the webapp -- default as shown below
config.webxml.rails.env = ENV['RAILS_ENV'] || 'development'
# Application booter to use, one of :rack, :rails, or :merb (autodetected by default)
# config.webxml.booter = :rails
# When using the :rack booter, "Rackup" script to use.
# - For 'rackup.path', the value points to the location of the rackup
# script in the web archive file. You need to make sure this file
# gets included in the war, possibly by adding it to config.includes
# or config.webinf_files above.
# - For 'rackup', the rackup script you provide as an inline string
# is simply embedded in web.xml.
# The script is evaluated in a Rack::Builder to load the application.
# Examples:
#config.webxml.rackup.path = 'WEB-INF/config.ru'
# config.webxml.rackup = %{require './lib/demo'; run Rack::Adapter::Camping.new(Demo)}
# config.webxml.rackup = require 'cgi' && CGI::escapeHTML(File.read("config.ru"))
# Control the pool of Rails runtimes. Leaving unspecified means
# the pool will grow as needed to service requests. It is recommended
# that you fix these values when running a production server!
# config.webxml.jruby.min.runtimes = 2
# config.webxml.jruby.max.runtimes = 4
# JNDI data source name
# config.webxml.jndi = 'jdbc/rails'
end
...@@ -25,7 +25,7 @@ class NoahApp < Sinatra::Base ...@@ -25,7 +25,7 @@ class NoahApp < Sinatra::Base
configure do configure do
set :app_file, __FILE__ set :app_file, __FILE__
set :root, File.dirname(__FILE__) set :root, File.dirname(__FILE__)
set :server, %w[thin mongrel webrick] set :server, %w[thin mongrel webrick kirk]
set :port, 9291 set :port, 9291
set :logging, true set :logging, true
set :raise_errors, false set :raise_errors, false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment