NAME ABOUT SYNOPSIS DESCRIPTION OPTIONS inochi init inochi api inochi man inochi gem inochi ann inochi pub:ann:ruby-talk inochi pub:web PROJECTS HACKING VERSIONS CREDITS LICENSE SEE ALSO

inochi(1)

  1. inochi(1)
  2. Version 2.0.0
  3. inochi(1)

NAME

inochi - Gives life to Ruby projects

Inochi Logo

ABOUT

Inochi is an infrastructure for Ruby projects that helps you test, document, package, publish, and announce your projects. It encourages great documentation and reduces project administrivia.

Features

Resources

Issue tracker (report bugs, request features, get help)

http://github.com/sunaku/inochi/issues

Source code (browse online or obtain with Git)

http://github.com/sunaku/inochi

API documentation

http://snk.tuxfamily.org/lib/inochi/api/

Announcements feed

http://snk.tuxfamily.org/lib/inochi/ann.xml

Official website

http://snk.tuxfamily.org/lib/ember/

Setup

Prerequisites:

Installing:

gem install inochi

Upgrading:

gem update inochi

Removing:

gem uninstall inochi

SYNOPSIS

inochi [OPTIONS] TASK [RAKE_OPTIONS]

DESCRIPTION

Runs TASK using rake(1), to which RAKE_OPTIONS (see rake --help output) are passed. The following tasks are available for running:

ann
Build all release announcements.
ann:feed
Build RSS feed announcement.
ann:html
Build HTML announcement.
ann:text
Build plain text announcement.
api
Build API documentation.
clean
Remove any temporary products.
clobber
Remove any generated file.
gem
Build release package for RubyGems.
init
Instill Inochi into current directory.
man
Build the help manual.
pub
Publish a release of this project.
pub:ann
Announce release on all news outlets.
pub:ann:raa
Announce release on RAA (Ruby Application Archive).
pub:ann:ruby-talk
Announce release on ruby-talk mailing list.
pub:gem
Publish gem release package to RubyGems.org.
pub:web
Publish help manual, API docs, and RSS feed to project website.

OPTIONS

-h, --help

Display this manual and exit.

-v, --version

Print version number and exit.

inochi init

Instill Inochi into current directory.

SYNOPSIS

inochi init project=PROJECT [package=PACKAGE] [merger=MERGER]

DESCRIPTION

Installs the Inochi infrastructure for the project (see PROJECTS below) named PROJECT into the current working directory, or upgrades a previous installation thereof.

Pre-existing files are not overwritten. Instead, it is your responsibility to merge changes (hopefully with the aid of an automated text merging tool; see MERGER below) between pre-existing and newly generated files.

PARAMETERS

NOTIFICATIONS

create FILE

A file is being created because it does not exist.

skip FILE

A file is being skipped because it is already up to date.

update FILE

A file is being updated because it is out of date. A text merging tool (see the merger parameter above) will be launched to transfer content from the old file (*.old) and the new file (*.new) to the out of date file. If a text merging tool is not specified, then you will have to do the merging by hand.

inochi api

Builds API documentation for the project's Ruby library using YARD. Ruby constructs marked with @private are omitted from the API documentation.

inochi man

Renders the help manual's source files (see Help manual below) into:

man.ronn

Ronn format, rendered by Ember.

man.html

HTML (Web page) format, rendered by Ronn.

man/man1/PACKAGE.1.gz

Roff (UNIX manual page) format, rendered by Ronn.

inochi gem

Builds a release package in RubyGems format (plainly known as a gem):

PACKAGE-VERSION.gem

The gem itself.

PACKAGE-VERSION.gemspec

Ruby representation of the gem's specification.

The gem specification is pre-initialized with information from the project's Ruby library and help manual. In particular:

gem.description

Plain text version of all content between the ABOUT heading and any subsequent heading.

gem.authors

Plain text version of all content between the AUTHORS or CREDITS heading (whichever comes first) and any subsequent heading.

gem.files

Only contains the project's LICENSE and CREDITS files, rendered help manual, Ruby library, shell command, and C extension.

All other files (such as the test suite and help manual source files) are omitted (1) to reduce the gem file size and (2) because they are really only needed during development.

The gem specification can be further customized through the :gem_spec_logic parameter defined in the project's options file (see Options file below).

inochi ann

Builds release announcements which can be edited by hand before publishing:

