docs/index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: README
— Documentation by YARD 0.9.7
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "README";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> »
<span class="title">File: README</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><div id='filecontents'><h1 id="bovem">bovem</h1>
<p><a href="http://badge.fury.io/rb/bovem"><img src="https://badge.fury.io/rb/bovem.png" alt="Gem Version" /></a>
<a href="https://gemnasium.com/ShogunPanda/bovem"><img src="https://gemnasium.com/ShogunPanda/bovem.png?travis" alt="Dependency Status" /></a>
<a href="http://travis-ci.org/ShogunPanda/bovem"><img src="https://secure.travis-ci.org/ShogunPanda/bovem.png?branch=master" alt="Build Status" /></a>
<a href="https://codeclimate.com/github/ShogunPanda/bovem"><img src="https://codeclimate.com/github/ShogunPanda/bovem.png" alt="Code Climate" /></a>
<a href="https://coveralls.io/github/ShogunPanda/bovem?branch=master"><img src="https://coveralls.io/repos/github/ShogunPanda/bovem/badge.svg?branch=master" alt="Coverage Status" /></a></p>
<p>A command line manager and a collection of utilities for developers.</p>
<p>https://sw.cowtech.it/bovem</p>
<h2 id="description">Description</h2>
<p>Bovem is a command line manager and small set of utilities for Ruby developers.</p>
<p>See the documentation for more informations.</p>
<h2 id="basic-usage">Basic usage</h2>
<p>As ever, talking by example is always better.
This application:</p>
<p>```ruby
require “bovem”</p>
<p>Bovem::Application.create(name: “Bovem Usage Test”, version: “1.0.0”, description: “An example modelled like a TODO application”, banner: “Do you like Bovem?”) do
option(:storage, [“f”, “file”], String, help: “The file where store TODOs to.”, meta: “FILE”)</p>
<p>command :list do
description “List all TODOs.”
action do |command|
# You should implement this.
end
end</p>
<p>command :manage, “Manage existing TODO.” do
option(:verbose, [], “Be verbose.”)</p>
<pre class="code ruby"><code class="ruby">action do |command|
puts "Please use \"add\" or \"remove\" subcommands."
end
command :add, {description: "Add a TODO."} do
action do |command|
# You should implement this.
end
end
command :remove, {description: "Removes a TODO."} do
action do |command|
# You should implement this.
end
end end end ```
</code></pre>
<p>Will create a complete (at least at the interface model) TODO application which support commands <code>list</code> and <code>manage</code>.</p>
<p>The <code>manage</code> command supports subcommands <code>add</code> and <code>remove</code>. You can invoke it via syntax <code>manage add</code> or <code>manage:add</code>. <strong>If there is no conflict, just <code>m:r</code> is sufficient!</strong></p>
<p>To provide (sub)commands, both hash-style or block-style method style are supported (except for the <code>action</code> option), as you can see in the example.</p>
<p>You can use the <code>--help</code> switch or the <code>help command</code> syntax to navigate through commands details.</p>
<p>After setting up the skeleton, you will just need to write the action bodies and you’re done. <strong>Happy coding!</strong></p>
<h3 id="wrapping-up-the-example">Wrapping up the example</h3>
<p>Here’s the help screen of the application above for the global application and for the <code>manage</code> command.</p>
<h4 id="general-help">General help</h4>
<p>```
$ ./test -h
[NAME]
Bovem Usage Test 1.0.0 - An example modelled like a TODO application</p>
<p>[SYNOPSIS]
test [options] [command [subcommand …]][command-options] [arguments]</p>
<p>[DESCRIPTION]
Do you like Bovem?</p>
<p>[GLOBAL OPTIONS]
-f FILE, –file FILE - The file where store TODOs to.
-h, –help - Shows this message.</p>
<p>[COMMANDS]
help - Shows a help about a command.
list - List all TODOs.
manage - Manage existing TODO.
```</p>
<h4 id="the-manage-command-help">The <code>manage</code> command help</h4>
<p>```
$ ./test help manage
[SYNOPSIS]
test [options] manage [subcommand …]] [command-options] [arguments]</p>
<p>[OPTIONS]
-v, –verbose - Be verbose.</p>
<p>[SUBCOMMANDS]
add - Add a TODO.
remove - Removes a TODO.
```</p>
<h2 id="advanced-usage">Advanced usage</h2>
<p>See documentation for more information.</p>
<h2 id="api-documentation">API Documentation</h2>
<p>The API documentation can be found <a href="https://sw.cowtech.it/bovem/docs">here</a>.</p>
<h2 id="contributing-to-bovem">Contributing to bovem</h2>
<ul>
<li>Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.</li>
<li>Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.</li>
<li>Fork the project.</li>
<li>Start a feature/bugfix branch.</li>
<li>Commit and push until you are happy with your contribution.</li>
<li>Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.</li>
<li>Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.</li>
</ul>
<h2 id="copyright">Copyright</h2>
<p>Copyright (C) 2013 and above Shogun (shogun@cowtech.it).</p>
<p>Licensed under the MIT license, which can be found at <a href="http://www.opensource.org/licenses/mit-license.php">http://www.opensource.org/licenses/mit-license.php</a>.</p>
</div></div>
<div id="footer">
Generated on Thu Jan 12 16:10:57 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.7 (ruby-2.3.0).
</div>
</div>
</body>
</html>