inochi 4.0.1 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CREDITS +5 -12
- data/bin/inochi +2 -10
- data/lib/inochi/engine.rb +75 -1
- data/lib/inochi/inochi.rb +7 -8
- data/lib/inochi/tasks/2-api.rake +1 -4
- data/lib/inochi/tasks/3-man.rake +55 -54
- data/lib/inochi/tasks/3-man.rake.css +49 -0
- data/lib/inochi/tasks/4-ann.rake +33 -41
- data/lib/inochi/tasks/5-gem.rake +3 -5
- data/lib/inochi/tasks/6-pub.rake +3 -10
- data/lib/inochi/templates/BEYOND.rbs +14 -13
- data/lib/inochi/templates/CREDITS.rbs +7 -14
- data/lib/inochi/templates/HACKING.rbs +48 -50
- data/lib/inochi/templates/HISTORY.rbs +24 -31
- data/lib/inochi/templates/INSTALL.rbs +27 -0
- data/lib/inochi/templates/MANUAL.rbs +8 -34
- data/lib/inochi/templates/README.rbs +14 -40
- data/lib/inochi/templates/SYNOPSIS.rbs +21 -0
- data/lib/inochi/templates/USAGE.rbs +8 -20
- data/lib/inochi/templates/command.rbs +2 -10
- data/lib/inochi/templates/{inochi.opts.rbs → inochi.conf.rbs} +8 -0
- data/lib/inochi/templates/inochi.rb.rbs +11 -11
- data/man/man1/inochi.1 +2807 -0
- metadata +14 -36
- data/lib/inochi/tasks/0-project.rake +0 -25
- data/lib/inochi/tasks/1-init.rake +0 -38
- data/lib/inochi/templates/EXAMPLES.rbs +0 -24
- data/logo/inochi.png +0 -0
- data/man.html +0 -1229
- data/man/man1/inochi.1.gz +0 -0
metadata
CHANGED
@@ -3,18 +3,18 @@ name: inochi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
|
-
-
|
6
|
+
- 5
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version:
|
8
|
+
- 0
|
9
|
+
version: 5.0.0
|
10
10
|
platform: ruby
|
11
|
-
authors:
|
12
|
-
|
11
|
+
authors: []
|
12
|
+
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-07
|
17
|
+
date: 2010-08-07 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -133,30 +133,10 @@ dependencies:
|
|
133
133
|
version: "1"
|
134
134
|
type: :runtime
|
135
135
|
version_requirements: *id006
|
136
|
-
- !ruby/object:Gem::Dependency
|
137
|
-
name: ronn
|
138
|
-
prerelease: false
|
139
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
140
|
-
none: false
|
141
|
-
requirements:
|
142
|
-
- - ">="
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
segments:
|
145
|
-
- 0
|
146
|
-
- 7
|
147
|
-
- 0
|
148
|
-
version: 0.7.0
|
149
|
-
- - <
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
segments:
|
152
|
-
- 1
|
153
|
-
version: "1"
|
154
|
-
type: :runtime
|
155
|
-
version_requirements: *id007
|
156
136
|
- !ruby/object:Gem::Dependency
|
157
137
|
name: yard
|
158
138
|
prerelease: false
|
159
|
-
requirement: &
|
139
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
160
140
|
none: false
|
161
141
|
requirements:
|
162
142
|
- - ">="
|
@@ -172,8 +152,8 @@ dependencies:
|
|
172
152
|
- 1
|
173
153
|
version: "1"
|
174
154
|
type: :runtime
|
175
|
-
version_requirements: *
|
176
|
-
description:
|
155
|
+
version_requirements: *id007
|
156
|
+
description: ""
|
177
157
|
email:
|
178
158
|
executables:
|
179
159
|
- inochi
|
@@ -191,30 +171,28 @@ files:
|
|
191
171
|
- lib/inochi/templates/CREDITS.rbs
|
192
172
|
- lib/inochi/templates/inochi.rb.rbs
|
193
173
|
- lib/inochi/templates/test_runner.rbs
|
174
|
+
- lib/inochi/templates/inochi.conf.rbs
|
194
175
|
- lib/inochi/templates/LICENSE.rbs
|
195
176
|
- lib/inochi/templates/README.rbs
|
196
177
|
- lib/inochi/templates/HACKING.rbs
|
178
|
+
- lib/inochi/templates/INSTALL.rbs
|
197
179
|
- lib/inochi/templates/USAGE.rbs
|
198
180
|
- lib/inochi/templates/library.rbs
|
199
181
|
- lib/inochi/templates/command.rbs
|
200
182
|
- lib/inochi/templates/HISTORY.rbs
|
201
|
-
- lib/inochi/templates/
|
183
|
+
- lib/inochi/templates/SYNOPSIS.rbs
|
202
184
|
- lib/inochi/templates/library_test.rb.rbs
|
203
185
|
- lib/inochi/templates/BEYOND.rbs
|
204
186
|
- lib/inochi/templates/MANUAL.rbs
|
205
|
-
- lib/inochi/templates/inochi.opts.rbs
|
206
187
|
- lib/inochi/tasks/2-api.rake
|
207
|
-
- lib/inochi/tasks/
|
188
|
+
- lib/inochi/tasks/3-man.rake.css
|
208
189
|
- lib/inochi/tasks/4-ann.rake
|
209
190
|
- lib/inochi/tasks/6-pub.rake
|
210
|
-
- lib/inochi/tasks/1-init.rake
|
211
191
|
- lib/inochi/tasks/3-man.rake
|
212
192
|
- lib/inochi/tasks/5-gem.rake
|
213
193
|
- LICENSE
|
214
194
|
- CREDITS
|
215
|
-
- man.
|
216
|
-
- man/man1/inochi.1.gz
|
217
|
-
- logo/inochi.png
|
195
|
+
- man/man1/inochi.1
|
218
196
|
has_rdoc: true
|
219
197
|
homepage: http://snk.tuxfamily.org/lib/inochi/
|
220
198
|
licenses: []
|
@@ -1,25 +0,0 @@
|
|
1
|
-
task :@project do
|
2
|
-
begin
|
3
|
-
@project_options_file = 'inochi.opts'
|
4
|
-
@project_options = YAML.load_file(@project_options_file).to_hash
|
5
|
-
|
6
|
-
# load the project module
|
7
|
-
library_file = Dir['lib/*/inochi.rb'].first
|
8
|
-
package_name = File.basename(File.dirname(library_file))
|
9
|
-
library_name = File.read(library_file)[/\b(module|class)\b\s+(\w+)/, 2]
|
10
|
-
|
11
|
-
$LOAD_PATH.unshift 'lib'
|
12
|
-
require "#{package_name}/inochi"
|
13
|
-
|
14
|
-
@project_module = Object.const_get(library_name)
|
15
|
-
@project_package_name = package_name
|
16
|
-
@project_library_name = library_name
|
17
|
-
@project_gem_file = "#{@project_package_name}-#{@project_module::VERSION}.gem"
|
18
|
-
rescue
|
19
|
-
puts
|
20
|
-
puts 'The current directory is not an Inochi project.'
|
21
|
-
puts 'Run the `inochi init` command to make it one.'
|
22
|
-
puts
|
23
|
-
raise
|
24
|
-
end
|
25
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
desc 'Instill Inochi into current directory.'
|
2
|
-
task :init do
|
3
|
-
|
4
|
-
unless project_name = ENV['project']
|
5
|
-
raise ArgumentError, 'project name not specified'
|
6
|
-
end
|
7
|
-
|
8
|
-
library_name = Engine.calc_library_name(project_name)
|
9
|
-
package_name = ENV['package'] || Engine.calc_package_name(library_name)
|
10
|
-
|
11
|
-
project_version = '0.0.0'
|
12
|
-
project_release = Time.now.strftime('%F')
|
13
|
-
|
14
|
-
command_file = "bin/#{package_name}"
|
15
|
-
create_from_rbs binding, command_file, 'command'
|
16
|
-
chmod 0755, command_file
|
17
|
-
|
18
|
-
create_from_rbs binding, 'inochi.opts'
|
19
|
-
|
20
|
-
create_from_rbs binding, "lib/#{package_name}.rb", 'library'
|
21
|
-
create_from_rbs binding, "lib/#{package_name}/inochi.rb"
|
22
|
-
|
23
|
-
create_from_rbs binding, 'test/runner', 'test_runner'
|
24
|
-
chmod 0755, 'test/runner'
|
25
|
-
create_from_rbs binding, 'test/helper.rb', 'test_helper.rb'
|
26
|
-
create_from_rbs binding, "test/#{package_name}_test.rb", 'library_test.rb'
|
27
|
-
|
28
|
-
create_from_rbs binding, 'LICENSE'
|
29
|
-
create_from_rbs binding, 'README'
|
30
|
-
create_from_rbs binding, 'MANUAL'
|
31
|
-
create_from_rbs binding, 'USAGE'
|
32
|
-
create_from_rbs binding, 'EXAMPLES'
|
33
|
-
create_from_rbs binding, 'HACKING'
|
34
|
-
create_from_rbs binding, 'HISTORY'
|
35
|
-
create_from_rbs binding, 'CREDITS'
|
36
|
-
create_from_rbs binding, 'BEYOND'
|
37
|
-
|
38
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
%#----------------------------------------------------------------------------
|
2
|
-
## EXAMPLES
|
3
|
-
%#----------------------------------------------------------------------------
|
4
|
-
|
5
|
-
> TODO: give examples of how to use your
|
6
|
-
> project to perform certain tasks
|
7
|
-
|
8
|
-
%#----------------------------------------------------------------------------
|
9
|
-
### A task
|
10
|
-
%#----------------------------------------------------------------------------
|
11
|
-
|
12
|
-
> TODO: explain how to perform this task
|
13
|
-
|
14
|
-
%#----------------------------------------------------------------------------
|
15
|
-
### Another task
|
16
|
-
%#----------------------------------------------------------------------------
|
17
|
-
|
18
|
-
> TODO: explain how to perform this task
|
19
|
-
|
20
|
-
%#----------------------------------------------------------------------------
|
21
|
-
### Yet another task
|
22
|
-
%#----------------------------------------------------------------------------
|
23
|
-
|
24
|
-
> TODO: explain how to perform this task
|
data/logo/inochi.png
DELETED
Binary file
|
data/man.html
DELETED
@@ -1,1229 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta http-equiv='content-type' value='text/html;charset=utf8'>
|
5
|
-
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
|
6
|
-
<title>inochi(1) - Gives life to Ruby projects</title>
|
7
|
-
<style type='text/css' media='all'>
|
8
|
-
/* style: man */
|
9
|
-
body#manpage {margin:0}
|
10
|
-
.mp {max-width:100ex;padding:0 9ex 1ex 4ex}
|
11
|
-
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
|
12
|
-
.mp h2 {margin:10px 0 0 0}
|
13
|
-
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
|
14
|
-
.mp h3 {margin:0 0 0 4ex}
|
15
|
-
.mp dt {margin:0;clear:left}
|
16
|
-
.mp dt.flush {float:left;width:8ex}
|
17
|
-
.mp dd {margin:0 0 0 9ex}
|
18
|
-
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
|
19
|
-
.mp pre {margin-bottom:20px}
|
20
|
-
.mp pre+h2,.mp pre+h3 {margin-top:22px}
|
21
|
-
.mp h2+pre,.mp h3+pre {margin-top:5px}
|
22
|
-
.mp img {display:block;margin:auto}
|
23
|
-
.mp h1.man-title {display:none}
|
24
|
-
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
|
25
|
-
.mp h2 {font-size:16px;line-height:1.25}
|
26
|
-
.mp h1 {font-size:20px;line-height:2}
|
27
|
-
.mp {text-align:justify;background:#fff}
|
28
|
-
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
|
29
|
-
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
|
30
|
-
.mp u {text-decoration:underline}
|
31
|
-
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
|
32
|
-
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
|
33
|
-
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
|
34
|
-
.mp b.man-ref {font-weight:normal;color:#434241}
|
35
|
-
.mp pre {padding:5px 1ex;background:#edeceb;border-left:1ex solid #ddd}
|
36
|
-
.mp pre code {font-weight:normal;color:#434241}
|
37
|
-
.mp h2+pre,h3+pre {padding-left:0}
|
38
|
-
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
|
39
|
-
ol.man-decor {width:100%}
|
40
|
-
ol.man-decor li.tl {text-align:left}
|
41
|
-
ol.man-decor li.tc {text-align:center;letter-spacing:4px}
|
42
|
-
ol.man-decor li.tr {text-align:right;float:right}
|
43
|
-
</style>
|
44
|
-
<style type='text/css' media='all'>
|
45
|
-
/* style: toc */
|
46
|
-
.man-navigation {display:block !important;position:fixed;top:0;left:113ex;height:100%;width:100%;padding:36px 0 0 0;border-left:1px solid #dbdbdb;background:#eee}
|
47
|
-
.man-navigation a,.man-navigation a:hover,.man-navigation a:link,.man-navigation a:visited {display:block;margin:0;padding:5px 2px 5px 20px;color:#999;text-decoration:none}
|
48
|
-
.man-navigation a:hover {color:#111;text-decoration:underline}
|
49
|
-
</style>
|
50
|
-
<style type='text/css' media='all'>
|
51
|
-
/* style: 80c */
|
52
|
-
.mp {max-width:78ex}
|
53
|
-
|
54
|
-
.man-navigation {left:91ex}
|
55
|
-
</style>
|
56
|
-
</head>
|
57
|
-
<!--
|
58
|
-
The following styles are deprecated and will be removed at some point:
|
59
|
-
div#man, div#man ol.man, div#man ol.head, div#man ol.man.
|
60
|
-
|
61
|
-
The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
|
62
|
-
.man-navigation should be used instead.
|
63
|
-
-->
|
64
|
-
<body id='manpage'>
|
65
|
-
<div class='mp' id='man'>
|
66
|
-
|
67
|
-
<div class='man-navigation' style='display:none'>
|
68
|
-
<a href="#NAME">NAME</a>
|
69
|
-
<a href="#SYNOPSIS">SYNOPSIS</a>
|
70
|
-
<a href="#DESCRIPTION">DESCRIPTION</a>
|
71
|
-
<a href="#OPTIONS">OPTIONS</a>
|
72
|
-
<a href="#TASKS">TASKS</a>
|
73
|
-
<a href="#PROJECTS">PROJECTS</a>
|
74
|
-
<a href="#TUTORIAL">TUTORIAL</a>
|
75
|
-
<a href="#HACKING">HACKING</a>
|
76
|
-
<a href="#HISTORY">HISTORY</a>
|
77
|
-
<a href="#AUTHORS">AUTHORS</a>
|
78
|
-
<a href="#CREDITS">CREDITS</a>
|
79
|
-
<a href="#LICENSE">LICENSE</a>
|
80
|
-
<a href="#SEE-ALSO">SEE ALSO</a>
|
81
|
-
<a href="#Features">Features</a>
|
82
|
-
<a href="#Resources">Resources</a>
|
83
|
-
<a href="#Setup">Setup</a>
|
84
|
-
<a href="#inochi-init">inochi init</a>
|
85
|
-
<a href="#inochi-api">inochi api</a>
|
86
|
-
<a href="#inochi-man">inochi man</a>
|
87
|
-
<a href="#inochi-gem">inochi gem</a>
|
88
|
-
<a href="#inochi-ann">inochi ann</a>
|
89
|
-
<a href="#inochi-pub-ann-ruby-talk">inochi pub:ann:ruby-talk</a>
|
90
|
-
<a href="#inochi-pub-web">inochi pub:web</a>
|
91
|
-
<a href="#Options-file">Options file</a>
|
92
|
-
<a href="#License-file">License file</a>
|
93
|
-
<a href="#Ruby-library">Ruby library</a>
|
94
|
-
<a href="#Test-suite">Test suite</a>
|
95
|
-
<a href="#Shell-command">Shell command</a>
|
96
|
-
<a href="#Help-manual">Help manual</a>
|
97
|
-
<a href="#Web-presence">Web presence</a>
|
98
|
-
<a href="#Creating-a-new-project">Creating a new project</a>
|
99
|
-
<a href="#Running-the-shell-command">Running the shell command</a>
|
100
|
-
<a href="#Building-the-help-manual">Building the help manual</a>
|
101
|
-
<a href="#Implementing-the-project">Implementing the project</a>
|
102
|
-
<a href="#Prerequisites">Prerequisites</a>
|
103
|
-
<a href="#Infrastructure">Infrastructure</a>
|
104
|
-
<a href="#-LOAD_PATH-setup">$LOAD_PATH setup</a>
|
105
|
-
<a href="#RubyGems-setup">RubyGems setup</a>
|
106
|
-
<a href="#Running-tests">Running tests</a>
|
107
|
-
<a href="#Contributing">Contributing</a>
|
108
|
-
<a href="#Version-4-0-1-2010-07-28-">Version 4.0.1 (2010-07-28)</a>
|
109
|
-
<a href="#Version-4-0-0-2010-07-25-">Version 4.0.0 (2010-07-25)</a>
|
110
|
-
<a href="#Version-3-0-0-2010-04-27-">Version 3.0.0 (2010-04-27)</a>
|
111
|
-
<a href="#Version-2-0-1-2010-04-25-">Version 2.0.1 (2010-04-25)</a>
|
112
|
-
<a href="#Version-2-0-0-2010-04-24-">Version 2.0.0 (2010-04-24)</a>
|
113
|
-
<a href="#Version-1-1-1-2009-10-03-">Version 1.1.1 (2009-10-03)</a>
|
114
|
-
<a href="#Version-1-1-0-2009-09-06-">Version 1.1.0 (2009-09-06)</a>
|
115
|
-
<a href="#Version-1-0-0-2009-05-03-">Version 1.0.0 (2009-05-03)</a>
|
116
|
-
<a href="#Version-0-3-0-2009-02-12-">Version 0.3.0 (2009-02-12)</a>
|
117
|
-
<a href="#Version-0-2-0-2009-01-25-">Version 0.2.0 (2009-01-25)</a>
|
118
|
-
<a href="#Version-0-1-0-2009-01-13-">Version 0.1.0 (2009-01-13)</a>
|
119
|
-
<a href="#Version-0-0-1-2009-01-13-">Version 0.0.1 (2009-01-13)</a>
|
120
|
-
<a href="#Version-0-0-0-2009-01-13-">Version 0.0.0 (2009-01-13)</a>
|
121
|
-
</div>
|
122
|
-
|
123
|
-
<ol class='man-decor man-head man head'>
|
124
|
-
<li class='tl'>inochi(1)</li>
|
125
|
-
<li class='tc'>Version 4.0.1</li>
|
126
|
-
<li class='tr'>inochi(1)</li>
|
127
|
-
</ol>
|
128
|
-
|
129
|
-
<h2 id="NAME">NAME</h2>
|
130
|
-
<p class="man-name">
|
131
|
-
<code>inochi</code> - <span class="man-whatis">Gives life to Ruby projects</span>
|
132
|
-
</p>
|
133
|
-
|
134
|
-
<p><img src="logo/inochi.png" alt="" /></p>
|
135
|
-
|
136
|
-
<p>Inochi is an infrastructure for Ruby projects that helps you test, document,
|
137
|
-
package, publish, and announce your projects. It encourages <em>great</em>
|
138
|
-
documentation and reduces project administrivia.</p>
|
139
|
-
|
140
|
-
<h3 id="Features">Features</h3>
|
141
|
-
|
142
|
-
<ul>
|
143
|
-
<li><p>Provides a comprehensive help manual that is written in <a href="http://en.wikipedia.org/wiki/ERuby">eRuby</a> over
|
144
|
-
<a href="http://daringfireball.net/projects/markdown">Markdown</a> and is rendered into a Web page and a UNIX manual page.</p></li>
|
145
|
-
<li><p>Announces project releases on <a href="http://raa.ruby-lang.org">RAA</a>, <a href="http://www.ruby-lang.org/en/community/mailing-lists/">ruby-talk</a>, and via RSS feed.</p></li>
|
146
|
-
<li><p>Stores project information in a single Ruby source file.</p></li>
|
147
|
-
</ul>
|
148
|
-
|
149
|
-
|
150
|
-
<h3 id="Resources">Resources</h3>
|
151
|
-
|
152
|
-
<dl>
|
153
|
-
<dt>Issue tracker (report bugs, request features, get help)</dt><dd><p><a href="http://github.com/sunaku/inochi/issues" data-bare-link="true">http://github.com/sunaku/inochi/issues</a></p></dd>
|
154
|
-
<dt>Source code (browse online or obtain with <a href="http://git-scm.com">Git</a>)</dt><dd><p><a href="http://github.com/sunaku/inochi" data-bare-link="true">http://github.com/sunaku/inochi</a></p></dd>
|
155
|
-
<dt>API documentation</dt><dd><p><a href="http://snk.tuxfamily.org/lib/inochi/api/" data-bare-link="true">http://snk.tuxfamily.org/lib/inochi/api/</a></p></dd>
|
156
|
-
<dt>Announcements feed</dt><dd><p><a href="http://snk.tuxfamily.org/lib/inochi/ann.xml" data-bare-link="true">http://snk.tuxfamily.org/lib/inochi/ann.xml</a></p></dd>
|
157
|
-
<dt>Official website</dt><dd><p><a href="http://snk.tuxfamily.org/lib/inochi/" data-bare-link="true">http://snk.tuxfamily.org/lib/inochi/</a></p></dd>
|
158
|
-
</dl>
|
159
|
-
|
160
|
-
|
161
|
-
<h3 id="Setup">Setup</h3>
|
162
|
-
|
163
|
-
<p>Prerequisites:</p>
|
164
|
-
|
165
|
-
<ul>
|
166
|
-
<li><p><a href="http://ruby-lang.org">Ruby</a> 1.8.6 or newer.</p></li>
|
167
|
-
<li><p><a href="http://rubygems.org">RubyGems</a> 1.3.6 or newer.</p></li>
|
168
|
-
<li><p><a href="http://lynx.isc.org">Lynx</a> 2.8.6 or newer.</p></li>
|
169
|
-
</ul>
|
170
|
-
|
171
|
-
|
172
|
-
<p>Installing:</p>
|
173
|
-
|
174
|
-
<pre><code>gem install inochi
|
175
|
-
</code></pre>
|
176
|
-
|
177
|
-
<p>Upgrading:</p>
|
178
|
-
|
179
|
-
<pre><code>gem update inochi
|
180
|
-
</code></pre>
|
181
|
-
|
182
|
-
<p>Removing:</p>
|
183
|
-
|
184
|
-
<pre><code>gem uninstall inochi
|
185
|
-
</code></pre>
|
186
|
-
|
187
|
-
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
188
|
-
|
189
|
-
<p><code>inochi</code> [<var>OPTIONS</var>] <var>TASK</var> [<var>RAKE_OPTIONS</var>]</p>
|
190
|
-
|
191
|
-
<p><code>inochi init</code> project=<var>PROJECT</var> [package=<var>PACKAGE</var>] [merger=<var>MERGER</var>]</p>
|
192
|
-
|
193
|
-
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
194
|
-
|
195
|
-
<p>Runs the given <var>TASK</var> (see <strong>TASKS</strong> below) while passing the given
|
196
|
-
<var>RAKE_OPTIONS</var> to <span class="man-ref">rake<span class="s">(1)</span></span>.</p>
|
197
|
-
|
198
|
-
<h2 id="OPTIONS">OPTIONS</h2>
|
199
|
-
|
200
|
-
<dl>
|
201
|
-
<dt><code>-h</code>, <code>--help</code></dt><dd><p>Display this manual and exit.</p></dd>
|
202
|
-
<dt><code>-v</code>, <code>--version</code></dt><dd><p>Print version number and exit.</p></dd>
|
203
|
-
</dl>
|
204
|
-
|
205
|
-
|
206
|
-
<h2 id="TASKS">TASKS</h2>
|
207
|
-
|
208
|
-
<p>The following tasks are available for running. Some of them are explained in
|
209
|
-
more detail below.</p>
|
210
|
-
|
211
|
-
<dl>
|
212
|
-
<dt class="flush"><strong>ann</strong></dt><dd>Build all release announcements.</dd>
|
213
|
-
<dt><strong>ann:feed</strong></dt><dd>Build RSS feed announcement.</dd>
|
214
|
-
<dt><strong>ann:html</strong></dt><dd>Build HTML announcement.</dd>
|
215
|
-
<dt><strong>ann:text</strong></dt><dd>Build plain text announcement.</dd>
|
216
|
-
<dt class="flush"><strong>api</strong></dt><dd>Build API documentation.</dd>
|
217
|
-
<dt class="flush"><strong>clean</strong></dt><dd>Remove any temporary products.</dd>
|
218
|
-
<dt class="flush"><strong>clobber</strong></dt><dd>Remove any generated file.</dd>
|
219
|
-
<dt class="flush"><strong>gem</strong></dt><dd>Build release package for RubyGems.</dd>
|
220
|
-
<dt class="flush"><strong>init</strong></dt><dd>Instill Inochi into current directory.</dd>
|
221
|
-
<dt class="flush"><strong>man</strong></dt><dd>Build the help manual.</dd>
|
222
|
-
<dt class="flush"><strong>pub</strong></dt><dd>Publish a release of this project.</dd>
|
223
|
-
<dt class="flush"><strong>pub:ann</strong></dt><dd>Announce release on all news outlets.</dd>
|
224
|
-
<dt><strong>pub:ann:raa</strong></dt><dd>Announce release on RAA (Ruby Application Archive).</dd>
|
225
|
-
<dt><strong>pub:ann:ruby-talk</strong></dt><dd>Announce release on ruby-talk mailing list.</dd>
|
226
|
-
<dt class="flush"><strong>pub:gem</strong></dt><dd>Publish gem release package to RubyGems.org.</dd>
|
227
|
-
<dt class="flush"><strong>pub:web</strong></dt><dd>Publish help manual, API docs, and RSS feed to project website.</dd>
|
228
|
-
</dl>
|
229
|
-
|
230
|
-
|
231
|
-
<h3 id="inochi-init">inochi init</h3>
|
232
|
-
|
233
|
-
<p>Installs the Inochi infrastructure for the project (see <strong>PROJECTS</strong> below) in
|
234
|
-
the current working directory or upgrades a previous installation thereof.</p>
|
235
|
-
|
236
|
-
<p><code>inochi</code> init <code>project</code>=<var>PROJECT</var> [<code>package</code>=<var>PACKAGE</var>] [<code>merger</code>=<var>MERGER</var>]</p>
|
237
|
-
|
238
|
-
<dl>
|
239
|
-
<dt class="flush"><var>PROJECT</var></dt><dd><p>Name of the project. This will be normalized into the name of a Ruby
|
240
|
-
module that will serve as a namespace for all code in the project.</p></dd>
|
241
|
-
<dt class="flush"><var>PACKAGE</var></dt><dd><p>Name of the project's package directory, shell command, and basename of the
|
242
|
-
project library file.</p></dd>
|
243
|
-
<dt class="flush"><var>MERGER</var></dt><dd><p>Command that invokes a text merging tool with three arguments: (1) old file,
|
244
|
-
(2) new file, (3) output file. The command should direct the result of
|
245
|
-
merging the old file and the new file to the output file. In addition, the
|
246
|
-
command <em>must not</em> modify the old file or the new file.</p></dd>
|
247
|
-
</dl>
|
248
|
-
|
249
|
-
|
250
|
-
<p>Pre-existing files are not overwritten. Instead, it is your responsibility to
|
251
|
-
merge changes between pre-existing and newly generated files. You can do this
|
252
|
-
with the aid of an automated text merging tool such as <a href="http://meld.sourceforge.net">meld</a>, <a href="http://tkdiff.sourceforge.net">tkdiff</a>, or
|
253
|
-
<a href="http://kdiff3.sourceforge.net">kdiff3</a> by following these steps:</p>
|
254
|
-
|
255
|
-
<ol>
|
256
|
-
<li><p>Create a file named <code>merge2</code> containing the following text:</p>
|
257
|
-
|
258
|
-
<pre><code>#!/bin/sh
|
259
|
-
old=$1; new=$2; out=$3;
|
260
|
-
# meld "$new" "$out" # use meld
|
261
|
-
# tkdiff "$old" "$new" -o "$out" # use tkdiff
|
262
|
-
# kdiff3 --merge "$old" "$new" --output "$out" # use kdiff3
|
263
|
-
</code></pre></li>
|
264
|
-
<li><p>Uncomment the line corresponding to the tool you wish to use.</p></li>
|
265
|
-
<li><p>Make the file executable:</p>
|
266
|
-
|
267
|
-
<pre><code>chmod +x merge2
|
268
|
-
</code></pre></li>
|
269
|
-
<li><p>Pass the file's path as the value of <var>MERGER</var>:</p>
|
270
|
-
|
271
|
-
<pre><code>inochi init merger=path/to/merge2
|
272
|
-
</code></pre></li>
|
273
|
-
</ol>
|
274
|
-
|
275
|
-
|
276
|
-
<p>Now your chosen text merging tool will be launched to help you transfer your
|
277
|
-
changes. When you are finished, save the merged file and exit the merging
|
278
|
-
tool. If you do not want to transfer any changes, then simply exit the
|
279
|
-
merging tool <em>without saving</em> any changes to the merged file!</p>
|
280
|
-
|
281
|
-
<h3 id="inochi-api">inochi api</h3>
|
282
|
-
|
283
|
-
<p>Builds API documentation for the project's Ruby library using <a href="http://yardoc.org/more">YARD</a>. Ruby
|
284
|
-
constructs marked with <code>@private</code> are omitted from the API documentation.</p>
|
285
|
-
|
286
|
-
<h3 id="inochi-man">inochi man</h3>
|
287
|
-
|
288
|
-
<p>Renders the help manual's source files (see <strong>Help manual</strong> below) into:</p>
|
289
|
-
|
290
|
-
<dl>
|
291
|
-
<dt>man.ronn</dt><dd><p><a href="http://github.com/rtomayko/ronn">Ronn</a> format, rendered by <a href="http://snk.tuxfamily.org/lib/ember/">Ember</a>.</p></dd>
|
292
|
-
<dt>man.html</dt><dd><p>HTML (Web page) format, rendered by <a href="http://github.com/rtomayko/ronn">Ronn</a>.</p></dd>
|
293
|
-
<dt>man/man1/<var>PACKAGE</var>.1.gz</dt><dd><p>Roff (UNIX manual page) format, rendered by <a href="http://github.com/rtomayko/ronn">Ronn</a>.</p></dd>
|
294
|
-
</dl>
|
295
|
-
|
296
|
-
|
297
|
-
<h3 id="inochi-gem">inochi gem</h3>
|
298
|
-
|
299
|
-
<p>Builds a release package in RubyGems format (plainly known as a <strong>gem</strong>):</p>
|
300
|
-
|
301
|
-
<dl>
|
302
|
-
<dt><var>PACKAGE</var>-<var>VERSION</var>.gem</dt><dd><p>The gem itself.</p></dd>
|
303
|
-
<dt><var>PACKAGE</var>-<var>VERSION</var>.gemspec</dt><dd><p>Ruby representation of the gem's specification.</p></dd>
|
304
|
-
</dl>
|
305
|
-
|
306
|
-
|
307
|
-
<p>The gem specification is pre-initialized with information from the project's
|
308
|
-
Ruby library and help manual. In particular:</p>
|
309
|
-
|
310
|
-
<dl>
|
311
|
-
<dt>gem.description</dt><dd><p>Plain text version of all content between the <strong>ABOUT</strong> heading and any
|
312
|
-
subsequent heading.</p></dd>
|
313
|
-
<dt>gem.authors</dt><dd><p>Plain text version of all content between the <strong>AUTHORS</strong> heading and any
|
314
|
-
subsequent heading.</p></dd>
|
315
|
-
<dt>gem.files</dt><dd><p>Only contains the project's <code>LICENSE</code> and <code>CREDITS</code> files, rendered help
|
316
|
-
manual, Ruby library, shell command, and C extension.</p>
|
317
|
-
|
318
|
-
<p>All other files (such as the test suite and help manual source files) are
|
319
|
-
omitted (1) to reduce the gem file size and (2) because they are really only
|
320
|
-
needed during development.</p></dd>
|
321
|
-
</dl>
|
322
|
-
|
323
|
-
|
324
|
-
<p>The gem specification can be further customized through the <code>:gem_spec_logic</code>
|
325
|
-
parameter defined in the project's options file (see <strong>Options file</strong> below).</p>
|
326
|
-
|
327
|
-
<h3 id="inochi-ann">inochi ann</h3>
|
328
|
-
|
329
|
-
<p>Builds release announcements which can be edited by hand before publishing:</p>
|
330
|
-
|
331
|
-
<dl>
|
332
|
-
<dt>ann.html</dt><dd><p>Web page version of the release announcement.</p></dd>
|
333
|
-
<dt class="flush">ann.txt</dt><dd><p>Plain text version of the release announcement; converted from the Web page
|
334
|
-
version by <a href="http://lynx.isc.org">Lynx</a>.</p></dd>
|
335
|
-
<dt class="flush">ann.xml</dt><dd><p>RSS feed version of the release announcement.</p></dd>
|
336
|
-
</dl>
|
337
|
-
|
338
|
-
|
339
|
-
<h3 id="inochi-pub-ann-ruby-talk">inochi pub:ann:ruby-talk</h3>
|
340
|
-
|
341
|
-
<p>Announces the release on the <a href="http://www.ruby-lang.org/en/community/mailing-lists/">ruby-talk</a> mailing list.</p>
|
342
|
-
|
343
|
-
<p>It is recommended that you build, review, and edit the <code>ann.txt</code> file <em>by
|
344
|
-
hand</em> before running this command because (1) the body of that file is
|
345
|
-
published directly as the announcement message and (2) HTML to plain text
|
346
|
-
conversion is not perfect.</p>
|
347
|
-
|
348
|
-
<h3 id="inochi-pub-web">inochi pub:web</h3>
|
349
|
-
|
350
|
-
<p>Publishes the help manual, API documentation, and RSS feed to project website
|
351
|
-
using <span class="man-ref">rsync<span class="s">(1)</span></span> according to the :pub_web_* parameters defined in the
|
352
|
-
project's options file (see <strong>Options file</strong> below).</p>
|
353
|
-
|
354
|
-
<h2 id="PROJECTS">PROJECTS</h2>
|
355
|
-
|
356
|
-
<p>A project instilled with Inochi is composed of an options file, a license,
|
357
|
-
source code, documentation, and a Web presence; which are all explained below.</p>
|
358
|
-
|
359
|
-
<h3 id="Options-file">Options file</h3>
|
360
|
-
|
361
|
-
<p>A project's options file is a <a href="http://www.yaml.org/YAML_for_ruby.html">YAML</a> document named <code>inochi.opts</code> that defines
|
362
|
-
the following optional parameters for the various <a class="man-ref" href="inochi.1.html">inochi<span class="s">(1)</span></a> sub-commands:</p>
|
363
|
-
|
364
|
-
<dl>
|
365
|
-
<dt>:pub_web_target</dt><dd><p>Location where <code>inochi pub:web</code> will upload files. This value
|
366
|
-
can use any local/remote/protocol syntax supported by <span class="man-ref">rsync<span class="s">(1)</span></span>.</p></dd>
|
367
|
-
<dt>:pub_web_options</dt><dd><p>Options for <span class="man-ref">rsync<span class="s">(1)</span></span>, which uploads files for <code>inochi pub:web</code>.</p></dd>
|
368
|
-
<dt>:pub_web_extras</dt><dd><p>Additional files for <code>inochi pub:web</code> to upload. The values listed
|
369
|
-
here can use any local/remote/protocol syntax supported by <span class="man-ref">rsync<span class="s">(1)</span></span>.</p>
|
370
|
-
|
371
|
-
<p>Example:</p>
|
372
|
-
|
373
|
-
<pre><code>:pub_web_extras:
|
374
|
-
- some/file
|
375
|
-
- some_user@some_host:some/path
|
376
|
-
</code></pre></dd>
|
377
|
-
<dt>:gem_spec_logic</dt><dd><p>Arbitrary Ruby code that will configure this project's RubyGem before it
|
378
|
-
is built by <code>inochi gem</code>. This code has access to a local variable named
|
379
|
-
<code>gem</code> which holds a Gem::Specification object representing this project.</p>
|
380
|
-
|
381
|
-
<p>Example:</p>
|
382
|
-
|
383
|
-
<pre><code>:gem_spec_logic: |
|
384
|
-
# show the Inochi-provided specification for this project's gem
|
385
|
-
puts gem.to_ruby
|
386
|
-
|
387
|
-
# add files that are outside this project directory to the gem
|
388
|
-
gem.files += ['some', 'files', 'in', 'this', 'directory']
|
389
|
-
|
390
|
-
# omit some added files in this project's directory from the gem
|
391
|
-
gem.files -= ['lib/top_secret.rb', 'bin/more_top_secret_stuff']
|
392
|
-
|
393
|
-
# and so on... anything is possible! use your imagination!
|
394
|
-
</code></pre></dd>
|
395
|
-
</dl>
|
396
|
-
|
397
|
-
|
398
|
-
<h3 id="License-file">License file</h3>
|
399
|
-
|
400
|
-
<p>A project's license defines the legal conditions under which the project is
|
401
|
-
developed and distributed. It is stored in a file named LICENSE at the root
|
402
|
-
of the project directory.</p>
|
403
|
-
|
404
|
-
<h3 id="Ruby-library">Ruby library</h3>
|
405
|
-
|
406
|
-
<p>A project's Ruby library is composed of the following files:</p>
|
407
|
-
|
408
|
-
<dl>
|
409
|
-
<dt>lib/<var>PACKAGE</var>.rb</dt><dd><p>Defines the project's namespace (Ruby module or class) and registers
|
410
|
-
sub-libraries to be automatically loaded on demand (Kernel#autoload).</p></dd>
|
411
|
-
<dt>lib/<var>PACKAGE</var>/inochi.rb</dt><dd><p>Defines project information in Ruby constants within the project's namespace
|
412
|
-
(Ruby module or class) and establishes version constraints for gems this
|
413
|
-
project depends on if RubyGems is available in the user's environment.
|
414
|
-
Unsatisfied constraints are simply printed to the standard error stream;
|
415
|
-
they do not raise a <code>Gem::LoadError</code> exception.</p></dd>
|
416
|
-
</dl>
|
417
|
-
|
418
|
-
|
419
|
-
<h3 id="Test-suite">Test suite</h3>
|
420
|
-
|
421
|
-
<p>A project's test suite is composed of the following files:</p>
|
422
|
-
|
423
|
-
<dl>
|
424
|
-
<dt>test/runner</dt><dd><p>Executable Ruby script that hides the details of running the test suite.</p></dd>
|
425
|
-
<dt>test/helper.rb</dt><dd><p>Ruby source file that prepares the testing environment by loading a testing
|
426
|
-
library and defining common knowledge and utility logic shared by the actual
|
427
|
-
tests.</p></dd>
|
428
|
-
<dt>test/**/*_test.rb</dt><dd><p>Part of the test suite. Performs the actual testing.</p></dd>
|
429
|
-
</dl>
|
430
|
-
|
431
|
-
|
432
|
-
<h3 id="Shell-command">Shell command</h3>
|
433
|
-
|
434
|
-
<p>A project's shell command is an executable Ruby source file that serves as a
|
435
|
-
gateway into the project's Ruby library from the command line:</p>
|
436
|
-
|
437
|
-
<dl>
|
438
|
-
<dt>bin/<var>PACKAGE</var></dt><dd>Expects the project's <code>lib/</code> directory to be on Ruby's $LOAD_PATH (see
|
439
|
-
<strong>HACKING</strong> below). This requirement is automatically met when a user
|
440
|
-
installs the project using RubyGems.</dd>
|
441
|
-
</dl>
|
442
|
-
|
443
|
-
|
444
|
-
<h3 id="Help-manual">Help manual</h3>
|
445
|
-
|
446
|
-
<p>A project's help manual is a monolithic <a href="http://en.wikipedia.org/wiki/ERuby">eRuby</a> template that is (1) processed
|
447
|
-
by <a href="http://snk.tuxfamily.org/lib/ember/">Ember</a> with its shorthand notation, hierarchical unindentation, and
|
448
|
-
missing <code><% end %></code> inference features enabled, and (2) composed of the
|
449
|
-
following source files:</p>
|
450
|
-
|
451
|
-
<dl>
|
452
|
-
<dt class="flush">MANUAL</dt><dd><p>Primary source file of the help manual that (1) defines common knowledge and
|
453
|
-
utility logic and (2) divides its content into the following files for
|
454
|
-
easier editing and maintenance.</p></dd>
|
455
|
-
<dt class="flush">README</dt><dd><p>Introduces the project, its Web presence, and gives setup instructions.</p></dd>
|
456
|
-
<dt class="flush">USAGE</dt><dd><p>Explains how to use the project's shell command.</p></dd>
|
457
|
-
<dt>EXAMPLES</dt><dd><p>Illustrates how to perform common tasks with the project's shell command and
|
458
|
-
Ruby library, respectively.</p></dd>
|
459
|
-
<dt class="flush">HACKING</dt><dd><p>Instructs fellow software developers on running, testing, and hacking the
|
460
|
-
project's source code.</p></dd>
|
461
|
-
<dt class="flush">HISTORY</dt><dd><p>Records notes about current and past releases of the project in terms of
|
462
|
-
incompatible changes, new features, bug fixes, and housekeeping activities.</p></dd>
|
463
|
-
<dt class="flush">CREDITS</dt><dd><p>Attributes all developers and contributors whose efforts have made the
|
464
|
-
project what it is today.</p></dd>
|
465
|
-
<dt class="flush">FURTHER</dt><dd><p>Refers to related commands, help manuals, and topics beyond this project.</p></dd>
|
466
|
-
</dl>
|
467
|
-
|
468
|
-
|
469
|
-
<h3 id="Web-presence">Web presence</h3>
|
470
|
-
|
471
|
-
<p>A project's a Web presence is composed, at minimum, of the following:</p>
|
472
|
-
|
473
|
-
<dl>
|
474
|
-
<dt>Code repository</dt><dd><p>Where fellow software developers can obtain the latest source code.</p></dd>
|
475
|
-
<dt>Issue tracker</dt><dd><p>Where users and contributors can submit patches, request features, and get
|
476
|
-
help.</p></dd>
|
477
|
-
<dt>Official website</dt><dd><p>Where the help manual, API documentation, and announcements RSS feed can be
|
478
|
-
accessed (hopefully) permanently.</p></dd>
|
479
|
-
</dl>
|
480
|
-
|
481
|
-
|
482
|
-
<p>You may choose to omit some or all of these components by simply not
|
483
|
-
mentioning them in the <strong>Resources</strong> section of the help manual's README
|
484
|
-
source file.</p>
|
485
|
-
|
486
|
-
<h2 id="TUTORIAL">TUTORIAL</h2>
|
487
|
-
|
488
|
-
<p>This section shows Inochi is used to create a simple WordCount project.</p>
|
489
|
-
|
490
|
-
<h3 id="Creating-a-new-project">Creating a new project</h3>
|
491
|
-
|
492
|
-
<p>Create a directory for the project:</p>
|
493
|
-
|
494
|
-
<pre><code>mkdir word_count
|
495
|
-
</code></pre>
|
496
|
-
|
497
|
-
<p>Instill Inochi into the directory:</p>
|
498
|
-
|
499
|
-
<pre><code>cd word_count
|
500
|
-
inochi init project=WordCount
|
501
|
-
</code></pre>
|
502
|
-
|
503
|
-
<p>Review pending work marked as "TODO":</p>
|
504
|
-
|
505
|
-
<pre><code>grep TODO -R .
|
506
|
-
</code></pre>
|
507
|
-
|
508
|
-
<h3 id="Running-the-shell-command">Running the shell command</h3>
|
509
|
-
|
510
|
-
<p>Run the project's shell command:</p>
|
511
|
-
|
512
|
-
<pre><code>ruby -Ilib bin/word_count
|
513
|
-
</code></pre>
|
514
|
-
|
515
|
-
<p>View the project version number:</p>
|
516
|
-
|
517
|
-
<pre><code>ruby -Ilib bin/word_count --version
|
518
|
-
</code></pre>
|
519
|
-
|
520
|
-
<p>View the project help manual:</p>
|
521
|
-
|
522
|
-
<pre><code>ruby -Ilib bin/word_count --help
|
523
|
-
</code></pre>
|
524
|
-
|
525
|
-
<h3 id="Building-the-help-manual">Building the help manual</h3>
|
526
|
-
|
527
|
-
<p>Build the help manual:</p>
|
528
|
-
|
529
|
-
<pre><code>inochi man
|
530
|
-
</code></pre>
|
531
|
-
|
532
|
-
<p>View the help manual in a terminal:</p>
|
533
|
-
|
534
|
-
<pre><code>man man/man1/word_count.1.gz
|
535
|
-
</code></pre>
|
536
|
-
|
537
|
-
<p>View the help manual in a Web browser:</p>
|
538
|
-
|
539
|
-
<pre><code>man.html
|
540
|
-
</code></pre>
|
541
|
-
|
542
|
-
<h3 id="Implementing-the-project">Implementing the project</h3>
|
543
|
-
|
544
|
-
<p>Append the following code to the <code>test/word_count_test.rb</code> file:</p>
|
545
|
-
|
546
|
-
<pre><code>class TestWordCount < Test::Unit::TestCase
|
547
|
-
def test_handles_empty_input
|
548
|
-
assert_equal(0, WordCount.count(nil))
|
549
|
-
assert_equal(0, WordCount.count(''))
|
550
|
-
assert_equal(0, WordCount.count(' '))
|
551
|
-
end
|
552
|
-
|
553
|
-
def test_handles_single_words
|
554
|
-
assert_equal(1, WordCount.count('a'))
|
555
|
-
assert_equal(1, WordCount.count('foo'))
|
556
|
-
assert_equal(1, WordCount.count('bar'))
|
557
|
-
end
|
558
|
-
|
559
|
-
def test_handles_multiple_words
|
560
|
-
assert_equal(2, WordCount.count('a b'))
|
561
|
-
assert_equal(2, WordCount.count('a-b'))
|
562
|
-
assert_equal(2, WordCount.count('a/b'))
|
563
|
-
end
|
564
|
-
|
565
|
-
def test_ignores_punctuation_and_space
|
566
|
-
assert_equal(0, WordCount.count('!'))
|
567
|
-
assert_equal(0, WordCount.count('! @ # % #!@#'))
|
568
|
-
assert_equal(0, WordCount.count(' !'))
|
569
|
-
assert_equal(0, WordCount.count('! '))
|
570
|
-
assert_equal(0, WordCount.count(' ! '))
|
571
|
-
assert_equal(0, WordCount.count(' ! '))
|
572
|
-
end
|
573
|
-
end
|
574
|
-
</code></pre>
|
575
|
-
|
576
|
-
<p>Run the test suite and observe that all tests fail:</p>
|
577
|
-
|
578
|
-
<pre><code>ruby test/runner
|
579
|
-
</code></pre>
|
580
|
-
|
581
|
-
<p>Append the following code to the <code>lib/word_count.rb</code> file:</p>
|
582
|
-
|
583
|
-
<pre><code>module WordCount
|
584
|
-
# Returns the number of words in the given input.
|
585
|
-
def WordCount.count input
|
586
|
-
input.to_s.split(/\W+/).length
|
587
|
-
end
|
588
|
-
end
|
589
|
-
</code></pre>
|
590
|
-
|
591
|
-
<p>Run the test suite again and observe that all tests pass:</p>
|
592
|
-
|
593
|
-
<pre><code>ruby test/runner
|
594
|
-
</code></pre>
|
595
|
-
|
596
|
-
<p>Append the following code to the <code>bin/word_count</code> file:</p>
|
597
|
-
|
598
|
-
<pre><code>input = ARGF.read
|
599
|
-
total = WordCount.count(input)
|
600
|
-
puts "There are #{total} words in the input."
|
601
|
-
</code></pre>
|
602
|
-
|
603
|
-
<p>Run the project's shell command on the <code>README</code> file:</p>
|
604
|
-
|
605
|
-
<pre><code>ruby -Ilib bin/word_count README
|
606
|
-
</code></pre>
|
607
|
-
|
608
|
-
<h2 id="HACKING">HACKING</h2>
|
609
|
-
|
610
|
-
<p>This section is meant for people who want to develop Inochi's source code.</p>
|
611
|
-
|
612
|
-
<h3 id="Prerequisites">Prerequisites</h3>
|
613
|
-
|
614
|
-
<p>Install Ruby libraries necessary for development:</p>
|
615
|
-
|
616
|
-
<pre><code>gem install inochi --development
|
617
|
-
</code></pre>
|
618
|
-
|
619
|
-
<h3 id="Infrastructure">Infrastructure</h3>
|
620
|
-
|
621
|
-
<p><a href="http://snk.tuxfamily.org/lib/inochi/">Inochi</a> serves as the project infrastructure for Inochi. It handles tasks
|
622
|
-
such as building this help manual and API documentation, and packaging,
|
623
|
-
announcing, and publishing new releases. See its help manual and list of
|
624
|
-
tasks to get started:</p>
|
625
|
-
|
626
|
-
<pre><code>inochi --help # display help manual
|
627
|
-
inochi --tasks # list available tasks
|
628
|
-
</code></pre>
|
629
|
-
|
630
|
-
<h3 id="-LOAD_PATH-setup">$LOAD_PATH setup</h3>
|
631
|
-
|
632
|
-
<p>Ensure that the <code>lib/</code> directory is listed in Ruby's <code>$LOAD_PATH</code> before you
|
633
|
-
use any libraries therein or run any executables in the <code>bin/</code> directory.</p>
|
634
|
-
|
635
|
-
<p>This can be achieved by passing an option to Ruby:</p>
|
636
|
-
|
637
|
-
<pre><code>ruby -Ilib bin/inochi
|
638
|
-
irb -Ilib -r inochi
|
639
|
-
</code></pre>
|
640
|
-
|
641
|
-
<p>Or by setting the <code>$RUBYLIB</code> environment variable:</p>
|
642
|
-
|
643
|
-
<pre><code>export RUBYLIB=lib # bash, ksh, zsh
|
644
|
-
setenv RUBYLIB lib # csh
|
645
|
-
set -x RUBYLIB lib # fish
|
646
|
-
|
647
|
-
ruby bin/inochi
|
648
|
-
irb -r inochi
|
649
|
-
</code></pre>
|
650
|
-
|
651
|
-
<p>Or by running Ruby through the <a href="http://github.com/chneukirchen/rup/blob/master/ruby-wrapper">ruby-wrapper</a> tool.</p>
|
652
|
-
|
653
|
-
<h3 id="RubyGems-setup">RubyGems setup</h3>
|
654
|
-
|
655
|
-
<p>If you use Ruby 1.8 or older, then ensure that RubyGems is activated before
|
656
|
-
you use any libraries in the <code>lib/</code> directory or run any executables in the
|
657
|
-
<code>bin/</code> directory.</p>
|
658
|
-
|
659
|
-
<p>This can be achieved by passing an option to Ruby:</p>
|
660
|
-
|
661
|
-
<pre><code>ruby -rubygems bin/inochi
|
662
|
-
irb -rubygems -r inochi
|
663
|
-
</code></pre>
|
664
|
-
|
665
|
-
<p>Or by setting the <code>$RUBYOPT</code> environment variable:</p>
|
666
|
-
|
667
|
-
<pre><code>export RUBYOPT=-rubygems # bash, ksh, zsh
|
668
|
-
setenv RUBYOPT -rubygems # csh
|
669
|
-
set -x RUBYOPT -rubygems # fish
|
670
|
-
</code></pre>
|
671
|
-
|
672
|
-
<h3 id="Running-tests">Running tests</h3>
|
673
|
-
|
674
|
-
<p>Simply execute the included test runner, which sets up Ruby's <code>$LOAD_PATH</code> for
|
675
|
-
testing, loads the <code>test/helper.rb</code> file, and then evaluates all
|
676
|
-
<code>test/**/*_test.rb</code> files:</p>
|
677
|
-
|
678
|
-
<pre><code>ruby test/runner
|
679
|
-
</code></pre>
|
680
|
-
|
681
|
-
<p>Its exit status will indicate whether all tests have passed. It may also
|
682
|
-
print additional pass/fail information depending on the testing library used
|
683
|
-
in the <code>test/helper.rb</code> file.</p>
|
684
|
-
|
685
|
-
<h3 id="Contributing">Contributing</h3>
|
686
|
-
|
687
|
-
<p>Fork this project on GitHub (see <strong>Resources</strong> above) and send a pull request.</p>
|
688
|
-
|
689
|
-
<h2 id="HISTORY">HISTORY</h2>
|
690
|
-
|
691
|
-
<p>This section contains release notes of current and past releases.</p>
|
692
|
-
|
693
|
-
<h3 id="Version-4-0-1-2010-07-28-">Version 4.0.1 (2010-07-28)</h3>
|
694
|
-
|
695
|
-
<p>This release fixes a bug in gem version dependency establishment.</p>
|
696
|
-
|
697
|
-
<p>Bug fixes:</p>
|
698
|
-
|
699
|
-
<ul>
|
700
|
-
<li><p>Gem version dependencies were not being established in Ruby 1.8.7 and
|
701
|
-
1.9.2 because <code>Kernel#gem</code> <a href="http://redmine.ruby-lang.org/issues/show/3617">is a private method</a> in those Ruby versions.</p>
|
702
|
-
|
703
|
-
<p>To propagate this fix into your projects, please reinitialize them with
|
704
|
-
this version of Inochi.</p></li>
|
705
|
-
</ul>
|
706
|
-
|
707
|
-
|
708
|
-
<h3 id="Version-4-0-0-2010-07-25-">Version 4.0.0 (2010-07-25)</h3>
|
709
|
-
|
710
|
-
<p>Incompatible changes:</p>
|
711
|
-
|
712
|
-
<ul>
|
713
|
-
<li>Rename the "VERSIONS" section in the HISTORY file to "HISTORY".</li>
|
714
|
-
</ul>
|
715
|
-
|
716
|
-
|
717
|
-
<p>Changes you will see in upgraded or newly generated projects:</p>
|
718
|
-
|
719
|
-
<ul>
|
720
|
-
<li><p>Rename the "FURTHER" file to "BEYOND".</p></li>
|
721
|
-
<li><p>Rename <code>test/test_helper.rb</code> to just <code>test/helper.rb</code>.</p></li>
|
722
|
-
<li><p>Store resource URLs in variables in MANUAL for reuse.</p></li>
|
723
|
-
<li><p>Provide more precise link to ruby-wrapper tool in HACKING.</p></li>
|
724
|
-
</ul>
|
725
|
-
|
726
|
-
|
727
|
-
<p>New features:</p>
|
728
|
-
|
729
|
-
<ul>
|
730
|
-
<li><p>Ensure that project version matches release notes before building a gem.
|
731
|
-
This helps to prevent the problem where you sometimes forget to update
|
732
|
-
both the release notes and the project information file simultaneously.</p></li>
|
733
|
-
<li><p>Display announcement message to user (and make them confirm it) before
|
734
|
-
publishing to ruby-talk. This helps to prevent you from appearing inept
|
735
|
-
and having to apologize later for your publishing blunders.</p></li>
|
736
|
-
<li><p>Add <code>-d</code> (to enable <code>$DEBUG</code>) and <code>-v</code> (to enable <code>$VERBOSE</code>)
|
737
|
-
command-line options to the generated <code>test/runner</code> script.</p></li>
|
738
|
-
</ul>
|
739
|
-
|
740
|
-
|
741
|
-
<p>Bug fixes:</p>
|
742
|
-
|
743
|
-
<ul>
|
744
|
-
<li><p>Various compatibility fixes for Ruby 1.9.2-rc2.</p></li>
|
745
|
-
<li><p>Prefix <code>test/runner</code> command with "ruby" for Windows users.</p></li>
|
746
|
-
<li><p>Ember::WEBSITE was always being emitted in README.</p></li>
|
747
|
-
</ul>
|
748
|
-
|
749
|
-
|
750
|
-
<p>Housekeeping:</p>
|
751
|
-
|
752
|
-
<ul>
|
753
|
-
<li><p>Add version constraints for YARD and Mechanize dependencies.</p></li>
|
754
|
-
<li><p>Upgrade from Dfect 1.1.0 to Detest 3.1.0 for unit testing.</p></li>
|
755
|
-
<li><p>Upgrade to Ronn 0.7.0 for generating this user manual.</p></li>
|
756
|
-
</ul>
|
757
|
-
|
758
|
-
|
759
|
-
<h3 id="Version-3-0-0-2010-04-27-">Version 3.0.0 (2010-04-27)</h3>
|
760
|
-
|
761
|
-
<p>Incompatible changes:</p>
|
762
|
-
|
763
|
-
<ul>
|
764
|
-
<li><p>The <code>require()</code> class method is no longer emitted on your project's
|
765
|
-
namespace. Instead, gem version constraints are established up front when
|
766
|
-
your project's Ruby library is first loaded.</p></li>
|
767
|
-
<li><p>Author names are now fetched from the AUTHORS section, not CREDITS.</p></li>
|
768
|
-
<li><p>Project information is now placed in the NAME section, not ABOUT.</p></li>
|
769
|
-
</ul>
|
770
|
-
|
771
|
-
|
772
|
-
<p>Bug fixes:</p>
|
773
|
-
|
774
|
-
<ul>
|
775
|
-
<li><p>Reflect current Inochi version in gem constraint.</p></li>
|
776
|
-
<li><p>Forgot to list <a href="http://snk.tuxfamily.org/lib/ember/">Ember</a> as a runtime gem dependency.</p></li>
|
777
|
-
</ul>
|
778
|
-
|
779
|
-
|
780
|
-
<p>Housekeeping:</p>
|
781
|
-
|
782
|
-
<ul>
|
783
|
-
<li><p>Move all task documentation into new <strong>TASKS</strong> section.</p></li>
|
784
|
-
<li><p>Move TASKS & PROJECTS information into separate files.</p></li>
|
785
|
-
</ul>
|
786
|
-
|
787
|
-
|
788
|
-
<h3 id="Version-2-0-1-2010-04-25-">Version 2.0.1 (2010-04-25)</h3>
|
789
|
-
|
790
|
-
<p>This release fixes some bugs and adds a simple tutorial to the help manual.</p>
|
791
|
-
|
792
|
-
<p>Bug fixes:</p>
|
793
|
-
|
794
|
-
<ul>
|
795
|
-
<li><p>Task files were not loaded in correct order. As a result, certain Inochi
|
796
|
-
tasks would fail (depending on the sorting order of your filesystem) with
|
797
|
-
the following cryptic error:</p>
|
798
|
-
|
799
|
-
<pre><code>inochi aborted!
|
800
|
-
Don't know how to build task ''
|
801
|
-
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1728:in `[]'
|
802
|
-
(See full trace by running task with --trace)
|
803
|
-
</code></pre></li>
|
804
|
-
<li><p>LICENSE file template lacked a "TODO" marker.</p></li>
|
805
|
-
<li><p>Forgot version number heading in announcement.</p></li>
|
806
|
-
</ul>
|
807
|
-
|
808
|
-
|
809
|
-
<p>Housekeeping:</p>
|
810
|
-
|
811
|
-
<ul>
|
812
|
-
<li>Restored the simple WordCount tutorial from version 1.1.1.
|
813
|
-
See <strong>TUTORIAL</strong> above.</li>
|
814
|
-
</ul>
|
815
|
-
|
816
|
-
|
817
|
-
<h3 id="Version-2-0-0-2010-04-24-">Version 2.0.0 (2010-04-24)</h3>
|
818
|
-
|
819
|
-
<p>This release makes Inochi a development-time dependency only, documents nearly
|
820
|
-
everything in the help manual, renders the help manual as a UNIX manual page,
|
821
|
-
simplifies the project infrastructure it provides, and removes needless cruft.</p>
|
822
|
-
|
823
|
-
<p>Incompatible changes:</p>
|
824
|
-
|
825
|
-
<ul>
|
826
|
-
<li><p>Inochi is no longer a runtime dependency (gem or otherwise) for projects
|
827
|
-
that use it. It also no longer runs tests, creates project namespaces, or
|
828
|
-
provides libraries for internationalization, combinatorics, command-line
|
829
|
-
parsing, utility logic, or Rakefiles.</p>
|
830
|
-
|
831
|
-
<p>See <strong>PROJECTS</strong> to learn about the new Inochi infrastructure.</p></li>
|
832
|
-
<li><p>The help manual is now processed by <a href="http://github.com/rtomayko/ronn">Ronn</a> instead of <a href="http://snk.tuxfamily.org/lib/erbook/">ERBook</a>. As a
|
833
|
-
result, you may only use plain <a href="http://daringfireball.net/projects/markdown">Markdown</a> and <a href="http://en.wikipedia.org/wiki/ERuby">eRuby</a> when writing it.</p></li>
|
834
|
-
<li><p>Announcement publishing tasks no longer read login information from the
|
835
|
-
<code>~/.config/inochi/logins.yaml</code> file and prompt you to enter that
|
836
|
-
information manually instead. As a result, the forementioned file is no
|
837
|
-
longer recognized or used by Inochi so you may safely delete it.</p></li>
|
838
|
-
</ul>
|
839
|
-
|
840
|
-
|
841
|
-
<p>New features:</p>
|
842
|
-
|
843
|
-
<ul>
|
844
|
-
<li><p>The help manual is now available as a UNIX manual page (thanks to <a href="http://github.com/rtomayko/ronn">Ronn</a>)
|
845
|
-
and is now divided into smaller files that can be read directly without
|
846
|
-
needing a special viewer, and are named according to open-source packaging
|
847
|
-
conventions (such as README, HACKING, and LICENSE) so that they draw the
|
848
|
-
attention of users unaccustomed to the organization of your project.</p></li>
|
849
|
-
<li><p>A <code>require</code> class method is now added to the project's namespace. This
|
850
|
-
method verifies that the library or gem being required meets the
|
851
|
-
dependency version constraints defined by the project.</p></li>
|
852
|
-
<li><p>A <code>test/runner</code> script is now generated. It provides a fast,
|
853
|
-
self-contained way to run your project's test suite.</p></li>
|
854
|
-
<li><p>Inochi is now a Rake application. A <code>Rakefile</code> is not necessary.</p></li>
|
855
|
-
</ul>
|
856
|
-
|
857
|
-
|
858
|
-
<p>Housekeeping:</p>
|
859
|
-
|
860
|
-
<ul>
|
861
|
-
<li><p>Many KISS and YAGNI fueled iterations later, this is it! :-)</p></li>
|
862
|
-
<li><p>Nearly every aspect of Inochi is now meticulously documented in the help
|
863
|
-
manual to the best of my ability. If I missed something important, please
|
864
|
-
notify me or contribute the correction yourself!</p></li>
|
865
|
-
</ul>
|
866
|
-
|
867
|
-
|
868
|
-
<h3 id="Version-1-1-1-2009-10-03-">Version 1.1.1 (2009-10-03)</h3>
|
869
|
-
|
870
|
-
<p>This release improves Ruby 1.9 support and upgrades gem dependencies.</p>
|
871
|
-
|
872
|
-
<p>Bug fixes:</p>
|
873
|
-
|
874
|
-
<ul>
|
875
|
-
<li><p><code>require()</code> was unable to find project library in Ruby 1.9.2dev.</p></li>
|
876
|
-
<li><p>Ruby 1.9 warning about "shadowing outer variable".</p></li>
|
877
|
-
<li><p>Ruby 1.9 error about "incompatible encoding regexp match".</p></li>
|
878
|
-
</ul>
|
879
|
-
|
880
|
-
|
881
|
-
<p>Housekeeping:</p>
|
882
|
-
|
883
|
-
<ul>
|
884
|
-
<li><p>The "spicycode-rcov" project was officially renamed to "relevance-rcov".</p></li>
|
885
|
-
<li><p>Upgrade to RubyForge 2.x library for publishing gems.</p></li>
|
886
|
-
</ul>
|
887
|
-
|
888
|
-
|
889
|
-
<h3 id="Version-1-1-0-2009-09-06-">Version 1.1.0 (2009-09-06)</h3>
|
890
|
-
|
891
|
-
<p>This release improves the user manual and scaffold generator output, injects
|
892
|
-
more metadata into gems, adds support for Microsoft web browsers, and fixes
|
893
|
-
some bugs.</p>
|
894
|
-
|
895
|
-
<p>New features:</p>
|
896
|
-
|
897
|
-
<ul>
|
898
|
-
<li><p>Add instructions for building gems without Inochi as a runtime dependency.</p></li>
|
899
|
-
<li><p>Put release notes in "description" field of gemspec, as <a href="http://www.ruby-forum.com/topic/190220#830072">suggested by Eric
|
900
|
-
Hodel</a>, so that subscribers
|
901
|
-
of <a href="http://gems.rubyforge.org/index.rss">the RubyForge gems feed</a> are
|
902
|
-
aware of the changes in a published gem.</p></li>
|
903
|
-
<li><p>Set the "date" field in gemspec to project release date.</p></li>
|
904
|
-
<li><p>Change file extension of generated user manuals from .xhtml to .html to
|
905
|
-
accomodate Microsoft web browsers' inability to process the
|
906
|
-
application/xhtml+xml mime type.</p></li>
|
907
|
-
</ul>
|
908
|
-
|
909
|
-
|
910
|
-
<p>Bug fixes:</p>
|
911
|
-
|
912
|
-
<ul>
|
913
|
-
<li><p>The sdoc library was necessary to run 'rake test'.</p></li>
|
914
|
-
<li><p>Forgot to add <code>:develop</code> option to scaffold generator output.</p></li>
|
915
|
-
<li><p>Make "rake lang:dump" unconditionally overwrite the dump file.</p></li>
|
916
|
-
<li><p>Fix gem not being built and prevent Maruku errors for the dummy
|
917
|
-
"WordCount" project in the user manual.</p></li>
|
918
|
-
<li><p>Use /usr/bin/env instead of /usr/bin/ruby to launch Ruby for better
|
919
|
-
portability.</p></li>
|
920
|
-
</ul>
|
921
|
-
|
922
|
-
|
923
|
-
<p>Housekeeping:</p>
|
924
|
-
|
925
|
-
<ul>
|
926
|
-
<li><p>Use simpler Copyright reminder at the top of every file.</p></li>
|
927
|
-
<li><p>Open source is for fun, so <a href="http://loiclemeur.com/english/2009/03/never-criticize-your-competitors.html">be
|
928
|
-
nice</a>:
|
929
|
-
speak of "related works" instead of "competitors".</p></li>
|
930
|
-
<li><p>Rename "Tutorial" to "General walkthrough" in user manual and add a
|
931
|
-
"Specific topics" section for housing uncommon use cases.</p></li>
|
932
|
-
<li><p>Remove "logistics" section and redistribute its contents in more
|
933
|
-
suitable locations in the user manual.</p></li>
|
934
|
-
</ul>
|
935
|
-
|
936
|
-
|
937
|
-
<h3 id="Version-1-0-0-2009-05-03-">Version 1.0.0 (2009-05-03)</h3>
|
938
|
-
|
939
|
-
<p>This release allows your gems to not depend on Inochi, lets you choose which
|
940
|
-
unit testing library to use, adds new utility libraries and rake tasks, and
|
941
|
-
fixes some bugs.</p>
|
942
|
-
|
943
|
-
<p>Incompatible changes:</p>
|
944
|
-
|
945
|
-
<ul>
|
946
|
-
<li><p>Your program is no longer halted by <code>Inochi.init()</code> and <code>Inochi.rake()</code> if
|
947
|
-
gem dependencies are not satified. A warning is issued instead.</p></li>
|
948
|
-
<li><p>The <code>project_summary</code> and <code>project_history</code> nodes, which are provided by
|
949
|
-
<code>Inochi.book()</code> to the user manual, have been renamed to <code>project</code> and
|
950
|
-
<code>history</code> respectively.</p></li>
|
951
|
-
<li><p>ERBook 7.1.0 is now used for generating the user manual. This is a major
|
952
|
-
step up from the previous version, and so it has incompatible changes.
|
953
|
-
See its release notes for details.</p></li>
|
954
|
-
<li><p><a href="http://github.com/voloko/sdoc/tree/master">SDoc</a> is now used to generate
|
955
|
-
API documentation instead of <a href="http://yard.rubyforge.org">YARD</a>. If you
|
956
|
-
link to particular classes or methods in the generated API documentation,
|
957
|
-
be sure to update your link addresses!</p></li>
|
958
|
-
<li><p>Minitest is no longer the default testing library. You must specify which
|
959
|
-
testing library you want to use via the <code>:test_with</code> option of the
|
960
|
-
<code>Inochi.rake()</code> method. See the "Test execution" section for details.</p></li>
|
961
|
-
<li><p>The "pak" rake task, which is provided by <code>Inochi.rake()</code>, has been
|
962
|
-
renamed to "gem".</p></li>
|
963
|
-
</ul>
|
964
|
-
|
965
|
-
|
966
|
-
<p>New features:</p>
|
967
|
-
|
968
|
-
<ul>
|
969
|
-
<li><p>Add <code>:inochi_consumer</code> and <code>:inochi_producer</code> options to <code>Inochi.rake()</code>
|
970
|
-
which allows you to <em>avoid</em> having Inochi as a runtime and development
|
971
|
-
dependency, respectively, for your project's gem.</p>
|
972
|
-
|
973
|
-
<p>This is useful if you just want to use Inochi facilities for building a
|
974
|
-
gem for a pure Ruby library that does not have any need for Inochi's
|
975
|
-
runtime convenience facilities.</p></li>
|
976
|
-
<li><p>Add <code>:develop</code> option for <code>Inochi.init()</code> which lets you specify RubyGems
|
977
|
-
as development dependencies in the same way as the <code>:require</code> option.</p></li>
|
978
|
-
<li><p>Add "lint" rake task which reports <a href="http://www.infoq.com/news/2008/11/static-analysis-tool-roundup">code quality
|
979
|
-
statistics</a>.</p></li>
|
980
|
-
<li><p>Add "test:cov" rake task which reports code coverage statistics.</p></li>
|
981
|
-
<li><p>Add "test:ruby" task which runs all tests with
|
982
|
-
<a href="http://www.infoq.com/news/2008/02/multiruby-testing">multiruby</a>.</p></li>
|
983
|
-
<li><p>Add 'rake opts=' environment variable, which lets you specify command-line
|
984
|
-
arguments directly to the Ruby interpreter, for all test* rake tasks.</p></li>
|
985
|
-
<li><p>Add inochi/util/combo combinatorics library for enumerations,
|
986
|
-
permutations, and combinations which are all useful in exhaustive
|
987
|
-
brute-force unit testing.</p></li>
|
988
|
-
<li><p>Add inochi/util/tempdir library which really should be in the Ruby
|
989
|
-
standard library.</p></li>
|
990
|
-
</ul>
|
991
|
-
|
992
|
-
|
993
|
-
<p>Bug fixes:</p>
|
994
|
-
|
995
|
-
<ul>
|
996
|
-
<li><p>The "enable email notification" checkbox was not activated properly when
|
997
|
-
posting announcement to ruby-talk mailing list via Ruby-Forum.</p></li>
|
998
|
-
<li><p>Mark gems needed by <code>Inochi.rake()</code> as <em>development</em> dependencies.</p>
|
999
|
-
|
1000
|
-
<p>Users must now run <code>gem install Inochi --development</code> to install these
|
1001
|
-
dependencies. This also solves the recursive dependency problem between
|
1002
|
-
Inochi and ERBook.</p></li>
|
1003
|
-
<li><p>Set executable in gem specification only if it exists.</p></li>
|
1004
|
-
<li><p>Fix parsing of stack trace in Ruby 1.9.</p></li>
|
1005
|
-
</ul>
|
1006
|
-
|
1007
|
-
|
1008
|
-
<p>Housekeeping:</p>
|
1009
|
-
|
1010
|
-
<ul>
|
1011
|
-
<li><p>Write contributor names in CREDITS file instead of in the user manual.</p></li>
|
1012
|
-
<li><p>Use completely lowercase name for Rakefile.</p></li>
|
1013
|
-
<li><p>Add copyright statement at the top of every source file.</p></li>
|
1014
|
-
</ul>
|
1015
|
-
|
1016
|
-
|
1017
|
-
<h3 id="Version-0-3-0-2009-02-12-">Version 0.3.0 (2009-02-12)</h3>
|
1018
|
-
|
1019
|
-
<p>This release adds support for language translations, improves the user
|
1020
|
-
interface, and fixes a show-stopper bug for Windows users.</p>
|
1021
|
-
|
1022
|
-
<p>New features:</p>
|
1023
|
-
|
1024
|
-
<ul>
|
1025
|
-
<li><p>Add support for language translations of phrases used in a project.</p>
|
1026
|
-
|
1027
|
-
<ul>
|
1028
|
-
<li><p>Add "lang:dump" Rake task for extracting language phrases from project.</p></li>
|
1029
|
-
<li><p>Add "lang:conv" Rake task for translating dumped phrases into various
|
1030
|
-
languages using the BabelFish translation service.</p></li>
|
1031
|
-
<li><p>Add <code>--locale</code> option to a project's main executable for setting user's
|
1032
|
-
preferred language in spite of the user's locale environment.</p></li>
|
1033
|
-
</ul>
|
1034
|
-
</li>
|
1035
|
-
<li><p>Notify user when attempting to publish announcements in the "pub" Rake
|
1036
|
-
tasks.</p></li>
|
1037
|
-
</ul>
|
1038
|
-
|
1039
|
-
|
1040
|
-
<p>Bug fixes:</p>
|
1041
|
-
|
1042
|
-
<ul>
|
1043
|
-
<li><p>In Windows, <code>ENV['USERPROFILE']</code> gives the path to the user's home
|
1044
|
-
directory and <code>ENV['HOME']</code> is not defined.</p></li>
|
1045
|
-
<li><p>The only real solution to the circular gem dependency problem is:</p>
|
1046
|
-
|
1047
|
-
<pre><code>gem install --force
|
1048
|
-
</code></pre>
|
1049
|
-
|
1050
|
-
<p>You should update the "Setup" section in your projects' user manuals
|
1051
|
-
accordingly.</p></li>
|
1052
|
-
</ul>
|
1053
|
-
|
1054
|
-
|
1055
|
-
<p>Housekeeping:</p>
|
1056
|
-
|
1057
|
-
<ul>
|
1058
|
-
<li><p>Break the huge lib/inochi/inochi.rb library into smaller files.</p></li>
|
1059
|
-
<li><p>Instead of adding methods to singleton classes directly, define modules
|
1060
|
-
and extend to them so that YARDoc documents the methods appropriately.</p></li>
|
1061
|
-
<li><p>List all project contributors globally in the "Credits" section.</p></li>
|
1062
|
-
<li><p>Remove "Contributor kudos" paragraph in release notes in favor of
|
1063
|
-
crediting contributors inline with each item in the release notes.</p></li>
|
1064
|
-
<li><p>Mention that the project license is ISC for the reader's convenience.</p></li>
|
1065
|
-
</ul>
|
1066
|
-
|
1067
|
-
|
1068
|
-
<h3 id="Version-0-2-0-2009-01-25-">Version 0.2.0 (2009-01-25)</h3>
|
1069
|
-
|
1070
|
-
<p>This release adds support for unit testing, improves the portability of
|
1071
|
-
<strong>Inochi</strong> and configurability of your projects, adds new content to the user
|
1072
|
-
manual, and fixes some bugs.</p>
|
1073
|
-
|
1074
|
-
<p>New features:</p>
|
1075
|
-
|
1076
|
-
<ul>
|
1077
|
-
<li><p>Added support for unit testing via the
|
1078
|
-
<a href="http://rubyforge.org/projects/bfts/">minitest</a> library.</p>
|
1079
|
-
|
1080
|
-
<ul>
|
1081
|
-
<li>The scaffold generator now emits a default unit test for the main
|
1082
|
-
project library.</li>
|
1083
|
-
</ul>
|
1084
|
-
</li>
|
1085
|
-
<li><p>Added optional ProgramName parameter to the scaffold generator. This
|
1086
|
-
allows you to specify reasonable program names when your project module
|
1087
|
-
has a strange capitalization:</p>
|
1088
|
-
|
1089
|
-
<pre><code>$ inochi ERBook
|
1090
|
-
create er_book/LICENSE
|
1091
|
-
|
1092
|
-
$ inochi ERBook erbook
|
1093
|
-
create erbook/LICENSE
|
1094
|
-
|
1095
|
-
$ inochi ERBook foobar
|
1096
|
-
create foobar/LICENSE
|
1097
|
-
</code></pre></li>
|
1098
|
-
<li><p>Allow project authors to be specified via
|
1099
|
-
<code>Inochi.init :YourProject, :authors => [['name', 'mail']]</code>
|
1100
|
-
(thanks to Florian Gilcher)</p></li>
|
1101
|
-
</ul>
|
1102
|
-
|
1103
|
-
|
1104
|
-
<p>Bug fixes:</p>
|
1105
|
-
|
1106
|
-
<ul>
|
1107
|
-
<li><p>Run on both JRuby and normal Ruby in multiple versions and with different
|
1108
|
-
executable names on Windows. (thanks to Florian Gilcher)</p></li>
|
1109
|
-
<li><p>Use <code>Gem::RubyGemsVersion</code> instead of a shell command to determine
|
1110
|
-
rubygems version for generation of setup.erb. (thanks to Florian Gilcher)</p></li>
|
1111
|
-
<li><p>Add blank lines between all list items, not just multi-line ones, in the
|
1112
|
-
plain-text version of the release announcement for improved readability.</p></li>
|
1113
|
-
<li><p>Omit LaTeX-style heading numbers from release announcements. They caused
|
1114
|
-
confusion, especially in plain-text announcements, when trying to
|
1115
|
-
determine which version of a project was released.</p></li>
|
1116
|
-
</ul>
|
1117
|
-
|
1118
|
-
|
1119
|
-
<p>Housekeeping:</p>
|
1120
|
-
|
1121
|
-
<dl>
|
1122
|
-
<dt>Added unit tests for utility methods provided by the <strong>Inochi</strong> module</dt><dd>project name calculation and CamelCase to snake_case conversion.</dd>
|
1123
|
-
</dl>
|
1124
|
-
|
1125
|
-
|
1126
|
-
<h3 id="Version-0-1-0-2009-01-13-">Version 0.1.0 (2009-01-13)</h3>
|
1127
|
-
|
1128
|
-
<p>This release reattempts to fix the <a href="http://www.ruby-forum.com/topic/176173#771281">circular dependency
|
1129
|
-
problem</a> that occurred when
|
1130
|
-
installing either Inochi or ERBook.</p>
|
1131
|
-
|
1132
|
-
<p>New features:</p>
|
1133
|
-
|
1134
|
-
<ul>
|
1135
|
-
<li><code>Inochi.init()</code> now adds <code>#major()</code>, <code>#series()</code>, and <code>#requirement()</code>
|
1136
|
-
instance methods to a project's <code>VERSION</code> constant.</li>
|
1137
|
-
</ul>
|
1138
|
-
|
1139
|
-
|
1140
|
-
<p>Bug fixes:</p>
|
1141
|
-
|
1142
|
-
<ul>
|
1143
|
-
<li><p>Solved circular dependency problem by making inochi gem not dependent on
|
1144
|
-
erbook gem. However, ERBook is still required during runtime and is
|
1145
|
-
supplied on the <code>gem install</code> command for <strong>Inochi</strong>.</p>
|
1146
|
-
|
1147
|
-
<p>The "Installing" section has been updated accordingly.</p></li>
|
1148
|
-
<li><p>Add forgotten Rake dependency for <strong>Inochi</strong> gem.</p></li>
|
1149
|
-
</ul>
|
1150
|
-
|
1151
|
-
|
1152
|
-
<h3 id="Version-0-0-1-2009-01-13-">Version 0.0.1 (2009-01-13)</h3>
|
1153
|
-
|
1154
|
-
<p>This release fixes some show-stopper bugs.</p>
|
1155
|
-
|
1156
|
-
<p>Bug fixes:</p>
|
1157
|
-
|
1158
|
-
<ul>
|
1159
|
-
<li><p>The name of the project library was <a href="http://www.ruby-forum.com/topic/176173#771351">being determined
|
1160
|
-
incorrectly</a>.
|
1161
|
-
(thanks to Florian Gilcher)</p></li>
|
1162
|
-
<li><p>There was a <a href="http://www.ruby-forum.com/topic/176173#771281">circular dependency problem</a> when installing the <strong>Inochi</strong> gem. (thanks to Florian Gilcher)</p>
|
1163
|
-
|
1164
|
-
<p>The solution is to specify the <code>--force</code> option when installing the gem.
|
1165
|
-
The "Installing" section has been updated accordingly.</p></li>
|
1166
|
-
<li><p>Generated project scaffolds now check against the major version of the
|
1167
|
-
<strong>Inochi</strong> gem, to avoid runtime version conflicts.</p></li>
|
1168
|
-
</ul>
|
1169
|
-
|
1170
|
-
|
1171
|
-
<p>Housekeeping:</p>
|
1172
|
-
|
1173
|
-
<ul>
|
1174
|
-
<li>Only add project libraries to <code>$LOAD_PATH</code> if not already there.</li>
|
1175
|
-
</ul>
|
1176
|
-
|
1177
|
-
|
1178
|
-
<h3 id="Version-0-0-0-2009-01-13-">Version 0.0.0 (2009-01-13)</h3>
|
1179
|
-
|
1180
|
-
<p>This is the first release of Inochi. Enjoy!</p>
|
1181
|
-
|
1182
|
-
<h2 id="AUTHORS">AUTHORS</h2>
|
1183
|
-
|
1184
|
-
<p>Suraj N. Kurapati</p>
|
1185
|
-
|
1186
|
-
<h2 id="CREDITS">CREDITS</h2>
|
1187
|
-
|
1188
|
-
<p>Florian Gilcher,
|
1189
|
-
Peileppe Production</p>
|
1190
|
-
|
1191
|
-
<p>The "inochi.png" image and its "inochi.svg" source utilize the
|
1192
|
-
<a href="http://www.openclipart.org/detail/17456">"3 flowers"</a> graphic, which was created and released into
|
1193
|
-
the public domain by <a href="http://www.openclipart.org/user-detail/Peileppe">Peileppe Production</a> on June 25, 2008.</p>
|
1194
|
-
|
1195
|
-
<h2 id="LICENSE">LICENSE</h2>
|
1196
|
-
|
1197
|
-
<p>(the ISC license)</p>
|
1198
|
-
|
1199
|
-
<p>Copyright 2008 Suraj N. Kurapati <a href="mailto:sunaku@gmail.com" data-bare-link="true">sunaku@gmail.com</a></p>
|
1200
|
-
|
1201
|
-
<p>Permission to use, copy, modify, and/or distribute this software for any
|
1202
|
-
purpose with or without fee is hereby granted, provided that the above
|
1203
|
-
copyright notice and this permission notice appear in all copies.</p>
|
1204
|
-
|
1205
|
-
<p>THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
1206
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
1207
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
1208
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
1209
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
1210
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
1211
|
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</p>
|
1212
|
-
|
1213
|
-
<h2 id="SEE-ALSO">SEE ALSO</h2>
|
1214
|
-
|
1215
|
-
<p><span class="man-ref">rake<span class="s">(1)</span></span>,
|
1216
|
-
<span class="man-ref">rsync<span class="s">(1)</span></span>,
|
1217
|
-
<a href="http://github.com/rtomayko/ronn">Ronn</a>,
|
1218
|
-
<a href="http://snk.tuxfamily.org/lib/ember/">Ember</a></p>
|
1219
|
-
|
1220
|
-
|
1221
|
-
<ol class='man-decor man-foot man foot'>
|
1222
|
-
<li class='tl'></li>
|
1223
|
-
<li class='tc'>July 2010</li>
|
1224
|
-
<li class='tr'>inochi(1)</li>
|
1225
|
-
</ol>
|
1226
|
-
|
1227
|
-
</div>
|
1228
|
-
</body>
|
1229
|
-
</html>
|