golf 0.2.8 → 0.3.0

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/lib/golf/rack.rb CHANGED
@@ -10,6 +10,14 @@ module Golf
10
10
  end
11
11
 
12
12
  def call(env)
13
+ if env["PATH_INFO"] == ""
14
+ if env["REQUEST_URI"].split('').last != "/"
15
+ return [301, {'Location' => env["REQUEST_URI"] << "/"}, ['See Ya!']]
16
+ else
17
+ env["PATH_INFO"] = "/"
18
+ end
19
+ end
20
+
13
21
  code = "200"
14
22
 
15
23
  #pass through for overrides
data/lib/golf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Golf
2
- VERSION = "0.2.8"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -7,7 +7,7 @@ gem 'rails', '3.0.6'
7
7
 
8
8
  gem 'sqlite3'
9
9
 
10
- gem 'golf'
10
+ gem 'golf', :path => "~/Projects/golf"
11
11
 
12
12
  # Use unicorn as the web server
13
13
  # gem 'unicorn'
@@ -1,4 +1,8 @@
1
1
  GolfExample::Application.routes.draw do
2
+
3
+ mount Golf::Rack.new, :at => "/golf"
4
+
5
+
2
6
  # The priority is based upon order of creation:
3
7
  # first created -> highest priority.
4
8
 
@@ -1,5 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
3
  require ::File.expand_path('../config/environment', __FILE__)
4
- use Golf::Rack
5
4
  run GolfExample::Application
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: golf
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.8
5
+ version: 0.3.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Micha Niskin, Alan Dipert, Julio Capote
@@ -109,7 +109,6 @@ files:
109
109
  - templates/rails/golfapp/scripts/00-myscript.js
110
110
  - templates/rails/golfapp/styles/main.css
111
111
  - templates/rails/lib/tasks/.gitkeep
112
- - templates/rails/log/development.log
113
112
  - templates/rails/log/production.log
114
113
  - templates/rails/log/server.log
115
114
  - templates/rails/log/test.log
File without changes