mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
paths shuffle
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@662 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
parent
85a3ee1b92
commit
3c411489d1
19 changed files with 45 additions and 191 deletions
88
Rakefile
88
Rakefile
|
@ -17,58 +17,60 @@ Echoe.new("mongrel") do |p|
|
|||
p.require_signed = true
|
||||
|
||||
case RUBY_PLATFORM
|
||||
when /mswin/
|
||||
p.certificate_chain = ['~/gem_certificates/mongrel-public_cert.pem',
|
||||
'~/gem_certificates/luislavena-mongrel-public_cert.pem']
|
||||
else
|
||||
p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
|
||||
'~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']
|
||||
end
|
||||
when /mswin/
|
||||
p.certificate_chain = ['~/gem_certificates/mongrel-public_cert.pem',
|
||||
'~/gem_certificates/luislavena-mongrel-public_cert.pem']
|
||||
else
|
||||
p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
|
||||
'~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']
|
||||
end
|
||||
|
||||
p.eval = proc do
|
||||
case RUBY_PLATFORM
|
||||
when /mswin/
|
||||
self.files += ['lib/http11.so']
|
||||
extensions.clear
|
||||
self.platform = Gem::Platform::WIN32
|
||||
when /jruby/
|
||||
self.files += ['lib/http11.jar']
|
||||
extensions.clear
|
||||
self.platform = 'jruby'
|
||||
else
|
||||
add_dependency('daemons', '>= 1.0.3')
|
||||
add_dependency('fastthread', '>= 1.0.1')
|
||||
end
|
||||
when /mswin/
|
||||
extensions.clear
|
||||
self.files += ['lib/http11.so']
|
||||
self.platform = Gem::Platform::WIN32
|
||||
when /jruby/
|
||||
extensions.clear
|
||||
self.files += ['lib/http11.jar']
|
||||
self.platform = 'jruby'
|
||||
else
|
||||
add_dependency('daemons', '>= 1.0.3')
|
||||
add_dependency('fastthread', '>= 1.0.1')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#### A hack around RubyGems and Echoe for pre-compiled extensions.
|
||||
|
||||
extension = "ext/http11/extconf.rb"
|
||||
extension_dir = File.dirname(extension)
|
||||
|
||||
def move_extensions
|
||||
Dir["#{extension_dir}/*.#{Config::CONFIG['DLEXT']}"].each { |file| cp file, "lib/" }
|
||||
end
|
||||
|
||||
case RUBY_PLATFORM
|
||||
# A hack around RubyGems and Echoe for pre-compiled extensions.
|
||||
when /mswin/
|
||||
file "lib/http11.so" do
|
||||
extension = "ext/http11/extconf.rb"
|
||||
directory = File.dirname(extension)
|
||||
Dir.chdir(directory) do
|
||||
ruby File.basename(extension)
|
||||
system(PLATFORM =~ /win32/ ? 'nmake' : 'make')
|
||||
end
|
||||
move_extensions
|
||||
end
|
||||
task :compile => ["lib/http11.so"]
|
||||
when /jruby/
|
||||
file "lib/http11.jar" do
|
||||
directory = "jruby_ext/http11"
|
||||
Dir.chdir(directory) { system "ant jar" }
|
||||
move_extensions
|
||||
end
|
||||
task :compile => ["lib/http11.jar"]
|
||||
end
|
||||
when /mswin/
|
||||
filename = "lib/http11.so"
|
||||
file filename do
|
||||
Dir.chdir(extension_dir) do
|
||||
ruby File.basename(extension)
|
||||
system(PLATFORM =~ /win32/ ? 'nmake' : 'make')
|
||||
end
|
||||
move_extensions
|
||||
end
|
||||
task :compile => [filename]
|
||||
|
||||
#### Helper
|
||||
|
||||
def move_extensions
|
||||
Dir["#{directory}/*.#{Config::CONFIG['DLEXT']}"].each { |file| cp file, "lib/" }
|
||||
when /jruby/
|
||||
filename = "lib/http11.jar"
|
||||
file filename do
|
||||
Dir.chdir(extension_dir) { sh "ant jar" }
|
||||
move_extensions
|
||||
end
|
||||
task :compile => [filename]
|
||||
end
|
||||
|
||||
#### Project-wide install and uninstall tasks
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/java"/>
|
||||
<classpathentry kind="src" path="target/java"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="lib" path="lib/jruby.jar"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>mongrel-support</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1,63 +0,0 @@
|
|||
# Usage:
|
||||
# Checkout mongrel from source
|
||||
# Set the MONGREL_SUPPORT environment variable to the directory
|
||||
# where this file is located.
|
||||
# Go to the mongrel source tree
|
||||
# Run this command
|
||||
# jruby -S rake -f $MONGREL_SUPPORT/Rakefile
|
||||
#
|
||||
|
||||
require 'rake'
|
||||
require 'rake/testtask'
|
||||
require 'rake/clean'
|
||||
require 'rake/gempackagetask'
|
||||
require 'rake/rdoctask'
|
||||
require 'tools/rakehelp'
|
||||
require 'fileutils'
|
||||
include FileUtils
|
||||
|
||||
$mongrel_support = ENV['MONGREL_SUPPORT']
|
||||
|
||||
unless $mongrel_support
|
||||
warn "MONGREL_SUPPORT needs to be set to the source directory of Mongrel"
|
||||
exit 1
|
||||
end
|
||||
|
||||
desc "Does a compile and package"
|
||||
task :default => [:package]
|
||||
|
||||
desc "Compiles Mongrel-support"
|
||||
task :compile do
|
||||
Dir.chdir($mongrel_support) do
|
||||
sh %(ant jar)
|
||||
end
|
||||
end
|
||||
|
||||
task :package => [:compile]
|
||||
|
||||
task 'lib/http11.jar' do
|
||||
cp "#{$mongrel_support}/lib/http11.jar", 'lib'
|
||||
end
|
||||
|
||||
name="mongrel"
|
||||
version="1.0.1"
|
||||
|
||||
setup_gem(name, version) do |spec|
|
||||
spec.summary = "A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps."
|
||||
spec.description = spec.summary
|
||||
spec.test_files = Dir.glob("test/test_*.rb")
|
||||
spec.author="Zed A. Shaw"
|
||||
spec.executables=['mongrel_rails']
|
||||
spec.files += %w(README Rakefile setup.rb lib/mongrel/mime_types.yml)
|
||||
|
||||
spec.required_ruby_version = '>= 1.8.4'
|
||||
|
||||
spec.files += ['lib/http11.jar']
|
||||
spec.extensions.clear
|
||||
spec.platform = 'jruby'
|
||||
|
||||
spec.add_dependency('gem_plugin', '>= 0.2.2')
|
||||
spec.add_dependency('cgi_multipart_eof_fix', '>= 1.0.0')
|
||||
end
|
||||
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
version.target=1.4
|
||||
version.source=1.4
|
|
@ -1,58 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project basedir="." default="build" name="mongrel-support">
|
||||
<property environment="env"/>
|
||||
<property file="build.properties"/>
|
||||
|
||||
<property name="src.java" value="src/java"/>
|
||||
<property name="src.javacc" value="src/javacc"/>
|
||||
<property name="target" value="target"/>
|
||||
<property name="target.classes" value="${target}/classes"/>
|
||||
<property name="target.classes.test" value="${target}/test-classes"/>
|
||||
<property name="lib.dir" value="lib"/>
|
||||
|
||||
<path id="build.classpath">
|
||||
<fileset dir="${lib.dir}" includes="*.jar" excludes="mongrel-support.jar,http11.jar"/>
|
||||
</path>
|
||||
|
||||
<target name="init">
|
||||
<mkdir dir="${target}"/>
|
||||
<mkdir dir="${target}/java/httpp"/>
|
||||
<mkdir dir="${target.classes}"/>
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="target"/>
|
||||
</target>
|
||||
|
||||
<target name="ragel" description="Standalone target that generates all our ragel based source files. Requires ragel and rlgen-java to be on the classpath">
|
||||
<exec executable="ragel" output="__ragel_out">
|
||||
<arg line="-J"/>
|
||||
<arg line="${src.java}/org/jruby/mongrel/http11_parser.rl"/>
|
||||
</exec>
|
||||
<exec executable="rlgen-java" input="__ragel_out">
|
||||
<arg line="-o ${src.java}/org/jruby/mongrel/Http11Parser.java"/>
|
||||
</exec>
|
||||
<delete file="__ragel_out"/>
|
||||
</target>
|
||||
|
||||
<target depends="init" name="wbuild" description="Builds version without references to JRuby or the Extension API">
|
||||
<javac debug="true" destdir="${target.classes}" source="${version.source}" target="${version.target}">
|
||||
<classpath refid="build.classpath"/>
|
||||
<src path="${src.java}"/>
|
||||
<include name="**/HttpParserImpl.java"/>
|
||||
<include name="httpp/**/*.java"/>
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target depends="init" name="build" description="Compiles Java source files">
|
||||
<javac debug="true" destdir="${target.classes}" source="${version.source}" target="${version.target}">
|
||||
<classpath refid="build.classpath"/>
|
||||
<src path="${src.java}"/>
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target depends="build" name="jar" description="Build a JAR file with the generated Java class files">
|
||||
<jar destfile="${lib.dir}/mongrel-support.jar" basedir="${target.classes}"/>
|
||||
<jar destfile="${lib.dir}/http11.jar" basedir="${target.classes}"/>
|
||||
</target>
|
||||
</project>
|
Binary file not shown.
Loading…
Reference in a new issue