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.
@@ -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 + request.fullpath}"
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
@@ -1,5 +1,5 @@
1
1
  module SslRoutes
2
2
 
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
 
5
5
  end
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: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
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: 2011-09-26 00:00:00 Z
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.7.2
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.