ssl_routes 0.1.3 → 0.1.4
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/ssl_routes/rails3.rb +2 -2
- data/lib/ssl_routes/version.rb +1 -1
- metadata +5 -5
data/lib/ssl_routes/rails3.rb
CHANGED
|
@@ -43,7 +43,7 @@ module SslRoutes
|
|
|
43
43
|
current, target = determine_protocols(options)
|
|
44
44
|
if current != target && !request.xhr? && request.get?
|
|
45
45
|
flash.keep
|
|
46
|
-
redirect_to "#{target}://#{request.host_with_port
|
|
46
|
+
redirect_to URI.join("#{target}://#{request.host_with_port}", request.fullpath).to_s
|
|
47
47
|
return false
|
|
48
48
|
end
|
|
49
49
|
end
|
|
@@ -62,7 +62,7 @@ module SslRoutes
|
|
|
62
62
|
module InstanceMethods
|
|
63
63
|
|
|
64
64
|
def url_for_with_ssl_support(options)
|
|
65
|
-
if options[:only_path] == true
|
|
65
|
+
if options.is_a?(Hash) && options[:only_path] == true
|
|
66
66
|
ac = self.respond_to?(:controller) ? self.controller : self
|
|
67
67
|
if ac.respond_to?(:enable_ssl) && ac.enable_ssl
|
|
68
68
|
case options
|
data/lib/ssl_routes/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ssl_routes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 19
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.1.4
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Cedric Howe
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date:
|
|
18
|
+
date: 2012-05-29 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
name: rails
|
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
78
78
|
requirements: []
|
|
79
79
|
|
|
80
80
|
rubyforge_project: ssl_routes
|
|
81
|
-
rubygems_version: 1.
|
|
81
|
+
rubygems_version: 1.8.24
|
|
82
82
|
signing_key:
|
|
83
83
|
specification_version: 3
|
|
84
84
|
summary: Enforce SSL based on your Rails routes.
|