ssl_routes 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -62,10 +62,11 @@ module SslRoutes
62
62
  module InstanceMethods
63
63
 
64
64
  def url_for_with_ssl_support(options)
65
- if self.controller.enable_ssl
65
+ ac = self.respond_to?(:controller) ? self.controller : self
66
+ if ac.enable_ssl
66
67
  case options
67
68
  when Hash
68
- current, target = self.controller.determine_protocols(options)
69
+ current, target = ac.determine_protocols(options)
69
70
  if current != target
70
71
  options.merge!({ :protocol => target, :only_path => false })
71
72
  end
@@ -1,5 +1,5 @@
1
1
  module SslRoutes
2
2
 
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Cedric Howe
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
- - - ">"
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  hash: 5
29
29
  segments:
@@ -33,7 +33,7 @@ dependencies:
33
33
  type: :runtime
34
34
  version_requirements: *id001
35
35
  description: Define your SSL settings in one place to enforce in your controller, generate URLs with the correct protocol, and protect yourself against session hijacking.
36
- email: cedric@freezerbox.com
36
+ email: cedric@howe.net
37
37
  executables: []
38
38
 
39
39
  extensions: []
@@ -47,7 +47,7 @@ files:
47
47
  - lib/ssl_routes/version.rb
48
48
  - lib/ssl_routes.rb
49
49
  - test/test_helper.rb
50
- homepage: http://github.com/cedric/ssl_routes/
50
+ homepage: http://github.com/cedric/ssl_routes
51
51
  licenses: []
52
52
 
53
53
  post_install_message:
@@ -67,7 +67,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  none: false
69
69
  requirements:
70
- - - ">"
70
+ - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  hash: 23
73
73
  segments: