0
+ def edit_content(content)
0
+ content.gsub!(/\$Release\$/, @release)
0
+ content.gsub!(/\$Release:.*?\$/, "$Release: #{@release} $")
0
+ content.gsub!(/\$Copyright.*?\$/, @copyright)
0
+ content.gsub!(/\$License.*?\$/, @license)
0
- project : motto-mysql
0
- - copyright : copyright(c) 200
6-2008 kuwata-lab all rights reserved.
0
+ - copyright : copyright(c) 200
8 kuwata-lab.com all rights reserved.
0
- license : "License: Ruby's license"
0
#- mysql_ruby_version: '2.7.4'
0
#- mysql_ruby_version: '2.7.5'
0
@@ -136,11 +147,7 @@ recipes:
0
store 'ext/**/*', 'test/**/*', dir
0
edit "#{dir}/**/*" do |content|
0
- content.gsub!(/\$Release\$/, "$(release)")
0
- content.gsub!(/\$Release:.*?\$/, "$Release: $(release) $")
0
- content.gsub!(/\$Copyright.*?\$/, "$(copyright)")
0
- content.gsub!(/\$License.*?\$/, "$(license)")
0
@@ -155,6 +162,44 @@ recipes:
0
+ ingreds: [ website/index.html ]
0
+ - product: website/index.html
0
+ ingreds: [ README.txt ]
0
+ mkdir "website" unless test(?d, "website")
0
+ download_url = "http://rubyforge.org/projects/$(project)/"
0
+ sys "rd2 #{@ingred} | tidy -q -i -wrap 9999 -ashtml > #{@product}"
0
+ edit @product do |content|
0
+ body = (content =~ /<body>.*<\/body>/m) && $&
0
+ #body.gsub! /<h1>.*<\/h1>/, "<h1>$(project): README.txt</h1>"
0
+ #body.gsub! /README-$(project)/, 'README'
0
+ body.gsub! /<!-- RDLabel: ".*" -->/, ''
0
+ body.gsub! /(<h\d>)<a name=".*?" id=".*?">/, '\1'
0
+ body.gsub! /<\/a>(<\/h\d>)/, '\1'
0
+ body.gsub! /copyright\(c\)/, 'copyright©'
0
+ body.sub! /http:\/\/$(project)\.rubyforge\.org\//, '<a href="\&">\&</a><br />'
0
+ body.sub! /http:\/\/rubyforge.org\/projects\/$(project)\//, '<a href="\&">\&</a>'
0
+ #body.sub! /$(project)-$(release)\.tar\.gz/, "<a href=\"#{download_url}\">\\&</a>"
0
+ #body.sub! /CGI-Exception/, '<a href="http://cgi-exception.rubyforge.org/">\&</a>'
0
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
0
+ <title>$(project): README.txt</title>
0
+ <meta http-equiv="Content-Type" content="text/html; charset=utf8">
0
+ <link rel="stylesheet" type="text/css" href="style.css">
0
items = %w[string var_string int24 long longlong float double
Comments
No one has commented yet.