On May 28, 2009, at 11:20 , Rick DeNatale wrote:
How? I've found the 'documentation' for hoe rather ephemeral.
even when I try ppl bitch. :P
ephemeral |əˈfem(ə)rəl|
adjective
lasting for a very short time : fashions are ephemeral. See note at
temporary .• (chiefly of plants) having a very short life cycle.
um. no.
% ri Hoe | lc -l
309
I hardly think that ephemeral is the right word for the following.
I've had this fairly well documented since 1.0.3 (Sep 23 2006).
% ri Hoe
---------------------------------------------------- Class: Hoe <
Object
hoe - a tool to help rake
Hoe is a simple rake/rubygems helper for project Rakefiles. It
generates all the usual tasks for projects including rdoc
generation, testing, packaging, and deployment.
Using Hoe
---------
Basics
Use this as a minimal starting point:
require 'hoe'
require './lib/project.rb'
Hoe.new("project_name", Project::VERSION) do |p|
p.rubyforge_name = "rf_project"
p.developer("Joe Blow", "j...@example.com")
# add other details here
end
# add other tasks here
Tasks Provided:
announce: Create news email file and post to rubyforge.
audit: Run ZenTest against the package.
check_extra_deps: Install missing dependencies.
check_manifest: Verify the manifest.
clean: Clean up all the extras.
config_hoe: Create a fresh ~/.hoerc file.
debug_gem: Show information about the gem.
default: Run the default task(s).
deps:email: Print a contact list for gems dependent on this
gem
deps:fetch: Fetch all the dependent gems of this gem into
tarballs
deps:list: List all the dependent gems of this gem
docs: Build the docs HTML Files
email: Generate email announcement file.
flay: Analyze for code duplication.
flog: Analyze code complexity.
gem: Build the gem file hoe-1.9.0.gem
generate_key: Generate a key for signing your gems.
install_gem: Install the package as a gem.
multi: Run the test suite using multiruby.
package: Build all the packages
post_blog: Post announcement to blog.
post_news: Post announcement to rubyforge.
publish_docs: Publish RDoc to RubyForge.
rcov: Analyze code coverage with tests
release: Package and upload the release to rubyforge.
ridocs: Generate ri locally for testing.
tasks: Generate a list of tasks for doco.
test: Run the test suite.
test_deps: Show which test files fail when run alone.
Extra Configuration Options:
Run +config_hoe+ to generate a new ~/.hoerc file. The file is a
YAML formatted config file with the following settings:
exclude: A regular expression of files to exclude
from
+check_manifest+.
publish_on_announce: Run +publish_docs+ when you run +release+.
signing_key_file: Signs your gems with this private key.
signing_cert_file: Signs your gem with this certificate.
blogs: An array of hashes of blog settings.
Run +config_hoe+ and see ~/.hoerc for examples.
Signing Gems:
Run the 'generate_key' task. This will:
1. Configure your ~/.hoerc.
2. Generate a signing key and certificate.
3. Install the private key and public certificate files into
~/.gem.
4. Upload the certificate to RubyForge.
Hoe will now generate signed gems when the package task is run.
If
you have multiple machines you build gems on, be sure to install
your key and certificate on each machine.
Keep your private key secret! Keep your private key safe!
To make sure your gems are signed run:
rake package; tar tf pkg/yourproject-1.2.3.gem
If your gem is signed you will see:
data.tar.gz
data.tar.gz.sig
metadata.gz
metadata.gz.sig
Platform awareness
Hoe allows bundling of pre-compiled extensions in the +package+
task.
To create a package for your current platform:
rake package INLINE=1
This will force Hoe analize your +Inline+ already compiled
extensions and include them in your gem.
If somehow you need to force a specific platform:
rake package INLINE=1 FORCE_PLATFORM=mswin32
This will set the +Gem::Specification+ platform to the one
indicated in +FORCE_PLATFORM+ (instead of default
Gem::Platform::CURRENT)
------------------------------------------------------------------------
Constants:
----------
FILTER = ENV['FILTER'] || ENV['TESTOPTS']
Used to add flags to test_unit (e.g., -n test_borked).
eg FILTER="-n test_blah"
GEMURL = URI.parse 'http://gems.rubyforge.org'
RUBY_DEBUG = ENV['RUBY_DEBUG']
Used to add extra flags to RUBY_FLAGS.
RUBY_FLAGS = ENV['RUBY_FLAGS'] || default_ruby_flags
Used to specify flags to ruby [has smart default].
SUPPORTED_TEST_FRAMEWORKS = { :testunit => "test/unit",
:minitest => "minitest/autorun", }
Configuration for the supported test frameworks for test
task.
VERSION = '1.12.2'
Attributes:
-----------
author (RW):
*MANDATORY*: The author(s) of the package. (can be array)
blog_categories (RW):
*Optional*: An array of the project's blog categories.
Defaults to project name.
changes (RW):
Optional: A description of the release's latest changes.
Auto-populates.
clean_globs (RW):
Optional: An array of file patterns to delete on clean.
description (RW):
Optional: A description of the project. Auto-populates.
description_sections (RW):
Optional: What sections from the readme to use for
auto-description. Defaults to %w(description).
email (RW):
*MANDATORY*: The author's email address(es). (can be array)
extra_deps (RW):
Optional: An array of rubygem dependencies.
extra_dev_deps (RW):
Optional: An array of rubygem developer dependencies.
extra_rdoc_files (RW):
Optional: Extra files you want to add to RDoc.
.txt files are automatically included (excluding the
obvious).
flay_threshold (RW):
Optional: flay threshold to determine threshold failure.
[default: 1200-100]
flog_threshold (RW):
Optional: flog threshold to determine threshold failure.
[default: 1500-200]
history_file (RW):
Optional: The filename for the project history. [default:
History.txt]
multiruby_skip (RW):
Optional: Array of incompatible versions for multiruby
filtering. Used as a regex.
name (RW):
*MANDATORY*: The name of the release.
need_tar (RW):
Optional: Should package create a tarball? [default: true]
need_zip (RW):
Optional: Should package create a zipfile? [default: false]
post_install_message (RW):
Optional: A post-install message to be displayed when gem is
installed.
readme_file (RW):
Optional: The filename for the project readme. [default:
README.txt]
remote_rdoc_dir (RW):
Optional: Name of RDoc destination directory on Rubyforge.
[default: +name+]
rspec_dirs (RW):
Optional: RSpec dirs. [default: %w(spec lib)]
rspec_options (RW):
Optional: RSpec options. [default: []]
rsync_args (RW):
Optional: Flags for RDoc rsync. [default: "-av --delete"]
rubyforge_name (RW):
Optional: The name of the rubyforge project. [default:
name.downcase]
spec_extras (RW):
Optional: A hash of extra values to set in the gemspec.
Value
may be a proc.
summary (RW):
Optional: A short summary of the project. Auto-populates.
summary_sentences (RW):
Optional: Number of sentences from description for summary.
Defaults to 1.
test_globs (RW):
Optional: An array of test file patterns [default:
test/**/test_*.rb]
testlib (RW):
Optional: What test library to require [default: :testunit]
url (RW):
Optional: The url(s) of the project. (can be array).
Auto-populates.
version (RW):
*MANDATORY*: The version. Don't hardcode! use a constant in
the project.
Class methods:
--------------
add_include_dirs, dependent_upon, get_gems_by_name,
get_latest_gems, get_source_index, normalize_names
Instance methods:
-----------------
developer, install_gem, missing, normalize_deps, paragraphs_of,
timebomb
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers