darkfish-rdoc 1.1.4 → 1.1.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 +176 -117
- data/Rakefile +40 -3
- data/Rakefile.local +16 -0
- data/lib/rdoc/generator/darkfish.rb +11 -7
- data/lib/rdoc/generator/template/darkfish/classpage.rhtml +1 -2
- data/lib/rdoc/generator/template/darkfish/js/jquery.js +23 -23
- data/lib/rdoc/generator/template/darkfish/js/quicksearch.js +27 -5
- data/lib/rdoc/generator/template/darkfish/rdoc.css +4 -6
- data/rake/dependencies.rb +25 -11
- data/rake/helpers.rb +16 -12
- data/rake/manual.rb +435 -64
- data/rake/publishing.rb +15 -10
- data/rake/rdoc.rb +6 -2
- data/rake/svn.rb +64 -6
- data/rake/testing.rb +3 -2
- data/spec/rdoc/generator/darkfish_spec.rb +13 -2
- metadata +2 -2
data/rake/publishing.rb
CHANGED
@@ -105,10 +105,12 @@ begin
|
|
105
105
|
desc "Re-publish the release with the current version number"
|
106
106
|
task :rerelease => [ :publish, :announce, :project ]
|
107
107
|
|
108
|
+
desc "Re-run the publication tasks, but send notifications to debugging address"
|
108
109
|
task :test do
|
110
|
+
trace "Will publish privately"
|
109
111
|
$publish_privately = true
|
112
|
+
Rake::Task['release:rerelease'].invoke
|
110
113
|
end
|
111
|
-
task :test => [ :rerelease ]
|
112
114
|
|
113
115
|
|
114
116
|
desc "Generate the release notes"
|
@@ -127,13 +129,14 @@ begin
|
|
127
129
|
|
128
130
|
edit task.name
|
129
131
|
end
|
130
|
-
|
132
|
+
CLOBBER.include( RELEASE_NOTES_FILE )
|
131
133
|
|
132
134
|
|
135
|
+
desc "Publish the project documentation to #{PROJECT_HOST}"
|
133
136
|
task :project => [ :rdoc ] do
|
134
137
|
when_writing( "Publishing docs to #{PROJECT_SCPDOCURL}" ) do
|
135
|
-
run 'ssh', PROJECT_HOST, "rm -rf #{
|
136
|
-
run 'scp', '-qCr',
|
138
|
+
run 'ssh', PROJECT_HOST, "rm -rf #{PROJECT_DOCDIR}"
|
139
|
+
run 'scp', '-qCr', RDOCDIR, PROJECT_SCPDOCURL
|
137
140
|
end
|
138
141
|
when_writing( "Uploading packages") do
|
139
142
|
pkgs = Pathname.glob( PKGDIR + "#{PKG_FILE_NAME}.{gem,tar.gz,tar.bz2,zip}" )
|
@@ -180,7 +183,7 @@ begin
|
|
180
183
|
|
181
184
|
edit task.name
|
182
185
|
end
|
183
|
-
|
186
|
+
CLOBBER.include( RELEASE_ANNOUNCE_FILE )
|
184
187
|
|
185
188
|
|
186
189
|
desc 'Send out a release announcement'
|
@@ -188,12 +191,11 @@ begin
|
|
188
191
|
email = TMail::Mail.new
|
189
192
|
if $publish_privately
|
190
193
|
trace "Sending private announce mail"
|
191
|
-
email.to
|
194
|
+
email.to = 'rubymage@gmail.com'
|
192
195
|
else
|
193
196
|
trace "Sending public announce mail"
|
194
|
-
email.to
|
195
|
-
|
196
|
-
# email.bcc = 'rubymage@gmail.com'
|
197
|
+
email.to = 'Ruby-Talk List <ruby-talk@ruby-lang.org>'
|
198
|
+
email.bcc = 'rubymage@gmail.com'
|
197
199
|
end
|
198
200
|
email.from = GEMSPEC.email
|
199
201
|
email.subject = "[ANN] #{PKG_NAME} #{PKG_VERSION}"
|
@@ -229,7 +231,7 @@ begin
|
|
229
231
|
|
230
232
|
|
231
233
|
desc 'Publish the new release to RubyForge'
|
232
|
-
task :publish => [:
|
234
|
+
task :publish => [:clean, :package, :notes] do |task|
|
233
235
|
project = GEMSPEC.rubyforge_project
|
234
236
|
|
235
237
|
rf = RubyForge.new
|
@@ -299,5 +301,8 @@ rescue LoadError => err
|
|
299
301
|
task "release:notes" => :no_release_tasks
|
300
302
|
end
|
301
303
|
|
304
|
+
desc "Package up a release, publish it, and send out notifications"
|
302
305
|
task :release => 'release:default'
|
306
|
+
task :rerelease => 'release:rerelease'
|
307
|
+
task :testrelease => 'release:test'
|
303
308
|
|
data/rake/rdoc.rb
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
#
|
2
2
|
# RDoc Rake tasks for ThingFish
|
3
|
-
# $Id: rdoc.rb
|
3
|
+
# $Id: rdoc.rb 40 2008-08-27 21:58:00Z deveiant $
|
4
4
|
#
|
5
5
|
|
6
6
|
require 'rake/rdoctask'
|
7
7
|
$have_darkfish = false
|
8
8
|
|
9
|
+
# Append docs/lib to the load path if it exists for a locally-installed Darkfish
|
10
|
+
DOCSLIB = DOCSDIR + 'lib'
|
11
|
+
$LOAD_PATH.unshift( DOCSLIB.to_s ) if DOCSLIB.exist?
|
12
|
+
|
9
13
|
begin
|
10
14
|
require 'darkfish-rdoc'
|
11
15
|
$have_darkfish = true
|
@@ -21,7 +25,7 @@ rescue LoadError => err
|
|
21
25
|
end
|
22
26
|
|
23
27
|
Rake::RDocTask.new do |rdoc|
|
24
|
-
rdoc.rdoc_dir =
|
28
|
+
rdoc.rdoc_dir = RDOCDIR.expand_path.relative_path_from( Pathname.pwd ).to_s
|
25
29
|
rdoc.title = "#{PKG_NAME} - #{PKG_SUMMARY}"
|
26
30
|
rdoc.options += RDOC_OPTIONS + [ '-f', 'darkfish' ] if $have_darkfish
|
27
31
|
|
data/rake/svn.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Subversion Rake Tasks
|
3
|
-
# $Id: svn.rb
|
3
|
+
# $Id: svn.rb 45 2008-09-06 00:04:47Z deveiant $
|
4
4
|
#
|
5
5
|
# Authors:
|
6
6
|
# * Michael Granger <ged@FaerieMUD.org>
|
@@ -10,6 +10,7 @@
|
|
10
10
|
require 'pp'
|
11
11
|
require 'yaml'
|
12
12
|
require 'date'
|
13
|
+
require 'time'
|
13
14
|
|
14
15
|
# Strftime format for tags/releases
|
15
16
|
TAG_TIMESTAMP_FORMAT = '%Y%m%d-%H%M%S'
|
@@ -100,7 +101,10 @@ end
|
|
100
101
|
|
101
102
|
|
102
103
|
### Return the keywords for the specified array of +files+ as a Hash keyed by filename.
|
103
|
-
def get_svn_keyword_map( files )
|
104
|
+
def get_svn_keyword_map( *files )
|
105
|
+
files.flatten!
|
106
|
+
files.push( '.' ) if files.empty?
|
107
|
+
|
104
108
|
cmd = ['svn', 'pg', 'svn:keywords', *files]
|
105
109
|
|
106
110
|
# trace "Executing: svn pg svn:keywords " + files.join(' ')
|
@@ -167,6 +171,22 @@ def get_svn_diff( *targets )
|
|
167
171
|
end
|
168
172
|
|
169
173
|
|
174
|
+
### Get a subversion status as an Array of tuples of the form:
|
175
|
+
### [ <status>, <path> ]
|
176
|
+
def get_svn_status( *targets )
|
177
|
+
targets << BASEDIR if targets.empty?
|
178
|
+
trace "Getting svn status for targets: %p" % [targets]
|
179
|
+
status = IO.read( '|-' ) or exec 'svn', 'st', '--ignore-externals', *(targets.flatten)
|
180
|
+
entries = status.split( /\n/ ).
|
181
|
+
collect do |line|
|
182
|
+
flag, path = line.strip.split( /\s+/, 2 )
|
183
|
+
[ flag, Pathname.new(path) ]
|
184
|
+
end
|
185
|
+
|
186
|
+
return entries
|
187
|
+
end
|
188
|
+
|
189
|
+
|
170
190
|
### Return the URL of the latest timestamp in the tags directory.
|
171
191
|
def get_latest_release_tag
|
172
192
|
rooturl = get_svn_repo_root()
|
@@ -398,8 +418,40 @@ namespace :svn do
|
|
398
418
|
end
|
399
419
|
|
400
420
|
|
421
|
+
desc "Add/ignore any files that are unknown in the working copy"
|
422
|
+
task :newfiles do
|
423
|
+
log "Checking for new files..."
|
424
|
+
entries = get_svn_status()
|
425
|
+
|
426
|
+
unless entries.empty?
|
427
|
+
files_to_add = []
|
428
|
+
files_to_ignore = []
|
429
|
+
|
430
|
+
entries.find_all {|entry| entry[0] == '?'}.each do |entry|
|
431
|
+
action = prompt_with_default( " #{entry[1]}: (a)dd, (i)gnore, (s)kip", 's' )
|
432
|
+
case action
|
433
|
+
when 'a'
|
434
|
+
files_to_add << entry[1]
|
435
|
+
when 'i'
|
436
|
+
files_to_ignore << entry[1]
|
437
|
+
end
|
438
|
+
end
|
439
|
+
|
440
|
+
unless files_to_add.empty?
|
441
|
+
run 'svn', 'add', *files_to_add
|
442
|
+
end
|
443
|
+
|
444
|
+
unless files_to_ignore.empty?
|
445
|
+
abort "Ignoring not yet implemented"
|
446
|
+
end
|
447
|
+
|
448
|
+
end
|
449
|
+
end
|
450
|
+
task :add => :newfiles
|
451
|
+
|
452
|
+
|
401
453
|
desc "Check in all the changes in your current working copy"
|
402
|
-
task :checkin => ['svn:update', 'test', 'svn:fix_keywords', COMMIT_MSG_FILE] do
|
454
|
+
task :checkin => ['svn:update', 'svn:newfiles', 'test', 'svn:fix_keywords', COMMIT_MSG_FILE] do
|
403
455
|
targets = get_target_args()
|
404
456
|
$deferr.puts '---', File.read( COMMIT_MSG_FILE ), '---'
|
405
457
|
ask_for_confirmation( "Continue with checkin?" ) do
|
@@ -449,13 +501,19 @@ namespace :svn do
|
|
449
501
|
|
450
502
|
task :debug_helpers do
|
451
503
|
methods = [
|
452
|
-
:
|
504
|
+
:get_last_changed_rev,
|
505
|
+
:get_latest_release_tag,
|
506
|
+
:get_latest_svn_timestamp_tag,
|
507
|
+
:get_svn_diff,
|
508
|
+
:get_svn_filelist,
|
453
509
|
:get_svn_info,
|
510
|
+
:get_svn_keyword_map,
|
511
|
+
:get_svn_path,
|
454
512
|
:get_svn_repo_root,
|
513
|
+
:get_svn_rev,
|
514
|
+
:get_svn_status,
|
455
515
|
:get_svn_url,
|
456
|
-
:get_svn_path,
|
457
516
|
:svn_ls,
|
458
|
-
:get_latest_svn_timestamp_tag,
|
459
517
|
]
|
460
518
|
maxlen = methods.collect {|sym| sym.to_s.length }.max
|
461
519
|
|
data/rake/testing.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Rake tasklib for testing tasks
|
3
|
-
# $Id: testing.rb
|
3
|
+
# $Id: testing.rb 39 2008-08-22 01:27:56Z deveiant $
|
4
4
|
#
|
5
5
|
# Authors:
|
6
6
|
# * Michael Granger <ged@FaerieMUD.org>
|
@@ -150,7 +150,8 @@ begin
|
|
150
150
|
desc "Show differences in coverage from last run"
|
151
151
|
Spec::Rake::SpecTask.new( :diff ) do |task|
|
152
152
|
task.spec_files = SPEC_FILES
|
153
|
-
task.
|
153
|
+
task.spec_opts = ['-f', 'p', '-b']
|
154
|
+
task.rcov_opts = RCOV_OPTS - ['--save'] + ['--text-coverage-diff']
|
154
155
|
task.rcov = true
|
155
156
|
end
|
156
157
|
|
@@ -32,7 +32,9 @@ describe RDoc::Generator::Darkfish do
|
|
32
32
|
describe "an instance" do
|
33
33
|
|
34
34
|
before( :each ) do
|
35
|
-
|
35
|
+
$dryrun = true
|
36
|
+
@options = RDoc::Options.new( RDoc::RDoc::GENERATORS )
|
37
|
+
@generator = RDoc::Generator::Darkfish.for( @options )
|
36
38
|
end
|
37
39
|
|
38
40
|
|
@@ -44,11 +46,20 @@ describe RDoc::Generator::Darkfish do
|
|
44
46
|
|
45
47
|
it "copies static files over during #write_style_sheet" do
|
46
48
|
FileUtils.should_receive( :cp_r ).
|
47
|
-
with( an_instance_of(Pathname), '.', :verbose => $DEBUG ).
|
49
|
+
with( an_instance_of(Pathname), '.', :verbose => $DEBUG, :noop => $dryrun ).
|
48
50
|
exactly( 3 ).times
|
49
51
|
@generator.write_style_sheet
|
50
52
|
end
|
51
53
|
|
54
|
+
it "adjusts to changes in RDoc 2.2.0 (::build_indices vs. ::build_indicies)" do
|
55
|
+
RDoc::Generator::Context.should_receive( :respond_to? ).with( :build_indicies ).
|
56
|
+
and_return( false )
|
57
|
+
RDoc::Generator::Context.should_receive( :build_indices ).with( :toplevels, @options ).
|
58
|
+
and_return([ {}, {} ])
|
59
|
+
|
60
|
+
@generator.generate( :toplevels )
|
61
|
+
end
|
62
|
+
|
52
63
|
end
|
53
64
|
end
|
54
65
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: darkfish-rdoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-09-25 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|