pluginfactory 1.0.4 → 1.0.5

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/ChangeLog CHANGED
@@ -1,351 +1,102 @@
1
- -- Wed, 25 Feb 2009 17:50:55 -0000 by deveiant (r57) -----
2
- Changed: lib/pluginfactory.rb
1
+ 2004-03-09 22:32 Michael Granger <ged@FaerieMUD.org>
3
2
 
4
- Incrementing library version.
3
+ * makedist.rb (1.1), utils.rb (1.1), docs/.cvsignore (1.1),
4
+ docs/CATALOG (1.1), docs/makedocs.rb (1.1):
5
5
 
6
+ Initial checkin.
7
+
8
+ 2004-03-08 00:07 Michael Granger <ged@FaerieMUD.org>
6
9
 
7
- -- Wed, 25 Feb 2009 16:52:20 -0000 by deveiant (r56) -----
8
- Added: spec/lib (new)
9
- spec/lib/helpers.rb (new)
10
- Changed: lib/pluginfactory.rb
11
- spec/pluginfactory_spec.rb
10
+ * tests/: othersub.rb (1.2), dir/deepsubofmybase.rb (1.2):
12
11
 
13
- * Fixes for Ruby 1.9.1.
14
- * Replace home-grown logger stuff with Logger library
12
+ - Fixed class/file agreement.
13
+
14
+ 2004-03-08 00:06 Michael Granger <ged@FaerieMUD.org>
15
15
 
16
+ * tests/mybase.rb (1.2):
16
17
 
17
- -- Mon, 23 Feb 2009 06:34:03 -0000 by deveiant (r55) -----
18
- Changed: README
19
- Rakefile
20
- utils.rb
21
- project.yml
22
- spec/pluginfactory_spec.rb
18
+ - Fixed derivativeDirs method.
19
+
20
+ 2004-03-08 00:05 Michael Granger <ged@FaerieMUD.org>
23
21
 
24
- Start of fixes for 1.9.1.
22
+ * lib/pluginfactory.rb (1.4):
25
23
 
24
+ - Documentation additions
25
+
26
+ - Refactored path-search code
27
+
28
+ 2004-03-07 21:30 Michael Granger <ged@FaerieMUD.org>
26
29
 
27
- -- Wed, 13 Aug 2008 21:58:41 -0000 by deveiant (r52) -----
28
- Changed: lib/pluginfactory.rb
29
- Rakefile
30
- utils.rb
31
- spec/pluginfactory_spec.rb
30
+ * test.rb (1.3):
32
31
 
33
- Updating tags on new files.
32
+ - Added a hook into -d that turns on logging.
33
+
34
+ 2004-03-07 19:13 Martin Chase <stillflame@FaerieMUD.org>
34
35
 
36
+ * README (1.4):
35
37
 
36
- -- Wed, 13 Aug 2008 21:57:47 -0000 by deveiant (r51) -----
37
- Deleted: rake
38
+ no, this is not using the default install.rb installation process
39
+
40
+ 2004-03-07 19:07 Martin Chase <stillflame@FaerieMUD.org>
38
41
 
39
- Removing old rake tasklib dir
42
+ * lib/pluginfactory.rb (1.3):
40
43
 
44
+ FactoryError now inherits from RuntimeError
45
+
46
+ 2004-03-07 19:06 Martin Chase <stillflame@FaerieMUD.org>
41
47
 
42
- -- Wed, 13 Aug 2008 21:57:18 -0000 by deveiant (r50) -----
43
- Added: project.yml (new)
44
- Changed: README
45
- /trunk
46
- LICENSE
47
- Rakefile
48
+ * test.rb (1.2):
48
49
 
49
- Converting to the new build system
50
+ filling in
51
+
52
+ 2004-03-07 19:05 Martin Chase <stillflame@FaerieMUD.org>
50
53
 
54
+ * tests/: mybase.rb (1.1), othersub.rb (1.1), subofmybase.rb (1.1),
55
+ dir/deepsubofmybase.rb (1.1):
51
56
 
