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 CHANGED
@@ -1 +1 @@
1
- 0.2.6
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{grandstand}
8
- s.version = "0.2.6"
8
+ s.version = "0.2.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Flip Sasser"]
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
- routing_options.merge!(:path => '', :constraints => {:domain => Grandstand.routing[:domain]})
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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 6
10
- version: 0.2.6
9
+ - 7
10
+ version: 0.2.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Flip Sasser