tool-shed 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/Gemfile +3 -1
  2. data/Gemfile.lock +82 -0
  3. data/README.md +7 -5
  4. data/bin/as-asset-detector +0 -0
  5. data/lib/shed/asdoc_package.rb +1 -1
  6. data/lib/shed/manifest.rb +12 -4
  7. data/lib/shed/opts/manifest_opts.rb +11 -4
  8. data/lib/shed/opts/tool_opts.rb +8 -5
  9. data/lib/shed/opts/unused_asset_opts.rb +1 -1
  10. data/lib/shed/opts/unused_class_opts.rb +16 -1
  11. data/lib/shed/opts/unused_style_opts.rb +1 -1
  12. data/lib/shed/search.rb +6 -5
  13. data/lib/shed/tool.rb +16 -3
  14. data/lib/shed/unused_asset.rb +37 -12
  15. data/lib/shed/unused_class.rb +4 -4
  16. data/lib/shed/version.rb +1 -1
  17. data/rakefile.rb +20 -84
  18. data/test/fixtures/unused-asset/src/org/helvector/ToolBox.mxml +4 -0
  19. data/test/test_helper.rb +13 -0
  20. data/test/unit/test_manifest.rb +23 -2
  21. data/test/unit/test_manifest_opts.rb +15 -0
  22. data/test/unit/test_search.rb +16 -4
  23. data/test/unit/test_unused_asset.rb +24 -14
  24. data/test/unit/test_unused_class_opts.rb +28 -1
  25. metadata +41 -69
  26. data/coverage/unit/index.html +0 -330
  27. data/coverage/unit/jquery-1.3.2.min.js +0 -19
  28. data/coverage/unit/jquery.tablesorter.min.js +0 -15
  29. data/coverage/unit/lib-hel-asdoc_package_rb.html +0 -447
  30. data/coverage/unit/lib-hel-manifest_rb.html +0 -555
  31. data/coverage/unit/lib-hel-opts-asdoc_package_opts_rb.html +0 -195
  32. data/coverage/unit/lib-hel-opts-manifest_opts_rb.html +0 -195
  33. data/coverage/unit/lib-hel-opts-tool_opts_rb.html +0 -531
  34. data/coverage/unit/lib-hel-opts-unused_class_opts_rb.html +0 -207
  35. data/coverage/unit/lib-hel-opts-unused_style_opts_rb.html +0 -201
  36. data/coverage/unit/lib-hel-project_tools_rb.html +0 -423
  37. data/coverage/unit/lib-hel-search_rb.html +0 -363
  38. data/coverage/unit/lib-hel-stripper_rb.html +0 -357
  39. data/coverage/unit/lib-hel-tool_rb.html +0 -423
  40. data/coverage/unit/lib-hel-unused_class_rb.html +0 -675
  41. data/coverage/unit/lib-hel-unused_style_rb.html +0 -747
  42. data/coverage/unit/lib-hel-version_rb.html +0 -135
  43. data/coverage/unit/lib-hel_tools_rb.html +0 -165
  44. data/coverage/unit/print.css +0 -12
  45. data/coverage/unit/rcov.js +0 -42
  46. data/coverage/unit/screen.css +0 -270
  47. data/coverage.data +0 -0
  48. data/rdoc/classes/ASDocPackage.html +0 -281
  49. data/rdoc/classes/ASDocPackageOpts.html +0 -204
  50. data/rdoc/classes/Manifest.html +0 -323
  51. data/rdoc/classes/ManifestOpts.html +0 -205
  52. data/rdoc/classes/ProjectTools.html +0 -302
  53. data/rdoc/classes/Search.html +0 -203
  54. data/rdoc/classes/Stripper.html +0 -223
  55. data/rdoc/classes/Tool.html +0 -313
  56. data/rdoc/classes/ToolOpts.html +0 -297
  57. data/rdoc/classes/UnusedClass.html +0 -258
  58. data/rdoc/classes/UnusedClassOpts.html +0 -206
  59. data/rdoc/classes/UnusedStyle.html +0 -277
  60. data/rdoc/classes/UnusedStyleOpts.html +0 -205
  61. data/rdoc/created.rid +0 -1
  62. data/rdoc/files/LICENSE.html +0 -129
  63. data/rdoc/files/README_md.html +0 -138
  64. data/rdoc/files/lib/hel/asdoc_package_rb.html +0 -107
  65. data/rdoc/files/lib/hel/manifest_rb.html +0 -107
  66. data/rdoc/files/lib/hel/opts/asdoc_package_opts_rb.html +0 -107
  67. data/rdoc/files/lib/hel/opts/manifest_opts_rb.html +0 -107
  68. data/rdoc/files/lib/hel/opts/tool_opts_rb.html +0 -114
  69. data/rdoc/files/lib/hel/opts/unused_class_opts_rb.html +0 -107
  70. data/rdoc/files/lib/hel/opts/unused_style_opts_rb.html +0 -107
  71. data/rdoc/files/lib/hel/project_tools_rb.html +0 -107
  72. data/rdoc/files/lib/hel/search_rb.html +0 -114
  73. data/rdoc/files/lib/hel/stripper_rb.html +0 -107
  74. data/rdoc/files/lib/hel/tool_rb.html +0 -107
  75. data/rdoc/files/lib/hel/unused_class_rb.html +0 -107
  76. data/rdoc/files/lib/hel/unused_style_rb.html +0 -107
  77. data/rdoc/files/lib/hel/version_rb.html +0 -107
  78. data/rdoc/files/lib/hel_tools_rb.html +0 -127
  79. data/rdoc/fr_class_index.html +0 -39
  80. data/rdoc/fr_file_index.html +0 -43
  81. data/rdoc/fr_method_index.html +0 -75
  82. data/rdoc/index.html +0 -24
  83. data/rdoc/rdoc-style.css +0 -208
  84. data/tool-shed-0.0.3.gem +0 -0
  85. data/tool-shed.gemspec +0 -41