52
- -- Wed, 26 Mar 2008 16:01:36 -0000 by deveiant (r48) -----
53
- Changed: Rakefile
54
- rake/publishing.rb
55
- rake/svn.rb
57
+ initial import
58
+
59
+ 2004-03-07 15:42 Martin Chase <stillflame@FaerieMUD.org>
56
60
 
57
- * More packaging/publishing fixes.
61
+ * README (1.3):
58
62
 
63
+ reformatted
64
+
65
+ 2004-03-07 15:41 Martin Chase <stillflame@FaerieMUD.org>
59
66
 
60
- -- Tue, 25 Mar 2008 21:17:07 -0000 by deveiant (r46) -----
61
- Changed: /trunk
62
- Rakefile
63
- rake/publishing.rb
67
+ * install.rb (1.2):
64
68
 
65
- * Fixed announcement-sending task to use SMTP+SSL via a monkeypatch to net/smtp. (Maybe package it
66
- up and upstream later?)
69
+ filled in
70
+
71
+ 2004-03-07 14:36 Martin Chase <stillflame@FaerieMUD.org>
67
72
 
73
+ * COPYRIGHT (1.2), README (1.2):
68
74
 
69
- -- Tue, 25 Mar 2008 19:36:11 -0000 by deveiant (r45) -----
70
- Added: experiments (new)
71
- experiments/logger_output.rb (new)
72
- rake/publishing.rb (new)
73
- Changed: README
74
- lib/pluginfactory.rb
75
- /trunk
76
- MANIFEST
77
- LICENSE
78
- Rakefile (and 4 other/s)
79
- Deleted: .gemspec
80
- makedist.rb
81
- install.rb
82
- .cvsignore
83
- docs
75
+ filled in
76
+
77
+ 2004-03-07 10:49 Martin Chase <stillflame@FaerieMUD.org>
84
78
 
85
- * Packaging and publication tasks updated.
86
- * Updated documentation.
79
+ * lib/pluginfactory.rb (1.2):
87
80
 
81
+ cleaned out ties to other modules
82
+
83
+ 2004-03-07 09:33 Martin Chase <stillflame@FaerieMUD.org>
88
84
 
89
- -- Fri, 27 Jul 2007 06:53:27 -0000 by deveiant (r43) -----
90
- Deleted: test.rb
85
+ * lib/: factory.rb (1.2), pluginfactory.rb (1.1):
91
86
 
92
- Removed test runner script
87
+ renaming
88
+
89
+ 2004-03-07 09:31 Martin Chase <stillflame@FaerieMUD.org>
93
90
 
91
+ * COPYRIGHT (1.1), README (1.1), install.rb (1.1), test.rb (1.1),
92
+ lib/factory.rb (1.1):
94
93
 
