golf 0.0.2 → 0.0.3

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.
data/.gitignore CHANGED
@@ -8,3 +8,4 @@ build/*
8
8
  dist/*
9
9
  docs/api/*
10
10
  docs/api
11
+ *.gem
data/lib/golf/rack.rb CHANGED
@@ -6,12 +6,12 @@ module Golf
6
6
  end
7
7
 
8
8
  def call(env)
9
- #compile it before we pass it to static
10
- #Golf::Compiler.compile!(env)
11
- ['200', { 'Content-Type' => 'application/javascript', 'Content-Length' => '5'}, ['asasd']]
12
- #@app.call(env) if @app
9
+ if env["REQUEST_METHOD"] == "GET" and env["PATH_INFO"] == "/component.js"
10
+ ['200', { 'Content-Type' => 'application/javascript', 'Content-Length' => '5'}, ['asasd']]
11
+ else
12
+ @app.call if @app
13
+ end
13
14
  end
14
-
15
15
  end
16
16
  end
17
17
 
data/lib/golf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Golf
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/template/404.txt ADDED
@@ -0,0 +1 @@
1
+ not found
data/template/config.ru CHANGED
@@ -4,4 +4,5 @@ require 'rack'
4
4
  require 'rack/contrib'
5
5
 
6
6
  use Golf::Rack
7
- run Rack::Static, :urls => ["/"], :root => "golfapp"
7
+ use Rack::Static, :urls => ["/"], :root => "golf"
8
+ run Rack::NotFound.new('404.txt')
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: golf
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Micha Niskin, Alan Dipert, Julio Capote
@@ -45,6 +45,7 @@ files:
45
45
  - lib/golf/compiler.rb
46
46
  - lib/golf/rack.rb
47
47
  - lib/golf/version.rb
48
+ - template/404.txt
48
49
  - template/Gemfile
49
50
  - template/config.ru
50
51
  - template/golfapp/components/Test/Test.html