ssl_enforcer 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.md +54 -0
  2. data/VERSION +1 -1
  3. data/ssl_enforcer.gemspec +10 -10
  4. metadata +67 -55
  5. data/README.rdoc +0 -19
data/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # SSL Enforcer
2
+
3
+ **SSL Enforcer** was created to make it dead simple to force SSL connections for specific subdomains in your rails application. Although it was designed to support rails applications built with modularized sections separated by subdomains, it can also be used to force SSL connections on a single domain site as well.
4
+
5
+ ## Installation
6
+
7
+ Add it to your Gemfile:
8
+
9
+ `gem "ssl_enforcer"`
10
+
11
+ And then run `bundle install` to install it.
12
+
13
+ ## Usage
14
+
15
+ To use SSL Enforcer after installing it open `config/environments/production.rb` and add the following line:
16
+
17
+ ```rb
18
+ # Force SSL Connections
19
+ config.middleware.use SSLEnforcer
20
+ ```
21
+
22
+ This will force SSL connections for the entire application.
23
+
24
+ If you would like to force SSL connections for a specific subdomain only, you can use the `:subdomain` option:
25
+
26
+ ```rb
27
+ # Force SSL Connections
28
+ config.middleware.use SSLEnforcer, :subdomain => %w( secure )
29
+ ```
30
+
31
+ By specifying the *secure* subdomain as the one to force SSL on, all connections to "https://secure.mydomain.com" will be forced redirected using a 301 redirect to "https://secure.mydomain.com". Connections to "http://www.mydomain.com/" would be left untouched.
32
+
33
+ If you have several different subdomains in your application that you would like to force SSL connections on, you can do so by providing an array of the subdomains to be enforced.
34
+
35
+ ```rb
36
+ # Force SSL Connections
37
+ config.middleware.use SSLEnforcer, :subdomain => %w( secure checkout protected)
38
+ ```
39
+
40
+ This will enforce SSL connections for "secure.mydomain.com", as well as "checkout.mydomain.com" and "protected.mydomain.com".
41
+
42
+ *NOTE* SSL Enforcer will not provide SSL certificates. You should first configure your server environment to properly support SSL connections before using SSL Enforcer.
43
+
44
+ ## Bug Reports
45
+
46
+ If you run into any issues feel free to create an issue on GitHub. The more information you can provide about the issue and your environment the better. We'll do the best we can to resolve issues quickly.
47
+
48
+ ## Credit where credit is due
49
+
50
+ This Gem was inspired by [rack-www](https://github.com/stjhimy/rack-www/ "rack-www") by [stjhimy](https://github.com/stjhimy/ "Jhimy Fernandes Villar").
51
+
52
+ ## License
53
+
54
+ MIT License. Copyright © 2012 Digital Opera, LLC. [www.digitalopera.com](http://www.digitalopera.com/ "Digital Opera, LLC")
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/ssl_enforcer.gemspec CHANGED
@@ -4,17 +4,17 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{ssl_enforcer}
8
- s.version = "0.1.0"
7
+ s.name = "ssl_enforcer"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["JD Hendrickson"]
12
- s.date = %q{2012-03-27}
13
- s.description = %q{Simple Rack middleware for forcing SSL on specific subdomains of an application.}
14
- s.email = %q{jd@digitalopera.com}
12
+ s.date = "2012-03-28"
13
+ s.description = "Simple Rack middleware for forcing SSL on specific subdomains of an application."
14
+ s.email = "jd@digitalopera.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
- "README.rdoc"
17
+ "README.md"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  "Gemfile",
23
23
  "Gemfile.lock",
24
24
  "LICENSE.txt",
25
- "README.rdoc",
25
+ "README.md",
26
26
  "Rakefile",
27
27
  "VERSION",
28
28
  "lib/ssl_enforcer.rb",
@@ -30,11 +30,11 @@ Gem::Specification.new do |s|
30
30
  "spec/ssl_enforcer_spec.rb",
31
31
  "ssl_enforcer.gemspec"
32
32
  ]
33
- s.homepage = %q{http://github.com/noiseunion/ssl_enforcer}
33
+ s.homepage = "http://github.com/noiseunion/ssl_enforcer"
34
34
  s.licenses = ["MIT"]
35
35
  s.require_paths = ["lib"]
36
- s.rubygems_version = %q{1.5.0}
37
- s.summary = %q{Force SSL for specific subdomains of your application}
36
+ s.rubygems_version = "1.8.18"
37
+ s.summary = "Force SSL for specific subdomains of your application"
38
38
 
39
39
  if s.respond_to? :specification_version then
40
40
  s.specification_version = 3
metadata CHANGED
@@ -1,114 +1,126 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ssl_enforcer
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
4
5
  prerelease:
5
- version: 0.1.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - JD Hendrickson
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-03-27 00:00:00 -05:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2012-03-28 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: rspec
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
18
+ requirements:
21
19
  - - ~>
22
- - !ruby/object:Gem::Version
20
+ - !ruby/object:Gem::Version
23
21
  version: 2.3.0
24
22
  type: :development
25
23
  prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 2.3.0
30
+ - !ruby/object:Gem::Dependency
28
31
  name: bundler
29
- requirement: &id002 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
30
33
  none: false
31
- requirements:
34
+ requirements:
32
35
  - - ~>
33
- - !ruby/object:Gem::Version
36
+ - !ruby/object:Gem::Version
34
37
  version: 1.0.0
35
38
  type: :development
36
39
  prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.0.0
46
+ - !ruby/object:Gem::Dependency
39
47
  name: jeweler
40
- requirement: &id003 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
41
49
  none: false
42
- requirements:
50
+ requirements:
43
51
  - - ~>
44
- - !ruby/object:Gem::Version
52
+ - !ruby/object:Gem::Version
45
53
  version: 1.6.4
46
54
  type: :development
47
55
  prerelease: false
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.6.4
62
+ - !ruby/object:Gem::Dependency
50
63
  name: simplecov
51
- requirement: &id004 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
52
65
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: "0"
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
57
70
  type: :development
58
71
  prerelease: false
59
- version_requirements: *id004
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
60
78
  description: Simple Rack middleware for forcing SSL on specific subdomains of an application.
61
79
  email: jd@digitalopera.com
62
80
  executables: []
63
-
64
81
  extensions: []
65
-
66
- extra_rdoc_files:
82
+ extra_rdoc_files:
67
83
  - LICENSE.txt
68
- - README.rdoc
69
- files:
84
+ - README.md
85
+ files:
70
86
  - .document
71
87
  - .rspec
72
88
  - Gemfile
73
89
  - Gemfile.lock
74
90
  - LICENSE.txt
75
- - README.rdoc
91
+ - README.md
76
92
  - Rakefile
77
93
  - VERSION
78
94
  - lib/ssl_enforcer.rb
79
95
  - spec/spec_helper.rb
80
96
  - spec/ssl_enforcer_spec.rb
81
97
  - ssl_enforcer.gemspec
82
- has_rdoc: true
83
98
  homepage: http://github.com/noiseunion/ssl_enforcer
84
- licenses:
99
+ licenses:
85
100
  - MIT
86
101
  post_install_message:
87
102
  rdoc_options: []
88
-
89
- require_paths:
103
+ require_paths:
90
104
  - lib
91
- required_ruby_version: !ruby/object:Gem::Requirement
105
+ required_ruby_version: !ruby/object:Gem::Requirement
92
106
  none: false
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- hash: -4343775433956632007
97
- segments:
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ segments:
98
112
  - 0
99
- version: "0"
100
- required_rubygems_version: !ruby/object:Gem::Requirement
113
+ hash: -1892090871554102448
114
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
115
  none: false
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: "0"
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
106
120
  requirements: []
107
-
108
121
  rubyforge_project:
109
- rubygems_version: 1.5.0
122
+ rubygems_version: 1.8.18
110
123
  signing_key:
111
124
  specification_version: 3
112
125
  summary: Force SSL for specific subdomains of your application
113
126
  test_files: []
114
-
data/README.rdoc DELETED
@@ -1,19 +0,0 @@
1
- = ssl_enforcer
2
-
3
- Description goes here.
4
-
5
- == Contributing to ssl_enforcer
6
-
7
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
- * Fork the project
10
- * Start a feature/bugfix branch
11
- * Commit and push until you are happy with your contribution
12
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
-
15
- == Copyright
16
-
17
- Copyright (c) 2012 JD. See LICENSE.txt for
18
- further details.
19
-