inochi 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/inochi/engine.rb CHANGED
@@ -37,7 +37,7 @@ module Inochi
37
37
  end
38
38
 
39
39
  def register_rake_tasks
40
- Dir[File.dirname(__FILE__) + '/tasks/*.rake'].each do |file|
40
+ Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each do |file|
41
41
  instance_eval File.read(file), file
42
42
  end
43
43
  end
data/lib/inochi/inochi.rb CHANGED
@@ -18,12 +18,12 @@ module Inochi
18
18
  ##
19
19
  # Number of this release of this project.
20
20
  #
21
- VERSION = '2.0.0'
21
+ VERSION = '2.0.1'
22
22
 
23
23
  ##
24
24
  # Date of this release of this project.
25
25
  #
26
- RELDATE = '2010-04-24'
26
+ RELDATE = '2010-04-25'
27
27
 
28
28
  ##
29
29
  # Description of this release of this project.
File without changes
File without changes
File without changes
File without changes
@@ -87,6 +87,7 @@ task :@ann_html do
87
87
  <p>#{@project_module::WEBSITE}</p>
88
88
  </center>
89
89
  #{@ann_nfo_html_nodes.join}
90
+ #{@ann_rel_html_title_node}
90
91
  #{@ann_rel_html_body_nodes.join}
91
92
  }.strip
92
93
 
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  (the ISC license)
2
2
 
3
- Copyright #{Time.now.year} Your Name <your@email.here>
3
+ Copyright #{Time.now.year} TODO Your Name <your@email.TODO>
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above
data/man.html CHANGED
@@ -73,13 +73,13 @@
73
73
  <body>
74
74
  <div id='man'>
75
75
 
76
- <div class='man-navigation'><a href='#NAME'>NAME</a> <a href='#ABOUT'>ABOUT</a> <a href='#SYNOPSIS'>SYNOPSIS</a> <a href='#DESCRIPTION'>DESCRIPTION</a> <a href='#OPTIONS'>OPTIONS</a> <a href='#inochi-init'>inochi init</a> <a href='#inochi-api'>inochi api</a> <a href='#inochi-man'>inochi man</a> <a href='#inochi-gem'>inochi gem</a> <a href='#inochi-ann'>inochi ann</a> <a href='#inochi-pub-ann-ruby-talk'>inochi pub:ann:ruby-talk</a> <a href='#inochi-pub-web'>inochi pub:web</a> <a href='#PROJECTS'>PROJECTS</a> <a href='#HACKING'>HACKING</a> <a href='#VERSIONS'>VERSIONS</a> <a href='#CREDITS'>CREDITS</a> <a href='#LICENSE'>LICENSE</a> <a href='#SEE-ALSO'>SEE ALSO</a></div>
76
+ <div class='man-navigation'><a href='#NAME'>NAME</a> <a href='#ABOUT'>ABOUT</a> <a href='#SYNOPSIS'>SYNOPSIS</a> <a href='#DESCRIPTION'>DESCRIPTION</a> <a href='#OPTIONS'>OPTIONS</a> <a href='#inochi-init'>inochi init</a> <a href='#inochi-api'>inochi api</a> <a href='#inochi-man'>inochi man</a> <a href='#inochi-gem'>inochi gem</a> <a href='#inochi-ann'>inochi ann</a> <a href='#inochi-pub-ann-ruby-talk'>inochi pub:ann:ruby-talk</a> <a href='#inochi-pub-web'>inochi pub:web</a> <a href='#PROJECTS'>PROJECTS</a> <a href='#TUTORIAL'>TUTORIAL</a> <a href='#HACKING'>HACKING</a> <a href='#VERSIONS'>VERSIONS</a> <a href='#CREDITS'>CREDITS</a> <a href='#LICENSE'>LICENSE</a> <a href='#SEE-ALSO'>SEE ALSO</a></div>
77
77
 
78
78
  <h1 class='man-title'>inochi(1)</h1>
79
79
 
80
80
  <ol class='head man'>
81
81
  <li class='tl'>inochi(1)</li>
82
- <li class='tc'>Version 2.0.0</li>
82
+ <li class='tc'>Version 2.0.1</li>
83
83
  <li class='tr'>inochi(1)</li>
84
84
  </ol>
85
85
 
@@ -460,6 +460,129 @@ accessed (hopefully) permanently.</p></dd>
460
460
  mentioning them in the <strong>Resources</strong> section of the help manual's README
461
461
  source file.</p>
462
462
 
