tool-shed 0.0.4

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.
Files changed (133) hide show
  1. data/Gemfile +9 -0
  2. data/LICENSE +20 -0
  3. data/README.md +52 -0
  4. data/bin/as-asset-detector +16 -0
  5. data/bin/as-class-detector +16 -0
  6. data/bin/as-docp +16 -0
  7. data/bin/as-manifest +16 -0
  8. data/bin/as-style-detector +16 -0
  9. data/coverage/unit/index.html +330 -0
  10. data/coverage/unit/jquery-1.3.2.min.js +19 -0
  11. data/coverage/unit/jquery.tablesorter.min.js +15 -0
  12. data/coverage/unit/lib-hel-asdoc_package_rb.html +447 -0
  13. data/coverage/unit/lib-hel-manifest_rb.html +555 -0
  14. data/coverage/unit/lib-hel-opts-asdoc_package_opts_rb.html +195 -0
  15. data/coverage/unit/lib-hel-opts-manifest_opts_rb.html +195 -0
  16. data/coverage/unit/lib-hel-opts-tool_opts_rb.html +531 -0
  17. data/coverage/unit/lib-hel-opts-unused_class_opts_rb.html +207 -0
  18. data/coverage/unit/lib-hel-opts-unused_style_opts_rb.html +201 -0
  19. data/coverage/unit/lib-hel-project_tools_rb.html +423 -0
  20. data/coverage/unit/lib-hel-search_rb.html +363 -0
  21. data/coverage/unit/lib-hel-stripper_rb.html +357 -0
  22. data/coverage/unit/lib-hel-tool_rb.html +423 -0
  23. data/coverage/unit/lib-hel-unused_class_rb.html +675 -0
  24. data/coverage/unit/lib-hel-unused_style_rb.html +747 -0
  25. data/coverage/unit/lib-hel-version_rb.html +135 -0
  26. data/coverage/unit/lib-hel_tools_rb.html +165 -0
  27. data/coverage/unit/print.css +12 -0
  28. data/coverage/unit/rcov.js +42 -0
  29. data/coverage/unit/screen.css +270 -0
  30. data/coverage.data +0 -0
  31. data/lib/shed/asdoc_package.rb +64 -0
  32. data/lib/shed/manifest.rb +82 -0
  33. data/lib/shed/opts/asdoc_package_opts.rb +22 -0
  34. data/lib/shed/opts/manifest_opts.rb +22 -0
  35. data/lib/shed/opts/tool_opts.rb +114 -0
  36. data/lib/shed/opts/unused_asset_opts.rb +24 -0
  37. data/lib/shed/opts/unused_class_opts.rb +24 -0
  38. data/lib/shed/opts/unused_style_opts.rb +23 -0
  39. data/lib/shed/project_tools.rb +60 -0
  40. data/lib/shed/search.rb +50 -0
  41. data/lib/shed/stripper.rb +49 -0
  42. data/lib/shed/tool.rb +60 -0
  43. data/lib/shed/unused_asset.rb +68 -0
  44. data/lib/shed/unused_class.rb +102 -0
  45. data/lib/shed/unused_style.rb +114 -0
  46. data/lib/shed/version.rb +12 -0
  47. data/lib/tool_shed.rb +19 -0
  48. data/rakefile.rb +109 -0
  49. data/rdoc/classes/ASDocPackage.html +281 -0
  50. data/rdoc/classes/ASDocPackageOpts.html +204 -0
  51. data/rdoc/classes/Manifest.html +323 -0
  52. data/rdoc/classes/ManifestOpts.html +205 -0
  53. data/rdoc/classes/ProjectTools.html +302 -0
  54. data/rdoc/classes/Search.html +203 -0
  55. data/rdoc/classes/Stripper.html +223 -0
  56. data/rdoc/classes/Tool.html +313 -0
  57. data/rdoc/classes/ToolOpts.html +297 -0
  58. data/rdoc/classes/UnusedClass.html +258 -0
  59. data/rdoc/classes/UnusedClassOpts.html +206 -0
  60. data/rdoc/classes/UnusedStyle.html +277 -0
  61. data/rdoc/classes/UnusedStyleOpts.html +205 -0
  62. data/rdoc/created.rid +1 -0
  63. data/rdoc/files/LICENSE.html +129 -0
  64. data/rdoc/files/README_md.html +138 -0
  65. data/rdoc/files/lib/hel/asdoc_package_rb.html +107 -0
  66. data/rdoc/files/lib/hel/manifest_rb.html +107 -0
  67. data/rdoc/files/lib/hel/opts/asdoc_package_opts_rb.html +107 -0
  68. data/rdoc/files/lib/hel/opts/manifest_opts_rb.html +107 -0
  69. data/rdoc/files/lib/hel/opts/tool_opts_rb.html +114 -0
  70. data/rdoc/files/lib/hel/opts/unused_class_opts_rb.html +107 -0
  71. data/rdoc/files/lib/hel/opts/unused_style_opts_rb.html +107 -0
  72. data/rdoc/files/lib/hel/project_tools_rb.html +107 -0
  73. data/rdoc/files/lib/hel/search_rb.html +114 -0
  74. data/rdoc/files/lib/hel/stripper_rb.html +107 -0
  75. data/rdoc/files/lib/hel/tool_rb.html +107 -0
  76. data/rdoc/files/lib/hel/unused_class_rb.html +107 -0
  77. data/rdoc/files/lib/hel/unused_style_rb.html +107 -0
  78. data/rdoc/files/lib/hel/version_rb.html +107 -0
  79. data/rdoc/files/lib/hel_tools_rb.html +127 -0
  80. data/rdoc/fr_class_index.html +39 -0
  81. data/rdoc/fr_file_index.html +43 -0
  82. data/rdoc/fr_method_index.html +75 -0
  83. data/rdoc/index.html +24 -0
  84. data/rdoc/rdoc-style.css +208 -0
  85. data/test/fixtures/search/App.mxml +0 -0
  86. data/test/fixtures/search/hide/Hidden.as +0 -0
  87. data/test/fixtures/search/org/helvector/Main.as +0 -0
  88. data/test/fixtures/src/org/helvector/Helvector.as +16 -0
  89. data/test/fixtures/src/org/helvector/one/HelOne.as +14 -0
  90. data/test/fixtures/src/org/helvector/one/HelOneTwo.mxml +0 -0
  91. data/test/fixtures/src/org/helvector/one/package.asdoc +1 -0
  92. data/test/fixtures/src/org/helvector/package.asdoc +1 -0
  93. data/test/fixtures/src/org/helvector/three/HelThree.as +14 -0
  94. data/test/fixtures/src/org/helvector/three/package.asdoc +1 -0
  95. data/test/fixtures/src/org/helvector/two/HelTwo.as +14 -0
  96. data/test/fixtures/src/org/helvector/two/package.asdoc +1 -0
  97. data/test/fixtures/unused-asset/assets/css/referenced.css +0 -0
  98. data/test/fixtures/unused-asset/assets/css/un-referenced.css +0 -0
  99. data/test/fixtures/unused-asset/assets/fonts/referenced.otf +0 -0
  100. data/test/fixtures/unused-asset/assets/fonts/un-referenced.otf +0 -0
  101. data/test/fixtures/unused-asset/assets/img/referenced.jpg +0 -0
  102. data/test/fixtures/unused-asset/assets/img/referenced.png +0 -0
  103. data/test/fixtures/unused-asset/assets/img/un-referenced.jpg +0 -0
  104. data/test/fixtures/unused-asset/assets/img/un-referenced.png +0 -0
  105. data/test/fixtures/unused-asset/src/org/helvector/ToolShed.as +30 -0
  106. data/test/fixtures/unused-cla/link-report.xml +17 -0
  107. data/test/fixtures/unused-cla/manifest.xml +6 -0
  108. data/test/fixtures/unused-cla/src/Unused.as +0 -0
  109. data/test/fixtures/unused-cla/src/Used.as +0 -0
  110. data/test/fixtures/unused-css/css/styles.css +2 -0
  111. data/test/fixtures/unused-css/css-multiple/more.css +2 -0
  112. data/test/fixtures/unused-css/css-multiple/styles.css +2 -0
  113. data/test/fixtures/unused-css/css-with-comments/commented.css +6 -0
  114. data/test/fixtures/unused-css/src/CSSApp.mxml +5 -0
  115. data/test/test_helper.rb +9 -0
  116. data/test/unit/test_asdoc_package.rb +72 -0
  117. data/test/unit/test_asdoc_package_opts.rb +28 -0
  118. data/test/unit/test_manifest.rb +53 -0
  119. data/test/unit/test_manifest_opts.rb +28 -0
  120. data/test/unit/test_search.rb +67 -0
  121. data/test/unit/test_source_tools.rb +97 -0
  122. data/test/unit/test_stripper.rb +56 -0
  123. data/test/unit/test_tool.rb +73 -0
  124. data/test/unit/test_tool_opts.rb +81 -0
  125. data/test/unit/test_unused_asset.rb +59 -0
  126. data/test/unit/test_unused_asset_opts.rb +32 -0
  127. data/test/unit/test_unused_class.rb +50 -0
  128. data/test/unit/test_unused_class_opts.rb +32 -0
  129. data/test/unit/test_unused_style.rb +103 -0
  130. data/test/unit/test_unused_style_opts.rb +31 -0
  131. data/tool-shed-0.0.3.gem +0 -0
  132. data/tool-shed.gemspec +41 -0
  133. metadata +265 -0