95
- -- Fri, 27 Jul 2007 06:50:56 -0000 by deveiant (r42) -----
96
- Added: LICENSE
97
- -> renamed from /trunk/COPYRIGHT@r41
98
- Rakefile (new)
99
- rake (new)
100
- rake/helpers.rb (new)
101
- spec/spec.opts (new)
102
- rake/svn.rb (new) (and 4 other/s)
103
- Changed: lib/pluginfactory.rb
104
- /trunk
105
- test.rb
106
- Deleted: tests
107
- COPYRIGHT
108
-
109
- Converted test::unit tests to RSpec
110
-
111
-
112
- -- Tue, 13 Mar 2007 18:34:19 -0000 by deveiant (r40) -----
113
- Changed: /trunk
114
- makedist.rb
115
-
116
- Bumping project-version and fixing makedist problems.
117
-
118
-
119
- -- Tue, 13 Mar 2007 18:20:58 -0000 by deveiant (r38) -----
120
- Changed: lib/pluginfactory.rb
121
-
122
- * Log list of candidate subdirs
123
-
124
-
125
- -- Thu, 22 Feb 2007 23:03:05 -0000 by deveiant (r37) -----
126
- Changed: lib/pluginfactory.rb
127
-
128
-
129
- * Support #derivative_dirs method as well as the camelCased variant.
130
-
131
-
132
- -- Sat, 01 Jul 2006 18:50:52 -0000 by ged (r36) -----
133
- Changed: lib/pluginfactory.rb
134
- docs/makedocs.rb
135
- test.rb
136
-
137
-
138
- * Converted camelCased methods to under_barred ones.
139
-
140
- * Fixed tests.
141
-
142
-
143
- -- Sat, 05 Mar 2005 00:32:10 -0000 by ged (r35) -----
144
- Changed: /trunk
145
-
146
- Incremented project version attribute
147
-
148
-
149
- -- Sat, 05 Mar 2005 00:25:54 -0000 by ged (r33) -----
150
- Changed: makedist.rb
151
-
152
- Merged changes from project-utils version
153
-
154
-
155
- -- Sat, 05 Mar 2005 00:21:05 -0000 by ged (r32) -----
156
- Changed: lib/pluginfactory.rb
157
-
158
- - Made load failures raise FactoryErrors as intended instead of RuntimeErrors.
159
-
160
-
161
- -- Sun, 21 Nov 2004 17:14:13 -0000 by ged (r31) -----
162
- Changed: utils.rb
163
- install.rb
164
-
165
- -- Updated project-utils files
166
-
167
-
168
- -- Sun, 21 Nov 2004 17:02:59 -0000 by ged (r30) -----
169
- Added: .gemspec (new)
170
- Changed: /trunk
171
- MANIFEST
172
-
173
- -- Gemified
174
- -- Fixed missing utils.rb in MANIFEST
175
- -- Added project-spec properties to the root dir.
176
-
177
-
178
- -- Wed, 08 Sep 2004 04:51:57 -0000 by ged (r28) -----
179
- Added: docs/makedocs.rb (new)
180
- utils.rb (new)
181
- makedist.rb (new)
182
- install.rb (new)
183
-
184
- - Hmmm... that didn't work. Copying over new versions of the util scripts until
185
- I figure out how the hell to do what I want.
186
-
187
-
188
- -- Wed, 08 Sep 2004 04:27:06 -0000 by ged (r27) -----
189
- Deleted: docs/makedocs.rb
190
- utils.rb
191
- makedist.rb
192
- install.rb
193
-
194
- - Replacing with versions from project-utils (experimental -- may just have to
195
- re-check them in)
196
-
197
-
198
- -- Tue, 24 Aug 2004 01:38:10 -0000 by ged (r26) -----
199
- Changed: lib/pluginfactory.rb
200
-
201
- - Added a very important property
202
-
203
-
204
- -- Tue, 24 Aug 2004 01:36:11 -0000 by ged (r25) -----
205
- Changed: lib/pluginfactory.rb
206
-
207
- - Added keywords property to lib/pluginfactory.rb
208
-
209
-
210
- -- Tue, 24 Aug 2004 01:35:26 -0000 by ged (r24) -----
211
- Changed: install.rb
212
-
213
- - Fixed String =~ String warning
214
-
215
-
216
- -- Tue, 24 Aug 2004 01:34:13 -0000 by ged (r23) -----
217
- Changed: install.rb
218
-
219
- - Added bangheader
220
-
221
-
222
- -- Tue, 24 Aug 2004 01:33:14 -0000 by ged (r22) -----
223
- Changed: test.rb
224
-
225
- - Easyified bangheader
226
-
227
-
228
- -- Wed, 10 Mar 2004 06:36:15 -0000 by deveiant (r20) -----
229
- Changed: ChangeLog
230
-
231
- Updated for tag release_0_01
232
-
233
-
234
- -- Wed, 10 Mar 2004 06:34:00 -0000 by deveiant (r19) -----
235
- Added: .cvsignore (new)
236
- .irbrc (new)
237
- docs/makedocs.rb (new)
238
- docs/CATALOG (new)
239
- utils.rb (new)
240
- makedist.rb (new) (and 5 other/s)
241
- Changed: /trunk
242
-
243
- Initial checkin.
244
-
245
-
246
- -- Mon, 08 Mar 2004 08:07:38 -0000 by deveiant (r18) -----
247
- Changed: tests/dir/deepsubofmybase.rb
248
- tests/othersub.rb
249
-
250
- - Fixed class/file agreement.
251
-
252
-
253
- -- Mon, 08 Mar 2004 08:06:24 -0000 by deveiant (r17) -----
254
- Changed: tests/mybase.rb
255
-
256
- - Fixed derivativeDirs method.
257
-
258
-
259
- -- Mon, 08 Mar 2004 08:05:38 -0000 by deveiant (r16) -----
260
- Changed: lib/pluginfactory.rb
261
-
262
- - Documentation additions
263
- - Refactored path-search code
264
-
265
-
266
- -- Mon, 08 Mar 2004 05:30:01 -0000 by deveiant (r15) -----
267
- Changed: test.rb
268
-
269
- - Added a hook into -d that turns on logging.
270
-
271
-
272
- -- Mon, 08 Mar 2004 03:13:38 -0000 by stillflame (r14) -----
273
- Changed: README
274
-
275
- no, this is not using the default install.rb installation process
276
-
277
-
278
- -- Mon, 08 Mar 2004 03:07:27 -0000 by stillflame (r13) -----
279
- Changed: lib/pluginfactory.rb
280
-
281
- FactoryError now inherits from RuntimeError
282
-
283
-
284
- -- Mon, 08 Mar 2004 03:06:05 -0000 by stillflame (r12) -----
285
- Changed: test.rb
286
-
287
- filling in
288
-
289
-
290
- -- Mon, 08 Mar 2004 03:05:36 -0000 by stillflame (r11) -----
291
- Added: tests/dir/deepsubofmybase.rb (new)
292
- tests/othersub.rb (new)
293
- tests/dir (new)
294
- tests (new)
295
- tests/subofmybase.rb (new)
296
- tests/mybase.rb (new) (and 1 other/s)
297
-
298
- initial import
299
-
300
-
301
- -- Sun, 07 Mar 2004 23:42:11 -0000 by stillflame (r10) -----
302
- Changed: README
303
-
304
- reformatted
305
-
306
-
307
- -- Sun, 07 Mar 2004 23:41:51 -0000 by stillflame (r9) -----
308
- Changed: install.rb
309
-
310
- filled in
311
-
312
-
313
- -- Sun, 07 Mar 2004 22:36:44 -0000 by stillflame (r8) -----
314
- Changed: README
315
- COPYRIGHT
316
-
317
- filled in
318
-
319
-
320
- -- Sun, 07 Mar 2004 18:49:23 -0000 by stillflame (r7) -----
321
- Changed: lib/pluginfactory.rb
322
-
323
- cleaned out ties to other modules
324
-
325
-
326
- -- Sun, 07 Mar 2004 17:33:10 -0000 by stillflame (r6) -----
327
- Added: lib/pluginfactory.rb (new)
328
- Deleted: lib/factory.rb
329
-
330
- renaming
331
-
332
-
333
- -- Sun, 07 Mar 2004 17:31:18 -0000 by stillflame (r2) -----
334
- Added: README (new)
335
- lib/factory.rb (new)
336
- test.rb (new)
337
- lib (new)
338
- COPYRIGHT (new)
339
- install.rb (new) (and 1 other/s)
340
-
341
- Initial revision
342
-
343
-
344
- -- Sun, 07 Mar 2004 17:31:18 -0000 by unknown (r1) -----
345
- Added: /trunk (new)
346
- /branches (new)
347
- /tags (new)
348
-
349
- New repository initialized by cvs2svn.
94
+ Initial revision
95
+
96
+ 2004-03-07 09:31 Martin Chase <stillflame@FaerieMUD.org>
350
97
 
