Changeset 94

Show
Ignore:
Timestamp:
07/24/08 19:47:42 (3 months ago)
Author:
deveiant
Message:

Updated build system

Location:
branches/rakefile-work
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • branches/rakefile-work/Rakefile

    r93 r94  
    5858SPECDIR       = BASEDIR + 'spec' 
    5959SPEC_FILES    = Pathname.glob( SPECDIR + '**/*_spec.rb' ).delete_if {|item| item =~ /\.svn/ } 
    60 SPEC_EXCLUDES = 'spec,/Library/Ruby,/var/lib,/usr/local/lib' 
    6160 
    6261TESTDIR       = BASEDIR + 'tests' 
    63 TEST_FILES    = Pathname.glob( TESTDIR + '**/*.tests.rb' ) 
     62TEST_FILES    = Pathname.glob( TESTDIR + '**/*.tests.rb' ).delete_if {|item| item =~ /\.svn/ } 
    6463 
    6564RELEASE_FILES = FileList[ TEXT_FILES + SPEC_FILES + TEST_FILES + LIB_FILES + EXT_FILES ] 
    6665 
    67  
     66COVERAGE_MINIMUM = ENV['COVERAGE_MINIMUM'] ? Float( ENV['COVERAGE_MINIMUM'] ) : 85.0 
     67RCOV_EXCLUDES = 'spec,tests,/Library/Ruby,/var/lib,/usr/local/lib' 
    6868RCOV_OPTS = [ 
    69     '--exclude', SPEC_EXCLUDES, 
     69    '--exclude', RCOV_EXCLUDES, 
    7070    '--xrefs', 
    7171    '--save', 
    72     '--callsites' 
     72    '--callsites', 
     73    #'--aggregate', 'coverage.data' # <- doesn't work as of 0.8.1.2.0 
    7374  ] 
    7475 
     76 
     77# Subversion constants -- directory names for releases and tags 
     78SVN_TRUNK_DIR    = 'trunk' 
     79SVN_RELEASES_DIR = 'releases' 
     80SVN_BRANCHES_DIR = 'branches' 
     81SVN_TAGS_DIR     = 'tags' 
    7582 
    7683### Load some task libraries that need to be loaded early 
     
    105112# Gem dependencies: gemname => version 
    106113DEPENDENCIES = { 
    107 #   'mongrel'       => '', 
    108114} 
    109115 
    110116# Non-gem requirements: packagename => version 
    111117REQUIREMENTS = { 
    112 #   'Apache'  => '>= 2.2.6', 
     118    'bdb' => '>= 0.6.5', 
    113119} 
    114120 
     
    120126    gem.summary           = PKG_SUMMARY 
    121127    gem.description       = <<-EOD 
    122  
    123128    A Ruby implementation of the WordNet lexical dictionary 
    124  
    125129    EOD 
    126130 
  • branches/rakefile-work/Rakefile.local

    r91 r94  
    2121 
    2222RELEASE_FILES.include( 'examples/*.rb' ) 
     23 
    2324 
    2425### Tasks 
  • branches/rakefile-work/convertdb.rb

    r92 r94  
    111111        default = nil 
    112112        wndirs = Pathname.glob( Pathname.getwd + 'WordNet-*' ) 
    113         unless wndirs.empty? 
    114             default = wndirs.first 
     113        localdict = Pathname.getwd + 'dict' 
     114        if !wndirs.empty? 
     115            default = wndirs.first + 'dict' 
     116        elsif localdict.exist? 
     117            default = localdict 
    115118        else 
    116             default = '/usr/local/WordNet-3.0' 
    117         end 
    118  
    119         # :TODO: Do some more intelligent searching here 
     119            default = '/usr/local/WordNet-3.0/dict' 
     120        end 
     121 
    120122        message "Where can I find the WordNet data files?\n" 
    121         datadir = prompt_with_default( "Data directory", default + "/dict" ) 
     123        datadir = prompt_with_default( "Data directory", default ) 
    122124        datadir = Pathname.new( datadir ) 
    123125 
  • branches/rakefile-work/project.yml

    r91 r94  
    55project_name: WordNet 
    66author_email: ged@FaerieMUD.org 
     7 
     8project_dependencies: 
     9 
     10project_requirements: 
     11  bdb: >= 0.6.5 
     12 
  • branches/rakefile-work/utils.rb

    r87 r94  
    292292 
    293293 
     294    ### Display a description of a potentially-dangerous task, and prompt 
     295    ### for confirmation. If the user answers with anything that begins 
     296    ### with 'y', yield to the block, else raise with an error. 
     297    def ask_for_confirmation( description ) 
     298        puts description 
     299 
     300        answer = prompt_with_default( "Continue?", 'n' ) do |input| 
     301            input =~ /^[yn]/i 
     302        end 
     303 
     304        case answer 
     305        when /^y/i 
     306            yield 
     307        else 
     308            error "Aborted." 
     309            fail 
     310        end 
     311    end 
     312 
     313 
    294314    ### Search for the program specified by the given <tt>progname</tt> in the 
    295315    ### user's <tt>PATH</tt>, and return the full path to it, or <tt>nil</tt> if