sparehand 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,2 +1,9 @@
1
- 0.1
1
+ 0.0.3
2
+ More re-working test framework to play nice with testrb and subsequently firebrigde.
3
+ Also moved libraries into sparehand directory to avoid potential naming issues.
4
+
5
+ 0.0.2
6
+ Added rake and hoe dependencies to appease the firebrigade gods.
7
+
8
+ 0.0.1
2
9
  Provided functionality for commenting or uncommenting named blocks.
data/Manifest.txt CHANGED
@@ -3,10 +3,8 @@ Manifest.txt
3
3
  README.txt
4
4
  Rakefile
5
5
  bin/comment_block
6
- coverage/index.html
7
- coverage/lib-comment_block_rb.html
8
- lib/comment_block.rb
9
- lib/safe_modify.rb
6
+ lib/sparehand/comment_block.rb
7
+ lib/sparehand/safe_modify.rb
10
8
  lib/sparehand/version.rb
11
9
  setup.rb
12
10
  test/comment_block_cli_test.rb
@@ -14,4 +12,5 @@ test/comment_block_test.rb
14
12
  test/fixtures/example_hosts_file
15
13
  test/fixtures/safe_modify_data
16
14
  test/safe_modify_test.rb
15
+ test/test_all.rb
17
16
  test/test_helper.rb
data/Rakefile CHANGED
@@ -7,46 +7,53 @@ require 'rake/gempackagetask'
7
7
  require 'rake/rdoctask'
8
8
  require 'rake/contrib/rubyforgepublisher'
9
9
  require 'fileutils'
10
- require 'hoe'
11
- include FileUtils
12
- require File.join(File.dirname(__FILE__), 'lib', 'sparehand', 'version')
13
10
 
14
- AUTHOR = "Mat Schaffer" # can also be an array of Authors
15
- EMAIL = "mat.schaffer@gmail.com"
16
- DESCRIPTION = "A collection of utilities for system manipulations both from Ruby or CLI."
17
- GEM_NAME = "sparehand"
18
- RUBYFORGE_PROJECT = "phillyonrails"
19
- HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org/sparehand"
11
+ begin
12
+ require 'hoe'
13
+ include FileUtils
14
+ require File.join(File.dirname(__FILE__), 'lib', 'sparehand', 'version')
20
15
 
16
+ AUTHOR = "Mat Schaffer" # can also be an array of Authors
17
+ EMAIL = "mat.schaffer@gmail.com"
18
+ DESCRIPTION = "A collection of utilities for system manipulations both from Ruby or CLI."
19
+ GEM_NAME = "sparehand"
20
+ RUBYFORGE_PROJECT = "phillyonrails"
21
+ HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org/sparehand"
21
22
 
22
- NAME = "sparehand"
23
- REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
24
- VERS = ENV['VERSION'] || (Sparehand::VERSION::STRING + (REV ? ".#{REV}" : ""))
23
+ NAME = "sparehand"
24
+ REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
25
+ VERS = ENV['VERSION'] || (Sparehand::VERSION::STRING + (REV ? ".#{REV}" : ""))
25
26
  CLEAN.include ['**/.*.sw?', '*.gem', '.config']
26
- RDOC_OPTS = ['--quiet', '--title', "sparehand documentation",
27
- "--opname", "index.html",
28
- "--line-numbers",
29
- "--main", "README",
30
- "--inline-source"]
27
+ RDOC_OPTS = ['--quiet', '--title', "sparehand documentation",
28
+ "--opname", "index.html",
29
+ "--line-numbers",
30
+ "--main", "README",
31
+ "--inline-source"]
31
32
 
32
- class Hoe
33
- def extra_deps
34
- @extra_deps.reject { |x| Array(x).first == 'hoe' }
35
- end
36
- end
33
+ class Hoe
34
+ def extra_deps
35
+ @extra_deps.reject { |x| Array(x).first == 'hoe' }
36
+ end
37
+ end
37
38
 
