Changeset 87

Show
Ignore:
Timestamp:
07/08/08 08:07:04 (5 months ago)
Author:
deveiant
Message:

Checkpoint commit:

  • started work on integrating dict conversion into the Rakefile. Not quite done yet.
  • removed the coverage check from the svn:ci task until I get all the specs converted.
  • started cleaning up the distribution
  • updated the included bdb library to the latest release
  • added support for conversion of the dict files directly from a WordNet?-x.x.tar.bz2 tarball extracted in the top-level directory
Location:
trunk
Files:
1 added
4 removed
24 modified
2 copied

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        44Ruby-WordNet-* 
        55commit-msg.txt 
         6WordNet-* 
  • trunk/Rakefile

    • Property svn:keywords set to Date Rev Author URL Id
    r86 r87  
    3535PKGDIR        = BASEDIR + 'pkg' 
    3636 
     37RAKE_TASKDIR  = BASEDIR + 'rake' 
    3738ARTIFACTS_DIR = Pathname.new( ENV['CC_BUILD_ARTIFACTS'] || '' ) 
    3839 
    39 TEXT_FILES    = %w( Rakefile README LICENSE LICENSE.txt ). 
     40TEXT_FILES    = %w( Rakefile ChangeLog INSTALL README LICENSE ). 
    4041    collect {|filename| BASEDIR + filename } 
     42 
     43BUILD_FILES   = %w( convertdb.rb utils.rb ) 
    4144 
    4245SPECDIR       = BASEDIR + 'spec' 
     
    5154RELEASE_FILES = TEXT_FILES + LIB_FILES + SPEC_FILES 
    5255 
    53 require RAKEDIR + 'helpers' 
     56require RAKE_TASKDIR + 'helpers.rb' 
    5457 
    5558### Package constants 
     
    6063RELEASE_NAME  = "REL #{PKG_VERSION}" 
    6164 
    62 # Load task plugins 
    63 Pathname.glob( RAKEDIR + '*.rb' ).each do |tasklib| 
    64     next if tasklib =~ %r{/helpers.rb$} 
    65     require tasklib 
    66 end 
     65### Load task libraries 
     66require RAKE_TASKDIR + 'svn.rb' 
     67require RAKE_TASKDIR + 'verifytask.rb' 
     68Pathname.glob( RAKE_TASKDIR + '*.rb' ).each do |tasklib| 
     69    next if tasklib =~ %r{/(helpers|svn|verifytask)\.rb$} 
     70    begin 
     71        require tasklib 
     72    rescue ScriptError => err 
     73        fail "Task library '%s' failed to load: %s: %s" % 
     74            [ tasklib, err.class.name, err.message ] 
     75        trace "Backtrace: \n  " + err.backtrace.join( "\n  " ) 
     76    rescue => err 
     77        log "Task library '%s' failed to load: %s: %s. Some tasks may not be available." % 
     78            [ tasklib, err.class.name, err.message ] 
     79        trace "Backtrace: \n  " + err.backtrace.join( "\n  " ) 
     80    end 
     81end 
     82 
    6783 
    6884if Rake.application.options.trace 
  • trunk/convertdb.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
    r86 r87  
    7575# Temporary location for the lexicon data files 
    7676BuildDir = Pathname.new( __FILE__ ).expand_path.dirname +  
    77            Pathname.new( WordNet::Lexicon::DefaultDbEnv ).basename 
     77           Pathname.new( WordNet::Lexicon::DEFAULT_DB_ENV ).basename 
    7878 
    7979 
     
    9090        "used by Ruby-WordNet. This will not affect existing WordNet files,\n"\ 
    9191        "but will require up to 40Mb of disk space.\n" 
    92     exit unless /^y/i =~ promptWithDefault("Continue?", "y") 
     92    exit unless /^y/i =~ prompt_with_default("Continue?", "y") 
    9393 
    9494    # Open the database and check to be sure it's empty. Confirm overwrite if 
     
    9898            "will be overwritten.\n" 
    9999        abort( "user cancelled." ) unless  
    100             /^y/i =~ promptWithDefault( "Continue?", "n" ) 
     100            /^y/i =~ prompt_with_default( "Continue?", "n" ) 
    101101        BuildDir.rmtree 
    102102    end 
     
    104104    # Find the source data files 
    105105    if ARGV.empty? 
     106        default = nil 
     107         
     108        if wndirs = Pathname.glob( Pathname.getwd + 'WordNet-*' ) 
     109            default = wndirs.first 
     110        else 
     111            default = '/usr/local/WordNet-3.0' 
     112        end 
    106113 
    107114        # :TODO: Do some more intelligent searching here 
    108115        message "Where can I find the WordNet data files?\n" 
    109         datadir = promptWithDefault( "Data directory", "/usr/local/WordNet-2.1/dict" ) 
     116        datadir = prompt_with_default( "Data directory", default + "dict" ) 
    110117    else 
    111118        datadir = ARGV.shift 
    112119    end 
    113  
    114     abort( "Directory '#{datadir}' does not exist" ) unless File::exists?( datadir ) 
    115     abort( "'#{datadir}' is not a directory" ) unless File::directory?( datadir ) 
    116     testfile = File::join(datadir, "data.noun") 
    117     abort( "'#{datadir}' doesn't seem to contain the necessary files.") unless 
    118         File::exists?( testfile ) 
     120    datadir = Pathname.new( datadir ) 
     121 
     122    abort( "Directory '#{datadir}' does not exist" ) unless datadir.exist? 
     123    abort( "'#{datadir}' is not a directory" ) unless datadir.directory? 
     124    testfile = datadir + "data.noun" 
     125    abort( "'#{datadir}' doesn't seem to contain the necessary files.") unless testfile.exist? 
    119126 
    120127    # Open the lexicon readwrite into the temporary datadir 
  • trunk/docs/makedocs.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/examples/addLacedBoots.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/examples/clothesWithCollars.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/examples/clothesWithTongues.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/examples/distance.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/examples/domainTree.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/examples/gcs.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/examples/holonymTree.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/examples/hypernymTree.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/examples/hyponymTree.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/examples/memberTree.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/examples/meronymTree.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/experiments/unhandled_pointer_types.rb

    • Property svn:keywords changed from Id URL Rev to Date Rev Author URL Id
  • trunk/lib/wordnet.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/lib/wordnet/constants.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/lib/wordnet/lexicon.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/lib/wordnet/synset.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/makedist.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
    r62 r87  
    2424 
    2525# SVN Revision 
    26 SVNRev = %q$Rev: 13 $ 
     26SVNRev = %q$Rev$ 
    2727 
    2828# SVN Id 
     
    3030 
    3131# SVN URL 
    32 SVNURL = %q$URL: svn+ssh://svn.FaerieMUD.org/usr/local/svn/project-utils/trunk/makedist.rb $ 
     32SVNURL = %q$URL$ 
    3333 
    3434$Programs = { 
  • trunk/rake/svn.rb

    r86 r87  
    260260 
    261261    desc "Check in all the changes in your current working copy" 
    262     task :checkin => ['svn:update', 'coverage:verify', 'svn:fix_keywords', COMMIT_MSG_FILE] do 
     262    task :checkin => ['svn:update', 'svn:fix_keywords', COMMIT_MSG_FILE] do 
    263263        targets = get_target_args() 
    264264        $deferr.puts '---', File.read( COMMIT_MSG_FILE ), '---' 
  • trunk/spec/linguawordnet.tests.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/spec/wordnet/lexicon_spec.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/spec/wordnet/synset.tests.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id
  • trunk/utils.rb

    • Property svn:keywords changed from author date id revision to Date Rev Author URL Id