linkparser 1.0.4 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2006-2009, The FaerieMUD Consortium
1
+ Copyright (c) 2006-2010, The FaerieMUD Consortium
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
@@ -0,0 +1,95 @@
1
+ # Ruby-LinkParser
2
+
3
+ This module is a Ruby binding for the link-grammar library, a syntactic parser
4
+ of English.
5
+
6
+ ## Authors
7
+
8
+ * Michael Granger <ged@FaerieMUD.org>
9
+ * Martin Chase <stillflame@FaerieMUD.org>
10
+
11
+
12
+ ## Requirements
13
+
14
+ * Ruby 1.8.7 or 1.9.2
15
+ * link-grammar (version 4.7.0 or later) from the AbiWord project
16
+ (http://www.abisource.com/projects/link-grammar/)
17
+
18
+
19
+ ## Installation
20
+
21
+ These instructions assume a UNIX or UNIX-like environment. I've built it on
22
+ MacOS X, FreeBSD, and Ubuntu Linux. I'm not sure how to get this to build
23
+ under Windows, as I don't have a Windows license with which to test it.
24
+ Suggestions welcomed.
25
+
26
+ First, you'll need to install the Abiword link-grammar library that comes with
27
+ this source (or download it yourself if you wish):
28
+
29
+ $ tar -xvzf link-grammar-4.6.5.tar.gz
30
+ $ cd link-grammar-4.6.5
31
+ $ ./configure; make; sudo make install
32
+ $ cd ..
33
+
34
+ Now build, test, and install the Ruby library:
35
+
36
+ $ rake
37
+ $ sudo rake install
38
+
39
+ If you've installed the link-grammar library someplace that isn't in your
40
+ regular include path, you might have to tell the build system where to look:
41
+
42
+ $ rake -- --with-link-grammar-dir=/usr/local
43
+
44
+ Under MacOS X, unless you've taken extra steps to compile the link-grammar
45
+ library as a universal binary, you'll probably also have to limit it to
46
+ your machine's architecture:
47
+
48
+ $ ARCHFLAGS="-arch i386" rake -- --with-link-grammar-dir=/usr/local
49
+
50
+ That's it!
51
+
52
+
53
+ ## Example Usage
54
+
55
+ require 'linkparser'
56
+
57
+ dict = LinkParser::Dictionary.new( :screen_width => 100 )
58
+ sent = dict.parse( "People use Ruby for all kinds of nifty things." )
59
+ # => #<LinkParser::Sentence:0xcf8eb "LEFT-WALL people use Ruby for all kinds
60
+ # of nifty things . RIGHT-WALL"/2 linkages/0 nulls>
61
+
62
+ sent.subject # => "people"
63
+ sent.verb # => "use"
64
+ sent.object # => "Ruby"
65
+
66
+ puts sent.constituent_tree_string
67
+ # =>
68
+ # (S (NP People)
69
+ # (VP use
70
+ # (NP Ruby)
71
+ # (PP for
72
+ # (NP (NP all kinds)
73
+ # (PP of
74
+ # (NP nifty things)))))
75
+ # .)
76
+
77
+ puts sent.diagram
78
+ # =>
79
+ # +-------------------------------Xp------------------------------+
80
+ # | +----MVp---+----Jp----+ +------Jp-----+ |
81
+ # +----Wd---+--Sp--+--Os-+ | +-Dmc-+--Mp-+ +----A---+ |
82
+ # | | | | | | | | | | |
83
+ # LEFT-WALL people.p use.v Ruby for.p all kinds.n of nifty.a things.n .
84
+
85
+
86
+ ## Legal
87
+
88
+ For licensing information, see the LICENSE file.
89
+
90
+ For copyright and licensing information for link-grammar itself, see the
91
+ LICENSE file in that distribution.
92
+
93
+ $Id$
94
+
95
+
data/Rakefile CHANGED
@@ -1,33 +1,54 @@
1
- #!rake
1
+ #!rake -*- ruby -*-
2
2
  #
3
3
  # LinkParser rakefile
4
4
  #
5
5
  # Based on various other Rakefiles, especially one by Ben Bleything
6
6
  #
7
- # Copyright (c) 2007-2009 The FaerieMUD Consortium
7
+ # Copyright (c) 2007-2010 The FaerieMUD Consortium
8
8
  #
9
9
  # Authors:
10
10
  # * Michael Granger <ged@FaerieMUD.org>
11
11
  #
12
12
 
13
13
  BEGIN {
14
+ require 'rbconfig'
14
15
  require 'pathname'
15
16
  basedir = Pathname.new( __FILE__ ).dirname
16
17
 
17
18
  libdir = basedir + "lib"
18
- extdir = basedir + "ext"
19
+ extdir = libdir + Config::CONFIG['sitearch']
19
20
 
21
+ $LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
20
22
  $LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
21
23
  $LOAD_PATH.unshift( extdir.to_s ) unless $LOAD_PATH.include?( extdir.to_s )
22
24
  }
23
25
 
26
+ begin
27
+ require 'readline'
28
+ include Readline
29
+ rescue LoadError
30
+ # Fall back to a plain prompt
31
+ def readline( text )
32
+ $stderr.print( text.chomp )
33
+ return $stdin.gets
34
+ end
35
+ end
36
+
37
+ begin
38
+ require 'rubygems'
39
+ rescue LoadError
40
+ module Gem
41
+ class Specification; end
42
+ end
43
+ end
44
+
45
+ require 'pathname'
24
46
  require 'rbconfig'
25
47
  require 'rake'
26
- require 'rake/rdoctask'
27
48
  require 'rake/testtask'
28
49
  require 'rake/packagetask'
29
50
  require 'rake/clean'
30
- require 'rake/191_compat.rb'
51
+ # require 'rake/191_compat.rb'
31
52
 
32
53
  $dryrun = false
33
54
 
@@ -40,46 +61,61 @@ DOCSDIR = BASEDIR + 'docs'
40
61
  PKGDIR = BASEDIR + 'pkg'
41
62
  DATADIR = BASEDIR + 'data'
42
63
 
64
+ MANUALDIR = DOCSDIR + 'manual'
65
+
43
66
  PROJECT_NAME = 'LinkParser'
44
67
  PKG_NAME = PROJECT_NAME.downcase
45
68
  PKG_SUMMARY = 'a Ruby binding for the link-grammar library'
46
69
 
70
+ # Cruisecontrol stuff
71
+ CC_BUILD_LABEL = ENV['CC_BUILD_LABEL']
72
+ CC_BUILD_ARTIFACTS = ENV['CC_BUILD_ARTIFACTS'] || 'artifacts'
73
+
47
74
  VERSION_FILE = LIBDIR + 'linkparser.rb'
48
75
  if VERSION_FILE.exist? && buildrev = ENV['CC_BUILD_LABEL']
49
76
  PKG_VERSION = VERSION_FILE.read[ /VERSION\s*=\s*['"](\d+\.\d+\.\d+)['"]/, 1 ] + '.' + buildrev
50
77
  elsif VERSION_FILE.exist?
51
78
  PKG_VERSION = VERSION_FILE.read[ /VERSION\s*=\s*['"](\d+\.\d+\.\d+)['"]/, 1 ]
52
- else
53
- PKG_VERSION = '0.0.0'
54
79
  end
55
80
 
81
+ PKG_VERSION = '0.0.0' unless defined?( PKG_VERSION ) && !PKG_VERSION.nil?
82
+
56
83
  PKG_FILE_NAME = "#{PKG_NAME.downcase}-#{PKG_VERSION}"
57
84
  GEM_FILE_NAME = "#{PKG_FILE_NAME}.gem"
58
85
 
86
+ # Universal VCS constants
87
+ DEFAULT_EDITOR = 'vi'
88
+ COMMIT_MSG_FILE = 'commit-msg.txt'
89
+ FILE_INDENT = " " * 12
90
+ LOG_INDENT = " " * 3
91
+
59
92
  EXTCONF = EXTDIR + 'extconf.rb'
60
93
 
61
- ARTIFACTS_DIR = Pathname.new( ENV['CC_BUILD_ARTIFACTS'] || 'artifacts' )
94
+ ARTIFACTS_DIR = Pathname.new( CC_BUILD_ARTIFACTS )
62
95
 
63
- TEXT_FILES = %w( Rakefile ChangeLog README LICENSE ).collect {|filename| BASEDIR + filename }
64
- BIN_FILES = Pathname.glob( BINDIR + '*' ).delete_if {|item| item =~ /\.svn/ }
65
- LIB_FILES = Pathname.glob( LIBDIR + '**/*.rb' ).delete_if {|item| item =~ /\.svn/ }
66
- EXT_FILES = Pathname.glob( EXTDIR + '**/*.{c,h,rb}' ).delete_if {|item| item =~ /\.svn/ }
67
- DATA_FILES = Pathname.glob( DATADIR + '**/*' ).delete_if {|item| item =~ /\.svn/ }
96
+ TEXT_FILES = Rake::FileList.new( %w[Rakefile ChangeLog README* LICENSE] )
97
+ BIN_FILES = Rake::FileList.new( "#{BINDIR}/*" )
98
+ LIB_FILES = Rake::FileList.new( "#{LIBDIR}/**/*.rb" )
99
+ EXT_FILES = Rake::FileList.new( "#{EXTDIR}/**/*.{c,h,rb}" )
100
+ DATA_FILES = Rake::FileList.new( "#{DATADIR}/**/*" )
68
101
 
69
102
  SPECDIR = BASEDIR + 'spec'
70
103
  SPECLIBDIR = SPECDIR + 'lib'
71
- SPEC_FILES = Pathname.glob( SPECDIR + '**/*_spec.rb' ).delete_if {|item| item =~ /\.svn/ } +
72
- Pathname.glob( SPECLIBDIR + '**/*.rb' ).delete_if {|item| item =~ /\.svn/ }
104
+ SPEC_FILES = Rake::FileList.new( "#{SPECDIR}/**/*_spec.rb", "#{SPECLIBDIR}/**/*.rb" )
73
105
 
74
106
  TESTDIR = BASEDIR + 'tests'
75
- TEST_FILES = Pathname.glob( TESTDIR + '**/*.tests.rb' ).delete_if {|item| item =~ /\.svn/ }
107
+ TEST_FILES = Rake::FileList.new( "#{TESTDIR}/**/*.tests.rb" )
76
108
 
77
109
  RAKE_TASKDIR = BASEDIR + 'rake'
78
- RAKE_TASKLIBS = Pathname.glob( RAKE_TASKDIR + '*.rb' )
110
+ RAKE_TASKLIBS = Rake::FileList.new( "#{RAKE_TASKDIR}/*.rb" )
111
+ PKG_TASKLIBS = Rake::FileList.new( "#{RAKE_TASKDIR}/{191_compat,helpers,packaging,rdoc,testing}.rb" )
112
+ PKG_TASKLIBS.include( "#{RAKE_TASKDIR}/manual.rb" ) if MANUALDIR.exist?
113
+
114
+ RAKE_TASKLIBS_URL = 'http://repo.deveiate.org/rake-tasklibs'
79
115
 
80
116
  LOCAL_RAKEFILE = BASEDIR + 'Rakefile.local'
81
117
 
82
- EXTRA_PKGFILES = []
118
+ EXTRA_PKGFILES = Rake::FileList.new
83
119
 
84
120
  RELEASE_FILES = TEXT_FILES +
85
121
  SPEC_FILES +
@@ -91,7 +127,12 @@ RELEASE_FILES = TEXT_FILES +
91
127
  RAKE_TASKLIBS +
92
128
  EXTRA_PKGFILES
93
129
 
94
- RELEASE_FILES << LOCAL_RAKEFILE if LOCAL_RAKEFILE.exist?
130
+
131
+ RELEASE_FILES << LOCAL_RAKEFILE.to_s if LOCAL_RAKEFILE.exist?
132
+
133
+ RELEASE_ANNOUNCE_ADDRESSES = [
134
+ "Ruby-Talk List <ruby-talk@ruby-lang.org>",
135
+ ]
95
136
 
96
137
  COVERAGE_MINIMUM = ENV['COVERAGE_MINIMUM'] ? Float( ENV['COVERAGE_MINIMUM'] ) : 85.0
97
138
  RCOV_EXCLUDES = 'spec,tests,/Library/Ruby,/var/lib,/usr/local/lib'
@@ -104,39 +145,61 @@ RCOV_OPTS = [
104
145
  ]
105
146
 
106
147
 
107
- # Subversion constants -- directory names for releases and tags
108
- SVN_TRUNK_DIR = 'trunk'
109
- SVN_RELEASES_DIR = 'releases'
110
- SVN_BRANCHES_DIR = 'branches'
111
- SVN_TAGS_DIR = 'tags'
112
-
113
- SVN_DOTDIR = BASEDIR + '.svn'
114
- SVN_ENTRIES = SVN_DOTDIR + 'entries'
148
+ ### Load some task libraries that need to be loaded early
149
+ if !RAKE_TASKDIR.exist?
150
+ $stderr.puts "It seems you don't have the build task directory. Shall I fetch it "
151
+ ans = readline( "for you? [y]" )
152
+ ans = 'y' if !ans.nil? && ans.empty?
153
+
154
+ if ans =~ /^y/i
155
+ $stderr.puts "Okay, fetching #{RAKE_TASKLIBS_URL} into #{RAKE_TASKDIR}..."
156
+ system 'hg', 'clone', RAKE_TASKLIBS_URL, "./#{RAKE_TASKDIR}"
157
+ if ! $?.success?
158
+ fail "Damn. That didn't work. Giving up; maybe try manually fetching?"
159
+ end
160
+ else
161
+ $stderr.puts "Then I'm afraid I can't continue. Best of luck."
162
+ fail "Rake tasklibs not present."
163
+ end
115
164
 
165
+ RAKE_TASKLIBS.include( "#{RAKE_TASKDIR}/*.rb" )
166
+ end
116
167
 
117
- ### Load some task libraries that need to be loaded early
118
168
  require RAKE_TASKDIR + 'helpers.rb'
119
- require RAKE_TASKDIR + 'svn.rb'
120
- require RAKE_TASKDIR + 'verifytask.rb'
169
+ include RakefileHelpers
121
170
 
122
- # Define some constants that depend on the 'svn' tasklib
123
- PKG_BUILD = get_svn_rev( BASEDIR ) || 0
171
+ # Set the build ID if the mercurial executable is available
172
+ if hg = which( 'hg' )
173
+ id = `#{hg} id -n`.chomp
174
+ PKG_BUILD = (id.chomp[ /^[[:xdigit:]]+/ ] || '1')
175
+ else
176
+ PKG_BUILD = '0'
177
+ end
124
178
  SNAPSHOT_PKG_NAME = "#{PKG_FILE_NAME}.#{PKG_BUILD}"
125
179
  SNAPSHOT_GEM_NAME = "#{SNAPSHOT_PKG_NAME}.gem"
126
180
 
127
181
  # Documentation constants
128
- RDOCDIR = DOCSDIR + 'api'
182
+ API_DOCSDIR = DOCSDIR + 'api'
183
+ README_FILE = TEXT_FILES.find {|path| path =~ /^README/ } || 'README'
129
184
  RDOC_OPTIONS = [
130
- '-w', '4',
131
- '-SHN',
132
- '-i', '.',
133
- '-m', 'README',
134
- '-t', PKG_NAME,
135
- '-W', 'http://deveiate.org/projects/Ruby-LinkParser/browser/trunk/'
185
+ '--tab-width=4',
186
+ '--show-hash',
187
+ '--include', BASEDIR.to_s,
188
+ "--main=#{README_FILE}",
189
+ "--title=#{PKG_NAME}",
190
+ ]
191
+ YARD_OPTIONS = [
192
+ '--use-cache',
193
+ '--protected',
194
+ '-r', README_FILE,
195
+ '--exclude', 'extconf\\.rb',
196
+ '--files', 'ChangeLog,LICENSE',
197
+ '--output-dir', API_DOCSDIR.to_s,
198
+ '--title', "#{PKG_NAME} #{PKG_VERSION}",
136
199
  ]
137
200
 
138
201
  # Release constants
139
- SMTP_HOST = 'mail.faeriemud.org'
202
+ SMTP_HOST = "mail.faeriemud.org"
140
203
  SMTP_PORT = 465 # SMTP + SSL
141
204
 
142
205
  # Project constants
@@ -146,9 +209,7 @@ PROJECT_DOCDIR = "#{PROJECT_PUBDIR}/#{PKG_NAME}"
146
209
  PROJECT_SCPPUBURL = "#{PROJECT_HOST}:#{PROJECT_PUBDIR}"
147
210
  PROJECT_SCPDOCURL = "#{PROJECT_HOST}:#{PROJECT_DOCDIR}"
148
211
 
149
- # Rubyforge stuff
150
- RUBYFORGE_GROUP = 'deveiate'
151
- RUBYFORGE_PROJECT = 'linkparser'
212
+ GEM_PUBHOST = 'rubygems.org'
152
213
 
153
214
  # Gem dependencies: gemname => version
154
215
  DEPENDENCIES = {
@@ -156,23 +217,21 @@ DEPENDENCIES = {
156
217
 
157
218
  # Developer Gem dependencies: gemname => version
158
219
  DEVELOPMENT_DEPENDENCIES = {
159
- 'amatch' => '>= 0.2.3',
160
- 'rake' => '>= 0.8.1',
161
- 'rcodetools' => '>= 0.7.0.0',
162
- 'rcov' => '>= 0',
163
- 'RedCloth' => '>= 4.0.3',
164
- 'rspec' => '>= 0',
165
- 'rubyforge' => '>= 0',
166
- 'termios' => '>= 0',
167
- 'text-format' => '>= 1.0.0',
168
- 'tmail' => '>= 1.2.3.1',
169
- 'ultraviolet' => '>= 0.10.2',
170
- 'libxml-ruby' => '>= 0.8.3',
220
+ 'rake' => '~> 0.8.7',
221
+ 'rcodetools' => '~> 0.7.0.0',
222
+ 'rcov' => '~> 0.8.1.2.0',
223
+ 'yard' => '~> 0.6.1',
224
+ 'RedCloth' => '~> 4.2.3',
225
+ 'rspec' => '~> 2.0.1',
226
+ 'ruby-termios' => '~> 0.9.6',
227
+ 'text-format' => '~> 1.0.0',
228
+ 'tmail' => '~> 1.2.3.1',
229
+ 'rake-compiler' => '~> 0.7.1',
171
230
  }
172
231
 
173
232
  # Non-gem requirements: packagename => version
174
233
  REQUIREMENTS = {
175
- 'link-grammar' => '>= 4.4.2',
234
+ 'link-grammar' => '>= 4.7.0',
176
235
  }
177
236
 
178
237
  # RubyGem specification
@@ -189,59 +248,54 @@ GEMSPEC = Gem::Specification.new do |gem|
189
248
  "about the link-grammar library.",
190
249
  ].join( "\n" )
191
250
 
192
- gem.authors = 'Michael Granger'
193
- gem.email = 'ged@FaerieMUD.org'
251
+ gem.authors = ["Martin Chase", "Michael Granger"]
252
+ gem.email = ["stillflame@FaerieMUD.org", "ged@FaerieMUD.org"]
194
253
  gem.homepage = 'http://deveiate.org/projects/Ruby-LinkParser/'
195
- gem.rubyforge_project = RUBYFORGE_PROJECT
254
+ gem.licenses = ["BSD"]
196
255
 
197
256
  gem.has_rdoc = true
198
257
  gem.rdoc_options = RDOC_OPTIONS
199
- gem.extra_rdoc_files = %w[ChangeLog README LICENSE]
258
+ gem.extra_rdoc_files = TEXT_FILES - [ 'Rakefile' ]
200
259
 
201
260
  gem.bindir = BINDIR.relative_path_from(BASEDIR).to_s
202
- gem.executables = BIN_FILES.select {|pn| pn.executable? }.
203
- collect {|pn| pn.relative_path_from(BINDIR).to_s }
261
+ gem.executables = BIN_FILES.select {|pn| File.executable?(pn) }.
262
+ collect {|pn| File.basename(pn) }
263
+ gem.require_paths << EXTDIR.relative_path_from( BASEDIR ).to_s if EXTDIR.exist?
204
264
 
205
265
  if EXTCONF.exist?
206
266
  gem.extensions << EXTCONF.relative_path_from( BASEDIR ).to_s
207
267
  end
208
268
 
209
- gem.files = RELEASE_FILES.
210
- collect {|f| f.relative_path_from(BASEDIR).to_s }
211
- gem.test_files = SPEC_FILES.
212
- collect {|f| f.relative_path_from(BASEDIR).to_s }
213
-
269
+ gem.files = RELEASE_FILES
270
+ gem.test_files = SPEC_FILES
271
+
272
+ # signing key and certificate chain
273
+ gem.signing_key = '/Volumes/Keys/ged-private_gem_key.pem'
274
+ gem.cert_chain = [File.expand_path('~/.gem/ged-public_gem_cert.pem')]
275
+
276
+
277
+ gem.required_ruby_version = '>=1.8.7'
278
+
214
279
  DEPENDENCIES.each do |name, version|
215
280
  version = '>= 0' if version.length.zero?
216
281
  gem.add_runtime_dependency( name, version )
217
282
  end
218
-
219
- # Developmental dependencies don't work as of RubyGems 1.2.0
220
- unless Gem::Version.new( Gem::RubyGemsVersion ) <= Gem::Version.new( "1.2.0" )
221
- DEVELOPMENT_DEPENDENCIES.each do |name, version|
222
- version = '>= 0' if version.length.zero?
223
- gem.add_development_dependency( name, version )
224
- end
225
- end
226
-
283
+
227
284
  REQUIREMENTS.each do |name, version|
228
285
  gem.requirements << [ name, version ].compact.join(' ')
229
286
  end
230
287
  end
231
288
 
232
- # Manual-generation config
233
- MANUALDIR = DOCSDIR + 'manual'
234
-
235
289
  $trace = Rake.application.options.trace ? true : false
236
290
  $dryrun = Rake.application.options.dryrun ? true : false
237
-
291
+ $include_dev_dependencies = false
238
292
 
239
293
  # Load any remaining task libraries
240
294
  RAKE_TASKLIBS.each do |tasklib|
241
- next if tasklib =~ %r{/(helpers|svn|verifytask)\.rb$}
295
+ next if tasklib.to_s =~ %r{/helpers\.rb$}
242
296
  begin
243
297
  trace " loading tasklib %s" % [ tasklib ]
244
- require tasklib.expand_path
298
+ import tasklib
245
299
  rescue ScriptError => err
246
300
  fail "Task library '%s' failed to load: %s: %s" %
247
301
  [ tasklib, err.class.name, err.message ]
@@ -262,24 +316,20 @@ import LOCAL_RAKEFILE if LOCAL_RAKEFILE.exist?
262
316
  #####################################################################
263
317
 
264
318
  ### Default task
265
- task :default => [:clean, :local, :spec, :rdoc, :package]
319
+ task :default => [:clean, :local, :spec, :apidocs, :package]
266
320
 
267
321
  ### Task the local Rakefile can append to -- no-op by default
268
322
  task :local
269
323
 
270
-
271
324
  ### Task: clean
272
- CLEAN.include 'coverage'
273
- CLOBBER.include 'artifacts', 'coverage.info', PKGDIR
274
-
275
- # Target to hinge on ChangeLog updates
276
- file SVN_ENTRIES
325
+ CLEAN.include 'coverage', '**/*.orig', '**/*.rej'
326
+ CLOBBER.include 'artifacts', 'coverage.info', 'ChangeLog', PKGDIR
277
327
 
278
328
  ### Task: changelog
279
- file 'ChangeLog' => SVN_ENTRIES.to_s do |task|
329
+ file 'ChangeLog' do |task|
280
330
  log "Updating #{task.name}"
281
331
 
282
- changelog = make_svn_changelog()
332
+ changelog = make_changelog()
283
333
  File.open( task.name, 'w' ) do |fh|
284
334
  fh.print( changelog )
285
335
  end
@@ -290,15 +340,15 @@ end
290
340
  desc "Cruisecontrol build"
291
341
  task :cruise => [:clean, 'spec:quiet', :package] do |task|
292
342
  raise "Artifacts dir not set." if ARTIFACTS_DIR.to_s.empty?
293
- artifact_dir = ARTIFACTS_DIR.cleanpath + ENV['CC_BUILD_LABEL']
343
+ artifact_dir = ARTIFACTS_DIR.cleanpath + (CC_BUILD_LABEL || Time.now.strftime('%Y%m%d-%T'))
294
344
  artifact_dir.mkpath
295
-
345
+
296
346
  coverage = BASEDIR + 'coverage'
297
347
  if coverage.exist? && coverage.directory?
298
348
  $stderr.puts "Copying coverage stats..."
299
349
  FileUtils.cp_r( 'coverage', artifact_dir )
300
350
  end
301
-
351
+
302
352
  $stderr.puts "Copying packages..."
303
353
  FileUtils.cp_r( FileList['pkg/*'].to_a, artifact_dir )
304
354
  end
@@ -307,7 +357,7 @@ end
307
357
  desc "Update the build system to the latest version"
308
358
  task :update_build do
309
359
  log "Updating the build system"
310
- sh 'svn', 'up', RAKE_TASKDIR
360
+ run 'hg', '-R', RAKE_TASKDIR, 'pull', '-u'
311
361
  log "Updating the Rakefile"
312
362
  sh 'rake', '-f', RAKE_TASKDIR + 'Metarakefile'
313
363
  end