38
- # Generate all the Rake tasks
39
- # Run 'rake -T' to see list of generated tasks (from gem root directory)
40
- hoe = Hoe.new(GEM_NAME, VERS) do |p|
41
- p.author = AUTHOR
42
- p.description = DESCRIPTION
43
- p.email = EMAIL
44
- p.summary = DESCRIPTION
45
- p.url = HOMEPATH
46
- p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
47
- p.test_globs = ["test/**/*_test.rb"]
48
- p.clean_globs = CLEAN
49
-
50
- p.changes = [ 'Added dependencies for rake and hoe to appease firebrigade.' ]
51
- p.extra_deps = [ 'rake', 'hoe' ]
39
+ # Generate all the Rake tasks
40
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
41
+ hoe = Hoe.new(GEM_NAME, VERS) do |p|
42
+ p.author = AUTHOR
43
+ p.description = DESCRIPTION
44
+ p.email = EMAIL
45
+ p.summary = DESCRIPTION
46
+ p.url = HOMEPATH
47
+ p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
48
+ p.test_globs = ["test/**/*_test.rb"]
49
+ p.clean_globs = CLEAN
50
+
51
+ p.changes = [ 'Added dependencies for rake and hoe to appease firebrigade.' ]
52
+ p.extra_deps = [ 'rake' ]
53
+ end
54
+ rescue LoadError
55
+ desc 'Run the test suite.'
56
+ task :test do
57
+ system "ruby -Ilib test/test_all.rb"
58
+ end
52
59
  end
data/bin/comment_block CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'comment_block'
4
- require 'safe_modify'
3
+ require 'sparehand/comment_block'
4
+ require 'sparehand/safe_modify'
5
5
 
6
6
  File.safe_modify(ARGV[0]) do |input, output|
7
7
  Sparehand::CommentBlock.process(input, ARGV[2], ARGV[1].to_sym, ARGV[3] || '#', output)
File without changes
@@ -2,7 +2,7 @@ module Sparehand #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -1,5 +1,5 @@
1
1
  require File.dirname(__FILE__) + '/test_helper.rb'
2
- require 'comment_block'
2
+ require 'sparehand/comment_block'
3
3
  require 'stringio'
4
4
 
5
5
  class CommentBlockTest < Test::Unit::TestCase
@@ -1,5 +1,5 @@
1
1
  require File.dirname(__FILE__) + '/test_helper.rb'
2
- require 'safe_modify'
2
+ require 'sparehand/safe_modify'
3
3
 
4
4
  class SafeModifyTest < Test::Unit::TestCase
5
5
  def setup
data/test/test_all.rb ADDED
@@ -0,0 +1,3 @@
1
+ Dir[File.join(File.dirname(__FILE__), '**', '*_test.rb')].each do |test_case|
2
+ require test_case if File.file? test_case
3
+ end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.1
3
3
  specification_version: 1
4
4
  name: sparehand
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.2
7
- date: 2007-02-10 00:00:00 -05:00
6
+ version: 0.0.3
7
+ date: 2007-02-11 00:00:00 -05:00
8
8
  summary: A collection of utilities for system manipulations both from Ruby or CLI.
9
9
  require_paths:
10
10
  - lib
@@ -34,10 +34,8 @@ files:
34
34
  - README.txt
35
35
  - Rakefile
36
36
  - bin/comment_block
37
- - coverage/index.html
38
- - coverage/lib-comment_block_rb.html
39
- - lib/comment_block.rb
40
- - lib/safe_modify.rb
37
+ - lib/sparehand/comment_block.rb
38
+ - lib/sparehand/safe_modify.rb
41
39
  - lib/sparehand/version.rb
42
40
  - setup.rb
43
41
  - test/comment_block_cli_test.rb
@@ -45,11 +43,10 @@ files:
45
43
  - test/fixtures/example_hosts_file
46
44
  - test/fixtures/safe_modify_data
47
45
  - test/safe_modify_test.rb
46
+ - test/test_all.rb
48
47
  - test/test_helper.rb
49
48
  test_files:
50
- - test/comment_block_cli_test.rb
51
- - test/comment_block_test.rb
52
- - test/safe_modify_test.rb
49
+ - test/test_all.rb
53
50
  rdoc_options: []
54
51
 
55
52
  extra_rdoc_files: []