@@ -0,0 +1,204 @@
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: ASDocPackageOpts</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">ASDocPackageOpts</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/hel/opts/asdoc_package_opts_rb.html">
59
+ lib/hel/opts/asdoc_package_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
+ <a href="ToolOpts.html">
69
+ ToolOpts
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
+ Manages the command line interface for the ASDoc Package File tool.
86
+ </p>
87
+
88
+ </div>
89
+
90
+
91
+ </div>
92
+
93
+ <div id="method-list">
94
+ <h3 class="section-bar">Methods</h3>
95
+
96
+ <div class="name-list">
97
+ <a href="#M000027">default_config</a>&nbsp;&nbsp;
98
+ <a href="#M000026">description</a>&nbsp;&nbsp;
99
+ <a href="#M000025">name</a>&nbsp;&nbsp;
100
+ </div>
101
+ </div>
102
+
103
+ </div>
104
+
105
+
106
+ <!-- if includes -->
107
+
108
+ <div id="section">
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <!-- if method_list -->
118
+ <div id="methods">
119
+ <h3 class="section-bar">Public Class methods</h3>
120
+
121
+ <div id="method-M000027" class="method-detail">
122
+ <a name="M000027"></a>
123
+
124
+ <div class="method-heading">
125
+ <a href="#M000027" class="method-signature">
126
+ <span class="method-name">default_config</span><span class="method-args">()</span>
127
+ </a>
128
+ </div>
129
+
130
+ <div class="method-description">
131
+ <p><a class="source-toggle" href="#"
132
+ onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
133
+ <div class="method-source-code" id="M000027-source">
134
+ <pre>
135
+ <span class="ruby-comment cmt"># File lib/hel/opts/asdoc_package_opts.rb, line 16</span>
136
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">default_config</span>
137
+ <span class="ruby-identifier">dc</span> = <span class="ruby-identifier">superclass</span>.<span class="ruby-identifier">default_config</span>
138
+ <span class="ruby-identifier">dc</span>[<span class="ruby-identifier">:output</span>] = <span class="ruby-value str">'package-asdoc.xml'</span>
139
+ <span class="ruby-identifier">dc</span>
140
+ <span class="ruby-keyword kw">end</span>
141
+ </pre>
142
+ </div>
143
+ </div>
144
+ </div>
145
+
146
+ <div id="method-M000026" class="method-detail">
147
+ <a name="M000026"></a>
148
+
149
+ <div class="method-heading">
150
+ <a href="#M000026" class="method-signature">
151
+ <span class="method-name">description</span><span class="method-args">()</span>
152
+ </a>
153
+ </div>
154
+
155
+ <div class="method-description">
156
+ <p><a class="source-toggle" href="#"
157
+ onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
158
+ <div class="method-source-code" id="M000026-source">
159
+ <pre>
160
+ <span class="ruby-comment cmt"># File lib/hel/opts/asdoc_package_opts.rb, line 12</span>
161
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">description</span>
162
+ <span class="ruby-value str">'ASDoc Package Builder'</span>
163
+ <span class="ruby-keyword kw">end</span>
164
+ </pre>
165
+ </div>
166
+ </div>
167
+ </div>
168
+
169
+ <div id="method-M000025" class="method-detail">
170
+ <a name="M000025"></a>
171
+
172
+ <div class="method-heading">
173
+ <a href="#M000025" class="method-signature">
174
+ <span class="method-name">name</span><span class="method-args">()</span>
175
+ </a>
176
+ </div>
177
+
178
+ <div class="method-description">
179
+ <p><a class="source-toggle" href="#"
180
+ onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
181
+ <div class="method-source-code" id="M000025-source">
182
+ <pre>
183
+ <span class="ruby-comment cmt"># File lib/hel/opts/asdoc_package_opts.rb, line 8</span>
184
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>
185
+ <span class="ruby-value str">'asdocp'</span>
186
+ <span class="ruby-keyword kw">end</span>
187
+ </pre>
188
+ </div>
189
+ </div>
190
+ </div>
191
+
192
+
193
+ </div>
194
+
195
+
196
+ </div>
197
+
198
+
199
+ <div id="validator-badges">
200
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
201
+ </div>
202
+
203
+ </body>
204
+ </html>
@@ -0,0 +1,323 @@
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: Manifest</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">Manifest</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/hel/manifest_rb.html">
59
+ lib/hel/manifest.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
+ Scans a specified source tree for ActionScript and MXML files and for each
86
+ one found creates a manifest entry. When complete writes the resulting
87
+ manfiest file to disk.
88
+ </p>
89
+
90
+ </div>
91
+
92
+
93
+ </div>
94
+
95
+ <div id="method-list">
96
+ <h3 class="section-bar">Methods</h3>
97
+
98
+ <div class="name-list">
99
+ <a href="#M000038">add</a>&nbsp;&nbsp;
100
+ <a href="#M000040">build</a>&nbsp;&nbsp;
101
+ <a href="#M000041">create_xml</a>&nbsp;&nbsp;
102
+ <a href="#M000037">new</a>&nbsp;&nbsp;
103
+ <a href="#M000039">scan</a>&nbsp;&nbsp;
104
+ </div>
105
+ </div>
106
+
107
+ </div>
108
+
109
+
110
+ <!-- if includes -->
111
+
112
+ <div id="section">
113
+
114
+
115
+
116
+
117
+
118
+ <div id="attribute-list">
119
+ <h3 class="section-bar">Attributes</h3>
120
+
121
+ <div class="name-list">
122
+ <table>
123
+ <tr class="top-aligned-row context-row">
124
+ <td class="context-item-name">components</td>
125
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
126
+ <td class="context-item-desc"></td>
127
+ </tr>
128
+ <tr class="top-aligned-row context-row">
129
+ <td class="context-item-name">xml</td>
130
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
131
+ <td class="context-item-desc"></td>
132
+ </tr>
133
+ </table>
134
+ </div>
135
+ </div>
136
+
137
+
138
+
139
+ <!-- if method_list -->
140
+ <div id="methods">
141
+ <h3 class="section-bar">Public Class methods</h3>
142
+
143
+ <div id="method-M000037" class="method-detail">
144
+ <a name="M000037"></a>
145
+
146
+ <div class="method-heading">
147
+ <a href="#M000037" class="method-signature">
148
+ <span class="method-name">new</span><span class="method-args">(opt,out=STDOUT)</span>
149
+ </a>
150
+ </div>
151
+
152
+ <div class="method-description">
153
+ <p><a class="source-toggle" href="#"
154
+ onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
155
+ <div class="method-source-code" id="M000037-source">
156
+ <pre>
157
+ <span class="ruby-comment cmt"># File lib/hel/manifest.rb, line 12</span>
158
+ <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>)
159
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">opt</span>,<span class="ruby-identifier">out</span>)
160
+
161
+ <span class="ruby-ivar">@filetypes</span> = <span class="ruby-regexp re">/\.(as|mxml)$/</span>
162
+
163
+ <span class="ruby-identifier">build</span>
164
+ <span class="ruby-keyword kw">end</span>
165
+ </pre>
166
+ </div>
167
+ </div>
168
+ </div>
169
+
170
+ <h3 class="section-bar">Public Instance methods</h3>
171
+
172
+ <div id="method-M000038" class="method-detail">
173
+ <a name="M000038"></a>
174
+
175
+ <div class="method-heading">
176
+ <a href="#M000038" class="method-signature">
177
+ <span class="method-name">add</span><span class="method-args">(path, id)</span>
178
+ </a>
179
+ </div>
180
+
181
+ <div class="method-description">
182
+ <p>
183
+ Generates a hash containing id and xml vales. The xml can be to be inserted
184
+ into the manifest for the specified class.
185
+ </p>
186
+ <p><a class="source-toggle" href="#"
187
+ onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
188
+ <div class="method-source-code" id="M000038-source">
189
+ <pre>
190
+ <span class="ruby-comment cmt"># File lib/hel/manifest.rb, line 24</span>
191
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">id</span>)
192
+ <span class="ruby-identifier">log</span>(<span class="ruby-node">&quot;Adding '#{path}'&quot;</span>)
193
+
194
+ <span class="ruby-identifier">cp</span> = <span class="ruby-constant">ProjectTools</span>.<span class="ruby-identifier">import</span>(<span class="ruby-identifier">path</span>)
195
+
196
+ { <span class="ruby-identifier">:key</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">id</span>, <span class="ruby-identifier">:xml</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;&lt;component id=\&quot;#{id}\&quot; class=\&quot;#{cp}\&quot; /&gt;&quot;</span> }
197
+ <span class="ruby-keyword kw">end</span>
198
+ </pre>
199
+ </div>
200
+ </div>
201
+ </div>
202
+
203
+ <div id="method-M000040" class="method-detail">
204
+ <a name="M000040"></a>
205
+
206
+ <div class="method-heading">
207
+ <a href="#M000040" class="method-signature">
208
+ <span class="method-name">build</span><span class="method-args">()</span>
209
+ </a>
210
+ </div>
211
+
212
+ <div class="method-description">
213
+ <p>
214
+ Build the manifest file and save it to disk.
215
+ </p>
216
+ <p><a class="source-toggle" href="#"
217
+ onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
218
+ <div class="method-source-code" id="M000040-source">
219
+ <pre>
220
+ <span class="ruby-comment cmt"># File lib/hel/manifest.rb, line 56</span>
221
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span>
222
+ <span class="ruby-ivar">@components</span> = <span class="ruby-identifier">scan</span>(<span class="ruby-ivar">@src</span>)
223
+
224
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@components</span>.<span class="ruby-identifier">empty?</span>
225
+ <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;No ActionScript or Mxml files found.&quot;</span>
226
+ <span class="ruby-keyword kw">else</span>
227
+
228
+ <span class="ruby-ivar">@components</span>.<span class="ruby-identifier">sort!</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>[<span class="ruby-identifier">:xml</span>] <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">b</span>[<span class="ruby-identifier">:xml</span>] }
229
+
230
+ <span class="ruby-ivar">@xml</span> = <span class="ruby-identifier">create_xml</span>(<span class="ruby-ivar">@components</span>)
231
+
232
+ <span class="ruby-comment cmt">#Open/Create the manifest file and write the output to it.</span>
233
+ <span class="ruby-identifier">to_disk</span>(<span class="ruby-ivar">@xml</span>)
234
+ <span class="ruby-keyword kw">end</span>
235
+ <span class="ruby-keyword kw">end</span>
236
+ </pre>
237
+ </div>
238
+ </div>
239
+ </div>
240
+
241
+ <div id="method-M000041" class="method-detail">
242
+ <a name="M000041"></a>
243
+
244
+ <div class="method-heading">
245
+ <a href="#M000041" class="method-signature">
246
+ <span class="method-name">create_xml</span><span class="method-args">(comps)</span>
247
+ </a>
248
+ </div>
249
+
250
+ <div class="method-description">
251
+ <p>
252
+ Constructs the flex complier config file when given a list of paths to
253
+ asdoc files.
254
+ </p>
255
+ <p><a class="source-toggle" href="#"
256
+ onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
257
+ <div class="method-source-code" id="M000041-source">
258
+ <pre>
259
+ <span class="ruby-comment cmt"># File lib/hel/manifest.rb, line 76</span>
260
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_xml</span>(<span class="ruby-identifier">comps</span>)
261
+ <span class="ruby-identifier">x</span> = <span class="ruby-value str">&quot;&lt;?xml version='1.0'?&gt;\n&lt;componentPackage&gt;\n&quot;</span>
262
+ <span class="ruby-identifier">comps</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;\t#{c[:xml]}\n&quot;</span> }
263
+ <span class="ruby-identifier">x</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;/componentPackage&gt;&quot;</span>
264
+ <span class="ruby-identifier">x</span>
265
+ <span class="ruby-keyword kw">end</span>
266
+ </pre>
267
+ </div>
268
+ </div>
269
+ </div>
270
+
271
+ <div id="method-M000039" class="method-detail">
272
+ <a name="M000039"></a>
273
+
274
+ <div class="method-heading">
275
+ <a href="#M000039" class="method-signature">
276
+ <span class="method-name">scan</span><span class="method-args">(path)</span>
277
+ </a>
278
+ </div>
279
+
280
+ <div class="method-description">
281
+ <p>
282
+ <a href="Search.html">Search</a> the provided path for as and mxml
283
+ documents and return those found as a list.
284
+ </p>
285
+ <p><a class="source-toggle" href="#"
286
+ onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
287
+ <div class="method-source-code" id="M000039-source">
288
+ <pre>
289
+ <span class="ruby-comment cmt"># File lib/hel/manifest.rb, line 36</span>
290
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan</span>(<span class="ruby-identifier">path</span>)
291
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Scanning '#{path}' for as and mxml files...&quot;</span>
292
+
293
+ <span class="ruby-identifier">found</span> = []
294
+
295
+ <span class="ruby-constant">Search</span>.<span class="ruby-identifier">find_all</span>(<span class="ruby-ivar">@filetypes</span>,<span class="ruby-identifier">path</span>,<span class="ruby-ivar">@excludes</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
296
+ <span class="ruby-identifier">ext</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">p</span>)
297
+ <span class="ruby-identifier">cn</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">p</span>, <span class="ruby-identifier">ext</span>)
298
+
299
+ <span class="ruby-identifier">found</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">p</span>, <span class="ruby-identifier">cn</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cn</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^[A-Z]/</span>
300
+ <span class="ruby-keyword kw">end</span>
301
+
302
+ <span class="ruby-identifier">found</span>.<span class="ruby-identifier">uniq!</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">found</span>.<span class="ruby-identifier">empty?</span>
303
+
304
+ <span class="ruby-identifier">found</span>
305
+ <span class="ruby-keyword kw">end</span>
306
+ </pre>
307
+ </div>
308
+ </div>
309
+ </div>
310
+
311
+
312
+ </div>
313
+
314
+
315
+ </div>
316
+
317
+
318
+ <div id="validator-badges">
319
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
320
+ </div>
321
+
322
+ </body>
323
+ </html>