98
+ * COPYRIGHT (1.1.1.1), README (1.1.1.1), install.rb (1.1.1.1),
99
+ test.rb (1.1.1.1), lib/factory.rb (1.1.1.1) (utags: release):
351
100
 
101
+ initial stripping out of Arrow/MUES
102
+
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008, Michael Granger
1
+ Copyright (c) 2008, 2009 Michael Granger and Martin Chase
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
data/README CHANGED
@@ -187,10 +187,6 @@ this might generate a log that looks like:
187
187
  E, [...] ERROR -- : Couldn't find a DataDriver named 'ringbuffer':
188
188
  tried ["ringbufferdatadriver", "ringbufferDataDriver", "ringbuffer"]
189
189
 
190
- == Subversion ID
191
-
192
- $Id: README 55 2009-02-23 06:34:03Z deveiant $
193
-
194
190
  == Authors
195
191
 
196
192
  * Martin Chase <stillflame@FaerieMUD.org>
data/Rakefile CHANGED
@@ -7,6 +7,7 @@
7
7
  # Copyright (c) 2007-2009 The FaerieMUD Consortium
8
8
  #
9
9
  # Authors:
10
+ # * Martin Chase <stillflame@FaerieMUD.org>
10
11
  # * Michael Granger <ged@FaerieMUD.org>
