golf 0.2.8 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/golf/rack.rb +8 -0
- data/lib/golf/version.rb +1 -1
- data/templates/rails/Gemfile +1 -1
- data/templates/rails/config/routes.rb +4 -0
- data/templates/rails/config.ru +0 -1
- metadata +1 -2
- data/templates/rails/log/development.log +0 -0
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
data/templates/rails/Gemfile
CHANGED
data/templates/rails/config.ru
CHANGED
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.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
|