closure 1.4.3 → 1.5.0
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.
- checksums.yaml +7 -0
- data/README.md +12 -12
- data/closure-compiler/README.md +503 -0
- data/closure-compiler/compiler.jar +0 -0
- data/closure-templates/SoyToJsSrcCompiler.jar +0 -0
- data/closure-templates/soyutils.js +1593 -469
- data/closure-templates/soyutils_usegoog.js +1105 -223
- data/docs/SCRIPT.md +5 -5
- data/docs/closure/Closure/BeanShell.html +63 -54
- data/docs/closure/Closure/Compiler/Compilation.html +124 -107
- data/docs/closure/Closure/Compiler/Error.html +28 -21
- data/docs/closure/Closure/Compiler.html +81 -76
- data/docs/closure/Closure/FileResponse.html +113 -98
- data/docs/closure/Closure/Goog.html +264 -253
- data/docs/closure/Closure/Middleware.html +66 -55
- data/docs/closure/Closure/Script/NotFound.html +28 -21
- data/docs/closure/Closure/Script/RenderStackOverflow.html +28 -21
- data/docs/closure/Closure/Script.html +212 -203
- data/docs/closure/Closure/Server.html +100 -90
- data/docs/closure/Closure/ShowExceptions.html +63 -52
- data/docs/closure/Closure/Sources.html +254 -246
- data/docs/closure/Closure/Templates/Error.html +28 -21
- data/docs/closure/Closure/Templates.html +88 -80
- data/docs/closure/Closure.html +181 -163
- data/docs/closure/_index.html +42 -38
- data/docs/closure/class_list.html +19 -8
- data/docs/closure/css/full_list.css +4 -2
- data/docs/closure/css/style.css +68 -51
- data/docs/closure/file.LICENSE.html +24 -217
- data/docs/closure/file.README.html +54 -47
- data/docs/closure/file_list.html +20 -9
- data/docs/closure/frames.html +18 -5
- data/docs/closure/index.html +54 -47
- data/docs/closure/js/app.js +60 -46
- data/docs/closure/js/full_list.js +24 -10
- data/docs/closure/js/jquery.js +4 -16
- data/docs/closure/method_list.html +74 -175
- data/docs/closure/top-level-namespace.html +29 -20
- data/lib/closure/compiler.rb +32 -42
- data/lib/closure/goog.rb +12 -12
- data/lib/closure/server.rb +6 -6
- data/lib/closure/show_exceptions.rb +15 -12
- data/lib/closure/version.rb +1 -1
- data/scripts/git.erb +183 -0
- data/scripts/hello/compiler.js.erb +2 -2
- data/scripts/hello/hello.js +1 -1
- data/scripts/hello/index.erb +6 -0
- data/scripts/hello/legume.js +12 -7
- data/scripts/index.erb +15 -13
- data/scripts/modules/compiler.js.erb +3 -3
- data/scripts/modules/compiler_build.js +3 -3
- data/scripts/modules/compiler_build.map +13 -12159
- data/scripts/modules/compiler_build_api.js +1 -1
- data/scripts/modules/compiler_build_app.js +74 -71
- data/scripts/modules/compiler_build_settings.js +2 -2
- data/scripts/modules/index.erb +5 -3
- data/scripts/modules/settings.js +1 -1
- data/scripts/svn.erb +11 -11
- data/scripts/welcome.erb +7 -6
- metadata +65 -81
- data/closure-compiler/README +0 -292
- data/scripts/hello/compiler_build.js +0 -5
- data/scripts/hello/compiler_build.map +0 -748
- data/scripts/hello/compiler_debug.js +0 -119
- data/scripts/modules/compiler_debug.js +0 -6
- data/scripts/modules/compiler_debug_api.js +0 -11
- data/scripts/modules/compiler_debug_app.js +0 -2414
- data/scripts/modules/compiler_debug_settings.js +0 -39
- data/scripts/rails/index.erb +0 -46
- data/scripts/rails/rails_ujs.js +0 -96
data/docs/SCRIPT.md
CHANGED
@@ -7,8 +7,8 @@ With Script, you build HTML or Javascript with embedded Ruby.
|
|
7
7
|
The core Script technology is very simple and all Scripts execute in the same context
|
8
8
|
regardless if they are test, demo, or compiler scripts.
|
9
9
|
|
10
|
-
Exploring or extending the examples is the best way to learn <a href="https://github.com/
|
11
|
-
are looking for information about Closure in general,
|
10
|
+
Exploring or extending the examples is the best way to learn <a href="https://github.com/AE9RB/closure-script">Closure Script</a>. If you
|
11
|
+
are looking for information about Closure in general,
|
12
12
|
<a href="http://oreilly.com/catalog/0636920001416">Closure: The Definitive Guide</a>
|
13
13
|
is a solid reference.
|
14
14
|
|
@@ -70,7 +70,7 @@ write to @response or change it to another object then the rendering is discarde
|
|
70
70
|
|
71
71
|
Regardless of your language background, cut-and-paste programming from the
|
72
72
|
scaffold examples should be practical. That's the idea anyways.
|
73
|
-
If you can conditionally build arrays of strings in Ruby, you're good to go.
|
73
|
+
If you can conditionally build arrays of strings in Ruby, you're good to go.
|
74
74
|
But, of course, the more Ruby you know the more you'll be able to do.
|
75
75
|
|
76
76
|
## config.ru
|
@@ -85,7 +85,7 @@ The default config.ru explains more in its comments. The smallest practical con
|
|
85
85
|
Closure.add_source '.', '/'
|
86
86
|
use Closure::Middleware
|
87
87
|
run Rack::File.new '.'
|
88
|
-
|
88
|
+
|
89
89
|
## Argument Augmentation
|
90
90
|
|
91
91
|
Closure Script adds additional features to the compiler like file modification checks and
|
@@ -139,4 +139,4 @@ Haml (.haml)
|
|
139
139
|
|
140
140
|
Markdown (.md, .markdown)
|
141
141
|
: Read-me files and developer documentation look nice for cheap and easy.
|
142
|
-
This very document is in markdown source.
|
142
|
+
This very document is in markdown source.
|
@@ -6,19 +6,21 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Closure::BeanShell
|
8
8
|
|
9
|
-
— Documentation by YARD 0.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
19
|
-
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!Closure/BeanShell.html";
|
20
21
|
</script>
|
21
22
|
|
23
|
+
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
25
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
@@ -26,36 +28,41 @@
|
|
26
28
|
|
27
29
|
</head>
|
28
30
|
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
31
|
<div id="header">
|
34
32
|
<div id="menu">
|
35
33
|
|
36
|
-
<a href="../_index.html">Index (B)</a> »
|
34
|
+
<a href="../_index.html">Index (B)</a> »
|
37
35
|
<span class='title'><span class='object_link'><a href="../Closure.html" title="Closure (class)">Closure</a></span></span>
|
38
36
|
»
|
39
37
|
<span class="title">BeanShell</span>
|
40
38
|
|
41
|
-
|
39
|
+
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
41
|
</div>
|
44
42
|
|
45
43
|
<div id="search">
|
46
44
|
|
47
|
-
<a
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
48
49
|
|
49
|
-
<a
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
50
54
|
|
51
|
-
<a
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
52
59
|
|
53
60
|
</div>
|
54
61
|
<div class="clear"></div>
|
55
62
|
</div>
|
56
|
-
|
63
|
+
|
57
64
|
<iframe id="search_frame"></iframe>
|
58
|
-
|
65
|
+
|
59
66
|
<div id="content"><h1>Class: Closure::BeanShell
|
60
67
|
|
61
68
|
|
@@ -94,10 +101,9 @@
|
|
94
101
|
|
95
102
|
<h2>Overview</h2><div class="docstring">
|
96
103
|
<div class="discussion">
|
97
|
-
|
98
|
-
Closure Script will manage a single BeanShell to run the Java tools. This
|
99
|
-
way we don&#
|
100
|
-
</p>
|
104
|
+
|
105
|
+
<p>Closure Script will manage a single BeanShell to run the Java tools. This
|
106
|
+
way we don't pay the Java startup costs on every compile job.</p>
|
101
107
|
|
102
108
|
|
103
109
|
</div>
|
@@ -118,7 +124,7 @@ way we don’t pay the Java startup costs on every compile job.
|
|
118
124
|
<dt id="JAR-constant" class="">JAR =
|
119
125
|
|
120
126
|
</dt>
|
121
|
-
<dd><pre class="code"><span class='const'>File</span><span class='period'>.</span><span class='id
|
127
|
+
<dd><pre class="code"><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='const'>Closure</span><span class='period'>.</span><span class='id identifier rubyid_base_path'>base_path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>beanshell</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>bsh-core-2.0b4.jar</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span></pre></dd>
|
122
128
|
|
123
129
|
</dl>
|
124
130
|
|
@@ -127,6 +133,8 @@ way we don’t pay the Java startup costs on every compile job.
|
|
127
133
|
|
128
134
|
|
129
135
|
|
136
|
+
|
137
|
+
|
130
138
|
|
131
139
|
<h2>
|
132
140
|
Instance Method Summary
|
@@ -144,6 +152,7 @@ way we don’t pay the Java startup costs on every compile job.
|
|
144
152
|
|
145
153
|
</span>
|
146
154
|
|
155
|
+
|
147
156
|
<span class="note title constructor">constructor</span>
|
148
157
|
|
149
158
|
|
@@ -153,9 +162,8 @@ way we don’t pay the Java startup costs on every compile job.
|
|
153
162
|
|
154
163
|
|
155
164
|
|
156
|
-
<span class="summary_desc"><div class='inline'
|
157
|
-
A new instance of BeanShell
|
158
|
-
</p>
|
165
|
+
<span class="summary_desc"><div class='inline'>
|
166
|
+
<p>A new instance of BeanShell.</p>
|
159
167
|
</div></span>
|
160
168
|
|
161
169
|
</li>
|
@@ -175,11 +183,11 @@ A new instance of BeanShell.
|
|
175
183
|
|
176
184
|
|
177
185
|
|
186
|
+
|
178
187
|
|
179
188
|
|
180
|
-
<span class="summary_desc"><div class='inline'
|
181
|
-
Run any Java command that BeanShell supports
|
182
|
-
</p>
|
189
|
+
<span class="summary_desc"><div class='inline'>
|
190
|
+
<p>Run any Java command that BeanShell supports.</p>
|
183
191
|
</div></span>
|
184
192
|
|
185
193
|
</li>
|
@@ -192,23 +200,24 @@ Run any Java command that BeanShell supports.
|
|
192
200
|
<h2>Constructor Details</h2>
|
193
201
|
|
194
202
|
<div class="method_details first">
|
195
|
-
<
|
203
|
+
<h3 class="signature first" id="initialize-instance_method">
|
196
204
|
|
197
205
|
- (<tt><span class='object_link'><a href="" title="Closure::BeanShell (class)">BeanShell</a></span></tt>) <strong>initialize</strong>(classpath = [])
|
198
206
|
|
199
207
|
|
200
208
|
|
201
|
-
|
209
|
+
|
210
|
+
|
211
|
+
</h3><div class="docstring">
|
202
212
|
<div class="discussion">
|
203
|
-
|
204
|
-
|
205
|
-
</p>
|
213
|
+
|
214
|
+
<p>Returns a new instance of BeanShell</p>
|
206
215
|
|
207
216
|
|
208
217
|
</div>
|
209
218
|
</div>
|
210
219
|
<div class="tags">
|
211
|
-
<
|
220
|
+
<p class="tag_title">Parameters:</p>
|
212
221
|
<ul class="param">
|
213
222
|
|
214
223
|
<li>
|
@@ -223,9 +232,8 @@ A new instance of BeanShell
|
|
223
232
|
|
224
233
|
|
225
234
|
—
|
226
|
-
<div class='inline'
|
227
|
-
<string>
|
228
|
-
</p>
|
235
|
+
<div class='inline'>
|
236
|
+
<p><string></p>
|
229
237
|
</div>
|
230
238
|
|
231
239
|
</li>
|
@@ -248,9 +256,9 @@ A new instance of BeanShell
|
|
248
256
|
<td>
|
249
257
|
<pre class="code"><span class="info file"># File 'lib/closure/beanshell.rb', line 26</span>
|
250
258
|
|
251
|
-
<span class='kw'>def</span> <span class='id
|
252
|
-
<span class='ivar'>@semaphore</span> <span class='op'>=</span> <span class='const'>Mutex</span><span class='period'>.</span><span class='id
|
253
|
-
<span class='ivar'>@classpath</span> <span class='op'>=</span> <span class='id
|
259
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_classpath'>classpath</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
260
|
+
<span class='ivar'>@semaphore</span> <span class='op'>=</span> <span class='const'>Mutex</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
261
|
+
<span class='ivar'>@classpath</span> <span class='op'>=</span> <span class='id identifier rubyid_classpath'>classpath</span>
|
254
262
|
<span class='gvar'>$cmdin</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
255
263
|
<span class='kw'>end</span></pre>
|
256
264
|
</td>
|
@@ -263,21 +271,22 @@ A new instance of BeanShell
|
|
263
271
|
|
264
272
|
<div id="instance_method_details" class="method_details_list">
|
265
273
|
<h2>Instance Method Details</h2>
|
266
|
-
|
274
|
+
|
267
275
|
|
268
276
|
<div class="method_details first">
|
269
|
-
<
|
277
|
+
<h3 class="signature first" id="run-instance_method">
|
270
278
|
|
271
279
|
- <strong>run</strong>(command)
|
272
280
|
|
273
281
|
|
274
282
|
|
275
|
-
|
283
|
+
|
284
|
+
|
285
|
+
</h3><div class="docstring">
|
276
286
|
<div class="discussion">
|
277
|
-
|
278
|
-
Run any Java command that BeanShell supports. Recovers from error
|
279
|
-
conditions when the Java process is killed
|
280
|
-
</p>
|
287
|
+
|
288
|
+
<p>Run any Java command that BeanShell supports. Recovers from error
|
289
|
+
conditions when the Java process is killed.</p>
|
281
290
|
|
282
291
|
|
283
292
|
</div>
|
@@ -307,17 +316,17 @@ conditions when the Java process is killed.
|
|
307
316
|
<td>
|
308
317
|
<pre class="code"><span class="info file"># File 'lib/closure/beanshell.rb', line 34</span>
|
309
318
|
|
310
|
-
<span class='kw'>def</span> <span class='id
|
319
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
|
311
320
|
<span class='kw'>begin</span>
|
312
|
-
<span class='kw'>return</span> <span class='id
|
321
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_execute'>execute</span> <span class='id identifier rubyid_command'>command</span>
|
313
322
|
<span class='kw'>rescue</span> <span class='const'>Errno</span><span class='op'>::</span><span class='const'>EPIPE</span>
|
314
323
|
<span class='comment'># Shut down broken pipe; another will be started.
|
315
|
-
</span> <span class='gvar'>$stderr</span><span class='period'>.</span><span class='id
|
316
|
-
<span class='gvar'>$pipe</span><span class='period'>.</span><span class='id
|
324
|
+
</span> <span class='gvar'>$stderr</span><span class='period'>.</span><span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'>: restarting Java.\n</span><span class='tstring_end'>"</span></span>
|
325
|
+
<span class='gvar'>$pipe</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
|
317
326
|
<span class='gvar'>$pipe</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
318
327
|
<span class='kw'>end</span>
|
319
328
|
<span class='comment'># This "second chance" will not rescue the error.
|
320
|
-
</span> <span class='id
|
329
|
+
</span> <span class='id identifier rubyid_execute'>execute</span> <span class='id identifier rubyid_command'>command</span>
|
321
330
|
<span class='kw'>end</span></pre>
|
322
331
|
</td>
|
323
332
|
</tr>
|
@@ -327,11 +336,11 @@ conditions when the Java process is killed.
|
|
327
336
|
</div>
|
328
337
|
|
329
338
|
</div>
|
330
|
-
|
339
|
+
|
331
340
|
<div id="footer">
|
332
|
-
Generated on Sun
|
341
|
+
Generated on Sun Mar 20 12:44:17 2016 by
|
333
342
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
334
|
-
0.7.
|
343
|
+
0.8.7.6 (ruby-2.2.1).
|
335
344
|
</div>
|
336
345
|
|
337
346
|
</body>
|