README.md in mercenary-0.0.1 vs README.md in mercenary-0.1.0
- old
+ new
@@ -1,9 +1,11 @@
# Mercenary
-TODO: Write a gem description
+Lightweight and flexible library for writing command-line apps in Ruby.
+[![Build Status](https://secure.travis-ci.org/jekyll/mercenary.png)](https://travis-ci.org/jekyll/mercenary)
+
## Installation
Add this line to your application's Gemfile:
gem 'mercenary'
@@ -16,10 +18,42 @@
$ gem install mercenary
## Usage
-TODO: Write usage instructions here
+```ruby
+Mercenary.program(:jekyll) do |p|
+ p.version Jekyll::VERSION
+ p.description 'Jekyll is a blog-aware, static site generator in Ruby'
+
+ p.command(:new) do |c|
+ c.syntax "jekyll new PATH"
+ c.description "Creates a new Jekyll site scaffold in PATH"
+
+ c.action do |args, options|
+ Jekyll::Commands::New.process(args)
+ end
+ end
+
+ p.command(:import) do |c|
+ c.syntax "jekyll import <platform> [options]"
+ c.description "Import your old blog to Jekyll"
+
+ c.action do |args, options|
+ begin
+ require "jekyll-import"
+ rescue
+ msg = "You must install the 'jekyll-import' gem before continuing.\n"
+ msg += "* Do this by running `gem install jekyll-import`.\n"
+ msg += "* Or if you need root privileges, run `sudo gem install jekyll-import`."
+ abort msg
+ end
+
+ Jekyll::Commands::Import.process(args.first, options)
+ end
+ end
+end
+```
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)