Changeset 94
- Timestamp:
- 07/24/08 19:47:42 (3 months ago)
- Location:
- branches/rakefile-work
- Files:
-
- 5 modified
-
Rakefile (modified) (3 diffs)
-
Rakefile.local (modified) (1 diff)
-
convertdb.rb (modified) (1 diff)
-
project.yml (modified) (1 diff)
-
utils.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/rakefile-work/Rakefile
r93 r94 58 58 SPECDIR = BASEDIR + 'spec' 59 59 SPEC_FILES = Pathname.glob( SPECDIR + '**/*_spec.rb' ).delete_if {|item| item =~ /\.svn/ } 60 SPEC_EXCLUDES = 'spec,/Library/Ruby,/var/lib,/usr/local/lib'61 60 62 61 TESTDIR = BASEDIR + 'tests' 63 TEST_FILES = Pathname.glob( TESTDIR + '**/*.tests.rb' ) 62 TEST_FILES = Pathname.glob( TESTDIR + '**/*.tests.rb' ).delete_if {|item| item =~ /\.svn/ } 64 63 65 64 RELEASE_FILES = FileList[ TEXT_FILES + SPEC_FILES + TEST_FILES + LIB_FILES + EXT_FILES ] 66 65 67 66 COVERAGE_MINIMUM = ENV['COVERAGE_MINIMUM'] ? Float( ENV['COVERAGE_MINIMUM'] ) : 85.0 67 RCOV_EXCLUDES = 'spec,tests,/Library/Ruby,/var/lib,/usr/local/lib' 68 68 RCOV_OPTS = [ 69 '--exclude', SPEC_EXCLUDES,69 '--exclude', RCOV_EXCLUDES, 70 70 '--xrefs', 71 71 '--save', 72 '--callsites' 72 '--callsites', 73 #'--aggregate', 'coverage.data' # <- doesn't work as of 0.8.1.2.0 73 74 ] 74 75 76 77 # Subversion constants -- directory names for releases and tags 78 SVN_TRUNK_DIR = 'trunk' 79 SVN_RELEASES_DIR = 'releases' 80 SVN_BRANCHES_DIR = 'branches' 81 SVN_TAGS_DIR = 'tags' 75 82 76 83 ### Load some task libraries that need to be loaded early … … 105 112 # Gem dependencies: gemname => version 106 113 DEPENDENCIES = { 107 # 'mongrel' => '',108 114 } 109 115 110 116 # Non-gem requirements: packagename => version 111 117 REQUIREMENTS = { 112 # 'Apache' => '>= 2.2.6',118 'bdb' => '>= 0.6.5', 113 119 } 114 120 … … 120 126 gem.summary = PKG_SUMMARY 121 127 gem.description = <<-EOD 122 123 128 A Ruby implementation of the WordNet lexical dictionary 124 125 129 EOD 126 130 -
branches/rakefile-work/Rakefile.local
r91 r94 21 21 22 22 RELEASE_FILES.include( 'examples/*.rb' ) 23 23 24 24 25 ### Tasks -
branches/rakefile-work/convertdb.rb
r92 r94 111 111 default = nil 112 112 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 115 118 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 120 122 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 ) 122 124 datadir = Pathname.new( datadir ) 123 125 -
branches/rakefile-work/project.yml
r91 r94 5 5 project_name: WordNet 6 6 author_email: ged@FaerieMUD.org 7 8 project_dependencies: 9 10 project_requirements: 11 bdb: >= 0.6.5 12 -
branches/rakefile-work/utils.rb
r87 r94 292 292 293 293 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 294 314 ### Search for the program specified by the given <tt>progname</tt> in the 295 315 ### user's <tt>PATH</tt>, and return the full path to it, or <tt>nil</tt> if
