golf 0.4.14 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +3 -1
- data/golf.gemspec +1 -0
- data/lib/golf/compiler.rb +60 -21
- data/lib/golf/filter.rb +10 -0
- data/lib/golf/filters/dummy_filter.rb +11 -0
- data/lib/golf/version.rb +1 -1
- data/lib/golf.rb +2 -1
- data/test/reference_app/golfapp/components/HelloWorld/HelloWorld.html +13 -0
- data/test/reference_app/golfapp/components/golf/cart/Admin/Admin.html +13 -0
- data/test/reference_app/golfapp/components/golf/cart/Cart/Cart.html +16 -0
- data/test/reference_app/golfapp/components/golf/cart/Product/Product.html +21 -0
- data/test/reference_app/golfapp/components/golf/cart/ProductListing/ProductListing.html +19 -0
- data/test/reference_app/golfapp/components/golf/cart/Store/Store.html +18 -0
- data/test/reference_app/golfapp/components.js +1 -0
- data/test/reference_app/golfapp/controller.js +28 -0
- data/test/reference_app/golfapp/img/ Timer & Non-Stick.jpeg +0 -0
- data/test/reference_app/golfapp/img/134lines.jpeg +0 -0
- data/test/reference_app/golfapp/img/Q33 Sail Plan.jpeg +0 -0
- data/test/reference_app/golfapp/img/a/b/qwer +0 -0
- data/test/reference_app/golfapp/img/em> - Brushed Stainless Steel.jpeg +0 -0
- data/test/reference_app/golfapp/img/em> - White.jpeg +0 -0
- data/test/reference_app/golfapp/img/em> Broil CTO7100B.jpeg +0 -0
- data/test/reference_app/golfapp/img/em> Broiler - Stainless.jpeg +0 -0
- data/test/reference_app/golfapp/img/em> with Countdo.jpeg +0 -0
- data/test/reference_app/golfapp/img/em> with Element IQ.jpeg +0 -0
- data/test/reference_app/golfapp/img/em> with OneTouch ...jpeg +0 -0
- data/test/reference_app/golfapp/img/em> with Pizza.jpeg +0 -0
- data/test/reference_app/golfapp/img/em>-1.jpeg +0 -0
- data/test/reference_app/golfapp/img/em>-2.jpeg +0 -0
- data/test/reference_app/golfapp/img/em>-3.jpeg +0 -0
- data/test/reference_app/golfapp/img/em>-Black.jpeg +0 -0
- data/test/reference_app/golfapp/img/em>.jpeg +0 -0
- data/test/reference_app/golfapp/img/unnamed.jpeg +0 -0
- data/test/reference_app/golfapp/plugins/mylib.js +0 -0
- data/test/reference_app/golfapp/scripts/00-myscript.js +0 -0
- data/test/reference_app/golfapp/scripts/01-jquery.tmpl.js +484 -0
- data/test/reference_app/golfapp/styles/main.css +0 -0
- data/test/test_compiler.rb +87 -7
- metadata +47 -17
- data/test/twitter_compiled/Gemfile +0 -6
- data/test/twitter_compiled/config.ru +0 -7
- data/test/twitter_compiled/golfapp/app_error.html +0 -60
- data/test/twitter_compiled/golfapp/components/golf/twitter/Search/Search.html +0 -29
- data/test/twitter_compiled/golfapp/components/golf/twitter/Tweet/Tweet.html +0 -16
- data/test/twitter_compiled/golfapp/components.js +0 -1
- data/test/twitter_compiled/golfapp/controller.js +0 -9
- data/test/twitter_compiled/golfapp/index.html +0 -58
- data/test/twitter_compiled/golfapp/jquery.address.js +0 -439
- data/test/twitter_compiled/golfapp/jquery.golf.js +0 -942
- data/test/twitter_compiled/golfapp/jquery.js +0 -4376
- data/test/twitter_compiled/golfapp/plugins/twitter.js +0 -14
- data/test/twitter_compiled/golfapp/welcome2golf.html +0 -50
- /data/test/{twitter_compiled/golfapp/scripts/00-myscript.js → reference_app/golfapp/img/a/asdf} +0 -0
- /data/test/{twitter_compiled/golfapp/styles/main.css → reference_app/golfapp/img/a/b/c/zxcv} +0 -0
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: golf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.5.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Micha Niskin, Alan Dipert, Julio Capote
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-14 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -46,6 +46,17 @@ dependencies:
|
|
46
46
|
version: "0"
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id003
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: hpricot
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: "0"
|
58
|
+
type: :runtime
|
59
|
+
version_requirements: *id004
|
49
60
|
description: Golf lets you write your interface in terms of reusable, simple components.
|
50
61
|
email:
|
51
62
|
- michaniskin@gmail.com
|
@@ -65,6 +76,8 @@ files:
|
|
65
76
|
- lib/golf.rb
|
66
77
|
- lib/golf/cli.rb
|
67
78
|
- lib/golf/compiler.rb
|
79
|
+
- lib/golf/filter.rb
|
80
|
+
- lib/golf/filters/dummy_filter.rb
|
68
81
|
- lib/golf/rack.rb
|
69
82
|
- lib/golf/version.rb
|
70
83
|
- resources/app_error.html
|
@@ -154,24 +167,41 @@ files:
|
|
154
167
|
- templates/twitter/golfapp/plugins/twitter.js
|
155
168
|
- templates/twitter/golfapp/scripts/00-myscript.js
|
156
169
|
- templates/twitter/golfapp/styles/main.css
|
170
|
+
- test/reference_app/golfapp/components.js
|
171
|
+
- test/reference_app/golfapp/components/HelloWorld/HelloWorld.html
|
172
|
+
- test/reference_app/golfapp/components/golf/cart/Admin/Admin.html
|
173
|
+
- test/reference_app/golfapp/components/golf/cart/Cart/Cart.html
|
174
|
+
- test/reference_app/golfapp/components/golf/cart/Product/Product.html
|
175
|
+
- test/reference_app/golfapp/components/golf/cart/ProductListing/ProductListing.html
|
176
|
+
- test/reference_app/golfapp/components/golf/cart/Store/Store.html
|
177
|
+
- test/reference_app/golfapp/controller.js
|
178
|
+
- test/reference_app/golfapp/img/ Timer & Non-Stick.jpeg
|
179
|
+
- test/reference_app/golfapp/img/134lines.jpeg
|
180
|
+
- test/reference_app/golfapp/img/Q33 Sail Plan.jpeg
|
181
|
+
- test/reference_app/golfapp/img/a/asdf
|
182
|
+
- test/reference_app/golfapp/img/a/b/c/zxcv
|
183
|
+
- test/reference_app/golfapp/img/a/b/qwer
|
184
|
+
- test/reference_app/golfapp/img/em> - Brushed Stainless Steel.jpeg
|
185
|
+
- test/reference_app/golfapp/img/em> - White.jpeg
|
186
|
+
- test/reference_app/golfapp/img/em> Broil CTO7100B.jpeg
|
187
|
+
- test/reference_app/golfapp/img/em> Broiler - Stainless.jpeg
|
188
|
+
- test/reference_app/golfapp/img/em> with Countdo.jpeg
|
189
|
+
- test/reference_app/golfapp/img/em> with Element IQ.jpeg
|
190
|
+
- test/reference_app/golfapp/img/em> with OneTouch ...jpeg
|
191
|
+
- test/reference_app/golfapp/img/em> with Pizza.jpeg
|
192
|
+
- test/reference_app/golfapp/img/em>-1.jpeg
|
193
|
+
- test/reference_app/golfapp/img/em>-2.jpeg
|
194
|
+
- test/reference_app/golfapp/img/em>-3.jpeg
|
195
|
+
- test/reference_app/golfapp/img/em>-Black.jpeg
|
196
|
+
- test/reference_app/golfapp/img/em>.jpeg
|
197
|
+
- test/reference_app/golfapp/img/unnamed.jpeg
|
198
|
+
- test/reference_app/golfapp/plugins/mylib.js
|
199
|
+
- test/reference_app/golfapp/scripts/00-myscript.js
|
200
|
+
- test/reference_app/golfapp/scripts/01-jquery.tmpl.js
|
201
|
+
- test/reference_app/golfapp/styles/main.css
|
157
202
|
- test/test_compiler.rb
|
158
203
|
- test/test_helper.rb
|
159
204
|
- test/test_rack.rb
|
160
|
-
- test/twitter_compiled/Gemfile
|
161
|
-
- test/twitter_compiled/config.ru
|
162
|
-
- test/twitter_compiled/golfapp/app_error.html
|
163
|
-
- test/twitter_compiled/golfapp/components.js
|
164
|
-
- test/twitter_compiled/golfapp/components/golf/twitter/Search/Search.html
|
165
|
-
- test/twitter_compiled/golfapp/components/golf/twitter/Tweet/Tweet.html
|
166
|
-
- test/twitter_compiled/golfapp/controller.js
|
167
|
-
- test/twitter_compiled/golfapp/index.html
|
168
|
-
- test/twitter_compiled/golfapp/jquery.address.js
|
169
|
-
- test/twitter_compiled/golfapp/jquery.golf.js
|
170
|
-
- test/twitter_compiled/golfapp/jquery.js
|
171
|
-
- test/twitter_compiled/golfapp/plugins/twitter.js
|
172
|
-
- test/twitter_compiled/golfapp/scripts/00-myscript.js
|
173
|
-
- test/twitter_compiled/golfapp/styles/main.css
|
174
|
-
- test/twitter_compiled/golfapp/welcome2golf.html
|
175
205
|
has_rdoc: true
|
176
206
|
homepage: http://golf.github.com
|
177
207
|
licenses: []
|
@@ -1,60 +0,0 @@
|
|
1
|
-
|
2
|
-
<style type="text/css">
|
3
|
-
* {
|
4
|
-
font-family: sans-serif;
|
5
|
-
margin: 0;
|
6
|
-
padding: 0;
|
7
|
-
color: #333;
|
8
|
-
}
|
9
|
-
|
10
|
-
h1.type {
|
11
|
-
padding: .5em 20px .5em 20px;
|
12
|
-
background: orange;
|
13
|
-
margin: 2px;
|
14
|
-
}
|
15
|
-
|
16
|
-
h3.description {
|
17
|
-
padding: .5em 20px .5em 20px;
|
18
|
-
background: yellowgreen;
|
19
|
-
margin: 2px;
|
20
|
-
}
|
21
|
-
|
22
|
-
p.message {
|
23
|
-
padding: .75em 20px .75em 20px;
|
24
|
-
background: cadetblue;
|
25
|
-
margin: 2px;
|
26
|
-
}
|
27
|
-
|
28
|
-
a, a:visited {
|
29
|
-
color: darkblue;
|
30
|
-
text-decoration: none;
|
31
|
-
}
|
32
|
-
|
33
|
-
a:hover {
|
34
|
-
color: darkblue;
|
35
|
-
text-decoration: underline;
|
36
|
-
}
|
37
|
-
|
38
|
-
code {
|
39
|
-
font-family: monospace;
|
40
|
-
font-weight: bold;
|
41
|
-
font-size: 1.18em;
|
42
|
-
padding: 0 0.20em 0 0.20em;
|
43
|
-
}
|
44
|
-
|
45
|
-
.content {
|
46
|
-
position: relative;
|
47
|
-
top: 5em;
|
48
|
-
width: 35em;
|
49
|
-
margin: 0 auto;
|
50
|
-
}
|
51
|
-
</style>
|
52
|
-
|
53
|
-
<div class="content">
|
54
|
-
<h1 class="type"/>
|
55
|
-
<h3 class="description"/>
|
56
|
-
<p class="message">
|
57
|
-
Golf server documentation:
|
58
|
-
<a href="http://golf.github.com/">http://golf.github.com</a>.
|
59
|
-
</p>
|
60
|
-
</div>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
<div>
|
2
|
-
<style type="text/golf">
|
3
|
-
</style>
|
4
|
-
|
5
|
-
<script type="text/golf">
|
6
|
-
function(query) {
|
7
|
-
var search = $.require("twitter").search;
|
8
|
-
|
9
|
-
search(query, function(i, tweet) {
|
10
|
-
$(".results").append(new Component.golf.twitter.Tweet(tweet));
|
11
|
-
$(".numresults").text(i+1);
|
12
|
-
});
|
13
|
-
|
14
|
-
$("form").submit(function() {
|
15
|
-
$.golf.location("/"+$("input[name='query']").val()+"/");
|
16
|
-
});
|
17
|
-
}
|
18
|
-
</script>
|
19
|
-
|
20
|
-
<div class="content">
|
21
|
-
<h1>Twitter Search</h1>
|
22
|
-
<form>
|
23
|
-
<input type="text" name="query"/>
|
24
|
-
<input type="submit"/>
|
25
|
-
</form>
|
26
|
-
<p><span class="numresults">0</span> results:</p>
|
27
|
-
<ul class="results"/>
|
28
|
-
</div>
|
29
|
-
</div>
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<li>
|
2
|
-
<style type="text/golf">
|
3
|
-
span.user {
|
4
|
-
color: green;
|
5
|
-
}
|
6
|
-
</style>
|
7
|
-
|
8
|
-
<script type="text/golf">
|
9
|
-
function(tweet) {
|
10
|
-
$(".user").text(tweet.from_user);
|
11
|
-
$(".text").text(tweet.text);
|
12
|
-
}
|
13
|
-
</script>
|
14
|
-
|
15
|
-
<span class="user">A user</span> says: <span class="text">Some things.</span>
|
16
|
-
</li>
|
@@ -1 +0,0 @@
|
|
1
|
-
jQuery.golf.components={"golf.twitter.Tweet":{"name":"golf.twitter.Tweet","html":"<li>\n <style type=\"text/golf\">\n span.user {\n color: green;\n }\n <\/style>\n\n <script type=\"text/golf\">\n\n function(tweet) {\n $(\".user\").text(tweet.from_user);\n $(\".text\").text(tweet.text);\n }\n \n<\/script>\n\n <span class=\"user\">A user<\/span> says: <span class=\"text\">Some things.<\/span>\n<\/li>\n"},"golf.twitter.Search":{"name":"golf.twitter.Search","html":"<div>\n <style type=\"text/golf\">\n <\/style>\n\n <script type=\"text/golf\">\n\n function(query) {\n var search = $.require(\"twitter\").search;\n\n search(query, function(i, tweet) {\n $(\".results\").append(new Component.golf.twitter.Tweet(tweet));\n $(\".numresults\").text(i+1);\n });\n\n $(\"form\").submit(function() {\n $.golf.location(\"/\"+$(\"input[name='query']\").val()+\"/\");\n });\n }\n \n<\/script>\n\n <div class=\"content\">\n <h1>Twitter Search<\/h1>\n <form>\n <input type=\"text\" name=\"query\"/>\n <input type=\"submit\"/>\n <\/form>\n <p><span class=\"numresults\">0<\/span> results:<\/p>\n <ul class=\"results\"/>\n <\/div>\n<\/div>\n"}};jQuery.golf.res={"Gemfile":"Gemfile","plugins":{"twitter.js":"plugins/twitter.js"},"config.ru":"config.ru","404.txt":"404.txt"};jQuery.golf.plugins={"twitter":{"name":"twitter","js":"(function() {\n\n exports.search = function(query, callback) {\n $.getJSON(\n \"http://search.twitter.com/search.json?q=\"+escape(query)+\"&callback=?\",\n function(data) {\n $.each(data.results, function(i, tweet) {\n callback(i, tweet);\n });\n }\n );\n };\n\n})();\n"}};jQuery.golf.scripts={"00-myscript":{"name":"00-myscript","js":""}};jQuery.golf.styles={"main":{"name":"main","css":""}};jQuery.golf.setupComponents();
|
@@ -1,58 +0,0 @@
|
|
1
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
2
|
-
<head>
|
3
|
-
<title> </title>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
|
5
|
-
<meta name="robots" content="noindex,nofollow"/>
|
6
|
-
<script type="text/javascript">
|
7
|
-
window.serverside = false;
|
8
|
-
window.sessionid = "";
|
9
|
-
window.servletUrl = window.location.protocol+"//"+window.location.host+window.location.pathname;
|
10
|
-
window.urlHash = "";
|
11
|
-
window.devmode = false;
|
12
|
-
window.forcebot = false;
|
13
|
-
window.forceproxy = false;
|
14
|
-
window.forceclient = false;
|
15
|
-
window.restBackends = [];
|
16
|
-
window.cloudfrontDomain = "";
|
17
|
-
if (servletUrl.match("/index\.html$"))
|
18
|
-
window.location.replace(
|
19
|
-
servletUrl.substring(0, servletUrl.length - "index.html".length));
|
20
|
-
</script>
|
21
|
-
<script type="text/javascript" src="jquery.js"></script>
|
22
|
-
<script type="text/javascript" src="jquery.address.js"></script>
|
23
|
-
<script type="text/javascript" src="jquery.golf.js"></script>
|
24
|
-
<script type="text/javascript" src="components.js"></script>
|
25
|
-
<script type="text/javascript" src="controller.js"></script>
|
26
|
-
<style type="text/css">
|
27
|
-
a.golfproxylink,
|
28
|
-
a.golfproxylink:link,
|
29
|
-
a.golfproxylink:visited,
|
30
|
-
a.golfproxylink:hover { color:inherit; text-decoration:inherit; }
|
31
|
-
</style>
|
32
|
-
<!-- custom head section -->
|
33
|
-
<!-- end custom head section -->
|
34
|
-
</head>
|
35
|
-
<body>
|
36
|
-
<noscript>
|
37
|
-
<!-- custom noscript section -->
|
38
|
-
<div style="color:#222;width:25em;margin:2em auto;padding:2em;border:1px solid black;font-family:sans-serif;text-align:justify">
|
39
|
-
<div style="margin:0 auto;text-align:center;">
|
40
|
-
<h3>JavaScript proxying is disabled.</h3>
|
41
|
-
</div>
|
42
|
-
<p>It looks like your browser doesn't support JavaScript, or
|
43
|
-
maybe you've turned it off. Normally, the Golf server would
|
44
|
-
proxy the JavaScript for you and you'd still be able to access
|
45
|
-
the site. However this application is running in static mode
|
46
|
-
and proxying is disabled.</p>
|
47
|
-
|
48
|
-
<p>If you want to access this application you will need to
|
49
|
-
enable JavaScript in your browser. Check out
|
50
|
-
<a href="http://www.google.com/support/websearch/bin/answer.py?hl=en&answer=23852">Google's JavaScript page</a>
|
51
|
-
for more information on how to do this.</p>
|
52
|
-
</div>
|
53
|
-
<!-- end custom noscript section -->
|
54
|
-
</noscript>
|
55
|
-
<div class="golfbody">
|
56
|
-
</div>
|
57
|
-
</body>
|
58
|
-
</html>
|