mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
GemPlugin now doesn't use autorequire. Mongrel adapted to cover an error with daemonize, logger, and closed files.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@88 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
parent
5bf3bca495
commit
97502ebea9
7 changed files with 8 additions and 10 deletions
|
@ -1,7 +1,6 @@
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'mongrel/rails'
|
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
|
require 'mongrel'
|
||||||
|
|
||||||
|
|
||||||
class Start < GemPlugin::Plugin "/commands"
|
class Start < GemPlugin::Plugin "/commands"
|
||||||
|
@ -78,7 +77,7 @@ class Start < GemPlugin::Plugin "/commands"
|
||||||
ENV['RAILS_ENV'] = @environment
|
ENV['RAILS_ENV'] = @environment
|
||||||
require 'config/environment'
|
require 'config/environment'
|
||||||
require 'dispatcher'
|
require 'dispatcher'
|
||||||
require 'cgi'
|
require 'mongrel/rails'
|
||||||
|
|
||||||
# configure the rails handler
|
# configure the rails handler
|
||||||
rails = RailsHandler.new(@docroot, load_mime_map)
|
rails = RailsHandler.new(@docroot, load_mime_map)
|
||||||
|
|
|
@ -5,7 +5,6 @@ require 'stringio'
|
||||||
require 'mongrel/cgi'
|
require 'mongrel/cgi'
|
||||||
require 'mongrel/handlers'
|
require 'mongrel/handlers'
|
||||||
require 'mongrel/command'
|
require 'mongrel/command'
|
||||||
require 'mongrel/plugins'
|
|
||||||
require 'timeout'
|
require 'timeout'
|
||||||
|
|
||||||
# Mongrel module containing all of the classes (include C extensions) for running
|
# Mongrel module containing all of the classes (include C extensions) for running
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
require 'rubygems'
|
||||||
require 'singleton'
|
require 'singleton'
|
||||||
require 'optparse'
|
require 'optparse'
|
||||||
require 'mongrel/plugins'
|
require 'gem_plugin'
|
||||||
|
|
||||||
module Mongrel
|
module Mongrel
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require_gem 'gem_plugin'
|
require 'gem_plugin'
|
||||||
|
|
||||||
# file is just a stub that makes sure the mongrel_plugins gem is loaded and ready
|
# file is just a stub that makes sure the mongrel_plugins gem is loaded and ready
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
require 'mongrel'
|
require 'mongrel'
|
||||||
require 'cgi'
|
require 'cgi'
|
||||||
|
|
||||||
|
|
||||||
# Implements a handler that can run Rails and serve files out of the
|
# Implements a handler that can run Rails and serve files out of the
|
||||||
# Rails application's public directory. This lets you run your Rails
|
# Rails application's public directory. This lets you run your Rails
|
||||||
# application with Mongrel during development and testing, then use it
|
# application with Mongrel during development and testing, then use it
|
||||||
|
|
|
@ -15,7 +15,7 @@ setup_rdoc ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
|
||||||
desc "Does a full compile, test run"
|
desc "Does a full compile, test run"
|
||||||
task :default => [:test, :package]
|
task :default => [:test, :package]
|
||||||
|
|
||||||
version="0.1"
|
version="0.2"
|
||||||
summary = "A plugin system based only on rubygems"
|
summary = "A plugin system based only on rubygems"
|
||||||
test_file = "test/test_plugins.rb"
|
test_file = "test/test_plugins.rb"
|
||||||
author="Zed A. Shaw"
|
author="Zed A. Shaw"
|
||||||
|
@ -23,7 +23,7 @@ name="gem_plugin"
|
||||||
scripts=[]
|
scripts=[]
|
||||||
|
|
||||||
setup_gem(name, version, author, summary, scripts, test_file) do |spec|
|
setup_gem(name, version, author, summary, scripts, test_file) do |spec|
|
||||||
spec.autorequire = "gem_plugin"
|
spec.description = summary
|
||||||
end
|
end
|
||||||
|
|
||||||
task :gem_test => [:package] do
|
task :gem_test => [:package] do
|
||||||
|
|
|
@ -110,7 +110,7 @@ module GemPlugin
|
||||||
# makes them false so we'll skip this gem if any excludes are found
|
# makes them false so we'll skip this gem if any excludes are found
|
||||||
if (check.select {|name,test| !test}).length == 0
|
if (check.select {|name,test| !test}).length == 0
|
||||||
# looks like no needs were set to false, so it's good
|
# looks like no needs were set to false, so it's good
|
||||||
require_gem gem.name
|
require "#{gem.name}/init"
|
||||||
@loaded_gems << gem.name
|
@loaded_gems << gem.name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue