bcurren-ssl_requirement 1.0.200807043 → 1.0.200807044
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/ssl_requirement.gemspec +1 -2
- metadata +1 -2
- data/lib/url_rewriter.rb +0 -27
data/ssl_requirement.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'ssl_requirement'
|
3
|
-
s.version = '1.0.
|
3
|
+
s.version = '1.0.200807044'
|
4
4
|
s.date = '2008-07-04'
|
5
5
|
|
6
6
|
s.summary = "Allow controller actions to force SSL on specific parts of the site."
|
@@ -19,7 +19,6 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.files = ["README",
|
20
20
|
"init.rb",
|
21
21
|
"lib/ssl_requirement.rb",
|
22
|
-
"lib/url_rewriter.rb",
|
23
22
|
"rails/init.rb",
|
24
23
|
"ssl_requirement.gemspec"]
|
25
24
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcurren-ssl_requirement
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.200807044
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RailsJedi
|
@@ -34,7 +34,6 @@ files:
|
|
34
34
|
- README
|
35
35
|
- init.rb
|
36
36
|
- lib/ssl_requirement.rb
|
37
|
-
- lib/url_rewriter.rb
|
38
37
|
- rails/init.rb
|
39
38
|
- ssl_requirement.gemspec
|
40
39
|
has_rdoc: true
|
data/lib/url_rewriter.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'action_controller/url_rewriter'
|
2
|
-
|
3
|
-
module ActionController
|
4
|
-
class UrlRewriter
|
5
|
-
|
6
|
-
# Add a secure option to the rewrite method.
|
7
|
-
def rewrite_with_secure_option(options = {})
|
8
|
-
secure = options.delete(:secure)
|
9
|
-
if !secure.nil? && !SslRequirement.disable_ssl_check?
|
10
|
-
if secure == true || secure == 1 || secure.to_s.downcase == "true"
|
11
|
-
options.merge!({
|
12
|
-
:only_path => false,
|
13
|
-
:protocol => 'https'
|
14
|
-
})
|
15
|
-
else
|
16
|
-
options.merge!({
|
17
|
-
:only_path => false,
|
18
|
-
:protocol => 'http'
|
19
|
-
})
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
rewrite_without_secure_option(options)
|
24
|
-
end
|
25
|
-
alias_method_chain :rewrite, :secure_option
|
26
|
-
end
|
27
|
-
end
|