grandstand 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/grandstand/main_controller.rb +10 -0
- data/grandstand.gemspec +1 -1
- data/lib/grandstand.rb +3 -3
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
@@ -1,6 +1,9 @@
|
|
1
1
|
class Grandstand::MainController < ApplicationController
|
2
2
|
skip_before_filter :find_page
|
3
3
|
before_filter :require_user
|
4
|
+
if Rails.env.production?
|
5
|
+
before_filter :require_ssl
|
6
|
+
end
|
4
7
|
before_filter :set_return_path, :only => [:index, :show]
|
5
8
|
|
6
9
|
layout :grandstand_layout
|
@@ -33,4 +36,11 @@ class Grandstand::MainController < ApplicationController
|
|
33
36
|
def require_no_user
|
34
37
|
redirect_to return_path || grandstand_root_path if current_user
|
35
38
|
end
|
39
|
+
|
40
|
+
def require_ssl
|
41
|
+
if !request.ssl?
|
42
|
+
new_url = Grandstand.routing[:domain] ? url_for(:protocol => 'https', :host => Grandstand.routing[:domain]) : url_for(:protocol => 'https')
|
43
|
+
redirect_to new_url
|
44
|
+
end
|
45
|
+
end
|
36
46
|
end
|
data/grandstand.gemspec
CHANGED
data/lib/grandstand.rb
CHANGED
@@ -19,9 +19,9 @@ module Grandstand
|
|
19
19
|
|
20
20
|
def routing_options
|
21
21
|
routing_options = {}
|
22
|
-
if Grandstand.routing[:domain]
|
23
|
-
|
24
|
-
end
|
22
|
+
# if Grandstand.routing[:domain]
|
23
|
+
# routing_options.merge!(:path => '', :constraints => {:domain => Grandstand.routing[:domain]})
|
24
|
+
# end
|
25
25
|
routing_options
|
26
26
|
end
|
27
27
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grandstand
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 7
|
10
|
+
version: 0.2.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Flip Sasser
|