Skip to content

Commit

Permalink
* Updated build system.
Browse files Browse the repository at this point in the history
 * Fixed distributions, which didn't have the static files included with them.
 * Removed a bunch of unused static files
 * Fixed the path to the bg hack for Thickbox on Macs
 * Added the beginnings of a test suite. Don't know yet how to test the generator in isolation.

--HG--
extra : convert_revision : svn%3A8c66a899-4b77-dc11-840b-00304827d434/trunk%4023
  • Loading branch information
deveiant committed Aug 9, 2008
1 parent 11e2451 commit b905bbf
Show file tree
Hide file tree
Showing 23 changed files with 111 additions and 9 deletions.
19 changes: 19 additions & 0 deletions ChangeLog
@@ -1,3 +1,22 @@
-- Fri, 08 Aug 2008 13:15:20 -0000 by deveiant (r22) -----
Changed: /trunk
Rakefile
project.yml
Deleted: misc/rake

Checkpoint commit


-- Fri, 08 Aug 2008 02:47:22 -0000 by deveiant (r21) -----
Changed: README
lib/rdoc/generator/template/darkfish/classpage.rhtml
Rakefile
ChangeLog
lib/rdoc/generator/template/darkfish/js/darkfish.js

Checkpoint commit


-- Thu, 07 Aug 2008 06:56:40 -0000 by deveiant (r18) -----
Added: lib/rdoc/generator/darkfish.rb
-> renamed from /trunk/lib/rdoc/generator/darkfish_generator.rb@r16
Expand Down
15 changes: 13 additions & 2 deletions Rakefile
Expand Up @@ -63,7 +63,17 @@ RAKE_TASKLIBS = Pathname.glob( RAKE_TASKDIR + '*.rb' )

LOCAL_RAKEFILE = BASEDIR + 'Rakefile.local'

RELEASE_FILES = TEXT_FILES + SPEC_FILES + TEST_FILES + LIB_FILES + EXT_FILES + RAKE_TASKLIBS
EXTRA_PKGFILES = []
EXTRA_PKGFILES += Pathname.glob( BASEDIR + 'lib/rdoc/generator/**/*.{css,rhtml,png,js}' ).delete_if {|item| item =~ /\.svn/ }

RELEASE_FILES = TEXT_FILES +
SPEC_FILES +
TEST_FILES +
LIB_FILES +
EXT_FILES +
RAKE_TASKLIBS +
EXTRA_PKGFILES

RELEASE_FILES << LOCAL_RAKEFILE if LOCAL_RAKEFILE.exist?

COVERAGE_MINIMUM = ENV['COVERAGE_MINIMUM'] ? Float( ENV['COVERAGE_MINIMUM'] ) : 85.0
Expand Down Expand Up @@ -122,7 +132,7 @@ RUBYFORGE_PROJECT = 'darkfish-rdoc'

# Gem dependencies: gemname => version
DEPENDENCIES = {
'rdoc: >= 2.1.0' => '',
'rdoc' => '>= 2.1.0',
}

# Non-gem requirements: packagename => version
Expand All @@ -137,6 +147,7 @@ GEMSPEC = Gem::Specification.new do |gem|
gem.summary = PKG_SUMMARY
gem.description = <<-EOD
A complete replacement for the default HTML generator for Rdoc, the
API documentation-extraction system for Ruby.
EOD

Expand Down
19 changes: 18 additions & 1 deletion lib/rdoc/generator/darkfish.rb
Expand Up @@ -59,14 +59,22 @@ class RDoc::Generator::Darkfish < RDoc::Generator::XML

# Darkfish Version (update this in )
VERSION = '1.1.1'



#################################################################
### C L A S S M E T H O D S
#################################################################

### Standard generator factory method
def self::for( options )
new( options )
end


#################################################################
### I N S T A N C E M E T H O D S
#################################################################

### Initialize a few instance variables before we start
def initialize( *args )
@template = nil
Expand All @@ -82,6 +90,14 @@ def initialize( *args )
end


######
public
######

# The output directory
attr_reader :outputdir


### Output progress information if debugging is enabled
def debug_msg( *msg )
return unless $DEBUG
Expand Down Expand Up @@ -120,6 +136,7 @@ def generate( toplevels )

rescue StandardError => err
debug_msg "%s: %s\n %s" % [ err.class.name, err.message, err.backtrace.join("\n ") ]
raise
end


Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/rdoc/generator/template/darkfish/rdoc.css
Expand Up @@ -511,7 +511,7 @@ div.method-source-code pre {
width:100%;
}

.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;}
.TB_overlayMacFFBGHack {background: url(images/macFFBgHack.png) repeat;}
.TB_overlayBG {
background-color:#000;
filter:alpha(opacity=75);
Expand Down
11 changes: 6 additions & 5 deletions project.yml
@@ -1,15 +1,16 @@
---
rubyforge_project: darkfish-rdoc
project_requirements: []
project_requirements: {}

project_description:
- A complete replacement for the default HTML generator for Rdoc, the
- "API documentation-extraction system for Ruby. "
project_description: "A complete replacement for the default HTML generator for Rdoc, the\n\
API documentation-extraction system for Ruby. "
rubyforge_group: deveiate
author_name: Michael Granger
project_homepage: http://deveiate.org/projects/Darkfish-Rdoc/
project_dependencies:
- "rdoc: >= 2.1.0"
rdoc: ">= 2.1.0"
project_summary: A pretty (different) Rdoc HTML generator
project_name: Darkfish-Rdoc
additional_pkgfiles:
- lib/rdoc/generator/**/*.{css,rhtml,png,js}
author_email: ged@FaerieMUD.org
54 changes: 54 additions & 0 deletions spec/rdoc/generator/darkfish_spec.rb
@@ -0,0 +1,54 @@
#!/usr/bin/env ruby

BEGIN {
require 'pathname'
basedir = Pathname.new( __FILE__ ).dirname.parent.parent.parent

libdir = basedir + "lib"

$LOAD_PATH.unshift( libdir ) unless $LOAD_PATH.include?( libdir )
}

begin
require 'spec/runner'
require 'rdoc/generator/darkfish'
rescue LoadError
unless Object.const_defined?( :Gem )
require 'rubygems'
retry
end
raise
end


describe RDoc::Generator::Darkfish do

it "can create an instance via the generator factory method" do
RDoc::Generator::Darkfish.for( 'darkfish' ).
should be_an_instance_of( RDoc::Generator::Darkfish )
end


describe "an instance" do

before( :each ) do
@generator = RDoc::Generator::Darkfish.for( 'darkfish' )
end


it "generates the required subdirectories" do
@generator.outputdir.should_receive( :mkpath )
@generator.gen_sub_directories
end


it "copies static files over during #write_style_sheet" do
FileUtils.should_receive( :cp_r ).
with( an_instance_of(Pathname), '.', :verbose => $DEBUG ).
exactly( 3 ).times
@generator.write_style_sheet
end

end
end

0 comments on commit b905bbf

Please sign in to comment.