ann.html

Web page version of the release announcement.

ann.txt

Plain text version of the release announcement; converted from the Web page version by Lynx.

ann.xml

RSS feed version of the release announcement.

inochi pub:ann:ruby-talk

Announces the release on the ruby-talk mailing list.

It is recommended that you build, review, and edit the ann.txt file by hand before running this command because (1) the body of that file is published directly as the announcement message and (2) HTML to plain text conversion is not perfect.

inochi pub:web

Publishes the help manual, API documentation, and RSS feed to project website using rsync(1) according to the :pub_web_* parameters defined in the project's options file (see Options file below).

PROJECTS

A project instilled with Inochi is composed of an options file, a license, source code, documentation, and a Web presence; which are all explained below.

Options file

A project's options file is a YAML document named inochi.opts that defines the following optional parameters for the various inochi(1) sub-commands:

:pub_web_target

Location where inochi pub:web will upload files. This value can use any local/remote/protocol syntax supported by rsync(1).

:pub_web_options

Options for rsync(1), which uploads files for inochi pub:web.

:pub_web_extras

Additional files for inochi pub:web to upload. The values listed here can use any local/remote/protocol syntax supported by rsync(1).

Example:

:pub_web_extras:
  - some/file
  - some_user@some_host:some/path
:gem_spec_logic

Arbitrary Ruby code that will configure this project's RubyGem before it is built by inochi gem. This code has access to a local variable named gem which holds a Gem::Specification object representing this project.

Example:

:gem_spec_logic: |
  # show the Inochi-provided specification for this project's gem
  puts gem.to_ruby

  # add files that are outside this project directory to the gem
  gem.files += ['some', 'files', 'in', 'this', 'directory']

  # omit some added files in this project's directory from the gem
  gem.files -= ['lib/top_secret.rb', 'bin/more_top_secret_stuff']

  # and so on...  anything is possible!  use your imagination!

License file

A project's license defines the legal conditions under which the project is developed and distributed. It is stored in a file named LICENSE at the root of the project directory.

Ruby library

A project's Ruby library is composed of the following files:

lib/PACKAGE.rb

Defines the project's namespace (Ruby module or class) and registers sub-libraries to be automatically loaded on demand (Kernel#autoload).

lib/PACKAGE/inochi.rb