11
12
  #
12
13
 
@@ -21,13 +22,23 @@ BEGIN {
21
22
  $LOAD_PATH.unshift( extdir.to_s ) unless $LOAD_PATH.include?( extdir.to_s )
22
23
  }
23
24
 
25
+ begin
26
+ require 'readline'
27
+ include Readline
28
+ rescue LoadError
29
+ # Fall back to a plain prompt
30
+ def readline( text )
31
+ $stderr.print( text.chomp )
32
+ return $stdin.gets
33
+ end
34
+ end
35
+
24
36
  require 'rbconfig'
25
37
  require 'rake'
26
- require 'rake/rdoctask'
27
38
  require 'rake/testtask'
28
39
  require 'rake/packagetask'
29
40
  require 'rake/clean'
30
- require 'rake/191_compat.rb'
41
+ # require 'rake/191_compat.rb'
31
42
 
32
43
  $dryrun = false
33
44
 
@@ -40,10 +51,16 @@ DOCSDIR = BASEDIR + 'docs'
40
51
  PKGDIR = BASEDIR + 'pkg'
41
52
  DATADIR = BASEDIR + 'data'
42
53
 
54
+ MANUALDIR = DOCSDIR + 'manual'
55
+
43
56
  PROJECT_NAME = 'PluginFactory'
44
57
  PKG_NAME = PROJECT_NAME.downcase
45
58
  PKG_SUMMARY = 'A mixin for making plugin classes'
46
59
 
60
+ # Cruisecontrol stuff
61
+ CC_BUILD_LABEL = ENV['CC_BUILD_LABEL']
62
+ CC_BUILD_ARTIFACTS = ENV['CC_BUILD_ARTIFACTS'] || 'artifacts'
63
+
47
64
  VERSION_FILE = LIBDIR + 'pluginfactory.rb'
48
65
  if VERSION_FILE.exist? && buildrev = ENV['CC_BUILD_LABEL']
49
66
  PKG_VERSION = VERSION_FILE.read[ /VERSION\s*=\s*['"](\d+\.\d+\.\d+)['"]/, 1 ] + '.' + buildrev
@@ -56,30 +73,39 @@ end
56
73
  PKG_FILE_NAME = "#{PKG_NAME.downcase}-#{PKG_VERSION}"
57
74
  GEM_FILE_NAME = "#{PKG_FILE_NAME}.gem"
58
75
 
76
+ # Universal VCS constants
77
+ DEFAULT_EDITOR = 'vi'
78
+ COMMIT_MSG_FILE = 'commit-msg.txt'
79
+ FILE_INDENT = " " * 12
80
+ LOG_INDENT = " " * 3
81
+
59
82
  EXTCONF = EXTDIR + 'extconf.rb'
60
83
 
61
- ARTIFACTS_DIR = Pathname.new( ENV['CC_BUILD_ARTIFACTS'] || 'artifacts' )
84
+ ARTIFACTS_DIR = Pathname.new( CC_BUILD_ARTIFACTS )
62
85
 
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/ }
86
+ TEXT_FILES = Rake::FileList.new( %w[Rakefile ChangeLog README LICENSE] )
87
+ BIN_FILES = Rake::FileList.new( "#{BINDIR}/*" )
88
+ LIB_FILES = Rake::FileList.new( "#{LIBDIR}/**/*.rb" )
89
+ EXT_FILES = Rake::FileList.new( "#{EXTDIR}/**/*.{c,h,rb}" )
90
+ DATA_FILES = Rake::FileList.new( "#{DATADIR}/**/*" )
68
91
 
69
92
  SPECDIR = BASEDIR + 'spec'
70
93
  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/ }
94
+ SPEC_FILES = Rake::FileList.new( "#{SPECDIR}/**/*_spec.rb", "#{SPECLIBDIR}/**/*.rb" )
73
95
 
74
96
  TESTDIR = BASEDIR + 'tests'
75
- TEST_FILES = Pathname.glob( TESTDIR + '**/*.tests.rb' ).delete_if {|item| item =~ /\.svn/ }
97
+ TEST_FILES = Rake::FileList.new( "#{TESTDIR}/**/*.tests.rb" )
76
98
 
77
99
  RAKE_TASKDIR = BASEDIR + 'rake'
78
- RAKE_TASKLIBS = Pathname.glob( RAKE_TASKDIR + '*.rb' )
100
+ RAKE_TASKLIBS = Rake::FileList.new( "#{RAKE_TASKDIR}/*.rb" )
101
+ PKG_TASKLIBS = Rake::FileList.new( "#{RAKE_TASKDIR}/{191_compat,helpers,packaging,rdoc,testing}.rb" )
102
+ PKG_TASKLIBS.include( "#{RAKE_TASKDIR}/manual.rb" ) if MANUALDIR.exist?
103
+
104
+ RAKE_TASKLIBS_URL = 'http://repo.deveiate.org/rake-tasklibs'
79
105
 
80
106
  LOCAL_RAKEFILE = BASEDIR + 'Rakefile.local'
81
107
 
82
- EXTRA_PKGFILES = []
108
+ EXTRA_PKGFILES = Rake::FileList.new
83
109
 
84
110
  RELEASE_FILES = TEXT_FILES +
85
111
  SPEC_FILES +
@@ -91,7 +117,8 @@ RELEASE_FILES = TEXT_FILES +
91
117
  RAKE_TASKLIBS +
92
118
  EXTRA_PKGFILES
93
119
 
94
- RELEASE_FILES << LOCAL_RAKEFILE if LOCAL_RAKEFILE.exist?
120
+
121
+ RELEASE_FILES << LOCAL_RAKEFILE.to_s if LOCAL_RAKEFILE.exist?
95
122
 
96
123
  COVERAGE_MINIMUM = ENV['COVERAGE_MINIMUM'] ? Float( ENV['COVERAGE_MINIMUM'] ) : 85.0
97
124
  RCOV_EXCLUDES = 'spec,tests,/Library/Ruby,/var/lib,/usr/local/lib'
@@ -104,23 +131,35 @@ RCOV_OPTS = [
104
131
  ]
105
132
 
106
133
 
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'
134
+ ### Load some task libraries that need to be loaded early
135
+ if !RAKE_TASKDIR.exist?
136
+ $stderr.puts "It seems you don't have the build task directory. Shall I fetch it "
137
+ ans = readline( "for you? [y]" )
138
+ ans = 'y' if !ans.nil? && ans.empty?
139
+
140
+ if ans =~ /^y/i
141
+ $stderr.puts "Okay, fetching #{RAKE_TASKLIBS_URL} into #{RAKE_TASKDIR}..."
142
+ system 'hg', 'clone', RAKE_TASKLIBS_URL, RAKE_TASKDIR
143
+ if ! $?.success?
144
+ fail "Damn. That didn't work. Giving up; maybe try manually fetching?"
145
+ end
146
+ else
147
+ $stderr.puts "Then I'm afraid I can't continue. Best of luck."
148
+ fail "Rake tasklibs not present."
149
+ end
115
150
 
151
+ RAKE_TASKLIBS.include( "#{RAKE_TASKDIR}/*.rb" )
152
+ end
116
153
 
117
- ### Load some task libraries that need to be loaded early
118
154
  require RAKE_TASKDIR + 'helpers.rb'
119
- require RAKE_TASKDIR + 'svn.rb'
120
- require RAKE_TASKDIR + 'verifytask.rb'
121
155
 
122
156
  # Define some constants that depend on the 'svn' tasklib
123
- PKG_BUILD = get_svn_rev( BASEDIR ) || 0
157
+ if hg = which( 'hg' )
158
+ id = IO.read('|-') or exec hg.to_s, 'id', '-n'
159
+ PKG_BUILD = id.chomp[ /^[[:xdigit:]]+/ ]
160
+ else
161
+ PKG_BUILD = 0
162
+ end
124
163
  SNAPSHOT_PKG_NAME = "#{PKG_FILE_NAME}.#{PKG_BUILD}"
