golf 0.6.22 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. data/golf.gemspec +1 -1
  2. data/lib/golf/compiler.rb +0 -1
  3. data/lib/golf/version.rb +1 -1
  4. data/resources/jquery.golf.js +22 -6
  5. data/templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_background-clip.scssc +0 -0
  6. data/templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_border-radius.scssc +0 -0
  7. data/templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_box-shadow.scssc +0 -0
  8. data/templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_gradient.scssc +0 -0
  9. data/templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_opacity.scssc +0 -0
  10. data/templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_shared.scssc +0 -0
  11. data/templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_text-shadow.scssc +0 -0
  12. data/templates/compass/.sass-cache/294b99ffe7786bc7dea9c87287be7eb43874f7f4/_support.scssc +0 -0
  13. data/templates/compass/.sass-cache/7027ce0115a3bdb747dcfb7080f30e1f24a4160d/_utilities.scssc +0 -0
  14. data/templates/compass/.sass-cache/9e606917b01e72164113eee0d51a069910b9b9e1/_reset.scssc +0 -0
  15. data/templates/compass/.sass-cache/e90078c6c954a5f81b7134d9c264bfd913112e1b/_fancy-buttons.sassc +0 -0
  16. data/templates/compass/.sass-cache/e90078c6c954a5f81b7134d9c264bfd913112e1b/_fancy-gradient.sassc +0 -0
  17. data/templates/compass/Gemfile +4 -0
  18. data/templates/compass/config.ru +6 -0
  19. data/templates/compass/golfapp/components/HelloWorld/HelloWorld.css.scss +3 -0
  20. data/templates/compass/golfapp/components/HelloWorld/HelloWorld.html.haml +3 -0
  21. data/templates/compass/golfapp/controller.js +7 -0
  22. data/templates/compass/golfapp/images/button_bg.png +0 -0
  23. data/templates/compass/golfapp/plugins/mylib.js +0 -0
  24. data/templates/compass/golfapp/scripts/00-myscript.js +0 -0
  25. data/templates/compass/golfapp/styles/ie6.scss +4 -0
  26. data/templates/compass/golfapp/styles/main.css.scss +4 -0
  27. data/templates/compass/golfapp/styles/reset.css.scss +1 -0
  28. data/templates/new/Gemfile +2 -1
  29. data/templates/rails/Gemfile +1 -1
  30. data/templates/sinatra/Gemfile +1 -1
  31. data/templates/sinatra/config.ru +4 -2
  32. data/templates/twitter/Gemfile +1 -1
  33. data/templates/twitter/config.ru +3 -1
  34. metadata +86 -9
  35. data/templates/rails/Gemfile.lock +0 -83
  36. data/templates/sinatra/Gemfile.lock +0 -21
data/golf.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Golf::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Micha Niskin, Alan Dipert, Julio Capote"]
10
- s.email = ["michaniskin@gmail.com"]
10
+ s.email = ["micha.niskin@gmail.com"]
11
11
  s.homepage = "http://golf.github.com"
12
12
  s.summary = %q{Component based front end JS Framework}
13
13
  s.description = %q{Golf lets you write your interface in terms of reusable, simple components.}
data/lib/golf/compiler.rb CHANGED
@@ -133,7 +133,6 @@ module Golf
133
133
  results = {}
134
134
  if File.exists?(dir) and File.directory?(dir)
135
135
  Dir["#{dir}/**/*"].sort.reverse.each do |path|
136
- puts path
137
136
  next if path.include?('~') or !path.include?(".#{type}")
138
137
  name = path.split('/').last.gsub(".#{type}",'')
139
138
  data = filtered_read(path)
data/lib/golf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Golf
2
- VERSION = "0.6.22"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -55,8 +55,7 @@ function $local(selector, root) {
55
55
  .find("*")
56
56
  .andSelf()
57
57
  .filter(selector)
58
- .not($(".component *", root).get())
59
- .not($("* .component", root).get());
58
+ .not($(".component *", root).get());
60
59
  }
61
60
 