Defines project information in Ruby constants within the project's namespace (Ruby module or class). Also defines a require class method on the project's namespace that loads the correct version (as defined by the project's dependency information) of a given gem if RubyGems is available.

Test suite

A project's test suite is composed of the following files:

test/runner

Executable Ruby script that hides the details of running the test suite.

test/test_helper.rb

Ruby source file that prepares the testing environment by loading a testing library and defining common knowledge and utility logic shared by the actual tests.

test/**/*_test.rb

Part of the test suite. Performs the actual testing.

Shell command

A project's shell command is an executable Ruby source file that serves as a gateway into the project's Ruby library from the command line:

bin/PACKAGE
Expects the project's lib/ directory to be on Ruby's $LOAD_PATH (see HACKING below). This requirement is automatically met when a user installs the project using RubyGems.

Help manual

A project's help manual is a monolithic eRuby template that is (1) processed by Ember with its shorthand notation, hierarchical unindentation, and missing <% end %> inference features enabled, and (2) composed of the following source files:

MANUAL

Primary source file of the help manual that (1) defines common knowledge and utility logic and (2) divides its content into the following files for easier editing and maintenance.

README

Introduces the project, its Web presence, and gives setup instructions.

USAGE

Explains how to use the project's shell command.

EXAMPLES

Illustrates how to perform common tasks with the project's shell command and Ruby library, respectively.

HACKING

Instructs fellow software developers on running, testing, and hacking the project's source code.

HISTORY

Records notes about current and past releases of the project in terms of incompatible changes, new features, bug fixes, and housekeeping activities.

CREDITS

Attributes all developers and contributors whose efforts have made the project what it is today.

FURTHER

Refers to related commands, help manuals, and topics beyond this project.

Web presence

A project's a Web presence is composed, at minimum, of the following:

Code repository

Where fellow software developers can obtain the latest source code.

Issue tracker

Where users and contributors can submit patches, request features, and get help.

Official website

Where the help manual, API documentation, and announcements RSS feed can be accessed (hopefully) permanently.

You may choose to omit some or all of these components by simply not mentioning them in the Resources section of the help manual's README source file.

HACKING

This section is meant for people who want to develop Inochi's source code.

Prerequisites

Install Ruby libraries necessary for development:

gem install inochi --development

Infrastructure

Inochi serves as the project infrastructure for Inochi. It handles tasks such as building this help manual and API documentation, and packaging, announcing, and publishing new releases. See its help manual and list of tasks to get started:

inochi --help     # display help manual
inochi --tasks    # list available tasks

$LOAD_PATH setup

Ensure that the lib/ directory is listed in Ruby's $LOAD_PATH before you use any libraries therein or run any executables in the bin/ directory.

This can be achieved by passing an option to Ruby:

ruby -Ilib bin/inochi
irb -Ilib -r inochi

Or by setting the $RUBYLIB environment variable:

export RUBYLIB=lib   # bash, ksh, zsh
setenv RUBYLIB lib   # csh
set -x RUBYLIB lib   # fish

ruby bin/inochi
irb -r inochi

Or by installing the ruby-wrapper tool.

RubyGems setup

If you use Ruby 1.8 or older, then ensure that RubyGems is activated before you use any libraries in the lib/ directory or run any executables in the bin/ directory.

This can be achieved by passing an option to Ruby:

ruby -rubygems bin/inochi
irb -rubygems -r inochi

Or by setting the $RUBYOPT environment variable:

export RUBYOPT=-rubygems   # bash, ksh, zsh
setenv RUBYOPT -rubygems   # csh
set -x RUBYOPT -rubygems   # fish

Running tests

Simply execute the included test runner, which sets up Ruby's $LOAD_PATH for testing, loads the included test/test_helper.rb file, and then evaluates all test/**/*_test.rb files:

test/runner

Its exit status will indicate whether all tests have passed. It may also print additional pass/fail information depending on the testing library used in the test/test_helper.rb file.

Contributing

Fork this project on GitHub (see Resources above) and send a pull request.

VERSIONS

This section contains release notes of current and past releases.

Version 2.0.0 (2010-04-24)

This release makes Inochi a development-time dependency only, documents nearly everything in the help manual, renders the help manual as a UNIX manual page, simplifies the project infrastructure it provides, and removes needless cruft.

Incompatible changes:

New features:

Housekeeping:

Version 1.1.1 (2009-10-03)

This release improves Ruby 1.9 support and upgrades gem dependencies.

Bug fixes:

Housekeeping:

Version 1.1.0 (2009-09-06)

This release improves the user manual and scaffold generator output, injects more metadata into gems, adds support for Microsoft web browsers, and fixes some bugs.

New features:

Bug fixes:

Housekeeping:

Version 1.0.0 (2009-05-03)

This release allows your gems to not depend on Inochi, lets you choose which unit testing library to use, adds new utility libraries and rake tasks, and fixes some bugs.

Incompatible changes:

New features:

Bug fixes:

Housekeeping:

Version 0.3.0 (2009-02-12)

This release adds support for language translations, improves the user interface, and fixes a show-stopper bug for Windows users.

New features:

Bug fixes:

Housekeeping:

Version 0.2.0 (2009-01-25)

This release adds support for unit testing, improves the portability of Inochi and configurability of your projects, adds new content to the user manual, and fixes some bugs.

New features:

Bug fixes:

Housekeeping:

Added unit tests for utility methods provided by the Inochi module
project name calculation and CamelCase to snake_case conversion.

Version 0.1.0 (2009-01-13)

This release reattempts to fix the circular dependency problem that occurred when installing either Inochi or ERBook.

New features:

Bug fixes:

Version 0.0.1 (2009-01-13)

This release fixes some show-stopper bugs.

Bug fixes:

Housekeeping:

Version 0.0.0 (2009-01-13)

This is the first release of Inochi. Enjoy!

CREDITS

Suraj N. Kurapati, Peileppe Production, Florian Gilcher

The "inochi.png" image and its "inochi.svg" source utilize the "3 flowers" graphic, which was created and released into the public domain by Peileppe Production on June 25, 2008.

LICENSE

(the ISC license)

Copyright 2008 Suraj N. Kurapati sunaku@gmail.com

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

SEE ALSO

rake(1), rsync(1), Ronn, Ember

  1. April 2010
  2. inochi(1)