Michael Granger avatar Michael Granger committed f0101ca Merge

Added tag v0.2.0 for changeset 558fe53042f8

Comments (0)

Files changed (12)

File contents unchanged.

+#!/usr/bin/env bash
+
+# This is an RVM Project .rvmrc file, used to automatically load the ruby
+# development environment upon cd'ing into the directory
+
+environment_id="ruby-1.9.3@hoe-manualgen"
+
+if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
+	&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]; then
+	echo "Using ${environment_id}"
+	. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
+
+	if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]]; then
+		. "${rvm_path:-$HOME/.rvm}/hooks/after_use"
+	fi
+else
+	# If the environment file has not yet been created, use the RVM CLI to select.
+	if ! rvm --create use  "$environment_id"
+		then
+		echo "Failed to create RVM environment '${environment_id}'."
+		exit 1
+	fi
+fi
+
+filename=".rvm.gems"
+if [[ -s "$filename" ]]; then
+	rvm gemset import "$filename"
+fi
+
+

History.md

-## v0.1.1 [2011-06-29] Michael Granger <ged@FaerieMUD.org>
-
-* Bugfix: add trace function in a mixin for outputting based on rake -t.
-
-## v0.1.0 [2011-03-16] Michael Granger <ged@FaerieMUD.org>
-
-* Put page filters under the same namespace as the rest
-* More work on the meta-manual.
-* Add page filters to the API docs
-* Reorganized page filter plugins to be a bit more consistently-
-  named/located
-
-## 0.0.1 [2011-01-31] Michael Granger <ged@FaerieMUD.org>
-
-Initial release.
-
+== v0.2.0 [2012-03-21] Michael Granger <ged@FaerieMUD.org>
+
+* Updated for Hoe 3!
+
+
+== v0.1.1 [2011-06-29] Michael Granger <ged@FaerieMUD.org>
+
+* Bugfix: add trace function in a mixin for outputting based on rake -t.
+
+
+== v0.1.0 [2011-03-16] Michael Granger <ged@FaerieMUD.org>
+
+* Put page filters under the same namespace as the rest
+* More work on the meta-manual.
+* Add page filters to the API docs
+* Reorganized page filter plugins to be a bit more consistently-
+  named/located
+
+
+== v0.0.1 [2011-01-31] Michael Granger <ged@FaerieMUD.org>
+
+Initial release.
+
 .autotest
-History.md
-README.md
+History.rdoc
+Manifest.txt
+README.rdoc
 Rakefile
 data/hoe-manualgen/layouts/default.erb.erb
 data/hoe-manualgen/lib/api-filter.rb
 data/hoe-manualgen/lib/examples-filter.rb
 data/hoe-manualgen/lib/links-filter.rb
 data/hoe-manualgen/resources/css/manual.css.erb
+data/hoe-manualgen/resources/css/reset.css
 data/hoe-manualgen/resources/fonts/GraublauWeb.otf
 data/hoe-manualgen/resources/fonts/GraublauWebBold.otf
 data/hoe-manualgen/resources/fonts/Inconsolata.otf

README.md

-# hoe-manualgen
-
-* http://deveiate.org/hoe-manualgen.html
-
-## Description
-
-A manual-generation plugin for Hoe.
-
-This is a plugin for [Hoe][hoe] that adds tasks and resources for
-generating a manual or cookbook.
-
-It's self-documenting, so for more, see [the latest manual for hoe-manualgen itself][hoe-manualgen-manual].
-
-
-## Installation
-
-    gem install hoe-manualgen
-
-
-## Contributing
-
-You can check out the current development source with Mercurial like so:
-
-	hg clone http://bitbucket.org/ged/hoe-manualgen
-
-Or if you prefer Git, via its Github mirror:
-
-	https://github.com/ged/hoe-manualgen
-
-After checking out the source, run:
-
-	$ rake newb
-
-This task will install any missing dependencies, run the tests/specs,
-and generate the API documentation.
-
-
-## License
-
-Copyright (c) 2010, 2011, Michael Granger
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice,
-  this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-
-* Neither the name of the author/s, nor the names of the project's
-  contributors may be used to endorse or promote products derived from this
-  software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-[hoe]:http://seattlerb.rubyforge.org/hoe/
-[hoe-manualgen-manual]:http://deveiate.org/code/hoe-manualgen/
-
-
+= hoe-manualgen
+
+* http://deveiate.org/hoe-manualgen.html
+
+
+== Description
+
+A manual-generation plugin for Hoe.
+
+This is a plugin for Hoe[http://seattlerb.rubyforge.org/hoe/] that 
+adds tasks and resources for generating a manual or cookbook.
+
+It's self-documenting, so for more, see
+{the latest manual for hoe-manualgen itself}[http://deveiate.org/code/hoe-manualgen/].
+
+
+== Installation
+
+    gem install hoe-manualgen
+
+
+== Contributing
+
+You can check out the current development source with Mercurial like so:
+
+	hg clone http://bitbucket.org/ged/hoe-manualgen
+
+Or if you prefer Git, via its Github mirror:
+
+	https://github.com/ged/hoe-manualgen
+
+After checking out the source, run:
+
+	$ rake newb
+
+This task will install any missing dependencies, run the tests/specs,
+and generate the API documentation.
+
+
+== License
+
+Copyright (c) 2010-2012, Michael Granger
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the author/s, nor the names of the project's
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
 #!/usr/bin/env rake
 
+require 'pathname'
+
 begin
 	require 'hoe'
 rescue LoadError
 
 require 'rake/clean'
 
-Hoe.add_include_dirs 'lib'
+Hoe.add_include_dirs 'lib', 'data/hoe-manualgen'
 
 Hoe.plugin :mercurial
 Hoe.plugin :signing
 Hoe.plugins.delete :rubyforge
 
 hoespec = Hoe.spec 'hoe-manualgen' do
-	self.readme_file = 'README.md'
-	self.history_file = 'History.md'
+	self.readme_file = 'README.rdoc'
+	self.history_file = 'History.rdoc'
+	self.extra_rdoc_files = FileList[ '*.rdoc', 'data/hoe-manualgen/lib/*.rb' ]
 
 	self.developer 'Michael Granger', 'ged@FaerieMUD.org'
 
-	self.extra_deps.push *{
-		'hoe'        => "~> #{Hoe::VERSION[/^\d+\.\d+/]}",
-		'RedCloth'   => '~> 4.2',
-		'rcodetools' => '~> 0.8',
-	}
-	self.extra_dev_deps.push *{
-		'rspec'    => '~> 2.4',
-		'tidy-ext' => '~> 0.1',
-	}
+	self.dependency 'hoe', "~> #{Hoe::VERSION[/^\d+\.\d+/]}"
+	self.dependency 'RedCloth', '~> 4.2'
+	self.dependency 'rcodetools', '~> 0.8'
+
+	self.dependency 'tidy-ext', '~> 0.1', :developer
+
+	self.manual_lib_dir = Pathname.pwd + 'data/hoe-manualgen/lib'
 
 	self.spec_extras[:licenses] = ["BSD"]
-
 	self.require_ruby_version( '>=1.8.7' )
 
 	self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags= )
-	self.extra_rdoc_files += Dir.glob( 'data/hoe-manualgen/lib/*.rb' )
 	self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
 end
 

data/hoe-manualgen/lib/api-filter.rb

 		<\?
 			api			# Instruction Target
 			\s+
-			(?:"					
+			(?:"
 				(.*?)   # Optional link text [$1]
 			":)?
 			(.*?)	    # Class name [$2]
 			return %{<a href="%s%s">%s</a>} % [
 				classuri,
 				make_anchor( methodname ),
-				link_text || (classname + methodname || '')
+				link_text || (classname + (methodname || ''))
 			]
 		else
 			link_text ||= classname

data/hoe-manualgen/lib/examples-filter.rb

 #!/usr/bin/ruby
+#encoding: utf-8
 #
 # A collection of standard filters for the manual generation tasklib.
 #
 		caption = %{<div class="caption">} + caption.to_s + %{</div>} if caption
 
 		return %{<notextile><div class="example #{lang}-example">%s%s</div></notextile>} %
-		 	[content, caption || '']
+			[content, caption || '']
 	end
 
 

lib/hoe/manualgen.rb

 		def cleanup( source )
 			require 'tidy'
 
-			Tidy.path = '/usr/lib/libtidy.dylib'
 			Tidy.open( TIDY_OPTIONS ) do |tidy|
 				tidy.options.output_xhtml = true
 
 		### Get (singleton) instances of the filters named in +filterlist+ and return them.
 		def load_filters( filterlist )
 			filterlist.flatten.collect do |key|
-				raise ArgumentError, "filter '#{key}' could not be loaded" unless
+				raise ArgumentError, "filter '#{key}' didn't load correctly" unless
 					Hoe::ManualGen::PageFilter.derivatives.key?( key )
 				Hoe::ManualGen::PageFilter.derivatives[ key ].instance
 			end

manual/src/index.page

 
 h3. License
 
-Copyright © 2011, J. Random Hacker
+Copyright (c) 2011, J. Random Hacker
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are
 
 - @api@ := Generate links to API documentation. See <?api Hoe::ManualGen::APIFilter ?> for details.
 - @editorial@ := Insert editorial markup. See <?api Hoe::ManualGen::EditorialFilter ?> for details.
-- @examples@ := Insert example code with syntax highlighting, optional XMP filtering, and captioning. See <?api Hoe::ManualGen::ExampleFilter ?> for details.
+- @examples@ := Insert example code with syntax highlighting, optional XMP filtering, and captioning. See <?api Hoe::ManualGen::ExamplesFilter ?> for details.
 - @links@ := Insert automatically-generated links to other pages by page title or filename. See <?api Hoe::ManualGen::LinksFilter ?> for details.
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.