@@ -1,297 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: ToolOpts</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">ToolOpts</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/hel/opts/tool_opts_rb.html">
59
- lib/hel/opts/tool_opts.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- Abstract layer for the helvector tools options parsers. This sets the basic
84
- paramaters the tools respond to via the command line.
85
- </p>
86
-
87
- </div>
88
-
89
-
90
- </div>
91
-
92
- <div id="method-list">
93
- <h3 class="section-bar">Methods</h3>
94
-
95
- <div class="name-list">
96
- <a href="#M000004">default_config</a>&nbsp;&nbsp;
97
- <a href="#M000002">description</a>&nbsp;&nbsp;
98
- <a href="#M000001">name</a>&nbsp;&nbsp;
99
- <a href="#M000005">parse</a>&nbsp;&nbsp;
100
- <a href="#M000003">version</a>&nbsp;&nbsp;
101
- </div>
102
- </div>
103
-
104
- </div>
105
-
106
-
107
- <!-- if includes -->
108
-
109
- <div id="section">
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
- <!-- if method_list -->
119
- <div id="methods">
120
- <h3 class="section-bar">Public Class methods</h3>
121
-
122
- <div id="method-M000004" class="method-detail">
123
- <a name="M000004"></a>
124
-
125
- <div class="method-heading">
126
- <a href="#M000004" class="method-signature">
127
- <span class="method-name">default_config</span><span class="method-args">()</span>
128
- </a>
129
- </div>
130
-
131
- <div class="method-description">
132
- <p><a class="source-toggle" href="#"
133
- onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
134
- <div class="method-source-code" id="M000004-source">
135
- <pre>
136
- <span class="ruby-comment cmt"># File lib/hel/opts/tool_opts.rb, line 23</span>
137
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">default_config</span>
138
- {
139
- <span class="ruby-identifier">:src</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;.&quot;</span>,
140
- <span class="ruby-identifier">:output</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'output.xml'</span>,
141
- <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>,
142
- <span class="ruby-identifier">:silent</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>
143
- }
144
- <span class="ruby-keyword kw">end</span>
145
- </pre>
146
- </div>
147
- </div>
148
- </div>
149
-
150
- <div id="method-M000002" class="method-detail">
151
- <a name="M000002"></a>
152
-
153
- <div class="method-heading">
154
- <a href="#M000002" class="method-signature">
155
- <span class="method-name">description</span><span class="method-args">()</span>
156
- </a>
157
- </div>
158
-
159
- <div class="method-description">
160
- <p><a class="source-toggle" href="#"
161
- onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
162
- <div class="method-source-code" id="M000002-source">
163
- <pre>
164
- <span class="ruby-comment cmt"># File lib/hel/opts/tool_opts.rb, line 15</span>
165
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">description</span>
166
- <span class="ruby-value str">'Helvector Tool'</span>
167
- <span class="ruby-keyword kw">end</span>
168
- </pre>
169
- </div>
170
- </div>
171
- </div>
172
-
173
- <div id="method-M000001" class="method-detail">
174
- <a name="M000001"></a>
175
-
176
- <div class="method-heading">
177
- <a href="#M000001" class="method-signature">
178
- <span class="method-name">name</span><span class="method-args">()</span>
179
- </a>
180
- </div>
181
-
182
- <div class="method-description">
183
- <p><a class="source-toggle" href="#"
184
- onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
185
- <div class="method-source-code" id="M000001-source">
186
- <pre>
187
- <span class="ruby-comment cmt"># File lib/hel/opts/tool_opts.rb, line 11</span>
188
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>
189
- <span class="ruby-constant">HelTool</span><span class="ruby-operator">::</span><span class="ruby-constant">NAME</span>
190
- <span class="ruby-keyword kw">end</span>
191
- </pre>
192
- </div>
193
- </div>
194
- </div>
195
-
196
- <div id="method-M000005" class="method-detail">
197
- <a name="M000005"></a>
198
-
199
- <div class="method-heading">
200
- <a href="#M000005" class="method-signature">
201
- <span class="method-name">parse</span><span class="method-args">(args,out=STDOUT)</span>
202
- </a>
203
- </div>
204
-
205
- <div class="method-description">
206
- <p>
207
- <a
208
- href="http://ruby-doc.org/stdlib/libdoc/optparse/rdoc/classes/OptionParser.html">ruby-doc.org/stdlib/libdoc/optparse/rdoc/classes/OptionParser.html</a>
209
- </p>
210
- <p><a class="source-toggle" href="#"
211
- onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
212
- <div class="method-source-code" id="M000005-source">
213
- <pre>
214
- <span class="ruby-comment cmt"># File lib/hel/opts/tool_opts.rb, line 35</span>
215
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">args</span>,<span class="ruby-identifier">out</span>=<span class="ruby-constant">STDOUT</span>)
216
- <span class="ruby-identifier">config</span> = <span class="ruby-identifier">default_config</span>
217
-
218
- <span class="ruby-identifier">options</span> = <span class="ruby-constant">OptionParser</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">opts</span><span class="ruby-operator">|</span>
219
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">banner</span> = <span class="ruby-node">&quot;Usage: #{name} [options]&quot;</span>
220
-
221
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">separator</span> <span class="ruby-value str">&quot;&quot;</span>
222
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">separator</span> <span class="ruby-value str">&quot;Options:&quot;</span>
223
-
224
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span>(<span class="ruby-value str">&quot;-s&quot;</span>, <span class="ruby-value str">&quot;--source [PATH]&quot;</span>, <span class="ruby-constant">String</span>,
225
- <span class="ruby-value str">&quot;Path to source folder, defaults to current directory.&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
226
- <span class="ruby-identifier">config</span>[<span class="ruby-identifier">:src</span>] = <span class="ruby-identifier">v</span>
227
- <span class="ruby-keyword kw">end</span>
228
-
229
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span>(<span class="ruby-value str">&quot;-o&quot;</span>, <span class="ruby-value str">&quot;--output [PATH]&quot;</span>, <span class="ruby-constant">String</span>,
230
- <span class="ruby-node">&quot;Path to output XML file, defaults to #{config[:output]}&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
231
- <span class="ruby-identifier">config</span>[<span class="ruby-identifier">:output</span>] = <span class="ruby-identifier">v</span>
232
- <span class="ruby-keyword kw">end</span>
233
-
234
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span>(<span class="ruby-value str">&quot;-v&quot;</span>, <span class="ruby-value str">&quot;--verbose&quot;</span>, <span class="ruby-value str">&quot;Run verbosely&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
235
- <span class="ruby-identifier">config</span>[<span class="ruby-identifier">:verbose</span>] = <span class="ruby-identifier">v</span>
236
- <span class="ruby-keyword kw">end</span>
237
-
238
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span>(<span class="ruby-value str">&quot;--silent&quot;</span>, <span class="ruby-value str">&quot;Supress all output.&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
239
- <span class="ruby-identifier">config</span>[<span class="ruby-identifier">:silent</span>] = <span class="ruby-identifier">v</span>
240
- <span class="ruby-keyword kw">end</span>
241
-
242
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on_tail</span>(<span class="ruby-value str">&quot;-h&quot;</span>, <span class="ruby-value str">&quot;--help&quot;</span>, <span class="ruby-value str">&quot;Show this message&quot;</span>) <span class="ruby-keyword kw">do</span>
243
- <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">opts</span>
244
- <span class="ruby-identifier">exit</span>
245
- <span class="ruby-keyword kw">end</span>
246
-
247
- <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on_tail</span>(<span class="ruby-value str">&quot;--version&quot;</span>, <span class="ruby-value str">&quot;Show version&quot;</span>) <span class="ruby-keyword kw">do</span>
248
- <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{description} version #{version}&quot;</span>
249
- <span class="ruby-identifier">exit</span>
250
- <span class="ruby-keyword kw">end</span>
251
- <span class="ruby-keyword kw">end</span>
252
-
253
- <span class="ruby-identifier">options</span>.<span class="ruby-identifier">parse!</span>(<span class="ruby-identifier">args</span>)
254
-
255
- <span class="ruby-identifier">config</span>
256
- <span class="ruby-keyword kw">end</span>
257
- </pre>
258
- </div>
259
- </div>
260
- </div>
261
-
262
- <div id="method-M000003" class="method-detail">
263
- <a name="M000003"></a>
264
-
265
- <div class="method-heading">
266
- <a href="#M000003" class="method-signature">
267
- <span class="method-name">version</span><span class="method-args">()</span>
268
- </a>
269
- </div>
270
-
271
- <div class="method-description">
272
- <p><a class="source-toggle" href="#"
273
- onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
274
- <div class="method-source-code" id="M000003-source">
275
- <pre>
276
- <span class="ruby-comment cmt"># File lib/hel/opts/tool_opts.rb, line 19</span>
277
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">version</span>
278
- <span class="ruby-constant">HelTool</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span><span class="ruby-operator">::</span><span class="ruby-constant">STRING</span>
279
- <span class="ruby-keyword kw">end</span>
280
- </pre>
281
- </div>
282
- </div>
283
- </div>
284
-
285
-
286
- </div>
287
-
288
-
289
- </div>
290
-
291
-
292
- <div id="validator-badges">
293
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
294
- </div>
295
-
296
- </body>
297
- </html>
@@ -1,258 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: UnusedClass</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">UnusedClass</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/hel/unused_class_rb.html">
59
- lib/hel/unused_class.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="Tool.html">
69
- Tool
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
- <div id="description">
84
- <p>
85
- This tool compares a mxmlc generated link-report against a manifest file
86
- created by the as-manifest tool to identify files that are in the project
87
- source tree but are no longer used by the application.
88
- </p>
89
- <p>
90
- Before executing this script make sure the relevant link reports and
91
- manifest files have been generated.
92
- </p>
93
-
94
- </div>
95
-
96
-
97
- </div>
98
-
99
- <div id="method-list">
100
- <h3 class="section-bar">Methods</h3>
101
-
102
- <div class="name-list">
103
- <a href="#M000015">detect</a>&nbsp;&nbsp;
104
- <a href="#M000013">new</a>&nbsp;&nbsp;
105
- <a href="#M000014">valid_opts</a>&nbsp;&nbsp;
106
- </div>
107
- </div>
108
-
109
- </div>
110
-
111
-
112
- <!-- if includes -->
113
-
114
- <div id="section">
115
-
116
-
117
-
118
-
119
-
120
- <div id="attribute-list">
121
- <h3 class="section-bar">Attributes</h3>
122
-
123
- <div class="name-list">
124
- <table>
125
- <tr class="top-aligned-row context-row">
126
- <td class="context-item-name">empty_packages</td>
127
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
128
- <td class="context-item-desc"></td>
129
- </tr>
130
- <tr class="top-aligned-row context-row">
131
- <td class="context-item-name">report</td>
132
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
133
- <td class="context-item-desc"></td>
134
- </tr>
135
- <tr class="top-aligned-row context-row">
136
- <td class="context-item-name">unused_classes</td>
137
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
138
- <td class="context-item-desc"></td>
139
- </tr>
140
- </table>
141
- </div>
142
- </div>
143
-
144
-
145
-
146
- <!-- if method_list -->
147
- <div id="methods">
148
- <h3 class="section-bar">Public Class methods</h3>
149
-
150
- <div id="method-M000013" class="method-detail">
151
- <a name="M000013"></a>
152
-
153
- <div class="method-heading">
154
- <a href="#M000013" class="method-signature">
155
- <span class="method-name">new</span><span class="method-args">(opt,out=STDOUT)</span>
156
- </a>
157
- </div>
158
-
159
- <div class="method-description">
160
- <p><a class="source-toggle" href="#"
161
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
162
- <div class="method-source-code" id="M000013-source">
163
- <pre>
164
- <span class="ruby-comment cmt"># File lib/hel/unused_class.rb, line 16</span>
165
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">opt</span>,<span class="ruby-identifier">out</span>=<span class="ruby-constant">STDOUT</span>)
166
- <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">opt</span>,<span class="ruby-identifier">out</span>)
167
-
168
- <span class="ruby-ivar">@link_report</span> = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:link_report</span>]
169
- <span class="ruby-ivar">@manifest</span> = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:manifest</span>]
170
- <span class="ruby-ivar">@link_regex</span> = <span class="ruby-regexp re">/&lt;script name=&quot;.*\/(\w+)\.(as|mxml)/</span>
171
- <span class="ruby-ivar">@manifest_regex</span> = <span class="ruby-regexp re">/&lt;component id=&quot;(\w+)&quot;/</span>
172
-
173
- <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">valid_opts</span>
174
- <span class="ruby-ivar">@out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{INVALID_OPTS} One or all of specified link report, manifest file, and source directories does not exist.&quot;</span>
175
- <span class="ruby-keyword kw">return</span>
176
- <span class="ruby-keyword kw">end</span>
177
-
178
- <span class="ruby-identifier">detect</span>
179
-
180
- <span class="ruby-ivar">@report</span> = <span class="ruby-identifier">describe</span>
181
-
182
- <span class="ruby-identifier">to_disk</span>(<span class="ruby-ivar">@report</span>)
183
- <span class="ruby-keyword kw">end</span>
184
- </pre>
185
- </div>
186
- </div>
187
- </div>
188
-
189
- <h3 class="section-bar">Public Instance methods</h3>
190
-
191
- <div id="method-M000015" class="method-detail">
192
- <a name="M000015"></a>
193
-
194
- <div class="method-heading">
195
- <a href="#M000015" class="method-signature">
196
- <span class="method-name">detect</span><span class="method-args">()</span>
197
- </a>
198
- </div>
199
-
200
- <div class="method-description">
201
- <p><a class="source-toggle" href="#"
202
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
203
- <div class="method-source-code" id="M000015-source">
204
- <pre>
205
- <span class="ruby-comment cmt"># File lib/hel/unused_class.rb, line 40</span>
206
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">detect</span>
207
- <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Scanning project for classes that are uncompiled...&quot;</span>
208
-
209
- <span class="ruby-ivar">@manifest_classes</span> = <span class="ruby-identifier">linked</span>(<span class="ruby-ivar">@manifest</span>, <span class="ruby-ivar">@manifest_regex</span>, <span class="ruby-value str">'manifest'</span>)
210
- <span class="ruby-ivar">@link_classes</span> = <span class="ruby-identifier">linked</span>(<span class="ruby-ivar">@link_report</span>, <span class="ruby-ivar">@link_regex</span>, <span class="ruby-value str">'link-report'</span>)
211
-
212
- <span class="ruby-ivar">@unused_classes</span> = <span class="ruby-ivar">@manifest_classes</span><span class="ruby-operator">-</span><span class="ruby-ivar">@link_classes</span>
213
- <span class="ruby-ivar">@empty_packages</span> = <span class="ruby-identifier">scan</span>(<span class="ruby-ivar">@src</span>)
214
-
215
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Unused classes: #{@unused_classes.length.to_s}&quot;</span>
216
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Empty packages: #{@empty_packages.length.to_s}&quot;</span>
217
- <span class="ruby-keyword kw">end</span>
218
- </pre>
219
- </div>
220
- </div>
221
- </div>
222
-
223
- <div id="method-M000014" class="method-detail">
224
- <a name="M000014"></a>
225
-
226
- <div class="method-heading">
227
- <a href="#M000014" class="method-signature">
228
- <span class="method-name">valid_opts</span><span class="method-args">()</span>
229
- </a>
230
- </div>
231
-
232
- <div class="method-description">
233
- <p><a class="source-toggle" href="#"
234
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
235
- <div class="method-source-code" id="M000014-source">
236
- <pre>
237
- <span class="ruby-comment cmt"># File lib/hel/unused_class.rb, line 36</span>
238
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_opts</span>
239
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-ivar">@link_report</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-ivar">@manifest</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-ivar">@src</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">false</span>
240
- <span class="ruby-keyword kw">end</span>
241
- </pre>
242
- </div>
243
- </div>
244
- </div>
245
-
246
-
247
- </div>
248
-
249
-
250
- </div>
251
-
252
-
253
- <div id="validator-badges">
254
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
255
- </div>
256
-
257
- </body>
258
- </html>