463
+ <h2 id="TUTORIAL">TUTORIAL</h2>
464
+
465
+ <p>This section shows how Inochi is used to manage a hypothetical
466
+ WordCount project throughout the various stages of its life.</p>
467
+
468
+ <h3 id="Creating-a-new-project">Creating a new project</h3>
469
+
470
+ <p>Create a directory for the project:</p>
471
+
472
+ <pre><code>mkdir word_count
473
+ </code></pre>
474
+
475
+ <p>Instill Inochi into the project:</p>
476
+
477
+ <pre><code>cd word_count
478
+ inochi init project=WordCount
479
+ </code></pre>
480
+
481
+ <p>Review pending work marked as "TODO":</p>
482
+
483
+ <pre><code>ack -a TODO || grep TODO -R .
484
+ </code></pre>
485
+
486
+ <h3 id="Running-the-shell-command">Running the shell command</h3>
487
+
488
+ <p>Run the project's shell command:</p>
489
+
490
+ <pre><code>ruby -Ilib bin/word_count
491
+ </code></pre>
492
+
493
+ <p>View the project version number:</p>
494
+
495
+ <pre><code>ruby -Ilib bin/word_count --version
496
+ </code></pre>
497
+
498
+ <p>View the project help manual:</p>
499
+
500
+ <pre><code>ruby -Ilib bin/word_count --help
501
+ </code></pre>
502
+
503
+ <h3 id="Building-the-help-manual">Building the help manual</h3>
504
+
505
+ <p>Build the help manual:</p>
506
+
507
+ <pre><code>inochi man
508
+ </code></pre>
509
+
510
+ <p>View the help manual in a terminal:</p>
511
+
512
+ <pre><code>man man/man1/word_count.1.gz
513
+ </code></pre>
514
+
515
+ <p>View the help manual in a Web browser:</p>
516
+
517
+ <pre><code>man.html
518
+ </code></pre>
519
+
520
+ <h3 id="Implementing-the-project">Implementing the project</h3>
521
+
522
+ <p>Append the following code to the <code>test/word_count_test.rb</code> file:</p>
523
+
524
+ <pre><code>class TestWordCount &lt; Test::Unit::TestCase
525
+ def test_handles_empty_input
526
+ assert_equal(0, WordCount.count(nil))
527
+ assert_equal(0, WordCount.count(''))
528
+ assert_equal(0, WordCount.count(' '))
529
+ end
530
+
531
+ def test_handles_single_words
532
+ assert_equal(1, WordCount.count('a'))
533
+ assert_equal(1, WordCount.count('foo'))
534
+ assert_equal(1, WordCount.count('bar'))
535
+ end
536
+
537
+ def test_handles_multiple_words
538
+ assert_equal(2, WordCount.count('a b'))
539
+ assert_equal(2, WordCount.count('a-b'))
540
+ assert_equal(2, WordCount.count('a/b'))
541
+ end
542
+
543
+ def test_ignores_punctuation_and_space
544
+ assert_equal(0, WordCount.count('!'))
545
+ assert_equal(0, WordCount.count('! @ # % #!@#'))
546
+ assert_equal(0, WordCount.count(' !'))
547
+ assert_equal(0, WordCount.count('! '))
548
+ assert_equal(0, WordCount.count(' ! '))
549
+ assert_equal(0, WordCount.count(' ! '))
550
+ end
551
+ end
552
+ </code></pre>
553
+
554
+ <p>Run the test suite and observe that all tests fail:</p>
555
+
556
+ <pre><code>test/runner
557
+ </code></pre>
558
+
559
+ <p>Append the following code to the <code>lib/word_count.rb</code> file:</p>
560
+
561
+ <pre><code>module WordCount
562
+ # Returns the number of words in the given input.
563
+ def WordCount.count input
564
+ input.to_s.split(/\W+/).length
565
+ end
566
+ end
567
+ </code></pre>
568
+
569
+ <p>Run the test suite again and observe that all tests pass:</p>
570
+
571
+ <pre><code>test/runner
572
+ </code></pre>
573
+
574
+ <p>Append the following code to the <code>bin/word_count</code> file:</p>
575
+
576
+ <pre><code>input = ARGF.read
577
+ total = WordCount.count(input)
578
+ puts "There are #{total} words in the input."
579
+ </code></pre>
580
+
581
+ <p>Run the project's shell command on the <code>README</code> file:</p>
582
+
583
+ <pre><code>ruby -Ilib bin/word_count README
584
+ </code></pre>
585
+
463
586
  <h2 id="HACKING">HACKING</h2>
464
587
 
465
588
  <p>This section is meant for people who want to develop Inochi's source code.</p>