125
164
  SNAPSHOT_GEM_NAME = "#{SNAPSHOT_PKG_NAME}.gem"
126
165
 
@@ -128,11 +167,11 @@ SNAPSHOT_GEM_NAME = "#{SNAPSHOT_PKG_NAME}.gem"
128
167
  RDOCDIR = DOCSDIR + 'api'
129
168
  RDOC_OPTIONS = [
130
169
  '-w', '4',
131
- '-SHN',
170
+ '-HN',
132
171
  '-i', '.',
133
172
  '-m', 'README',
134
173
  '-t', PKG_NAME,
135
- '-W', 'http://deveiate.org/projects/PluginFactory/browser/trunk/'
174
+ '-W', 'http://deveiate.org/projects/PluginFactory/browser/'
136
175
  ]
137
176
 
138
177
  # Release constants
@@ -156,18 +195,16 @@ DEPENDENCIES = {
156
195
 
157
196
  # Developer Gem dependencies: gemname => version
158
197
  DEVELOPMENT_DEPENDENCIES = {
159
- 'amatch' => '>= 0.2.3',
160
- 'rake' => '>= 0.8.1',
198
+ 'rake' => '>= 0.8.7',
161
199
  'rcodetools' => '>= 0.7.0.0',
162
- 'rcov' => '>= 0',
200
+ 'rcov' => '>= 0.8.1.2.0',
201
+ 'rdoc' => '>= 2.4.3',
163
202
  'RedCloth' => '>= 4.0.3',
164
- 'rspec' => '>= 0',
203
+ 'rspec' => '>= 1.2.6',
165
204
  'rubyforge' => '>= 0',
166
205
  'termios' => '>= 0',
167
206
  'text-format' => '>= 1.0.0',
168
207
  'tmail' => '>= 1.2.3.1',
169
- 'ultraviolet' => '>= 0.10.2',
170
- 'libxml-ruby' => '>= 0.8.3',
171
208
  }
172
209
 
173
210
  # Non-gem requirements: packagename => version
@@ -188,8 +225,8 @@ GEMSPEC = Gem::Specification.new do |gem|
188
225
  "which implement the interface for different underlying functionality.",
189
226
  ].join( "\n" )
190
227
 
191
- gem.authors = 'Michael Granger'
192
- gem.email = 'ged@FaerieMUD.org'
228
+ gem.authors = "Martin Chase, Michael Granger"
229
+ gem.email = ["stillflame@FaerieMUD.org", "ged@FaerieMUD.org"]
193
230
  gem.homepage = 'http://deveiate.org/projects/PluginFactory/'
194
231
  gem.rubyforge_project = RUBYFORGE_PROJECT
195
232
 
@@ -198,48 +235,37 @@ GEMSPEC = Gem::Specification.new do |gem|
198
235
  gem.extra_rdoc_files = %w[ChangeLog README LICENSE]
199
236
 
200
237
  gem.bindir = BINDIR.relative_path_from(BASEDIR).to_s
201
- gem.executables = BIN_FILES.select {|pn| pn.executable? }.
202
- collect {|pn| pn.relative_path_from(BINDIR).to_s }
238
+ gem.executables = BIN_FILES.select {|pn| File.executable?(pn) }.
239
+ collect {|pn| File.basename(pn) }
240
+ gem.require_paths << EXTDIR.relative_path_from( BASEDIR ).to_s if EXTDIR.exist?
203
241
 
204
242
  if EXTCONF.exist?
205
243
  gem.extensions << EXTCONF.relative_path_from( BASEDIR ).to_s
206
244
  end
207
245
 
208
- gem.files = RELEASE_FILES.
209
- collect {|f| f.relative_path_from(BASEDIR).to_s }
210
- gem.test_files = SPEC_FILES.
211
- collect {|f| f.relative_path_from(BASEDIR).to_s }
212
-
246
+ gem.files = RELEASE_FILES
247
+ gem.test_files = SPEC_FILES
248
+
213
249
  DEPENDENCIES.each do |name, version|
