Changeset 273

Show
Ignore:
Timestamp:
03/17/2008 11:59:57 (8 months ago)
Author:
why
Message:

Changing SuperRedCloth references to just RedCloth?.

Location:
trunk
Files:
1 modified
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/Rakefile

    r272 r273  
    77include FileUtils 
    88 
    9 NAME = "superredcloth" 
     9NAME = "redcloth" 
    1010SUMMARY = "a fast library for formatting Textile and Markdown as HTML" 
    1111REV = `svn info`[/Revision: (\d+)/, 1] rescue nil 
    1212VERS = ENV['VERSION'] || "1" + (REV ? ".#{REV}" : "") 
    13 CLEAN.include ['ext/superredcloth_scan/*.{bundle,so,obj,pdb,lib,def,exp}', 'ext/superredcloth_scan/Makefile',  
     13CLEAN.include ['ext/redcloth_scan/*.{bundle,so,obj,pdb,lib,def,exp}', 'ext/redcloth_scan/Makefile',  
    1414               '**/.*.sw?', '*.gem', '.config'] 
    1515 
     
    1818 
    1919desc "Compiles all extensions" 
    20 task :compile => [:superredcloth_scan] do 
    21   if Dir.glob(File.join("lib","superredcloth_scan.*")).length == 0 
     20task :compile => [:redcloth_scan] do 
     21  if Dir.glob(File.join("lib","redcloth_scan.*")).length == 0 
    2222    STDERR.puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" 
    2323    STDERR.puts "Gem actually failed to build.  Your system is" 
    24     STDERR.puts "NOT configured properly to build superredcloth." 
     24    STDERR.puts "NOT configured properly to build redcloth." 
    2525    STDERR.puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" 
    2626    exit(1) 
     
    2828end 
    2929 
    30 desc "Packages up SuperRedCloth." 
     30desc "Packages up RedCloth." 
    3131task :package => [:clean, :ragel] 
    3232 
    33 desc "Releases packages for all SuperRedCloth packages and platforms." 
     33desc "Releases packages for all RedCloth packages and platforms." 
    3434task :release => [:package, :rubygems_win32] 
    3535 
     
    6868    # rdoc.template = "extras/flipbook_rdoc.rb" 
    6969    rdoc.main = "README" 
    70     rdoc.title = "SuperRedCloth Documentation" 
     70    rdoc.title = "RedCloth Documentation" 
    7171    rdoc.rdoc_files.add ['README', 'CHANGELOG', 'COPYING', 'lib/**/*.rb'] 
    7272end 
     
    8888          Dir.glob("{bin,doc,test,lib,extras}/**/*") +  
    8989          Dir.glob("ext/**/*.{h,c,rb,rl}") +  
    90           %w[ext/superredcloth_scan/superredcloth_scan.c] # needed because it's generated later 
     90          %w[ext/redcloth_scan/redcloth_scan.c] # needed because it's generated later 
    9191         
    9292        s.require_path = "lib" 
    93         #s.autorequire = "superredcloth"  # no no no this is tHe 3v1l 
     93        #s.autorequire = "redcloth"  # no no no this is tHe 3v1l 
    9494        s.extensions = FileList["ext/**/extconf.rb"].to_a 
    9595        s.bindir = "bin" 
     
    101101end 
    102102 
    103 extension = "superredcloth_scan" 
    104 ext = "ext/superredcloth_scan" 
     103extension = "redcloth_scan" 
     104ext = "ext/redcloth_scan" 
    105105ext_so = "#{ext}/#{extension}.#{Config::CONFIG['DLEXT']}" 
    106106ext_files = FileList[ 
    107   "#{ext}/superredcloth_scan.c", 
    108   "#{ext}/superredcloth_inline.c", 
     107  "#{ext}/redcloth_scan.c", 
     108  "#{ext}/redcloth_inline.c", 
    109109  "#{ext}/extconf.rb", 
    110110  "#{ext}/Makefile", 
     
    123123end 
    124124 
    125 ["#{ext}/superredcloth_scan.c","#{ext}/superredcloth_inline.c"].each do |name| 
     125["#{ext}/redcloth_scan.c","#{ext}/redcloth_inline.c"].each do |name| 
    126126  source = name.sub(/\.c$/, '.rl') 
    127   file name => [source, "#{ext}/superredcloth_common.rl", "#{ext}/superredcloth.h"] do 
     127  file name => [source, "#{ext}/redcloth_common.rl", "#{ext}/redcloth.h"] do 
    128128    @ragel_v ||= `ragel -v`[/(version )(\S*)/,2].split('.').map{|s| s.to_i} 
    129129    if @ragel_v[0] >= 6 
     
    139139task extension.to_sym => ["#{ext}/Makefile", ext_so ] 
    140140 
    141 file "#{ext}/Makefile" => ["#{ext}/extconf.rb", "#{ext}/superredcloth_scan.c","#{ext}/superredcloth_inline.c"] do 
     141file "#{ext}/Makefile" => ["#{ext}/extconf.rb", "#{ext}/redcloth_scan.c","#{ext}/redcloth_inline.c"] do 
    142142  Dir.chdir(ext) do ruby "extconf.rb" end 
    143143end 
     
    148148  "ext/**/*.{c,rb,h,rl}", 
    149149  "CHANGELOG", "README", "Rakefile", "COPYING", 
    150   "extras/**/*", "lib/superredcloth_scan.so"] 
     150  "extras/**/*", "lib/redcloth_scan.so"] 
    151151 
    152152Win32Spec = Gem::Specification.new do |s| 
     
    165165 
    166166  s.require_path = "lib" 
    167   #s.autorequire = "superredcloth"  # no no no this is tHe 3v1l 
     167  #s.autorequire = "redcloth"  # no no no this is tHe 3v1l 
    168168  s.extensions = [] 
    169169  s.bindir = "bin" 
    170170end 
    171171   
    172 WIN32_PKG_DIR = "superredcloth-" + VERS 
     172WIN32_PKG_DIR = "redcloth-" + VERS 
    173173 
    174174file WIN32_PKG_DIR => [:package] do 
     
    176176end 
    177177 
    178 desc "Cross-compile the superredcloth_scan extension for win32" 
    179 file "superredcloth_scan_win32" => [WIN32_PKG_DIR] do 
    180   cp "extras/mingw-rbconfig.rb", "#{WIN32_PKG_DIR}/ext/superredcloth_scan/rbconfig.rb" 
    181   sh "cd #{WIN32_PKG_DIR}/ext/superredcloth_scan/ && ruby -I. extconf.rb && make" 
    182   mv "#{WIN32_PKG_DIR}/ext/superredcloth_scan/superredcloth_scan.so", "#{WIN32_PKG_DIR}/lib" 
     178desc "Cross-compile the redcloth_scan extension for win32" 
     179file "redcloth_scan_win32" => [WIN32_PKG_DIR] do 
     180  cp "extras/mingw-rbconfig.rb", "#{WIN32_PKG_DIR}/ext/redcloth_scan/rbconfig.rb" 
     181  sh "cd #{WIN32_PKG_DIR}/ext/redcloth_scan/ && ruby -I. extconf.rb && make" 
     182  mv "#{WIN32_PKG_DIR}/ext/redcloth_scan/redcloth_scan.so", "#{WIN32_PKG_DIR}/lib" 
    183183end 
    184184 
    185185desc "Build the binary RubyGems package for win32" 
    186 task :rubygems_win32 => ["superredcloth_scan_win32"] do 
     186task :rubygems_win32 => ["redcloth_scan_win32"] do 
    187187  Dir.chdir("#{WIN32_PKG_DIR}") do 
    188188    Gem::Builder.new(Win32Spec).build 
    189189    verbose(true) { 
    190       mv Dir["*.gem"].first, "../pkg/superredcloth-#{VERS}-mswin32.gem" 
     190      mv Dir["*.gem"].first, "../pkg/redcloth-#{VERS}-mswin32.gem" 
    191191    } 
    192192  end 
  • trunk/lib/redcloth.rb

    r272 r273  
    1 require 'superredcloth_scan' 
     1require 'redcloth_scan' 
    22 
    33$:.unshift(File.dirname(__FILE__)) 
    44 
    5 require 'superredcloth/html' 
    6 require 'superredcloth/latex' 
     5require 'redcloth/html' 
     6require 'redcloth/latex'