data/coverage/index.html DELETED
@@ -1,259 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
3
- <head>
4
- <title>C0 code coverage information</title>
5
- <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
6
- <style type='text/css'>span.cross-ref-title {
7
- font-size: 140%;
8
- }
9
- span.cross-ref a {
10
- text-decoration: none;
11
- }
12
- span.cross-ref {
13
- background-color:#f3f7fa;
14
- border: 1px dashed #333;
15
- margin: 1em;
16
- padding: 0.5em;
17
- overflow: hidden;
18
- }
19
- a.crossref-toggle {
20
- text-decoration: none;
21
- }
22
- span.marked0 {
23
- background-color: rgb(185, 210, 200);
24
- display: block;
25
- }
26
- span.marked1 {
27
- background-color: rgb(190, 215, 205);
28
- display: block;
29
- }
30
- span.inferred0 {
31
- background-color: rgb(175, 200, 200);
32
- display: block;
33
- }
34
- span.inferred1 {
35
- background-color: rgb(180, 205, 205);
36
- display: block;
37
- }
38
- span.uncovered0 {
39
- background-color: rgb(225, 110, 110);
40
- display: block;
41
- }
42
- span.uncovered1 {
43
- background-color: rgb(235, 120, 120);
44
- display: block;
45
- }
46
- span.overview {
47
- border-bottom: 8px solid black;
48
- }
49
- div.overview {
50
- border-bottom: 8px solid black;
51
- }
52
- body {
53
- font-family: verdana, arial, helvetica;
54
- }
55
- div.footer {
56
- font-size: 68%;
57
- margin-top: 1.5em;
58
- }
59
- h1, h2, h3, h4, h5, h6 {
60
- margin-bottom: 0.5em;
61
- }
62
- h5 {
63
- margin-top: 0.5em;
64
- }
65
- .hidden {
66
- display: none;
67
- }
68
- div.separator {
69
- height: 10px;
70
- }
71
- /* Commented out for better readability, esp. on IE */
72
- /*
73
- table tr td, table tr th {
74
- font-size: 68%;
75
- }
76
- td.value table tr td {
77
- font-size: 11px;
78
- }
79
- */
80
- table.percent_graph {
81
- height: 12px;
82
- border: #808080 1px solid;
83
- empty-cells: show;
84
- }
85
- table.percent_graph td.covered {
86
- height: 10px;
87
- background: #00f000;
88
- }
89
- table.percent_graph td.uncovered {
90
- height: 10px;
91
- background: #e00000;
92
- }
93
- table.percent_graph td.NA {
94
- height: 10px;
95
- background: #eaeaea;
96
- }
97
- table.report {
98
- border-collapse: collapse;
99
- width: 100%;
100
- }
101
- table.report td.heading {
102
- background: #dcecff;
103
- border: #d0d0d0 1px solid;
104
- font-weight: bold;
105
- text-align: center;
106
- }
107
- table.report td.heading:hover {
108
- background: #c0ffc0;
109
- }
110
- table.report td.text {
111
- border: #d0d0d0 1px solid;
112
- }
113
- table.report td.value {
114
- text-align: right;
115
- border: #d0d0d0 1px solid;
116
- }
117
- table.report tr.light {
118
- background-color: rgb(240, 240, 245);
119
- }
120
- table.report tr.dark {
121
- background-color: rgb(230, 230, 235);
122
- }
123
- </style>
124
- <script type='text/javascript'>
125
- // <![CDATA[
126
- function toggleCode( id ) {
127
- if ( document.getElementById )
128
- elem = document.getElementById( id );
129
- else if ( document.all )
130
- elem = eval( "document.all." + id );
131
- else
132
- return false;
133
-
134
- elemStyle = elem.style;
135
-
136
- if ( elemStyle.display != "block" ) {
137
- elemStyle.display = "block"
138
- } else {
139
- elemStyle.display = "none"
140
- }
141
-
142
- return true;
143
- }
144
-
145
- // Make cross-references hidden by default
146
- document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
147
- // ]]>
148
- </script>
149
- </head>
150
- <body>
151
- <h3>C0 code coverage information</h3>
152
- <p>Generated on Sat Feb 10 19:57:44 -0500 2007 with <a href='http://eigenclass.org/hiki.rb?rcov'>rcov 0.7.0</a>
153
- </p>
154
- <hr /> <table class='report'>
155
- <thead>
156
- <tr>
157
- <td class='heading'>Name</td>
158
- <td class='heading'>Total lines</td>
159
- <td class='heading'>Lines of code</td>
160
- <td class='heading'>Total coverage</td>
161
- <td class='heading'>Code coverage</td>
162
- </tr>
163
- </thead>
164
- <tbody>
165
- <tr class='light'>
166
- <td>TOTAL</td>
167
- <td class='value'>
168
- <tt>41</tt>
169
- </td>
170
- <td class='value'>
171
- <tt>36</tt>
172
- </td>
173
- <td>
174
- <table cellspacing='0' cellpadding='0' align='right'>
175
- <tr>
176
- <td>
177
- <tt>68.3%</tt>&nbsp;</td>
178
- <td>
179
- <table cellspacing='0' class='percent_graph' cellpadding='0' width='100'>
180
- <tr>
181
- <td class='covered' width='68' />
182
- <td class='uncovered' width='32' />
183
- </tr>
184
- </table>
185
- </td>
186
- </tr>
187
- </table>
188
- </td>
189
- <td>
190
- <table cellspacing='0' cellpadding='0' align='right'>
191
- <tr>
192
- <td>
193
- <tt>69.4%</tt>&nbsp;</td>
194
- <td>
195
- <table cellspacing='0' class='percent_graph' cellpadding='0' width='100'>
196
- <tr>
197
- <td class='covered' width='69' />
198
- <td class='uncovered' width='31' />
199
- </tr>
200
- </table>
201
- </td>
202
- </tr>
203
- </table>
204
- </td>
205
- </tr>
206
- <tr class='dark'>
207
- <td>
208
- <a href='lib-comment_block_rb.html'>lib/comment_block.rb</a>
209
- </td>
210
- <td class='value'>
211
- <tt>41</tt>
212
- </td>
213
- <td class='value'>
214
- <tt>36</tt>
215
- </td>
216
- <td>
217
- <table cellspacing='0' cellpadding='0' align='right'>
218
- <tr>
219
- <td>
220
- <tt>68.3%</tt>&nbsp;</td>
221
- <td>
222
- <table cellspacing='0' class='percent_graph' cellpadding='0' width='100'>
223
- <tr>
224
- <td class='covered' width='68' />
225
- <td class='uncovered' width='32' />
226
- </tr>
227
- </table>
228
- </td>
229
- </tr>
230
- </table>
231
- </td>
232
- <td>
233
- <table cellspacing='0' cellpadding='0' align='right'>
234
- <tr>
235
- <td>
236
- <tt>69.4%</tt>&nbsp;</td>
237
- <td>
238
- <table cellspacing='0' class='percent_graph' cellpadding='0' width='100'>
239
- <tr>
240
- <td class='covered' width='69' />
241
- <td class='uncovered' width='31' />
242
- </tr>
243
- </table>
244
- </td>
245
- </tr>
246
- </table>
247
- </td>
248
- </tr>
249
- </tbody>
250
- </table><hr /> <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a> version 0.7.0.</p><p>
251
- <a href='http://validator.w3.org/check/referer'>
252
- <img src='http://www.w3.org/Icons/valid-xhtml11' height='31' alt='Valid XHTML 1.1!' width='88' />
253
- </a>
254
- <a href='http://jigsaw.w3.org/css-validator/check/referer'>
255
- <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px' />
256
- </a>
257
- </p>
258
- </body>
259
- </html>
@@ -1,670 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
3
- <head>
4
- <title>lib/comment_block.rb - C0 code coverage information</title>
5
- <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
6
- <style type='text/css'>span.cross-ref-title {
7
- font-size: 140%;
8
- }
9
- span.cross-ref a {
10
- text-decoration: none;
11
- }
12
- span.cross-ref {
13
- background-color:#f3f7fa;
14
- border: 1px dashed #333;
15
- margin: 1em;
16
- padding: 0.5em;
17
- overflow: hidden;
18
- }
19
- a.crossref-toggle {
20
- text-decoration: none;
21
- }
22
- span.marked0 {
23
- background-color: rgb(185, 210, 200);
24
- display: block;
25
- }
26
- span.marked1 {
27
- background-color: rgb(190, 215, 205);
28
- display: block;
29
- }
30
- span.inferred0 {
31
- background-color: rgb(175, 200, 200);
32
- display: block;
33
- }
34
- span.inferred1 {
35
- background-color: rgb(180, 205, 205);
36
- display: block;
37
- }
38
- span.uncovered0 {
39
- background-color: rgb(225, 110, 110);
40
- display: block;
41
- }
42
- span.uncovered1 {
43
- background-color: rgb(235, 120, 120);
44
- display: block;
45
- }
46
- span.overview {
47
- border-bottom: 8px solid black;
48
- }
49
- div.overview {
50
- border-bottom: 8px solid black;
51
- }
52
- body {
53
- font-family: verdana, arial, helvetica;
54
- }
55
- div.footer {
56
- font-size: 68%;
57
- margin-top: 1.5em;
58
- }
59
- h1, h2, h3, h4, h5, h6 {
60
- margin-bottom: 0.5em;
61
- }
62
- h5 {
63
- margin-top: 0.5em;
64
- }
65
- .hidden {
66
- display: none;
67
- }
68
- div.separator {
69
- height: 10px;
70
- }
71
- /* Commented out for better readability, esp. on IE */
72
- /*
73
- table tr td, table tr th {
74
- font-size: 68%;
75
- }
76
- td.value table tr td {
77
- font-size: 11px;
78
- }
79
- */
80
- table.percent_graph {
81
- height: 12px;
82
- border: #808080 1px solid;
83
- empty-cells: show;
84
- }
85
- table.percent_graph td.covered {
86
- height: 10px;
87
- background: #00f000;
88
- }
89
- table.percent_graph td.uncovered {
90
- height: 10px;
91
- background: #e00000;
92
- }
93
- table.percent_graph td.NA {
94
- height: 10px;
95
- background: #eaeaea;
96
- }
97
- table.report {
98
- border-collapse: collapse;
99
- width: 100%;
100
- }
101
- table.report td.heading {
102
- background: #dcecff;
103
- border: #d0d0d0 1px solid;
104
- font-weight: bold;
105
- text-align: center;
106
- }
107
- table.report td.heading:hover {
108
- background: #c0ffc0;
109
- }
110
- table.report td.text {
111
- border: #d0d0d0 1px solid;
112
- }
113
- table.report td.value {
114
- text-align: right;
115
- border: #d0d0d0 1px solid;
116
- }
117
- table.report tr.light {
118
- background-color: rgb(240, 240, 245);
119
- }
120
- table.report tr.dark {
121
- background-color: rgb(230, 230, 235);
122
- }
123
- </style>
124
- <script type='text/javascript'>
125
- // <![CDATA[
126
- function toggleCode( id ) {
127
- if ( document.getElementById )
128
- elem = document.getElementById( id );
129
- else if ( document.all )
130
- elem = eval( "document.all." + id );
131
- else
132
- return false;
133
-
134
- elemStyle = elem.style;
135
-
136
- if ( elemStyle.display != "block" ) {
137
- elemStyle.display = "block"
138
- } else {
139
- elemStyle.display = "none"
140
- }
141
-
142
- return true;
143
- }
144
-
145
- // Make cross-references hidden by default
146
- document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
147
- // ]]>
148
- </script>
149
- <style type='text/css'>span.run0 {
150
- background-color: rgb(178, 204, 255);
151
- display: block;
152
- }
153
- span.run1 {
154
- background-color: rgb(178, 206, 255);
155
- display: block;
156
- }
157
- span.run2 {
158
- background-color: rgb(178, 209, 255);
159
- display: block;
160
- }
161
- span.run3 {
162
- background-color: rgb(178, 211, 255);
163
- display: block;
164
- }
165
- span.run4 {
166
- background-color: rgb(178, 214, 255);
167
- display: block;
168
- }
169
- span.run5 {
170
- background-color: rgb(178, 218, 255);
171
- display: block;
172
- }
173
- span.run6 {
174
- background-color: rgb(178, 220, 255);
175
- display: block;
176
- }
177
- span.run7 {
178
- background-color: rgb(178, 223, 255);
179
- display: block;
180
- }
181
- span.run8 {
182
- background-color: rgb(178, 225, 255);
183
- display: block;
184
- }
185
- span.run9 {
186
- background-color: rgb(178, 228, 255);
187
- display: block;
188
- }
189
- span.run10 {
190
- background-color: rgb(178, 232, 255);
191
- display: block;
192
- }
193
- span.run11 {
194
- background-color: rgb(178, 234, 255);
195
- display: block;
196
- }
197
- span.run12 {
198
- background-color: rgb(178, 237, 255);
199
- display: block;
200
- }
201
- span.run13 {
202
- background-color: rgb(178, 239, 255);
203
- display: block;
204
- }
205
- span.run14 {
206
- background-color: rgb(178, 242, 255);
207
- display: block;
208
- }
209
- span.run15 {
210
- background-color: rgb(178, 246, 255);
211
- display: block;
212
- }
213
- span.run16 {
214
- background-color: rgb(178, 248, 255);
215
- display: block;
216
- }
217
- span.run17 {
218
- background-color: rgb(178, 251, 255);
219
- display: block;
220
- }
221
- span.run18 {
222
- background-color: rgb(178, 253, 255);
223
- display: block;
224
- }
225
- span.run19 {
226
- background-color: rgb(178, 255, 253);
227
- display: block;
228
- }
229
- span.run20 {
230
- background-color: rgb(178, 255, 249);
231
- display: block;
232
- }
233
- span.run21 {
234
- background-color: rgb(178, 255, 247);
235
- display: block;
236
- }
237
- span.run22 {
238
- background-color: rgb(178, 255, 244);
239
- display: block;
240
- }
241
- span.run23 {
242
- background-color: rgb(178, 255, 242);
243
- display: block;
244
- }
245
- span.run24 {
246
- background-color: rgb(178, 255, 239);
247
- display: block;
248
- }
249
- span.run25 {
250
- background-color: rgb(178, 255, 235);
251
- display: block;
252
- }
253
- span.run26 {
254
- background-color: rgb(178, 255, 233);
255
- display: block;
256
- }
257
- span.run27 {
258
- background-color: rgb(178, 255, 230);
259
- display: block;
260
- }
261
- span.run28 {
262
- background-color: rgb(178, 255, 228);
263
- display: block;
264
- }
265
- span.run29 {
266
- background-color: rgb(178, 255, 225);
267
- display: block;
268
- }
269
- span.run30 {
270
- background-color: rgb(178, 255, 221);
271
- display: block;
272
- }
273
- span.run31 {
274
- background-color: rgb(178, 255, 219);
275
- display: block;
276
- }
277
- span.run32 {
278
- background-color: rgb(178, 255, 216);
279
- display: block;
280
- }
281
- span.run33 {
282
- background-color: rgb(178, 255, 214);
283
- display: block;
284
- }
285
- span.run34 {
286
- background-color: rgb(178, 255, 211);
287
- display: block;
288
- }
289
- span.run35 {
290
- background-color: rgb(178, 255, 207);
291
- display: block;
292
- }
293
- span.run36 {
294
- background-color: rgb(178, 255, 205);
295
- display: block;
296
- }
297
- span.run37 {
298
- background-color: rgb(178, 255, 202);
299
- display: block;
300
- }
301
- span.run38 {
302
- background-color: rgb(178, 255, 200);
303
- display: block;
304
- }
305
- span.run39 {
306
- background-color: rgb(178, 255, 197);
307
- display: block;
308
- }
309
- span.run40 {
310
- background-color: rgb(178, 255, 193);
311
- display: block;
312
- }
313
- span.run41 {
314
- background-color: rgb(178, 255, 191);
315
- display: block;
316
- }
317
- span.run42 {
318
- background-color: rgb(178, 255, 188);
319
- display: block;
320
- }
321
- span.run43 {
322
- background-color: rgb(178, 255, 186);
323
- display: block;
324
- }
325
- span.run44 {
326
- background-color: rgb(178, 255, 183);
327
- display: block;
328
- }
329
- span.run45 {
330
- background-color: rgb(178, 255, 179);
331
- display: block;
332
- }
333
- span.run46 {
334
- background-color: rgb(179, 255, 178);
335
- display: block;
336
- }
337
- span.run47 {
338
- background-color: rgb(182, 255, 178);
339
- display: block;
340
- }
341
- span.run48 {
342
- background-color: rgb(184, 255, 178);
343
- display: block;
344
- }
345
- span.run49 {
346
- background-color: rgb(187, 255, 178);
347
- display: block;
348
- }
349
- span.run50 {
350
- background-color: rgb(191, 255, 178);
351
- display: block;
352
- }
353
- span.run51 {
354
- background-color: rgb(193, 255, 178);
355
- display: block;
356
- }
357
- span.run52 {
358
- background-color: rgb(196, 255, 178);
359
- display: block;
360
- }
361
- span.run53 {
362
- background-color: rgb(198, 255, 178);
363
- display: block;
364
- }
365
- span.run54 {
366
- background-color: rgb(201, 255, 178);
367
- display: block;
368
- }
369
- span.run55 {
370
- background-color: rgb(205, 255, 178);
371
- display: block;
372
- }
373
- span.run56 {
374
- background-color: rgb(207, 255, 178);
375
- display: block;
376
- }
377
- span.run57 {
378
- background-color: rgb(210, 255, 178);
379
- display: block;
380
- }
381
- span.run58 {
382
- background-color: rgb(212, 255, 178);
383
- display: block;
384
- }
385
- span.run59 {
386
- background-color: rgb(215, 255, 178);
387
- display: block;
388
- }
389
- span.run60 {
390
- background-color: rgb(219, 255, 178);
391
- display: block;
392
- }
393
- span.run61 {
394
- background-color: rgb(221, 255, 178);
395
- display: block;
396
- }
397
- span.run62 {
398
- background-color: rgb(224, 255, 178);
399
- display: block;
400
- }
401
- span.run63 {
402
- background-color: rgb(226, 255, 178);
403
- display: block;
404
- }
405
- span.run64 {
406
- background-color: rgb(229, 255, 178);
407
- display: block;
408
- }
409
- span.run65 {
410
- background-color: rgb(233, 255, 178);
411
- display: block;
412
- }
413
- span.run66 {
414
- background-color: rgb(235, 255, 178);
415
- display: block;
416
- }
417
- span.run67 {
418
- background-color: rgb(238, 255, 178);
419
- display: block;
420
- }
421
- span.run68 {
422
- background-color: rgb(240, 255, 178);
423
- display: block;
424
- }
425
- span.run69 {
426
- background-color: rgb(243, 255, 178);
427
- display: block;
428
- }
429
- span.run70 {
430
- background-color: rgb(247, 255, 178);
431
- display: block;
432
- }
433
- span.run71 {
434
- background-color: rgb(249, 255, 178);
435
- display: block;
436
- }
437
- span.run72 {
438
- background-color: rgb(252, 255, 178);
439
- display: block;
440
- }
441
- span.run73 {
442
- background-color: rgb(255, 255, 178);
443
- display: block;
444
- }
445
- span.run74 {
446
- background-color: rgb(255, 252, 178);
447
- display: block;
448
- }
449
- span.run75 {
450
- background-color: rgb(255, 248, 178);
451
- display: block;
452
- }
453
- span.run76 {
454
- background-color: rgb(255, 246, 178);
455
- display: block;
456
- }
457
- span.run77 {
458
- background-color: rgb(255, 243, 178);
459
- display: block;
460
- }
461
- span.run78 {
462
- background-color: rgb(255, 240, 178);
463
- display: block;
464
- }
465
- span.run79 {
466
- background-color: rgb(255, 238, 178);
467
- display: block;
468
- }
469
- span.run80 {
470
- background-color: rgb(255, 234, 178);
471
- display: block;
472
- }
473
- span.run81 {
474
- background-color: rgb(255, 232, 178);
475
- display: block;
476
- }
477
- span.run82 {
478
- background-color: rgb(255, 229, 178);
479
- display: block;
480
- }
481
- span.run83 {
482
- background-color: rgb(255, 226, 178);
483
- display: block;
484
- }
485
- span.run84 {
486
- background-color: rgb(255, 224, 178);
487
- display: block;
488
- }
489
- span.run85 {
490
- background-color: rgb(255, 220, 178);
491
- display: block;
492
- }
493
- span.run86 {
494
- background-color: rgb(255, 218, 178);
495
- display: block;
496
- }
497
- span.run87 {
498
- background-color: rgb(255, 215, 178);
499
- display: block;
500
- }
501
- span.run88 {
502
- background-color: rgb(255, 212, 178);
503
- display: block;
504
- }
505
- span.run89 {
506
- background-color: rgb(255, 210, 178);
507
- display: block;
508
- }
509
- span.run90 {
510
- background-color: rgb(255, 206, 178);
511
- display: block;
512
- }
513
- span.run91 {
514
- background-color: rgb(255, 204, 178);
515
- display: block;
516
- }
517
- span.run92 {
518
- background-color: rgb(255, 201, 178);
519
- display: block;
520
- }
521
- span.run93 {
522
- background-color: rgb(255, 198, 178);
523
- display: block;
524
- }
525
- span.run94 {
526
- background-color: rgb(255, 196, 178);
527
- display: block;
528
- }
529
- span.run95 {
530
- background-color: rgb(255, 192, 178);
531
- display: block;
532
- }
533
- span.run96 {
534
- background-color: rgb(255, 189, 178);
535
- display: block;
536
- }
537
- span.run97 {
538
- background-color: rgb(255, 187, 178);
539
- display: block;
540
- }
541
- span.run98 {
542
- background-color: rgb(255, 184, 178);
543
- display: block;
544
- }
545
- span.run99 {
546
- background-color: rgb(255, 182, 178);
547
- display: block;
548
- }
549
- span.run100 {
550
- background-color: rgb(255, 178, 178);
551
- display: block;
552
- }
553
- </style>
554
- </head>
555
- <body>
556
- <h3>C0 code coverage information</h3>
557
- <p>Generated on Sat Feb 10 19:57:44 -0500 2007 with <a href='http://eigenclass.org/hiki.rb?rcov'>rcov 0.7.0</a>
558
- </p>
559
- <hr /><pre><span class='marked0'>Code reported as executed by Ruby looks like this...
560
- </span><span class='marked1'>and this: this line is also marked as covered.
561
- </span><span class='inferred0'>Lines considered as run by rcov, but not reported by Ruby, look like this,
562
- </span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).
563
- </span><span class='uncovered0'>Finally, here&apos;s a line marked as not executed.
564
- </span></pre>
565
- <table class='report'>
566
- <thead>
567
- <tr>
568
- <td class='heading'>Name</td>
569
- <td class='heading'>Total lines</td>
570
- <td class='heading'>Lines of code</td>
571
- <td class='heading'>Total coverage</td>
572
- <td class='heading'>Code coverage</td>
573
- </tr>
574
- </thead>
575
- <tbody>
576
- <tr class='light'>
577
- <td>
578
- <a href='lib-comment_block_rb.html'>lib/comment_block.rb</a>
579
- </td>
580
- <td class='value'>
581
- <tt>41</tt>
582
- </td>
583
- <td class='value'>
584
- <tt>36</tt>
585
- </td>
586
- <td>
587
- <table cellspacing='0' cellpadding='0' align='right'>
588
- <tr>
589
- <td>
590
- <tt>68.3%</tt>&nbsp;</td>
591
- <td>
592
- <table cellspacing='0' class='percent_graph' cellpadding='0' width='100'>
593
- <tr>
594
- <td class='covered' width='68' />
595
- <td class='uncovered' width='32' />
596
- </tr>
597
- </table>
598
- </td>
599
- </tr>
600
- </table>
601
- </td>
602
- <td>
603
- <table cellspacing='0' cellpadding='0' align='right'>
604
- <tr>
605
- <td>
606
- <tt>69.4%</tt>&nbsp;</td>
607
- <td>
608
- <table cellspacing='0' class='percent_graph' cellpadding='0' width='100'>
609
- <tr>
610
- <td class='covered' width='69' />
611
- <td class='uncovered' width='31' />
612
- </tr>
613
- </table>
614
- </td>
615
- </tr>
616
- </table>
617
- </td>
618
- </tr>
619
- </tbody>
620
- </table><pre><span class="marked1"><a name="line1" /> 1 module Sparehand
621
- </span><span class="marked0"><a name="line2" /> 2 module CommentBlock
622
- </span><span class="marked1"><a name="line3" /> 3 @@operation = :toggle
623
- </span><span class="marked0"><a name="line4" /> 4 @@comment = '#'
624
- </span><span class="inferred1"><a name="line5" /> 5
625
- </span><span class="marked0"><a name="line6" /> 6 def self.manipulate_data input, tag, output
626
- </span><span class="uncovered1"><a name="line7" /> 7 state = :ignore
627
- </span><span class="uncovered0"><a name="line8" /> 8 data.each_line do line
628
- </span><span class="uncovered1"><a name="line9" /> 9 if line.strip == &quot;#{@@comment}END #{tag}&quot;
629
- </span><span class="uncovered0"><a name="line10" />10 state = :ignore
630
- </span><span class="uncovered1"><a name="line11" />11 end
631
- </span><span class="uncovered0"><a name="line12" />12
632
- </span><span class="uncovered1"><a name="line13" />13 output.puts send(state, line)
633
- </span><span class="uncovered0"><a name="line14" />14
634
- </span><span class="uncovered1"><a name="line15" />15 if line.strip == &quot;#{@@comment}BEGIN #{tag}&quot;
635
- </span><span class="uncovered0"><a name="line16" />16 state = :process
636
- </span><span class="uncovered1"><a name="line17" />17 end
637
- </span><span class="uncovered0"><a name="line18" />18 end
638
- </span><span class="uncovered1"><a name="line19" />19 end
639
- </span><span class="inferred0"><a name="line20" />20
640
- </span><span class="marked1"><a name="line21" />21 def self.ignore line
641
- </span><span class="marked0"><a name="line22" />22 line
642
- </span><span class="marked1"><a name="line23" />23 end
643
- </span><span class="inferred0"><a name="line24" />24
644
- </span><span class="marked1"><a name="line25" />25 def self.process line, operation = @@operation, comment = @@comment
645
- </span><span class="marked0"><a name="line26" />26 if line =~ /^#{comment}/
646
- </span><span class="marked1"><a name="line27" />27 if operation == :comment
647
- </span><span class="marked0"><a name="line28" />28 line
648
- </span><span class="inferred1"><a name="line29" />29 else
649
- </span><span class="marked0"><a name="line30" />30 line[comment.length..-1]
650
- </span><span class="inferred1"><a name="line31" />31 end
651
- </span><span class="inferred0"><a name="line32" />32 else
652
- </span><span class="marked1"><a name="line33" />33 if operation == :uncomment
653
- </span><span class="marked0"><a name="line34" />34 line
654
- </span><span class="inferred1"><a name="line35" />35 else
655
- </span><span class="marked0"><a name="line36" />36 comment + line
656
- </span><span class="inferred1"><a name="line37" />37 end
657
- </span><span class="inferred0"><a name="line38" />38 end
658
- </span><span class="marked1"><a name="line39" />39 end
659
- </span><span class="inferred0"><a name="line40" />40 end #CommentBlock
660
- </span><span class="inferred1"><a name="line41" />41 end #Sparehand
661
- </span></pre><hr /> <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a> version 0.7.0.</p><p>
662
- <a href='http://validator.w3.org/check/referer'>
663
- <img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88' />
664
- </a>
665
- <a href='http://jigsaw.w3.org/css-validator/check/referer'>
666
- <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px' />
667
- </a>
668
- </p>
669
- </body>
670
- </html>