closure 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/closure/Closure/BeanShell.html +1 -1
- data/docs/closure/Closure/Compiler/Compilation.html +1 -1
- data/docs/closure/Closure/Compiler/Error.html +1 -1
- data/docs/closure/Closure/Compiler.html +1 -1
- data/docs/closure/Closure/FileResponse.html +1 -1
- data/docs/closure/Closure/Goog.html +6 -6
- data/docs/closure/Closure/Middleware.html +1 -1
- data/docs/closure/Closure/Script/NotFound.html +1 -1
- data/docs/closure/Closure/Script/RenderStackOverflow.html +1 -1
- data/docs/closure/Closure/Script.html +1 -1
- data/docs/closure/Closure/Server.html +1 -1
- data/docs/closure/Closure/ShowExceptions.html +9 -9
- data/docs/closure/Closure/Sources.html +1 -1
- data/docs/closure/Closure/Templates/Error.html +1 -1
- data/docs/closure/Closure/Templates.html +1 -1
- data/docs/closure/Closure.html +1 -1
- data/docs/closure/_index.html +1 -1
- data/docs/closure/file.LICENSE.html +1 -1
- data/docs/closure/file.README.html +1 -1
- data/docs/closure/index.html +1 -1
- data/docs/closure/top-level-namespace.html +1 -1
- data/lib/closure/beanshell.rb +17 -17
- data/lib/closure/compiler.rb +10 -10
- data/lib/closure/goog.rb +58 -59
- data/lib/closure/script.rb +20 -21
- data/lib/closure/show_exceptions.rb +0 -3
- data/lib/closure/templates.rb +13 -13
- data/lib/closure/version.rb +1 -1
- data/lib/closure.rb +12 -12
- metadata +3 -8
- data/scripts/modules/compiler_build.js +0 -6
- data/scripts/modules/compiler_build.map +0 -24
- data/scripts/modules/compiler_build_api.js +0 -1
- data/scripts/modules/compiler_build_app.js +0 -78
- data/scripts/modules/compiler_build_settings.js +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7580eda4e1d93310622f704e9e7d57d8ed3ed89e
|
4
|
+
data.tar.gz: b33c5bff5983957a745d57e5b5ed1379ee023224
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1c65576762fc781deb2ec632ee8c4ab8187b78797081c5b7dd062b8f5be66b5dd05d2752d8fb78a131036a6074593d8194115c9a514b08ef6dce16ad7ac528d
|
7
|
+
data.tar.gz: d13e4acf1706dce4e773dfffb94efa389480ef2907b6479be99951c86b0a9f5e74dc66eae8b95bda955cca89c97521fb1728379e5132bd4b7d5605d31ee94d8a
|
@@ -338,7 +338,7 @@ conditions when the Java process is killed.</p>
|
|
338
338
|
</div>
|
339
339
|
|
340
340
|
<div id="footer">
|
341
|
-
Generated on
|
341
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
342
342
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
343
343
|
0.8.7.6 (ruby-2.2.1).
|
344
344
|
</div>
|
@@ -650,7 +650,7 @@ the javascript console.</p>
|
|
650
650
|
</div>
|
651
651
|
|
652
652
|
<div id="footer">
|
653
|
-
Generated on
|
653
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
654
654
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
655
655
|
0.8.7.6 (ruby-2.2.1).
|
656
656
|
</div>
|
@@ -114,7 +114,7 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
118
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
119
|
0.8.7.6 (ruby-2.2.1).
|
120
120
|
</div>
|
@@ -386,7 +386,7 @@ namespaces like <span class='object_link'><a href="Goog.html#compile-instance_me
|
|
386
386
|
</div>
|
387
387
|
|
388
388
|
<div id="footer">
|
389
|
-
Generated on
|
389
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
390
390
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
391
391
|
0.8.7.6 (ruby-2.2.1).
|
392
392
|
</div>
|
@@ -634,7 +634,7 @@ early.</p>
|
|
634
634
|
</div>
|
635
635
|
|
636
636
|
<div id="footer">
|
637
|
-
Generated on
|
637
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
638
638
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
639
639
|
0.8.7.6 (ruby-2.2.1).
|
640
640
|
</div>
|
@@ -341,7 +341,7 @@
|
|
341
341
|
|
342
342
|
|
343
343
|
<span class="summary_desc"><div class='inline'>
|
344
|
-
<p>If
|
344
|
+
<p>If you change any javascript sources then you need to tell Script.</p>
|
345
345
|
</div></span>
|
346
346
|
|
347
347
|
</li>
|
@@ -778,7 +778,7 @@ determine if compilation is to be performed.</p>
|
|
778
778
|
<span class='kw'>ensure</span>
|
779
779
|
<span class='kw'>if</span> <span class='id identifier rubyid_pre_js_tempfile'>pre_js_tempfile</span>
|
780
780
|
<span class='id identifier rubyid_pre_js_tempfile'>pre_js_tempfile</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
|
781
|
-
<span class='id identifier rubyid_pre_js_tempfile'>pre_js_tempfile</span><span class='period'>.</span><span class='id identifier rubyid_unlink'>unlink</span>
|
781
|
+
<span class='id identifier rubyid_pre_js_tempfile'>pre_js_tempfile</span><span class='period'>.</span><span class='id identifier rubyid_unlink'>unlink</span>
|
782
782
|
<span class='kw'>end</span>
|
783
783
|
<span class='kw'>end</span>
|
784
784
|
<span class='kw'>end</span></pre>
|
@@ -956,7 +956,7 @@ potential for a source browser, editor, and more.</p>
|
|
956
956
|
<pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 185</span>
|
957
957
|
|
958
958
|
<span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span>
|
959
|
-
<span class='ivar'>@sources</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='op'>|</span>
|
959
|
+
<span class='ivar'>@sources</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='op'>|</span>
|
960
960
|
<span class='kw'>yield</span> <span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span>
|
961
961
|
<span class='kw'>end</span>
|
962
962
|
<span class='kw'>end</span></pre>
|
@@ -1046,8 +1046,8 @@ namespace.</p>
|
|
1046
1046
|
</h3><div class="docstring">
|
1047
1047
|
<div class="discussion">
|
1048
1048
|
|
1049
|
-
<p>If
|
1050
|
-
lazy refresh, you may call it repeatedly.</p>
|
1049
|
+
<p>If you change any javascript sources then you need to tell Script. This is
|
1050
|
+
a lazy refresh, you may call it repeatedly.</p>
|
1051
1051
|
|
1052
1052
|
|
1053
1053
|
</div>
|
@@ -1217,7 +1217,7 @@ filenames are relative to the script calling #soy_to_js.</p>
|
|
1217
1217
|
</div>
|
1218
1218
|
|
1219
1219
|
<div id="footer">
|
1220
|
-
Generated on
|
1220
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
1221
1221
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1222
1222
|
0.8.7.6 (ruby-2.2.1).
|
1223
1223
|
</div>
|
@@ -308,7 +308,7 @@ Closure Script, even in non-source folders, by using the url extension e.g.
|
|
308
308
|
</div>
|
309
309
|
|
310
310
|
<div id="footer">
|
311
|
-
Generated on
|
311
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
312
312
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
313
313
|
0.8.7.6 (ruby-2.2.1).
|
314
314
|
</div>
|
@@ -114,7 +114,7 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
118
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
119
|
0.8.7.6 (ruby-2.2.1).
|
120
120
|
</div>
|
@@ -114,7 +114,7 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
118
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
119
|
0.8.7.6 (ruby-2.2.1).
|
120
120
|
</div>
|
@@ -1092,7 +1092,7 @@ be added.</p>
|
|
1092
1092
|
</div>
|
1093
1093
|
|
1094
1094
|
<div id="footer">
|
1095
|
-
Generated on
|
1095
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
1096
1096
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1097
1097
|
0.8.7.6 (ruby-2.2.1).
|
1098
1098
|
</div>
|
@@ -443,7 +443,7 @@ too.</p>
|
|
443
443
|
</div>
|
444
444
|
|
445
445
|
<div id="footer">
|
446
|
-
Generated on
|
446
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
447
447
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
448
448
|
0.8.7.6 (ruby-2.2.1).
|
449
449
|
</div>
|
@@ -213,12 +213,12 @@ the request was for javascript.</p>
|
|
213
213
|
<pre class="lines">
|
214
214
|
|
215
215
|
|
216
|
-
|
217
|
-
|
218
|
-
|
216
|
+
81
|
217
|
+
82
|
218
|
+
83</pre>
|
219
219
|
</td>
|
220
220
|
<td>
|
221
|
-
<pre class="code"><span class="info file"># File 'lib/closure/show_exceptions.rb', line
|
221
|
+
<pre class="code"><span class="info file"># File 'lib/closure/show_exceptions.rb', line 81</span>
|
222
222
|
|
223
223
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_app'>app</span><span class='rparen'>)</span>
|
224
224
|
<span class='ivar'>@app</span> <span class='op'>=</span> <span class='const'>Html</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Javascript</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_app'>app</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
@@ -250,12 +250,12 @@ the request was for javascript.</p>
|
|
250
250
|
<pre class="lines">
|
251
251
|
|
252
252
|
|
253
|
-
|
254
|
-
|
255
|
-
|
253
|
+
85
|
254
|
+
86
|
255
|
+
87</pre>
|
256
256
|
</td>
|
257
257
|
<td>
|
258
|
-
<pre class="code"><span class="info file"># File 'lib/closure/show_exceptions.rb', line
|
258
|
+
<pre class="code"><span class="info file"># File 'lib/closure/show_exceptions.rb', line 85</span>
|
259
259
|
|
260
260
|
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
|
261
261
|
<span class='ivar'>@app</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
|
@@ -270,7 +270,7 @@ the request was for javascript.</p>
|
|
270
270
|
</div>
|
271
271
|
|
272
272
|
<div id="footer">
|
273
|
-
Generated on
|
273
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
274
274
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
275
275
|
0.8.7.6 (ruby-2.2.1).
|
276
276
|
</div>
|
@@ -1381,7 +1381,7 @@ invalidate the cache.</p>
|
|
1381
1381
|
</div>
|
1382
1382
|
|
1383
1383
|
<div id="footer">
|
1384
|
-
Generated on
|
1384
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
1385
1385
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1386
1386
|
0.8.7.6 (ruby-2.2.1).
|
1387
1387
|
</div>
|
@@ -114,7 +114,7 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
118
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
119
|
0.8.7.6 (ruby-2.2.1).
|
120
120
|
</div>
|
@@ -361,7 +361,7 @@ on source filename arguments.</p>
|
|
361
361
|
</div>
|
362
362
|
|
363
363
|
<div id="footer">
|
364
|
-
Generated on
|
364
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
365
365
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
366
366
|
0.8.7.6 (ruby-2.2.1).
|
367
367
|
</div>
|
data/docs/closure/Closure.html
CHANGED
@@ -718,7 +718,7 @@ pairs configured with Closure.add_source().</p>
|
|
718
718
|
</div>
|
719
719
|
|
720
720
|
<div id="footer">
|
721
|
-
Generated on
|
721
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
722
722
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
723
723
|
0.8.7.6 (ruby-2.2.1).
|
724
724
|
</div>
|
data/docs/closure/_index.html
CHANGED
@@ -284,7 +284,7 @@
|
|
284
284
|
</div>
|
285
285
|
|
286
286
|
<div id="footer">
|
287
|
-
Generated on
|
287
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
288
288
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
289
289
|
0.8.7.6 (ruby-2.2.1).
|
290
290
|
</div>
|
@@ -64,7 +64,7 @@
|
|
64
64
|
<div id="content"><div id='filecontents'> Apache License<br/> Version 2.0, January 2004<br/> http://www.apache.org/licenses/<br/><br/> TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION<br/><br/> 1. Definitions.<br/><br/> "License" shall mean the terms and conditions for use, reproduction,<br/> and distribution as defined by Sections 1 through 9 of this document.<br/><br/> "Licensor" shall mean the copyright owner or entity authorized by<br/> the copyright owner that is granting the License.<br/><br/> "Legal Entity" shall mean the union of the acting entity and all<br/> other entities that control, are controlled by, or are under common<br/> control with that entity. For the purposes of this definition,<br/> "control" means (i) the power, direct or indirect, to cause the<br/> direction or management of such entity, whether by contract or<br/> otherwise, or (ii) ownership of fifty percent (50%) or more of the<br/> outstanding shares, or (iii) beneficial ownership of such entity.<br/><br/> "You" (or "Your") shall mean an individual or Legal Entity<br/> exercising permissions granted by this License.<br/><br/> "Source" form shall mean the preferred form for making modifications,<br/> including but not limited to software source code, documentation<br/> source, and configuration files.<br/><br/> "Object" form shall mean any form resulting from mechanical<br/> transformation or translation of a Source form, including but<br/> not limited to compiled object code, generated documentation,<br/> and conversions to other media types.<br/><br/> "Work" shall mean the work of authorship, whether in Source or<br/> Object form, made available under the License, as indicated by a<br/> copyright notice that is included in or attached to the work<br/> (an example is provided in the Appendix below).<br/><br/> "Derivative Works" shall mean any work, whether in Source or Object<br/> form, that is based on (or derived from) the Work and for which the<br/> editorial revisions, annotations, elaborations, or other modifications<br/> represent, as a whole, an original work of authorship. For the purposes<br/> of this License, Derivative Works shall not include works that remain<br/> separable from, or merely link (or bind by name) to the interfaces of,<br/> the Work and Derivative Works thereof.<br/><br/> "Contribution" shall mean any work of authorship, including<br/> the original version of the Work and any modifications or additions<br/> to that Work or Derivative Works thereof, that is intentionally<br/> submitted to Licensor for inclusion in the Work by the copyright owner<br/> or by an individual or Legal Entity authorized to submit on behalf of<br/> the copyright owner. For the purposes of this definition, "submitted"<br/> means any form of electronic, verbal, or written communication sent<br/> to the Licensor or its representatives, including but not limited to<br/> communication on electronic mailing lists, source code control systems,<br/> and issue tracking systems that are managed by, or on behalf of, the<br/> Licensor for the purpose of discussing and improving the Work, but<br/> excluding communication that is conspicuously marked or otherwise<br/> designated in writing by the copyright owner as "Not a Contribution."<br/><br/> "Contributor" shall mean Licensor and any individual or Legal Entity<br/> on behalf of whom a Contribution has been received by Licensor and<br/> subsequently incorporated within the Work.<br/><br/> 2. Grant of Copyright License. Subject to the terms and conditions of<br/> this License, each Contributor hereby grants to You a perpetual,<br/> worldwide, non-exclusive, no-charge, royalty-free, irrevocable<br/> copyright license to reproduce, prepare Derivative Works of,<br/> publicly display, publicly perform, sublicense, and distribute the<br/> Work and such Derivative Works in Source or Object form.<br/><br/> 3. Grant of Patent License. Subject to the terms and conditions of<br/> this License, each Contributor hereby grants to You a perpetual,<br/> worldwide, non-exclusive, no-charge, royalty-free, irrevocable<br/> (except as stated in this section) patent license to make, have made,<br/> use, offer to sell, sell, import, and otherwise transfer the Work,<br/> where such license applies only to those patent claims licensable<br/> by such Contributor that are necessarily infringed by their<br/> Contribution(s) alone or by combination of their Contribution(s)<br/> with the Work to which such Contribution(s) was submitted. If You<br/> institute patent litigation against any entity (including a<br/> cross-claim or counterclaim in a lawsuit) alleging that the Work<br/> or a Contribution incorporated within the Work constitutes direct<br/> or contributory patent infringement, then any patent licenses<br/> granted to You under this License for that Work shall terminate<br/> as of the date such litigation is filed.<br/><br/> 4. Redistribution. You may reproduce and distribute copies of the<br/> Work or Derivative Works thereof in any medium, with or without<br/> modifications, and in Source or Object form, provided that You<br/> meet the following conditions:<br/><br/> (a) You must give any other recipients of the Work or<br/> Derivative Works a copy of this License; and<br/><br/> (b) You must cause any modified files to carry prominent notices<br/> stating that You changed the files; and<br/><br/> (c) You must retain, in the Source form of any Derivative Works<br/> that You distribute, all copyright, patent, trademark, and<br/> attribution notices from the Source form of the Work,<br/> excluding those notices that do not pertain to any part of<br/> the Derivative Works; and<br/><br/> (d) If the Work includes a "NOTICE" text file as part of its<br/> distribution, then any Derivative Works that You distribute must<br/> include a readable copy of the attribution notices contained<br/> within such NOTICE file, excluding those notices that do not<br/> pertain to any part of the Derivative Works, in at least one<br/> of the following places: within a NOTICE text file distributed<br/> as part of the Derivative Works; within the Source form or<br/> documentation, if provided along with the Derivative Works; or,<br/> within a display generated by the Derivative Works, if and<br/> wherever such third-party notices normally appear. The contents<br/> of the NOTICE file are for informational purposes only and<br/> do not modify the License. You may add Your own attribution<br/> notices within Derivative Works that You distribute, alongside<br/> or as an addendum to the NOTICE text from the Work, provided<br/> that such additional attribution notices cannot be construed<br/> as modifying the License.<br/><br/> You may add Your own copyright statement to Your modifications and<br/> may provide additional or different license terms and conditions<br/> for use, reproduction, or distribution of Your modifications, or<br/> for any such Derivative Works as a whole, provided Your use,<br/> reproduction, and distribution of the Work otherwise complies with<br/> the conditions stated in this License.<br/><br/> 5. Submission of Contributions. Unless You explicitly state otherwise,<br/> any Contribution intentionally submitted for inclusion in the Work<br/> by You to the Licensor shall be under the terms and conditions of<br/> this License, without any additional terms or conditions.<br/> Notwithstanding the above, nothing herein shall supersede or modify<br/> the terms of any separate license agreement you may have executed<br/> with Licensor regarding such Contributions.<br/><br/> 6. Trademarks. This License does not grant permission to use the trade<br/> names, trademarks, service marks, or product names of the Licensor,<br/> except as required for reasonable and customary use in describing the<br/> origin of the Work and reproducing the content of the NOTICE file.<br/><br/> 7. Disclaimer of Warranty. Unless required by applicable law or<br/> agreed to in writing, Licensor provides the Work (and each<br/> Contributor provides its Contributions) on an "AS IS" BASIS,<br/> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or<br/> implied, including, without limitation, any warranties or conditions<br/> of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A<br/> PARTICULAR PURPOSE. You are solely responsible for determining the<br/> appropriateness of using or redistributing the Work and assume any<br/> risks associated with Your exercise of permissions under this License.<br/><br/> 8. Limitation of Liability. In no event and under no legal theory,<br/> whether in tort (including negligence), contract, or otherwise,<br/> unless required by applicable law (such as deliberate and grossly<br/> negligent acts) or agreed to in writing, shall any Contributor be<br/> liable to You for damages, including any direct, indirect, special,<br/> incidental, or consequential damages of any character arising as a<br/> result of this License or out of the use or inability to use the<br/> Work (including but not limited to damages for loss of goodwill,<br/> work stoppage, computer failure or malfunction, or any and all<br/> other commercial damages or losses), even if such Contributor<br/> has been advised of the possibility of such damages.<br/><br/> 9. Accepting Warranty or Additional Liability. While redistributing<br/> the Work or Derivative Works thereof, You may choose to offer,<br/> and charge a fee for, acceptance of support, warranty, indemnity,<br/> or other liability obligations and/or rights consistent with this<br/> License. However, in accepting such obligations, You may act only<br/> on Your own behalf and on Your sole responsibility, not on behalf<br/> of any other Contributor, and only if You agree to indemnify,<br/> defend, and hold each Contributor harmless for any liability<br/> incurred by, or claims asserted against, such Contributor by reason<br/> of your accepting any such warranty or additional liability.<br/><br/> END OF TERMS AND CONDITIONS<br/><br/> APPENDIX: How to apply the Apache License to your work.<br/><br/> To apply the Apache License to your work, attach the following<br/> boilerplate notice, with the fields enclosed by brackets "[]"<br/> replaced with your own identifying information. (Don't include<br/> the brackets!) The text should be enclosed in the appropriate<br/> comment syntax for the file format. We also recommend that a<br/> file or class name and description of purpose be included on the<br/> same "printed page" as the copyright notice for easier<br/> identification within third-party archives.<br/><br/> Copyright [yyyy] [name of copyright owner]<br/><br/> Licensed under the Apache License, Version 2.0 (the "License");<br/> you may not use this file except in compliance with the License.<br/> You may obtain a copy of the License at<br/><br/> http://www.apache.org/licenses/LICENSE-2.0<br/><br/> Unless required by applicable law or agreed to in writing, software<br/> distributed under the License is distributed on an "AS IS" BASIS,<br/> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br/> See the License for the specific language governing permissions and<br/> limitations under the License.</div></div>
|
65
65
|
|
66
66
|
<div id="footer">
|
67
|
-
Generated on
|
67
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
68
68
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
69
69
|
0.8.7.6 (ruby-2.2.1).
|
70
70
|
</div>
|
@@ -218,7 +218,7 @@ background process. You’re only limited by your imagination.</p>
|
|
218
218
|
</div></div>
|
219
219
|
|
220
220
|
<div id="footer">
|
221
|
-
Generated on
|
221
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
222
222
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
223
223
|
0.8.7.6 (ruby-2.2.1).
|
224
224
|
</div>
|
data/docs/closure/index.html
CHANGED
@@ -218,7 +218,7 @@ background process. You’re only limited by your imagination.</p>
|
|
218
218
|
</div></div>
|
219
219
|
|
220
220
|
<div id="footer">
|
221
|
-
Generated on
|
221
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
222
222
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
223
223
|
0.8.7.6 (ruby-2.2.1).
|
224
224
|
</div>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on
|
106
|
+
Generated on Fri Mar 18 15:12:13 2016 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
108
|
0.8.7.6 (ruby-2.2.1).
|
109
109
|
</div>
|
data/lib/closure/beanshell.rb
CHANGED
@@ -14,21 +14,21 @@
|
|
14
14
|
|
15
15
|
|
16
16
|
class Closure
|
17
|
-
|
17
|
+
|
18
18
|
# Closure Script will manage a single BeanShell to run the Java tools.
|
19
19
|
# This way we don't pay the Java startup costs on every compile job.
|
20
20
|
class BeanShell
|
21
|
-
|
21
|
+
|
22
22
|
PROMPT = /^bsh % $\Z/
|
23
23
|
JAR = File.join(Closure.base_path, 'beanshell', 'bsh-core-2.0b4.jar')
|
24
|
-
|
24
|
+
|
25
25
|
# @param classpath (Array)<string>
|
26
26
|
def initialize(classpath=[])
|
27
27
|
@semaphore = Mutex.new
|
28
28
|
@classpath = classpath
|
29
|
-
|
29
|
+
@@pipe ||= nil
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
# Run any Java command that BeanShell supports.
|
33
33
|
# Recovers from error conditions when the Java process is killed.
|
34
34
|
def run(command)
|
@@ -37,32 +37,32 @@ class Closure
|
|
37
37
|
rescue Errno::EPIPE
|
38
38
|
# Shut down broken pipe; another will be started.
|
39
39
|
$stderr.print "#{self.class}: restarting Java.\n"
|
40
|
-
|
41
|
-
|
40
|
+
@@pipe.close
|
41
|
+
@@pipe = nil
|
42
42
|
end
|
43
43
|
# This "second chance" will not rescue the error.
|
44
44
|
execute command
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
protected
|
48
|
-
|
48
|
+
|
49
49
|
# Executes a command on the REPL and returns the result.
|
50
50
|
def execute(command)
|
51
51
|
out = ''
|
52
52
|
@semaphore.synchronize do
|
53
|
-
unless
|
53
|
+
unless @@pipe
|
54
54
|
classpath = [@classpath, JAR].flatten
|
55
55
|
java_repl = "#{Closure.config.java} -classpath #{classpath.join(':').dump} bsh.Interpreter"
|
56
|
-
|
56
|
+
@@pipe = IO.popen(java_repl, 'w+')
|
57
57
|
eat_startup = ''
|
58
|
-
eat_startup <<
|
58
|
+
eat_startup << @@pipe.readpartial(8192) until eat_startup =~ PROMPT
|
59
59
|
end
|
60
|
-
|
61
|
-
out <<
|
60
|
+
@@pipe << command
|
61
|
+
out << @@pipe.readpartial(8192) until out =~ PROMPT
|
62
62
|
end
|
63
63
|
out.sub(PROMPT, '')
|
64
64
|
end
|
65
|
-
|
65
|
+
|
66
66
|
end
|
67
|
-
|
68
|
-
end
|
67
|
+
|
68
|
+
end
|
data/lib/closure/compiler.rb
CHANGED
@@ -177,11 +177,11 @@ class Closure
|
|
177
177
|
|
178
178
|
# The javascript snippet for module info
|
179
179
|
# @param [Array<Hash>] mods
|
180
|
-
def self.module_info(mods)
|
181
|
-
js = "var
|
180
|
+
def self.module_info(mods, var = 'MODULE_INFO')
|
181
|
+
js = "var #{var} = {"
|
182
182
|
js += mods.map do |mod|
|
183
183
|
reqs = mod[:requires].map{ |r| r.dump }
|
184
|
-
|
184
|
+
"#{mod[:name].dump}: [#{reqs.join ', '}]"
|
185
185
|
end.join ', '
|
186
186
|
js += "};\n"
|
187
187
|
end
|
@@ -189,11 +189,11 @@ class Closure
|
|
189
189
|
|
190
190
|
# The javascript snippet for raw module file locations
|
191
191
|
# @param [Array<Hash>] mods
|
192
|
-
def self.module_uris_raw(mods, sources)
|
193
|
-
js = "var
|
192
|
+
def self.module_uris_raw(mods, sources, var = 'MODULE_URIS')
|
193
|
+
js = "var #{var} = {\n"
|
194
194
|
js += mods.map do |mod|
|
195
195
|
files = mod[:files].map{ |r| (sources.src_for r).dump }
|
196
|
-
|
196
|
+
"#{mod[:name].dump}: [\n#{files.join ",\n"}]"
|
197
197
|
end.join ",\n"
|
198
198
|
js += "\n};\n"
|
199
199
|
end
|
@@ -201,11 +201,11 @@ class Closure
|
|
201
201
|
|
202
202
|
# The javascript snippet for compiled module file locations
|
203
203
|
# @param [Array<Hash>] mods
|
204
|
-
def self.module_uris_compiled(mods, sources, prefix)
|
205
|
-
js = "var
|
204
|
+
def self.module_uris_compiled(mods, sources, prefix, var = 'MODULE_URIS')
|
205
|
+
js = "var #{var} = {\n"
|
206
206
|
js += mods.map do |mod|
|
207
207
|
file = sources.src_for prefix + mod[:name] + '.js'
|
208
|
-
|
208
|
+
"#{mod[:name].dump}: [#{file.dump}]"
|
209
209
|
end.join ",\n"
|
210
210
|
js += "\n};\n"
|
211
211
|
end
|
@@ -376,7 +376,7 @@ class Closure
|
|
376
376
|
raise 'Static and automatic --module options can not be mixed.'
|
377
377
|
end
|
378
378
|
if mods.empty?
|
379
|
-
args.insert
|
379
|
+
args.insert(-1, *mod_args)
|
380
380
|
nil
|
381
381
|
else
|
382
382
|
mods
|
data/lib/closure/goog.rb
CHANGED
@@ -30,8 +30,10 @@ class Closure
|
|
30
30
|
# Perhaps you want to use a .yml file to define build options.
|
31
31
|
# Closure::Script calls this for every render so you don't need
|
32
32
|
# to define compiler arguments in the same script that calls compile.
|
33
|
-
|
34
|
-
|
33
|
+
# @param [String] root of file paths, optional
|
34
|
+
def add_dependency(dependency, root = nil)
|
35
|
+
root ||= File.dirname(@render_stack.last)
|
36
|
+
dependency = File.expand_path dependency, root
|
35
37
|
@dependencies << dependency unless @dependencies.include? dependency
|
36
38
|
end
|
37
39
|
|
@@ -45,8 +47,10 @@ class Closure
|
|
45
47
|
# SoyToJsSrcCompiler.jar support plus it expands filename globs.
|
46
48
|
# All source filenames are relative to the script calling #soy_to_js.
|
47
49
|
# @param [Array<String>] args
|
48
|
-
|
49
|
-
|
50
|
+
# @param [String] root of file paths, optional
|
51
|
+
def soy_to_js(args, root = nil)
|
52
|
+
root ||= File.dirname(@render_stack.last)
|
53
|
+
Templates::compile(args, root)
|
50
54
|
refresh
|
51
55
|
end
|
52
56
|
|
@@ -66,68 +70,63 @@ class Closure
|
|
66
70
|
# --compilation_level ADVANCED_OPTIMIZATIONS
|
67
71
|
# }).to_response %>
|
68
72
|
# @param [Array<String>] args
|
73
|
+
# @param [String] root of file paths, optional
|
69
74
|
# @return [Compilation]
|
70
|
-
def compile(args)
|
75
|
+
def compile(args, root = nil)
|
71
76
|
args = Array.new args # work on a copy
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
script_tag = "<script src=#{src_for(value).dump}></script>"
|
90
|
-
comp << "document.write(#{script_tag.dump});\n"
|
91
|
-
js_counter += 1
|
92
|
-
# For modules, just the files for the first module
|
93
|
-
break if mods and js_counter >= mods[0][:files].length
|
94
|
-
end
|
95
|
-
args_index = args_index + 2
|
96
|
-
end
|
97
|
-
else
|
98
|
-
# Compiled mode
|
99
|
-
module_output_path_prefix = Compiler::Util.arg_values(args, '--module_output_path_prefix').last
|
100
|
-
if mods and !module_output_path_prefix
|
101
|
-
# raise this before compilation so we don't write to a weird place
|
102
|
-
raise "--module_output_path_prefix is required when using --module"
|
103
|
-
end
|
104
|
-
comp = Compiler.compile args, @dependencies, @env
|
105
|
-
if mods
|
106
|
-
refresh # compilation may add new files, module_uris_compiled uses src_for
|
107
|
-
prefix = File.expand_path module_output_path_prefix, File.dirname(@render_stack.last)
|
108
|
-
if comp.js_output_file
|
109
|
-
File.open comp.js_output_file, 'w' do |f|
|
110
|
-
f.write Compiler::Util.module_info mods
|
111
|
-
f.write Compiler::Util.module_uris_compiled mods, @sources, prefix
|
112
|
-
end
|
113
|
-
else
|
114
|
-
comp << Compiler::Util.module_info(mods)
|
115
|
-
comp << Compiler::Util.module_uris_compiled(mods, @sources, prefix)
|
116
|
-
end
|
117
|
-
# Load the first module
|
118
|
-
first_module_file = module_output_path_prefix + mods[0][:name] + '.js'
|
119
|
-
first_module_file = File.expand_path first_module_file, File.dirname(@render_stack.last)
|
120
|
-
script_tag = "<script src=#{src_for(first_module_file).dump}></script>"
|
77
|
+
root ||= File.dirname(@render_stack.last)
|
78
|
+
Compiler::Util.expand_paths args, root
|
79
|
+
mods = Compiler::Util.augment args, @sources, @env
|
80
|
+
if Compiler::Util.arg_values(args, '--compilation_level').empty?
|
81
|
+
# Raw mode
|
82
|
+
comp = Compiler::Compilation.new @env
|
83
|
+
if mods
|
84
|
+
comp << Compiler::Util.module_info(mods)
|
85
|
+
comp << Compiler::Util.module_uris_raw(mods, @sources)
|
86
|
+
end
|
87
|
+
js_counter = 0
|
88
|
+
args_index = 0
|
89
|
+
while args_index < args.length
|
90
|
+
option, value = args[args_index, 2]
|
91
|
+
if option == '--js'
|
92
|
+
value = File.expand_path value, root
|
93
|
+
script_tag = "<script src=#{src_for(value).dump}></script>"
|
121
94
|
comp << "document.write(#{script_tag.dump});\n"
|
95
|
+
js_counter += 1
|
96
|
+
# For modules, just the files for the first module
|
97
|
+
break if mods and js_counter >= mods[0][:files].length
|
122
98
|
end
|
99
|
+
args_index = args_index + 2
|
100
|
+
end
|
101
|
+
else
|
102
|
+
# Compiled mode
|
103
|
+
module_output_path_prefix = Compiler::Util.arg_values(args, '--module_output_path_prefix').last
|
104
|
+
if mods and !module_output_path_prefix
|
105
|
+
# raise this before compilation so we don't write to a weird place
|
106
|
+
raise "--module_output_path_prefix is required when using --module"
|
123
107
|
end
|
124
|
-
comp
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
108
|
+
comp = Compiler.compile args, @dependencies, @env
|
109
|
+
if mods
|
110
|
+
refresh # compilation may add new files, module_uris_compiled uses src_for
|
111
|
+
prefix = File.expand_path module_output_path_prefix, root
|
112
|
+
if comp.js_output_file
|
113
|
+
File.open comp.js_output_file, 'w' do |f|
|
114
|
+
f.write Compiler::Util.module_info mods
|
115
|
+
f.write Compiler::Util.module_uris_compiled mods, @sources, prefix
|
116
|
+
end
|
117
|
+
else
|
118
|
+
comp << Compiler::Util.module_info(mods)
|
119
|
+
comp << Compiler::Util.module_uris_compiled(mods, @sources, prefix)
|
120
|
+
end
|
121
|
+
# Load the first module
|
122
|
+
first_module_file = module_output_path_prefix + mods[0][:name] + '.js'
|
123
|
+
first_module_file = File.expand_path first_module_file, root
|
124
|
+
comp << '(function(){var e=document.createElement("script");e.type="text/javascript";e.src='
|
125
|
+
comp << src_for(first_module_file).dump
|
126
|
+
comp << ";document.head.appendChild(e);})();\n"
|
129
127
|
end
|
130
128
|
end
|
129
|
+
comp
|
131
130
|
end
|
132
131
|
|
133
132
|
# Calculate the deps src for a filename.
|