@@ -545,6 +668,35 @@ in the <code>test/test_helper.rb</code> file.</p>
545
668
 
546
669
  <p>This section contains release notes of current and past releases.</p>
547
670
 
671
+ <h3 id="Version-2-0-1-2010-04-25-">Version 2.0.1 (2010-04-25)</h3>
672
+
673
+ <p>This release fixes some bugs and adds a simple tutorial to the help manual.</p>
674
+
675
+ <p>Bug fixes:</p>
676
+
677
+ <ul>
678
+ <li><p>Task files were not loaded in correct order. As a result, certain Inochi
679
+ tasks would fail (depending on the sorting order of your filesystem) with
680
+ the following cryptic error:</p>
681
+
682
+ <pre><code>inochi aborted!
683
+ Don't know how to build task ''
684
+ /usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1728:in `[]'
685
+ (See full trace by running task with --trace)
686
+ </code></pre></li>
687
+ <li><p>LICENSE file template lacked a "TODO" marker.</p></li>
688
+ <li><p>Forgot version number heading in announcement.</p></li>
689
+ </ul>
690
+
691
+
692
+ <p>Housekeeping:</p>
693
+
694
+ <ul>
695
+ <li>Restored the simple WordCount tutorial from version 1.1.1.
696
+ See <strong>TUTORIAL</strong> above.</li>
697
+ </ul>
698
+
699
+
548
700
  <h3 id="Version-2-0-0-2010-04-24-">Version 2.0.0 (2010-04-24)</h3>
549
701
 
550
702
  <p>This release makes Inochi a development-time dependency only, documents nearly
@@ -926,7 +1078,7 @@ the public domain by <a href="http://www.openclipart.org/user-detail/Peileppe">P
926
1078
 
927
1079
  <p>(the ISC license)</p>
928
1080
 
929
- <p>Copyright 2008 Suraj N. Kurapati <a href="&#109;&#97;&#x69;&#x6c;&#116;&#111;&#x3a;&#115;&#117;&#x6e;&#x61;&#107;&#117;&#x40;&#103;&#x6d;&#97;&#x69;&#x6c;&#x2e;&#x63;&#x6f;&#x6d;" data-bare-link="true">&#x73;&#x75;&#x6e;&#97;&#x6b;&#117;&#x40;&#103;&#109;&#x61;&#105;&#x6c;&#46;&#99;&#x6f;&#109;</a></p>
1081
+ <p>Copyright 2008 Suraj N. Kurapati <a href="&#x6d;&#97;&#x69;&#108;&#116;&#111;&#58;&#115;&#x75;&#110;&#97;&#107;&#117;&#x40;&#103;&#x6d;&#x61;&#x69;&#x6c;&#46;&#x63;&#111;&#x6d;" data-bare-link="true">&#x73;&#x75;&#x6e;&#x61;&#x6b;&#x75;&#64;&#103;&#109;&#97;&#105;&#x6c;&#46;&#99;&#x6f;&#109;</a></p>
930
1082
 
931
1083
  <p>Permission to use, copy, modify, and/or distribute this software for any
932
1084
  purpose with or without fee is hereby granted, provided that the above
data/man/man1/inochi.1.gz CHANGED
Binary file
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 0
8
- - 0
9
- version: 2.0.0
8
+ - 1
9
+ version: 2.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Suraj N. Kurapati
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-04-24 00:00:00 -07:00
19
+ date: 2010-04-25 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -165,13 +165,13 @@ files:
165
165
  - lib/inochi/templates/library_test.rb.rbs
166
166
  - lib/inochi/templates/MANUAL.rbs
167
167
  - lib/inochi/templates/inochi.opts.rbs
168
- - lib/inochi/tasks/api.rake
169
- - lib/inochi/tasks/man.rake
170
- - lib/inochi/tasks/pub.rake
171
- - lib/inochi/tasks/init.rake
172
- - lib/inochi/tasks/gem.rake
173
- - lib/inochi/tasks/ann.rake
174
- - lib/inochi/tasks/project.rake
168
+ - lib/inochi/tasks/2-api.rake
169
+ - lib/inochi/tasks/0-project.rake
170
+ - lib/inochi/tasks/4-ann.rake
171
+ - lib/inochi/tasks/6-pub.rake
172
+ - lib/inochi/tasks/1-init.rake
173
+ - lib/inochi/tasks/3-man.rake
174
+ - lib/inochi/tasks/5-gem.rake
175
175
  - LICENSE
176
176
  - CREDITS
177
177
  - man.html