make middleman not be so outright jruby hostile

This commit is contained in:
Travis Tilley 2011-02-21 10:19:18 -05:00
parent 1a15147f67
commit 08a9f45164
4 changed files with 52 additions and 41 deletions

View file

@ -14,6 +14,8 @@ require 'rake/clean'
task :test => :cucumber task :test => :cucumber
# rocco depends on rdiscount, which makes me sad.
unless defined?(JRUBY_VERSION)
# Bring in Rocco tasks # Bring in Rocco tasks
require 'rocco/tasks' require 'rocco/tasks'
Rocco::make 'docs/' Rocco::make 'docs/'
@ -22,7 +24,6 @@ desc 'Build rocco docs'
task :docs => :rocco task :docs => :rocco
directory 'docs/' directory 'docs/'
# Make index.html a copy of rocco.html # Make index.html a copy of rocco.html
file 'docs/index.html' => 'docs/middleman.html' do |f| file 'docs/index.html' => 'docs/middleman.html' do |f|
cp 'docs/middleman.html', 'docs/index.html', :preserve => true cp 'docs/middleman.html', 'docs/index.html', :preserve => true
@ -50,3 +51,4 @@ file 'docs/.git' => ['docs/', '.git/refs/heads/gh-pages'] do |f|
sh "cd docs && git fetch -q o && git reset -q --hard o/gh-pages && touch ." sh "cd docs && git fetch -q o && git reset -q --hard o/gh-pages && touch ."
end end
CLOBBER.include 'docs/.git' CLOBBER.include 'docs/.git'
end

View file

@ -54,9 +54,16 @@ end
app = Middleman::Server.new app = Middleman::Server.new
require 'rubygems' require 'rubygems'
require 'thin'
Thin::Logging.silent = true
Rack::Handler::Thin.run app, options do |inst| unless defined?(JRUBY_VERSION)
require 'thin'
handler = Rack::Handler::Thin
else
require 'kirk'
require 'rack/handler/kirk'
handler = Rack::Handler::Kirk
end
handler.run app, options do |inst|
puts "== The Middleman is standing watch on port #{options[:Port]}" puts "== The Middleman is standing watch on port #{options[:Port]}"
end end

View file

@ -1,3 +1,3 @@
module Middleman module Middleman
VERSION = "1.1.0.beta.4" VERSION = "1.1.0.beta.4.1"
end end

View file

@ -19,7 +19,8 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"] s.require_paths = ["lib"]
s.add_runtime_dependency("rack", ["~> 1.0"]) s.add_runtime_dependency("rack", ["~> 1.0"])
s.add_runtime_dependency("thin", ["~> 1.2.0"]) s.add_runtime_dependency("thin", ["~> 1.2.0"]) unless defined?(JRUBY_VERSION)
s.add_runtime_dependency("kirk", ["~> 0.1.8"]) if defined?(JRUBY_VERSION)
s.add_runtime_dependency("shotgun", ["~> 0.8.0"]) s.add_runtime_dependency("shotgun", ["~> 0.8.0"])
s.add_runtime_dependency("thor", ["~> 0.14.0"]) s.add_runtime_dependency("thor", ["~> 0.14.0"])
s.add_runtime_dependency("tilt", ["~> 1.2.0"]) s.add_runtime_dependency("tilt", ["~> 1.2.0"])
@ -31,7 +32,8 @@ Gem::Specification.new do |s|
s.add_runtime_dependency("haml", [">= 3.1.0.alpha.147"]) s.add_runtime_dependency("haml", [">= 3.1.0.alpha.147"])
s.add_runtime_dependency("sass", [">= 3.1.0.alpha.218"]) s.add_runtime_dependency("sass", [">= 3.1.0.alpha.218"])
s.add_runtime_dependency("compass", ["0.11.beta.2"]) s.add_runtime_dependency("compass", ["0.11.beta.2"])
s.add_runtime_dependency("oily_png", ["~> 0.3.0"]) s.add_runtime_dependency("chunky_png", ["~> 0.12.0"])
s.add_runtime_dependency("oily_png", ["~> 0.3.0"]) unless defined?(JRUBY_VERSION)
s.add_runtime_dependency("json_pure", ["~> 1.4.0"]) s.add_runtime_dependency("json_pure", ["~> 1.4.0"])
s.add_runtime_dependency("smusher", ["~> 0.4.5"]) s.add_runtime_dependency("smusher", ["~> 0.4.5"])
s.add_runtime_dependency("compass-slickmap", ["~> 0.4.0"]) s.add_runtime_dependency("compass-slickmap", ["~> 0.4.0"])
@ -39,6 +41,6 @@ Gem::Specification.new do |s|
s.add_runtime_dependency("less", ["~> 1.2.0"]) s.add_runtime_dependency("less", ["~> 1.2.0"])
s.add_development_dependency("cucumber", ["~> 0.10.0"]) s.add_development_dependency("cucumber", ["~> 0.10.0"])
s.add_development_dependency("rspec", [">= 0"]) s.add_development_dependency("rspec", [">= 0"])
s.add_development_dependency("rocco", [">= 0"]) s.add_development_dependency("rocco", [">= 0"]) unless defined?(JRUBY_VERSION)
end end