62
61
  function checkForReservedClass(elems, shutup) {
@@ -376,15 +375,13 @@ function componentConstructor(name) {
376
375
  if (context != null)
377
376
  return $(context)
378
377
  .find(selector)
379
- .not($(".component *", obj._dom).get())
380
- .not($("* .component", obj._dom).get());
378
+ .not($(".component *", obj._dom).get());
381
379
  else
382
380
  return $(obj._dom)
383
381
  .find("*")
384
382
  .andSelf()
385
383
  .filter(selector)
386
- .not($(".component *", obj._dom).get())
387
- .not($("* .component", obj._dom).get());
384
+ .not($(".component *", obj._dom).get());
388
385
  };
389
386
 
390
387
  $.extend($fake, $);
@@ -673,6 +670,25 @@ $.golf = {
673
670
  setupComponents: function() {
674
671
  var cmp, name, i, m, scripts=[];
675
672
 
673
+ $.golf.mappings = {
674
+ "foo": "golf.cart.Product"
675
+ };
676
+
677
+ document.createElement = (function(orig) {
678
+ return function() {
679
+ var argv = Array.prototype.slice.call(arguments);
680
+ var i, c;
681
+ for (i in $.golf.mappings) {
682
+ if (i == argv[0].toLowerCase()) {
683
+ eval("c = Component."+$.golf.mappings[i]);
684
+ return (new c())._dom.get()[0];
685
+ } else {
686
+ return orig.apply(this, argv);
687
+ }
688
+ }
689
+ };
690
+ })(document.createElement);
691
+
676
692
  d("Setting up components now.");
677
693
 
678
694
  d("Loading scripts/ directory...");
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'golf','<= 0.6.5'
4
+ gem 'fancy-buttons'
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ Bundler.require
5
+
6
+ run Golf::Rack.new
@@ -0,0 +1,3 @@
1
+ div.container { color: "blue" };
2
+
3
+
@@ -0,0 +1,3 @@
1
+ %div
2
+ %button
3
+ Click here
@@ -0,0 +1,7 @@
1
+ $.golf.controller = [
2
+ { route: ".*",
3
+ action: function(container, params) {
4
+ container.empty().append(new Component.HelloWorld());
5
+ }
6
+ }
7
+ ];
File without changes
File without changes
@@ -0,0 +1,4 @@
1
+ a.button, form button {
2
+ background-image: none !important;
3
+ &:hover, &:active, &:focus {
4
+ background-image: none !important; } }
@@ -0,0 +1,4 @@
1
+ @import "fancy-buttons";
2
+
3
+ button { @include fancy-button(#2966a8); }
4
+
@@ -0,0 +1 @@
1
+ @import "blueprint/reset"
@@ -1,3 +1,4 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'golf'
3
+
4
+ gem 'golf', '<= 0.6.5'
@@ -7,7 +7,7 @@ gem 'rails', '3.0.6'
7
7
 
8
8
  gem 'sqlite3'
9
9
 
10
- gem 'golf'
10
+ gem 'golf', '<= 0.6.5'
11
11
 
12
12
  # Use unicorn as the web server
13
13
  # gem 'unicorn'
@@ -1,4 +1,4 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'golf'
3
+ gem 'golf', '<= 0.6.5'
4
4
  gem 'sinatra'
@@ -1,6 +1,8 @@
1
1
  require 'rubygems'
2
- require 'golf'
3
- require 'sinatra'
2
+ require 'bundler'
3
+
4
+ Bundler.require
5
+
4
6
  require './demo'
5
7
 
6
8
  use DemoBackend
@@ -1,3 +1,3 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'golf'
3
+ gem 'golf', '<= 0.6.5'
@@ -1,4 +1,6 @@
1
1
  require 'rubygems'
2
- require 'golf'
2
+ require 'bundler'
3
+
4
+ Bundler.require
3
5
 
4
6
  run Golf::Rack.new
metadata CHANGED
@@ -1,8 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: golf
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.6.22
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 7
8
+ - 0
9
+ version: 0.7.0
6
10
  platform: ruby
7
11
  authors:
8
12
  - Micha Niskin, Alan Dipert, Julio Capote
@@ -10,7 +14,7 @@ autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
16
 
13
- date: 2011-04-15 00:00:00 -07:00
17
+ date: 2011-04-17 00:00:00 -04:00
14
18
  default_executable:
15
19
  dependencies:
16
20
  - !ruby/object:Gem::Dependency
@@ -21,6 +25,8 @@ dependencies:
21
25
  requirements:
22
26
  - - ">="
23
27
  - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
24
30
  version: "0"
25
31
  type: :runtime
26
32
  version_requirements: *id001
@@ -32,6 +38,8 @@ dependencies:
32
38
  requirements:
33
39
  - - ">="
34
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
35
43
  version: "0"
36
44
  type: :runtime
37
45
  version_requirements: *id002
@@ -43,6 +51,8 @@ dependencies:
43
51
  requirements:
44
52
  - - ">="
45
53
  - !ruby/object:Gem::Version
54
+ segments:
55
+ - 0
46
56
  version: "0"
47
57
  type: :runtime
48
58
  version_requirements: *id003
@@ -54,6 +64,8 @@ dependencies:
54
64
  requirements:
55
65
  - - ">="
56
66
  - !ruby/object:Gem::Version
67
+ segments:
68
+ - 0
57
69
  version: "0"
58
70
  type: :runtime
59
71
  version_requirements: *id004
@@ -65,6 +77,8 @@ dependencies:
65
77
  requirements:
66
78
  - - ">="
67
79
  - !ruby/object:Gem::Version
80
+ segments:
81
+ - 0
68
82
  version: "0"
69
83
  type: :runtime
70
84
  version_requirements: *id005
@@ -76,12 +90,14 @@ dependencies:
76
90
  requirements:
77
91
  - - ">="
78
92
  - !ruby/object:Gem::Version
93
+ segments:
94
+ - 0
79
95
  version: "0"
80
96
  type: :runtime
81
97
  version_requirements: *id006
82
98
  description: Golf lets you write your interface in terms of reusable, simple components.
83
99
  email:
84
- - michaniskin@gmail.com
100
+ - micha.niskin@gmail.com
85
101
  executables:
86
102
  - golf
87
103
  extensions: []
@@ -107,6 +123,29 @@ files:
107
123
  - resources/jquery.golf.js
108
124
  - resources/jquery.js
109
125
  - resources/welcome2golf.html
126
+ - templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_background-clip.scssc
127
+ - templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_border-radius.scssc
128
+ - templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_box-shadow.scssc
129
+ - templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_gradient.scssc
130
+ - templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_opacity.scssc
131
+ - templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_shared.scssc
132
+ - templates/compass/.sass-cache/0c038f67c6ff1b994b0191a2b8cca8192a8be6d6/_text-shadow.scssc
133
+ - templates/compass/.sass-cache/294b99ffe7786bc7dea9c87287be7eb43874f7f4/_support.scssc
134
+ - templates/compass/.sass-cache/7027ce0115a3bdb747dcfb7080f30e1f24a4160d/_utilities.scssc
135
+ - templates/compass/.sass-cache/9e606917b01e72164113eee0d51a069910b9b9e1/_reset.scssc
136
+ - templates/compass/.sass-cache/e90078c6c954a5f81b7134d9c264bfd913112e1b/_fancy-buttons.sassc
137
+ - templates/compass/.sass-cache/e90078c6c954a5f81b7134d9c264bfd913112e1b/_fancy-gradient.sassc
138
+ - templates/compass/Gemfile
139
+ - templates/compass/config.ru
140
+ - templates/compass/golfapp/components/HelloWorld/HelloWorld.css.scss
141
+ - templates/compass/golfapp/components/HelloWorld/HelloWorld.html.haml
142
+ - templates/compass/golfapp/controller.js
143
+ - templates/compass/golfapp/images/button_bg.png
144
+ - templates/compass/golfapp/plugins/mylib.js
145
+ - templates/compass/golfapp/scripts/00-myscript.js
146
+ - templates/compass/golfapp/styles/ie6.scss
147
+ - templates/compass/golfapp/styles/main.css.scss
148
+ - templates/compass/golfapp/styles/reset.css.scss
110
149
  - templates/component/Component.html
111
150
  - templates/new/Gemfile
112
151
  - templates/new/config.ru
@@ -116,7 +155,6 @@ files:
116
155
  - templates/new/golfapp/scripts/00-myscript.js
117
156
  - templates/new/golfapp/styles/main.css
118
157
  - templates/rails/Gemfile
119
- - templates/rails/Gemfile.lock
120
158
  - templates/rails/README
121
159
  - templates/rails/Rakefile
122
160
  - templates/rails/app/controllers/application_controller.rb
@@ -172,7 +210,6 @@ files:
172
210
  - templates/raw/scripts/00-myscript.js
173
211
  - templates/raw/styles/main.css
174
212
  - templates/sinatra/Gemfile
175
- - templates/sinatra/Gemfile.lock
176
213
  - templates/sinatra/config.ru
177
214
  - templates/sinatra/demo.rb
178
215
  - templates/sinatra/golfapp/components/RandomNumber/RandomNumber.html
@@ -239,19 +276,59 @@ required_ruby_version: !ruby/object:Gem::Requirement
239
276
  requirements:
240
277
  - - ">="
241
278
  - !ruby/object:Gem::Version
279
+ segments:
280
+ - 0
242
281
  version: "0"
243
282
  required_rubygems_version: !ruby/object:Gem::Requirement
244
283
  none: false
245
284
  requirements:
246
285
  - - ">="
247
286
  - !ruby/object:Gem::Version
287
+ segments:
288
+ - 0
248
289
  version: "0"
249
290
  requirements: []
250
291
 
251
292
  rubyforge_project: golf
252
- rubygems_version: 1.6.1
293
+ rubygems_version: 1.3.7
253
294
  signing_key:
254
295
  specification_version: 3
255
296
  summary: Component based front end JS Framework
256
- test_files: []
257
-
297
+ test_files:
298
+ - test/reference_app/golfapp/components.js
299
+ - test/reference_app/golfapp/components/HelloWorld/HelloWorld.css
300
+ - test/reference_app/golfapp/components/HelloWorld/HelloWorld.html
301
+ - test/reference_app/golfapp/components/HelloWorld/HelloWorld.js
302
+ - test/reference_app/golfapp/components/golf/cart/Admin/Admin.html
303
+ - test/reference_app/golfapp/components/golf/cart/Cart/Cart.html
304
+ - test/reference_app/golfapp/components/golf/cart/Product/Product.html
305
+ - test/reference_app/golfapp/components/golf/cart/ProductListing/ProductListing.html
306
+ - test/reference_app/golfapp/components/golf/cart/Store/Store.html
307
+ - test/reference_app/golfapp/controller.js
308
+ - test/reference_app/golfapp/img/ Timer & Non-Stick.jpeg
309
+ - test/reference_app/golfapp/img/134lines.jpeg
310
+ - test/reference_app/golfapp/img/Q33 Sail Plan.jpeg
311
+ - test/reference_app/golfapp/img/a/asdf
312
+ - test/reference_app/golfapp/img/a/b/c/zxcv
313
+ - test/reference_app/golfapp/img/a/b/qwer
314
+ - test/reference_app/golfapp/img/em> - Brushed Stainless Steel.jpeg
315
+ - test/reference_app/golfapp/img/em> - White.jpeg
316
+ - test/reference_app/golfapp/img/em> Broil CTO7100B.jpeg
317
+ - test/reference_app/golfapp/img/em> Broiler - Stainless.jpeg
318
+ - test/reference_app/golfapp/img/em> with Countdo.jpeg
319
+ - test/reference_app/golfapp/img/em> with Element IQ.jpeg
320
+ - test/reference_app/golfapp/img/em> with OneTouch ...jpeg
321
+ - test/reference_app/golfapp/img/em> with Pizza.jpeg
322
+ - test/reference_app/golfapp/img/em>-1.jpeg
323
+ - test/reference_app/golfapp/img/em>-2.jpeg
324
+ - test/reference_app/golfapp/img/em>-3.jpeg
325
+ - test/reference_app/golfapp/img/em>-Black.jpeg
326
+ - test/reference_app/golfapp/img/em>.jpeg
327
+ - test/reference_app/golfapp/img/unnamed.jpeg
328
+ - test/reference_app/golfapp/plugins/mylib.js
329
+ - test/reference_app/golfapp/scripts/00-myscript.js
330
+ - test/reference_app/golfapp/scripts/01-jquery.tmpl.js
331
+ - test/reference_app/golfapp/styles/main.css
332
+ - test/test_compiler.rb
333
+ - test/test_helper.rb
334
+ - test/test_rack.rb
@@ -1,83 +0,0 @@
1
- PATH
2
- remote: ~/Projects/golf
3
- specs:
4
- golf (0.3.0)
5
- json
6
- rack
7
- thor
8
-
9
- GEM
10
- remote: http://rubygems.org/
11
- specs:
12
- abstract (1.0.0)
13
- actionmailer (3.0.6)
14
- actionpack (= 3.0.6)
15
- mail (~> 2.2.15)
16
- actionpack (3.0.6)
17
- activemodel (= 3.0.6)
18
- activesupport (= 3.0.6)
19
- builder (~> 2.1.2)
20
- erubis (~> 2.6.6)
21
- i18n (~> 0.5.0)
22
- rack (~> 1.2.1)
23
- rack-mount (~> 0.6.14)
24
- rack-test (~> 0.5.7)
25
- tzinfo (~> 0.3.23)
26
- activemodel (3.0.6)
27
- activesupport (= 3.0.6)
28
- builder (~> 2.1.2)
29
- i18n (~> 0.5.0)
30
- activerecord (3.0.6)
31
- activemodel (= 3.0.6)
32
- activesupport (= 3.0.6)
33
- arel (~> 2.0.2)
34
- tzinfo (~> 0.3.23)
35
- activeresource (3.0.6)
36
- activemodel (= 3.0.6)
37
- activesupport (= 3.0.6)
38
- activesupport (3.0.6)
39
- arel (2.0.9)
40
- builder (2.1.2)
41
- erubis (2.6.6)
42
- abstract (>= 1.0.0)
43
- i18n (0.5.0)
44
- json (1.5.1)
45
- mail (2.2.15)
46
- activesupport (>= 2.3.6)
47
- i18n (>= 0.4.0)
48
- mime-types (~> 1.16)
49
- treetop (~> 1.4.8)
50
- mime-types (1.16)
51
- polyglot (0.3.1)
52
- rack (1.2.2)
53
- rack-mount (0.6.14)
54
- rack (>= 1.0.0)
55
- rack-test (0.5.7)
56
- rack (>= 1.0)
57
- rails (3.0.6)
58
- actionmailer (= 3.0.6)
59
- actionpack (= 3.0.6)
60
- activerecord (= 3.0.6)
61
- activeresource (= 3.0.6)
62
- activesupport (= 3.0.6)
63
- bundler (~> 1.0)
64
- railties (= 3.0.6)
65
- railties (3.0.6)
66
- actionpack (= 3.0.6)
67
- activesupport (= 3.0.6)
68
- rake (>= 0.8.7)
69
- thor (~> 0.14.4)
70
- rake (0.8.7)
71
- sqlite3 (1.3.3)
72
- thor (0.14.6)
73
- treetop (1.4.9)
74
- polyglot (>= 0.3.1)
75
- tzinfo (0.3.26)
76
-
77
- PLATFORMS
78
- ruby
79
-
80
- DEPENDENCIES
81
- golf!
82
- rails (= 3.0.6)
83
- sqlite3
@@ -1,21 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- golf (0.2.0)
5
- json
6
- rack
7
- thor
8
- json (1.5.1)
9
- rack (1.2.2)
10
- sinatra (1.2.2)
11
- rack (~> 1.1)
12
- tilt (< 2.0, >= 1.2.2)
13
- thor (0.14.6)
14
- tilt (1.2.2)
15
-
16
- PLATFORMS
17
- ruby
18
-
19
- DEPENDENCIES
20
- golf
21
- sinatra