golf 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,50 @@
1
+ <style type="text/css">
2
+ * {
3
+ font-family: sans-serif;
4
+ margin: 0;
5
+ padding: 0;
6
+ color: #222;
7
+ }
8
+
9
+ h1 {
10
+ padding: .5em 20px .5em 20px;
11
+ background: cadetblue;
12
+ margin: 2px;
13
+ }
14
+
15
+ h3 {
16
+ padding: .5em 20px .5em 20px;
17
+ background: yellowgreen;
18
+ margin: 2px;
19
+ }
20
+
21
+ p {
22
+ padding: .75em 20px .75em 20px;
23
+ background: orange;
24
+ margin: 2px;
25
+ }
26
+
27
+ a, a:visited {
28
+ color: darkblue;
29
+ }
30
+
31
+ a:hover {
32
+ color: white;
33
+ }
34
+
35
+ .content {
36
+ position: relative;
37
+ top: 5em;
38
+ width: 35em;
39
+ margin: 0 auto;
40
+ }
41
+ </style>
42
+
43
+ <div class="content">
44
+ <h1>Hi there!</h1>
45
+ <h3>Your Golf Web Application Server is up and running.</h3>
46
+ <p>
47
+ Look at the <a href="http://golf.github.com/">documentation</a> to
48
+ get started!
49
+ </p>
50
+ </div>
File without changes
@@ -2,4 +2,5 @@ source "http://rubygems.org"
2
2
 
3
3
  gem 'rack'
4
4
  gem 'rack-contrib'
5
- gem 'golf'
5
+ gem 'rack-rewrite'
6
+ gem 'golf'
@@ -4,5 +4,4 @@ require 'rack'
4
4
  require 'rack/contrib'
5
5
 
6
6
  use Golf::Rack
7
- use Rack::Static, :urls => ["/"], :root => "golfapp"
8
7
  run Rack::NotFound.new('404.txt')
@@ -0,0 +1,7 @@
1
+ $.golf.controller = [
2
+ { route: ".*",
3
+ action: function(container, params) {
4
+ container.empty().append(new Component.HelloWorld());
5
+ }
6
+ }
7
+ ];
@@ -41,6 +41,7 @@ function Component() {
41
41
  function Debug(prefix) {
42
42
  return function(text) {
43
43
  text = prefix+": "+text;
44
+ window.devmode = true;
44
45
  if (window.devmode && window.console && window.console.log)
45
46
  console.log(text);
46
47
  else if (window.serverside)
data/test/test_rack.rb CHANGED
@@ -12,6 +12,15 @@ class RackTest < Test::Unit::TestCase
12
12
  assert last_response.ok?
13
13
  end
14
14
 
15
+ def test_resource_serving
16
+ get "/jquery.js"
17
+ assert last_response.ok?
18
+
19
+ get "/jquery.golf.js"
20
+ assert last_response.ok?
15
21
 
22
+ get "/"
23
+ assert last_response.ok?
24
+ end
16
25
 
17
26
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: golf
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.8
5
+ version: 0.0.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Micha Niskin, Alan Dipert, Julio Capote
@@ -56,11 +56,18 @@ files:
56
56
  - lib/golf/compiler.rb
57
57
  - lib/golf/rack.rb
58
58
  - lib/golf/version.rb
59
- - template/404.txt
60
- - template/Gemfile
61
- - template/config.ru
62
- - template/golfapp/components/HelloWorld/HelloWorld.html
63
- - template/golfapp/controller.js
59
+ - resources/app_error.html
60
+ - resources/controller.js
61
+ - resources/index.html
62
+ - resources/jquery.address.js
63
+ - resources/jquery.golf.js
64
+ - resources/jquery.js
65
+ - resources/welcome2golf.html
66
+ - templates/new/404.txt
67
+ - templates/new/Gemfile
68
+ - templates/new/components/HelloWorld/HelloWorld.html
69
+ - templates/new/config.ru
70
+ - templates/new/controller.js
64
71
  - test/data/app_error.html
65
72
  - test/data/components.js
66
73
  - test/data/components/HelloWorld/HelloWorld.html