mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
reenable site feed, with autodiscovery link, by scraping feed43 instead of using the broken atom.xml
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@868 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
parent
efef53f223
commit
6e58b5d68f
3 changed files with 38 additions and 125 deletions
70
Rakefile
70
Rakefile
|
@ -15,16 +15,16 @@ e = Echoe.new("mongrel") do |p|
|
||||||
p.need_tar_gz = false
|
p.need_tar_gz = false
|
||||||
p.need_tgz = true
|
p.need_tgz = true
|
||||||
|
|
||||||
# case RUBY_PLATFORM
|
# case RUBY_PLATFORM
|
||||||
# when /mswin/
|
# when /mswin/
|
||||||
# p.certificate_chain = ['~/gem_certificates/mongrel-public_cert.pem',
|
# p.certificate_chain = ['~/gem_certificates/mongrel-public_cert.pem',
|
||||||
# '~/gem_certificates/luislavena-mongrel-public_cert.pem']
|
# '~/gem_certificates/luislavena-mongrel-public_cert.pem']
|
||||||
# else
|
# else
|
||||||
p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
|
p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
|
||||||
'~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']
|
'~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']
|
||||||
# end
|
# end
|
||||||
|
|
||||||
p.eval = proc do
|
p.eval = proc do
|
||||||
case RUBY_PLATFORM
|
case RUBY_PLATFORM
|
||||||
when /mswin/
|
when /mswin/
|
||||||
extensions.clear
|
extensions.clear
|
||||||
|
@ -39,7 +39,7 @@ e = Echoe.new("mongrel") do |p|
|
||||||
add_dependency('fastthread', '>= 1.0.1')
|
add_dependency('fastthread', '>= 1.0.1')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#### Ragel builder
|
#### Ragel builder
|
||||||
|
@ -75,10 +75,10 @@ def move_extensions
|
||||||
Dir["ext/**/*.#{Config::CONFIG['DLEXT']}"].each { |file| mv file, "lib/" }
|
Dir["ext/**/*.#{Config::CONFIG['DLEXT']}"].each { |file| mv file, "lib/" }
|
||||||
end
|
end
|
||||||
|
|
||||||
def java_classpath_arg
|
def java_classpath_arg
|
||||||
# A myriad of ways to discover the JRuby classpath
|
# A myriad of ways to discover the JRuby classpath
|
||||||
classpath = begin
|
classpath = begin
|
||||||
require 'java'
|
require 'java'
|
||||||
# Already running in a JRuby JVM
|
# Already running in a JRuby JVM
|
||||||
Java::java.lang.System.getProperty('java.class.path')
|
Java::java.lang.System.getProperty('java.class.path')
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
|
@ -91,12 +91,12 @@ case RUBY_PLATFORM
|
||||||
when /mswin/
|
when /mswin/
|
||||||
filename = "lib/http11.so"
|
filename = "lib/http11.so"
|
||||||
file filename do
|
file filename do
|
||||||
Dir.chdir("ext/http11") do
|
Dir.chdir("ext/http11") do
|
||||||
ruby "extconf.rb"
|
ruby "extconf.rb"
|
||||||
system(PLATFORM =~ /mswin/ ? 'nmake' : 'make')
|
system(PLATFORM =~ /mswin/ ? 'nmake' : 'make')
|
||||||
end
|
end
|
||||||
move_extensions
|
move_extensions
|
||||||
end
|
end
|
||||||
task :compile => [filename]
|
task :compile => [filename]
|
||||||
|
|
||||||
when /java/
|
when /java/
|
||||||
|
@ -107,8 +107,8 @@ when /java/
|
||||||
sources = FileList['ext/http11_java/**/*.java'].join(' ')
|
sources = FileList['ext/http11_java/**/*.java'].join(' ')
|
||||||
sh "javac -target 1.4 -source 1.4 -d #{build_dir} #{java_classpath_arg} #{sources}"
|
sh "javac -target 1.4 -source 1.4 -d #{build_dir} #{java_classpath_arg} #{sources}"
|
||||||
sh "jar cf lib/http11.jar -C #{build_dir} ."
|
sh "jar cf lib/http11.jar -C #{build_dir} ."
|
||||||
move_extensions
|
move_extensions
|
||||||
end
|
end
|
||||||
task :compile => [filename]
|
task :compile => [filename]
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -153,7 +153,7 @@ task :install => [:install_requirements] do
|
||||||
sub_project("mongrel_status", :install)
|
sub_project("mongrel_status", :install)
|
||||||
sub_project("mongrel_upload_progress", :install)
|
sub_project("mongrel_upload_progress", :install)
|
||||||
sub_project("mongrel_console", :install)
|
sub_project("mongrel_console", :install)
|
||||||
sub_project("mongrel_cluster", :install)
|
sub_project("mongrel_cluster", :install)
|
||||||
sub_project("mongrel_experimental", :install)
|
sub_project("mongrel_experimental", :install)
|
||||||
sub_project("mongrel_service", :install) if RUBY_PLATFORM =~ /mswin/
|
sub_project("mongrel_service", :install) if RUBY_PLATFORM =~ /mswin/
|
||||||
end
|
end
|
||||||
|
@ -165,8 +165,8 @@ task :uninstall => [:clean] do
|
||||||
sub_project("mongrel_upload_progress", :uninstall)
|
sub_project("mongrel_upload_progress", :uninstall)
|
||||||
sub_project("mongrel_console", :uninstall)
|
sub_project("mongrel_console", :uninstall)
|
||||||
sub_project("gem_plugin", :uninstall)
|
sub_project("gem_plugin", :uninstall)
|
||||||
sub_project("fastthread", :uninstall)
|
sub_project("fastthread", :uninstall)
|
||||||
sub_project("mongrel_experimental", :uninstall)
|
sub_project("mongrel_experimental", :uninstall)
|
||||||
sub_project("mongrel_service", :uninstall) if RUBY_PLATFORM =~ /mswin/
|
sub_project("mongrel_service", :uninstall) if RUBY_PLATFORM =~ /mswin/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -178,8 +178,8 @@ task :clean do
|
||||||
sub_project("mongrel_status", :clean)
|
sub_project("mongrel_status", :clean)
|
||||||
sub_project("mongrel_upload_progress", :clean)
|
sub_project("mongrel_upload_progress", :clean)
|
||||||
sub_project("mongrel_console", :clean)
|
sub_project("mongrel_console", :clean)
|
||||||
sub_project("mongrel_cluster", :clean)
|
sub_project("mongrel_cluster", :clean)
|
||||||
sub_project("mongrel_experimental", :clean)
|
sub_project("mongrel_experimental", :clean)
|
||||||
sub_project("mongrel_service", :clean) if RUBY_PLATFORM =~ /mswin/
|
sub_project("mongrel_service", :clean) if RUBY_PLATFORM =~ /mswin/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -193,39 +193,39 @@ namespace :site do
|
||||||
rm_rf "pkg/tars"
|
rm_rf "pkg/tars"
|
||||||
mkdir_p "pkg/gems"
|
mkdir_p "pkg/gems"
|
||||||
mkdir_p "pkg/tars"
|
mkdir_p "pkg/tars"
|
||||||
|
|
||||||
FileList["**/*.gem"].each { |gem| mv gem, "pkg/gems" }
|
FileList["**/*.gem"].each { |gem| mv gem, "pkg/gems" }
|
||||||
FileList["**/*.tgz"].each {|tgz| mv tgz, "pkg/tars" }
|
FileList["**/*.tgz"].each {|tgz| mv tgz, "pkg/tars" }
|
||||||
|
|
||||||
# XXX Hack, because only Luis can package for Win32 right now
|
# XXX Hack, because only Luis can package for Win32 right now
|
||||||
sh "cp ~/Downloads/mongrel-#{e.version}-mswin32.gem pkg/gems/"
|
sh "cp ~/Downloads/mongrel-#{e.version}-mswin32.gem pkg/gems/"
|
||||||
sh "cp ~/Downloads/mongrel_service-0.3.3-mswin32.gem pkg/gems/"
|
sh "cp ~/Downloads/mongrel_service-0.3.3-mswin32.gem pkg/gems/"
|
||||||
sh "rm -rf pkg/mongrel*"
|
sh "rm -rf pkg/mongrel*"
|
||||||
sh "gem generate_index -d pkg"
|
sh "gem generate_index -d pkg"
|
||||||
sh "scp -r CHANGELOG pkg/* rubyforge.org:/var/www/gforge-projects/mongrel/releases/"
|
sh "scp -r CHANGELOG pkg/* rubyforge.org:/var/www/gforge-projects/mongrel/releases/"
|
||||||
sh "svn log -v > SVN_LOG"
|
sh "svn log -v > SVN_LOG"
|
||||||
sh "scp -r SVN_LOG pkg/* rubyforge.org:/var/www/gforge-projects/mongrel/releases/"
|
sh "scp -r SVN_LOG pkg/* rubyforge.org:/var/www/gforge-projects/mongrel/releases/"
|
||||||
rm "SVN_LOG"
|
rm "SVN_LOG"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Upload the website"
|
desc "Upload the website"
|
||||||
task :web do
|
task :web do
|
||||||
# Requires the 'webgem' gem and the 'atom-tools' gem
|
# Requires the 'webgem' gem
|
||||||
sh "cd site; webgen; webgen; ruby atom.rb > output/feed.atom; rsync -azv --no-perms --no-times output/* rubyforge.org:/var/www/gforge-projects/mongrel/"
|
sh "cd site; webgen; webgen; curl 'http://feed43.com/mongrel.xml' > output/rss.xml; rsync -azv --no-perms --no-times output/* rubyforge.org:/var/www/gforge-projects/mongrel/"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Upload the rdocs"
|
desc "Upload the rdocs"
|
||||||
task :rdoc => [:doc] do
|
task :rdoc => [:doc] do
|
||||||
sh "rsync -azv --no-perms --no-times doc/* rubyforge.org:/var/www/gforge-projects/mongrel/rdoc/"
|
sh "rsync -azv --no-perms --no-times doc/* rubyforge.org:/var/www/gforge-projects/mongrel/rdoc/"
|
||||||
sh "cd projects/gem_plugin; rake site:rdoc"
|
sh "cd projects/gem_plugin; rake site:rdoc"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Upload the coverage report"
|
desc "Upload the coverage report"
|
||||||
task :coverage => [:rcov] do
|
task :coverage => [:rcov] do
|
||||||
sh "rsync -azv --no-perms --no-times test/coverage/* rubyforge.org:/var/www/gforge-projects/mongrel/coverage/" rescue nil
|
sh "rsync -azv --no-perms --no-times test/coverage/* rubyforge.org:/var/www/gforge-projects/mongrel/coverage/" rescue nil
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Upload the website, the rdocs, and the coverage report"
|
desc "Upload the website, the rdocs, and the coverage report"
|
||||||
task :all => [:clean, :web, :rdoc, :coverage]
|
task :all => [:clean, :web, :rdoc, :coverage]
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
86
site/atom.rb
86
site/atom.rb
|
@ -1,86 +0,0 @@
|
||||||
require 'rubygems'
|
|
||||||
require 'atom/collection'
|
|
||||||
require 'find'
|
|
||||||
require 'yaml'
|
|
||||||
require 'redcloth'
|
|
||||||
|
|
||||||
$site ="http://mongrel.rubyforge.org/"
|
|
||||||
|
|
||||||
zed = Atom::Author.new
|
|
||||||
zed.name = "Zed A. Shaw"
|
|
||||||
zed.uri = $site
|
|
||||||
zed.email = "zedNOSPAMshaw A-T zedNOSPAMshaw.com"
|
|
||||||
|
|
||||||
|
|
||||||
f = Atom::Feed.new
|
|
||||||
f.id = $site
|
|
||||||
f.authors << zed
|
|
||||||
|
|
||||||
link = Atom::Link.new
|
|
||||||
link["href"] = $site + "/feed.atom"
|
|
||||||
link["rel"] = "self"
|
|
||||||
f.links << link
|
|
||||||
link = Atom::Link.new
|
|
||||||
link["href"] = $site
|
|
||||||
link["rel"] = "via"
|
|
||||||
f.links << link
|
|
||||||
|
|
||||||
f.title = "Mongrel Web Server"
|
|
||||||
f.subtitle = "Faster Is Possible"
|
|
||||||
f.updated = Time.now
|
|
||||||
f.generator = "atom-tools"
|
|
||||||
f.rights = "Copyright Zed A. Shaw with contributors. All rights reserved."
|
|
||||||
|
|
||||||
class Page
|
|
||||||
attr_accessor :path
|
|
||||||
attr_accessor :stat
|
|
||||||
attr_accessor :uri
|
|
||||||
attr_accessor :info
|
|
||||||
|
|
||||||
def initialize(path)
|
|
||||||
@path = path
|
|
||||||
@stat = File.stat(path)
|
|
||||||
@uri = $site + path.match(/^src(.*)\.page/)[1] + ".html"
|
|
||||||
@info = YAML.load_file(path)
|
|
||||||
end
|
|
||||||
|
|
||||||
def <=>(other)
|
|
||||||
other.stat.mtime <=> self.stat.mtime
|
|
||||||
end
|
|
||||||
|
|
||||||
def to_html
|
|
||||||
if not @html
|
|
||||||
content = open(path) { |f| f.read(1024) }
|
|
||||||
content.gsub!(/^---.*---/m,"")
|
|
||||||
content = content + "...\n\"Read more\":#{uri}"
|
|
||||||
r = RedCloth.new(content)
|
|
||||||
@html = r.to_html
|
|
||||||
end
|
|
||||||
|
|
||||||
@html
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
pages = []
|
|
||||||
|
|
||||||
Find.find("src") do |path|
|
|
||||||
if /.page$/ === path and !path.index("index.page")
|
|
||||||
pages << Page.new(path)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
pages.sort!
|
|
||||||
|
|
||||||
pages[0 .. 30].each do |p|
|
|
||||||
e = Atom::Entry.new
|
|
||||||
e.id = p.uri
|
|
||||||
e.title = p.info["title"]
|
|
||||||
link = Atom::Link.new
|
|
||||||
link["href"] = p.uri
|
|
||||||
e.links << link
|
|
||||||
e.updated = p.stat.mtime
|
|
||||||
f.entries << e
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
puts f.to_s
|
|
|
@ -4,10 +4,9 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>Mongrel: {title: }</title>
|
<title>Mongrel: {title: }</title>
|
||||||
<link rel="stylesheet" href="{relocatable: default.css}" type="text/css" media=
|
<link rel="stylesheet" href="{relocatable: default.css}" type="text/css" media="screen" />
|
||||||
"screen" />
|
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://mongrel.rubyforge.org/rss.xml" />
|
||||||
<meta http-equiv="Content-Type" content=
|
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
|
||||||
"text/html; charset=us-ascii" />
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Reference in a new issue