Commit 7364e67b authored by John E. Vincent's avatar John E. Vincent

Fixes for jruby/warbler. Hardcode some deps

parent 5e968b3d
...@@ -8,3 +8,5 @@ logs/* ...@@ -8,3 +8,5 @@ logs/*
*.class *.class
tmp/* tmp/*
*.war *.war
.bundle
warbler/*
...@@ -3,12 +3,16 @@ PATH ...@@ -3,12 +3,16 @@ PATH
specs: specs:
noah (0.0.5) noah (0.0.5)
haml (= 3.0.25) haml (= 3.0.25)
nest (= 1.1.0)
ohm (= 0.1.3) ohm (= 0.1.3)
ohm-contrib (= 0.1.0) ohm-contrib (= 0.1.1)
rack (= 1.2.1)
rake (= 0.8.7) rake (= 0.8.7)
redis (= 2.1.1)
sinatra (= 1.1.2) sinatra (= 1.1.2)
sinatra-namespace (= 0.6.1) sinatra-namespace (= 0.6.1)
thin (= 1.2.7) thin (= 1.2.7)
tilt (= 1.2.1)
vegas (= 0.1.8) vegas (= 0.1.8)
yajl-ruby (= 0.7.9) yajl-ruby (= 0.7.9)
...@@ -30,13 +34,14 @@ GEM ...@@ -30,13 +34,14 @@ GEM
redis (~> 2.1) redis (~> 2.1)
ohm (0.1.3) ohm (0.1.3)
nest (~> 1.0) nest (~> 1.0)
ohm-contrib (0.1.0) ohm-contrib (0.1.1)
ohm ohm
rack (1.2.1) rack (1.2.1)
rack-test (0.5.7) rack-test (0.5.7)
rack (>= 1.0) rack (>= 1.0)
rake (0.8.7) rake (0.8.7)
rcov (0.9.9) rcov (0.9.9)
rcov (0.9.9-java)
redis (2.1.1) redis (2.1.1)
rspec (2.4.0) rspec (2.4.0)
rspec-core (~> 2.4.0) rspec-core (~> 2.4.0)
...@@ -65,7 +70,7 @@ GEM ...@@ -65,7 +70,7 @@ GEM
daemons (>= 1.0.9) daemons (>= 1.0.9)
eventmachine (>= 0.12.6) eventmachine (>= 0.12.6)
rack (>= 1.0.0) rack (>= 1.0.0)
tilt (1.2.2) tilt (1.2.1)
vegas (0.1.8) vegas (0.1.8)
rack (>= 1.0.0) rack (>= 1.0.0)
yajl-ruby (0.7.9) yajl-ruby (0.7.9)
......
require 'bundler' require 'bundler'
begin #begin
Bundler.setup(:default, :development) # Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e #rescue Bundler::BundlerError => e
$stderr.puts e.message # $stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems" # $stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code # exit e.status_code
end #end
require 'rake' require 'rake'
require 'rspec/core' require 'rspec/core'
...@@ -103,3 +103,4 @@ RSpec::Core::RakeTask.new(:coverage) do |t| ...@@ -103,3 +103,4 @@ RSpec::Core::RakeTask.new(:coverage) do |t|
t.verbose = true t.verbose = true
t.rcov_opts = %q[--aggregate coverage.data --sort coverage --text-report --exclude "config,.bundle/*,gems/*,spec/*" -o doc/coverage -Ilib -i "noah.rb"] t.rcov_opts = %q[--aggregate coverage.data --sort coverage --text-report --exclude "config,.bundle/*,gems/*,spec/*" -o doc/coverage -Ilib -i "noah.rb"]
end end
require 'rubygems' require 'rubygems'
require 'sinatra' require 'sinatra'
require File.join(File.dirname(__FILE__), 'lib','noah') require File.join('.', 'lib','noah')
ENV['REDIS_URL'] = "redis://localhost:6379/0" ## Uncomment the following to hardcode a redis url
#ENV['REDIS_URL'] = "redis://localhost:6379/0"
noah = Noah::App.new do noah = Noah::App.new do
set :run, false set :run, false
set :environment, :production set :environment, :production
set :server, %w[thin mongrel webrick Jetty Kirk] ## Set your server list up here
# set :server, %w[thin mongrel webrick Jetty Kirk]
end end
run noah run noah
...@@ -4,14 +4,15 @@ ...@@ -4,14 +4,15 @@
# Warbler web application assembly configuration file # Warbler web application assembly configuration file
Warbler::Config.new do |config| Warbler::Config.new do |config|
#config.features = %w(gemjar) #config.features = %w(gemjar)
config.dirs = %w(bin config lib views) config.dirs = %w(config lib views)
config.includes = FileList["config.ru"] config.includes = FileList["config.ru"]
#config.bundler = false config.excludes = FileList["noah.gemspec", "Gemfile", "Gemfile.lock"]
config.gems += ["ohm", "ohm-contrib", "sinatra", "sinatra-namespace", "haml", "vegas"] config.bundler = false
config.gems += ["json", "ohm", "ohm-contrib", "sinatra", "sinatra-namespace", "haml"]
config.gem_excludes = [/^(test|spec)\//] config.gem_excludes = [/^(test|spec)\//]
config.public_html = FileList["views/**/*"] config.public_html = FileList["views/**/*"]
config.webxml.booter = :rack config.webxml.booter = :rack
config.webxml.rackup.path = 'WEB-INF/config.ru' #config.webxml.rackup.path = 'WEB-INF/config.ru'
#config.webxml.rackup = %{require './lib/noah'; run Noah::App} #config.webxml.rackup = %{require './lib/noah'; run Noah::App}
# config.webxml.rackup = require 'cgi' && CGI::escapeHTML(File.read("config.ru")) # config.webxml.rackup = require 'cgi' && CGI::escapeHTML(File.read("config.ru"))
end end
...@@ -19,7 +19,7 @@ Gem::Specification.new do |s| ...@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"] s.require_paths = ["lib"]
s.add_dependency("redis", ["= 2.2.1"]) s.add_dependency("redis", ["= 2.1.1"])
s.add_dependency("nest", ["= 1.1.0"]) s.add_dependency("nest", ["= 1.1.0"])
s.add_dependency("rack", ["= 1.2.1"]) s.add_dependency("rack", ["= 1.2.1"])
s.add_dependency("rake", ["= 0.8.7"]) s.add_dependency("rake", ["= 0.8.7"])
......
...@@ -8,42 +8,42 @@ ...@@ -8,42 +8,42 @@
%h2 Hosts %h2 Hosts
%ul %ul
%li %li
%a{:href => "/h/"} All registered Hosts %a{:href => "h/"} All registered Hosts
%li %li
%a{:href => "/h/localhost"} localhost (this server) %a{:href => "h/localhost"} localhost (this server)
%li %li
%a{:href => "/h/localhost/noah"} localhost noah service %a{:href => "h/localhost/noah"} localhost noah service
#header #header
%h2 Services %h2 Services
%ul %ul
%li %li
%a{:href => "/s/"} All registered Services %a{:href => "s/"} All registered Services
%li %li
%a{:href => "/s/http"} All hosts providing 'http' %a{:href => "s/http"} All hosts providing 'http'
%li %li
%a{:href => "/s/noah/localhost"} localhost noah service %a{:href => "s/noah/localhost"} localhost noah service
#header #header
%h2 Applications %h2 Applications
%ul %ul
%li %li
%a{:href => "/a/"} All registered Applications %a{:href => "a/"} All registered Applications
%li %li
%a{:href => "/a/noah"} Noah Application entry %a{:href => "a/noah"} Noah Application entry
%li %li
%a{:href => "/a/noah/redis"} Noah Redis configuration entry %a{:href => "a/noah/redis"} Noah Redis configuration entry
#header #header
%h2 Configurations %h2 Configurations
%ul %ul
%li %li
%a{:href => "/c/"} All registered Configurations %a{:href => "c/"} All registered Configurations
%li %li
%a{:href => "/c/noah"} Noah Configuration entry %a{:href => "c/noah"} Noah Configuration entry
%li %li
%a{:href => "/c/myrailsapp1"} myrailsapp1 Configuration entry %a{:href => "c/myrailsapp1"} myrailsapp1 Configuration entry
%li %li
%a{:href => "/c/myrestapp1"} myrestapp1 Configuration entry %a{:href => "c/myrestapp1"} myrestapp1 Configuration entry
%li %li
%a{:href => "/c/myrailsapp1/database.yml"} database.yml file for myrailsapp1 (should return the proper content-type) %a{:href => "c/myrailsapp1/database.yml"} database.yml file for myrailsapp1 (should return the proper content-type)
%li %li
%a{:href => "/c/myrestapp1/config.json"} config.json file for myrestapp1 %a{:href => "c/myrestapp1/config.json"} config.json file for myrestapp1
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