214
250
  version = '>= 0' if version.length.zero?
215
251
  gem.add_runtime_dependency( name, version )
216
252
  end
217
-
218
- # Developmental dependencies don't work as of RubyGems 1.2.0
219
- unless Gem::Version.new( Gem::RubyGemsVersion ) <= Gem::Version.new( "1.2.0" )
220
- DEVELOPMENT_DEPENDENCIES.each do |name, version|
221
- version = '>= 0' if version.length.zero?
222
- gem.add_development_dependency( name, version )
223
- end
224
- end
225
-
253
+
226
254
  REQUIREMENTS.each do |name, version|
227
255
  gem.requirements << [ name, version ].compact.join(' ')
228
256
  end
229
257
  end
230
258
 
231
- # Manual-generation config
232
- MANUALDIR = DOCSDIR + 'manual'
233
-
234
259
  $trace = Rake.application.options.trace ? true : false
235
260
  $dryrun = Rake.application.options.dryrun ? true : false
236
-
261
+ $include_dev_dependencies = false
237
262
 
238
263
  # Load any remaining task libraries
239
264
  RAKE_TASKLIBS.each do |tasklib|
240
- next if tasklib =~ %r{/(helpers|svn|verifytask)\.rb$}
265
+ next if tasklib.to_s =~ %r{/helpers\.rb$}
241
266
  begin
242
- require tasklib
267
+ trace " loading tasklib %s" % [ tasklib ]
268
+ import tasklib
243
269
  rescue ScriptError => err
244
270
  fail "Task library '%s' failed to load: %s: %s" %
245
271
  [ tasklib, err.class.name, err.message ]
@@ -265,19 +291,15 @@ task :default => [:clean, :local, :spec, :rdoc, :package]
265
291
  ### Task the local Rakefile can append to -- no-op by default
266
292
  task :local
267
293
 
268
-
269
294
  ### Task: clean
270
295
  CLEAN.include 'coverage'
271
296
  CLOBBER.include 'artifacts', 'coverage.info', PKGDIR
272
297
 
273
- # Target to hinge on ChangeLog updates
274
- file SVN_ENTRIES
275
-
276
298
  ### Task: changelog
277
- file 'ChangeLog' => SVN_ENTRIES.to_s do |task|
299
+ file 'ChangeLog' do |task|
278
300
  log "Updating #{task.name}"
279
301
 
280
- changelog = make_svn_changelog()
302
+ changelog = make_changelog()
281
303
  File.open( task.name, 'w' ) do |fh|
282
304
  fh.print( changelog )
283
305
  end
@@ -288,15 +310,15 @@ end
288
310
  desc "Cruisecontrol build"
289
311
  task :cruise => [:clean, 'spec:quiet', :package] do |task|
290
312
  raise "Artifacts dir not set." if ARTIFACTS_DIR.to_s.empty?
291
- artifact_dir = ARTIFACTS_DIR.cleanpath + ENV['CC_BUILD_LABEL']
313
+ artifact_dir = ARTIFACTS_DIR.cleanpath + (CC_BUILD_LABEL || Time.now.strftime('%Y%m%d-%T'))
292
314
  artifact_dir.mkpath
293
-
315
+
294
316
  coverage = BASEDIR + 'coverage'
295
317
  if coverage.exist? && coverage.directory?
296
318
  $stderr.puts "Copying coverage stats..."
297
319
  FileUtils.cp_r( 'coverage', artifact_dir )
298
320
  end
299
-
321
+
300
322
  $stderr.puts "Copying packages..."
301
323
  FileUtils.cp_r( FileList['pkg/*'].to_a, artifact_dir )
302
324
  end
@@ -305,7 +327,7 @@ end
305
327
  desc "Update the build system to the latest version"
306
328
  task :update_build do
307
329
  log "Updating the build system"
308
- sh 'svn', 'up', RAKE_TASKDIR
330
+ run 'hg', '-R', RAKE_TASKDIR, 'pull', '-u'
309
331
  log "Updating the Rakefile"
310
332
  sh 'rake', '-f', RAKE_TASKDIR + 'Metarakefile'
311
333
  end