oration 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/doc/Object.html ADDED
@@ -0,0 +1,232 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: Object</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="./js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="./js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="class">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="./bin/oration.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="bin/oration">bin/oration</a></li>
43
+
44
+ <li><a href="./bin/oration_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
45
+ class="thickbox" title="bin/oration.rb">bin/oration.rb</a></li>
46
+
47
+ <li><a href="./lib/generator_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
48
+ class="thickbox" title="lib/generator.rb">lib/generator.rb</a></li>
49
+
50
+ </ul>
51
+ </div>
52
+ </div>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <!-- Parent Class -->
60
+
61
+ <div id="parent-class-section" class="section">
62
+ <h3 class="section-header">Parent</h3>
63
+
64
+ <p class="link"></p>
65
+
66
+ </div>
67
+
68
+
69
+ <!-- Namespace Contents -->
70
+
71
+
72
+ <!-- Method Quickref -->
73
+
74
+ <div id="method-list-section" class="section">
75
+ <h3 class="section-header">Methods</h3>
76
+ <ul class="link-list">
77
+
78
+ <li><a href="#method-i-validate_arguments">#validate_arguments</a></li>
79
+
80
+ </ul>
81
+ </div>
82
+
83
+
84
+ <!-- Included Modules -->
85
+
86
+ </div>
87
+
88
+ <div id="project-metadata">
89
+
90
+
91
+
92
+ <div id="classindex-section" class="section project-section">
93
+ <h3 class="section-header">Class/Module Index
94
+ <span class="search-toggle"><img src="./images/find.png"
95
+ height="16" width="16" alt="[+]"
96
+ title="show/hide quicksearch" /></span></h3>
97
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
98
+ <fieldset>
99
+ <legend>Quicksearch</legend>
100
+ <input type="text" name="quicksearch" value=""
101
+ class="quicksearch-field" />
102
+ </fieldset>
103
+ </form>
104
+
105
+ <ul class="link-list">
106
+
107
+ <li><a href="./Generator.html">Generator</a></li>
108
+
109
+ <li><a href="./Object.html">Object</a></li>
110
+
111
+ </ul>
112
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
113
+ </div>
114
+
115
+
116
+ </div>
117
+ </div>
118
+
119
+ <div id="documentation">
120
+ <h1 class="class">Object</h1>
121
+
122
+ <div id="description">
123
+
124
+ </div>
125
+
126
+ <!-- Constants -->
127
+
128
+ <div id="constants-list" class="section">
129
+ <h3 class="section-header">Constants</h3>
130
+ <dl>
131
+
132
+ <dt><a name="SUPPORTED_LANGUAGES">SUPPORTED_LANGUAGES</a></dt>
133
+
134
+ <dd class="description"><p>A list of languages that we can build Cicero-ready applications for. Right
135
+ now it’s just Python and Go. TODO(cgb): Add Java support</p></dd>
136
+
137
+
138
+ </dl>
139
+ </div>
140
+
141
+
142
+ <!-- Attributes -->
143
+
144
+
145
+ <!-- Methods -->
146
+
147
+ <div id="public-instance-method-details" class="method-section section">
148
+ <h3 class="section-header">Public Instance Methods</h3>
149
+
150
+
151
+ <div id="validate_arguments-method" class="method-detail ">
152
+ <a name="method-i-validate_arguments"></a>
153
+
154
+
155
+ <div class="method-heading">
156
+ <span class="method-name">validate_arguments</span><span
157
+ class="method-args">(arguments, file=File)</span>
158
+ <span class="method-click-advice">click to toggle source</span>
159
+ </div>
160
+
161
+
162
+ <div class="method-description">
163
+
164
+ <p>This method takes in the arguments given to oration and validates them.
165
+ Right now it’s just three arguments: the name of the main code file to
166
+ exec, the name of the function in that file that should be exec’d, and
167
+ where we should write their App Engine app. We validate that the file
168
+ specified exists and has a function with that name, and that the directory
169
+ they specified doesn’t exist (so that we don’t overwrite anything
170
+ already there).</p>
171
+
172
+
173
+
174
+ <div class="method-source-code"
175
+ id="validate_arguments-source">
176
+ <pre>
177
+ <span class="ruby-comment"># File bin/oration, line 16</span>
178
+ def validate_arguments(arguments, file=<span class="ruby-constant">File</span>)
179
+ if arguments.length != 3
180
+ abort(<span class="ruby-string">&quot;Usage: oration path-to-file function-name output-location&quot;</span>)
181
+ end
182
+
183
+ main_file = arguments[0]
184
+ function_name = arguments[1]
185
+ output_dir = arguments[2]
186
+
187
+ if !file.exists?(main_file)
188
+ abort(&quot;#{main_file} didn't exist.&quot;)
189
+ end
190
+
191
+ contents = file.open(main_file) { |f| f.read }
192
+
193
+ <span class="ruby-comment"># Right now we support Python and Go code, so match against method</span>
194
+ <span class="ruby-comment"># signatures in those languages.</span>
195
+ python_sig = /def #{function_name}\(/
196
+ go_method_sig = /func #{function_name}\(/
197
+ all_languages_method_sig_regex = /#{python_sig}|#{go_method_sig}/
198
+
199
+ if !contents.match(all_languages_method_sig_regex)
200
+ abort(&quot;We couldn't find the function #{function_name} in the file &quot; +
201
+ &quot;#{main_file}&quot;)
202
+ end
203
+
204
+ if file.exists?(output_dir)
205
+ abort(&quot;The output location specified, #{output_dir}, already exists.&quot; +
206
+ <span class="ruby-string">&quot; Please remove it and try again.&quot;</span>)
207
+ end
208
+ end</pre>
209
+ </div>
210
+
211
+ </div>
212
+
213
+
214
+
215
+
216
+ </div>
217
+
218
+
219
+ </div>
220
+
221
+
222
+ </div>
223
+
224
+ <div id="validator-badges">
225
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
226
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
227
+ Rdoc Generator</a> 2</small>.</p>
228
+ </div>
229
+
230
+ </body>
231
+ </html>
232
+
@@ -0,0 +1,56 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
8
+
9
+ <title>File: oration [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="../js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="../js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="../js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file file-popup">
24
+ <div id="metadata">
25
+ <dl>
26
+ <dt class="modified-date">Last Modified</dt>
27
+ <dd class="modified-date">Wed Nov 30 22:35:43 -0800 2011</dd>
28
+
29
+
30
+ <dt class="requires">Requires</dt>
31
+ <dd class="requires">
32
+ <ul>
33
+
34
+ <li>generator</li>
35
+
36
+ </ul>
37
+ </dd>
38
+
39
+
40
+
41
+ </dl>
42
+ </div>
43
+
44
+ <div id="documentation">
45
+
46
+ <div class="description">
47
+ <h2>Description</h2>
48
+
49
+ <p>Programmer: Chris Bunch</p>
50
+
51
+ </div>
52
+
53
+ </div>
54
+ </body>
55
+ </html>
56
+
@@ -0,0 +1,56 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
8
+
9
+ <title>File: oration.rb [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="../js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="../js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="../js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file file-popup">
24
+ <div id="metadata">
25
+ <dl>
26
+ <dt class="modified-date">Last Modified</dt>
27
+ <dd class="modified-date">Wed Nov 30 22:35:43 -0800 2011</dd>
28
+
29
+
30
+ <dt class="requires">Requires</dt>
31
+ <dd class="requires">
32
+ <ul>
33
+
34
+ <li>generator</li>
35
+
36
+ </ul>
37
+ </dd>
38
+
39
+
40
+
41
+ </dl>
42
+ </div>
43
+
44
+ <div id="documentation">
45
+
46
+ <div class="description">
47
+ <h2>Description</h2>
48
+
49
+ <p>Programmer: Chris Bunch</p>
50
+
51
+ </div>
52
+
53
+ </div>
54
+ </body>
55
+ </html>
56
+
data/doc/created.rid ADDED
@@ -0,0 +1,4 @@
1
+ Thu, 01 Dec 2011 12:44:41 -0800
2
+ bin/oration.rb Wed, 30 Nov 2011 22:35:43 -0800
3
+ lib/generator.rb Thu, 01 Dec 2011 12:38:03 -0800
4
+ bin/oration Wed, 30 Nov 2011 22:35:43 -0800
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/doc/index.html ADDED
@@ -0,0 +1,71 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
8
+
9
+ <title>RDoc Documentation</title>
10
+
11
+ <link type="text/css" media="screen" href="rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
16
+ <script src="js/darkfish.js" type="text/javascript" charset="utf-8"></script>
17
+
18
+ </head>
19
+ <body class="indexpage">
20
+
21
+
22
+ <h1>RDoc Documentation</h1>
23
+
24
+
25
+ <p>This is the API documentation for 'RDoc Documentation'.</p>
26
+
27
+
28
+
29
+
30
+
31
+ <h2 id="classes">Classes/Modules</h2>
32
+ <ul>
33
+
34
+ <li class="module"><a href="Generator.html">Generator</a></li>
35
+
36
+ <li class="class"><a href="Object.html">Object</a></li>
37
+
38
+ </ul>
39
+
40
+ <h2 id="methods">Methods</h2>
41
+ <ul>
42
+
43
+ <li><a href="Generator.html#method-c-generate_app">::generate_app &mdash; Generator</a></li>
44
+
45
+ <li><a href="Generator.html#method-c-generate_go_app">::generate_go_app &mdash; Generator</a></li>
46
+
47
+ <li><a href="Generator.html#method-c-generate_python_app">::generate_python_app &mdash; Generator</a></li>
48
+
49
+ <li><a href="Generator.html#method-c-get_go_function">::get_go_function &mdash; Generator</a></li>
50
+
51
+ <li><a href="Generator.html#method-c-get_python_function">::get_python_function &mdash; Generator</a></li>
52
+
53
+ <li><a href="Generator.html#method-c-write_go_app_yaml_file">::write_go_app_yaml_file &mdash; Generator</a></li>
54
+
55
+ <li><a href="Generator.html#method-c-write_go_cicero_code">::write_go_cicero_code &mdash; Generator</a></li>
56
+
57
+ <li><a href="Generator.html#method-c-write_python_app_yaml_file">::write_python_app_yaml_file &mdash; Generator</a></li>
58
+
59
+ <li><a href="Generator.html#method-c-write_python_cicero_code">::write_python_cicero_code &mdash; Generator</a></li>
60
+
61
+ <li><a href="Object.html#method-i-validate_arguments">#validate_arguments &mdash; Object</a></li>
62
+
63
+ </ul>
64
+
65
+ <div id="validator-badges">
66
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
67
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
68
+ Rdoc Generator</a> 2</small>.</p>
69
+ </div>
70
+ </body>
71
+ </html>
@@ -0,0 +1,116 @@
1
+ /**
2
+ *
3
+ * Darkfish Page Functions
4
+ * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
5
+ *
6
+ * Author: Michael Granger <mgranger@laika.com>
7
+ *
8
+ */
9
+
10
+ /* Provide console simulation for firebug-less environments */
11
+ if (!("console" in window) || !("firebug" in console)) {
12
+ var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
13
+ "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
14
+
15
+ window.console = {};
16
+ for (var i = 0; i < names.length; ++i)
17
+ window.console[names[i]] = function() {};
18
+ };
19
+
20
+
21
+ /**
22
+ * Unwrap the first element that matches the given @expr@ from the targets and return them.
23
+ */
24
+ $.fn.unwrap = function( expr ) {
25
+ return this.each( function() {
26
+ $(this).parents( expr ).eq( 0 ).after( this ).remove();
27
+ });
28
+ };
29
+
30
+
31
+ function showSource( e ) {
32
+ var target = e.target;
33
+ var codeSections = $(target).
34
+ parents('.method-detail').
35
+ find('.method-source-code');
36
+
37
+ $(target).
38
+ parents('.method-detail').
39
+ find('.method-source-code').
40
+ slideToggle();
41
+ };
42
+
43
+ function hookSourceViews() {
44
+ $('.method-description,.method-heading').click( showSource );
45
+ };
46
+
47
+ function toggleDebuggingSection() {
48
+ $('.debugging-section').slideToggle();
49
+ };
50
+
51
+ function hookDebuggingToggle() {
52
+ $('#debugging-toggle img').click( toggleDebuggingSection );
53
+ };
54
+
55
+ function hookQuickSearch() {
56
+ $('.quicksearch-field').each( function() {
57
+ var searchElems = $(this).parents('.section').find( 'li' );
58
+ var toggle = $(this).parents('.section').find('h3 .search-toggle');
59
+ // console.debug( "Toggle is: %o", toggle );
60
+ var qsbox = $(this).parents('form').get( 0 );
61
+
62
+ $(this).quicksearch( this, searchElems, {
63
+ noSearchResultsIndicator: 'no-class-search-results',
64
+ focusOnLoad: false
65
+ });
66
+ $(toggle).click( function() {
67
+ // console.debug( "Toggling qsbox: %o", qsbox );
68
+ $(qsbox).toggle();
69
+ });
70
+ });
71
+ };
72
+
73
+ function highlightTarget( anchor ) {
74
+ console.debug( "Highlighting target '%s'.", anchor );
75
+
76
+ $("a[name=" + anchor + "]").each( function() {
77
+ if ( !$(this).parent().parent().hasClass('target-section') ) {
78
+ console.debug( "Wrapping the target-section" );
79
+ $('div.method-detail').unwrap( 'div.target-section' );
80
+ $(this).parent().wrap( '<div class="target-section"></div>' );
81
+ } else {
82
+ console.debug( "Already wrapped." );
83
+ }
84
+ });
85
+ };
86
+
87
+ function highlightLocationTarget() {
88
+ console.debug( "Location hash: %s", window.location.hash );
89
+ if ( ! window.location.hash || window.location.hash.length == 0 ) return;
90
+
91
+ var anchor = window.location.hash.substring(1);
92
+ console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" );
93
+
94
+ highlightTarget( anchor );
95
+ };
96
+
97
+ function highlightClickTarget( event ) {
98
+ console.debug( "Highlighting click target for event %o", event.target );
99
+ try {
100
+ var anchor = $(event.target).attr( 'href' ).substring(1);
101
+ console.debug( "Found target anchor: %s", anchor );
102
+ highlightTarget( anchor );
103
+ } catch ( err ) {
104
+ console.error( "Exception while highlighting: %o", err );
105
+ };
106
+ };
107
+
108
+
109
+ $(document).ready( function() {
110
+ hookSourceViews();
111
+ hookDebuggingToggle();
112
+ hookQuickSearch();
113
+ highlightLocationTarget();
114
+
115
+ $('ul.link-list a').bind( "click", highlightClickTarget );
116
+ });