heroku-rack-ssl-enforcer-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0ee10eb9897fe69685c94143d333a31f2efb0c02
4
+ data.tar.gz: aef63588181c312bb9dd1178385f72b7d9b485d2
5
+ SHA512:
6
+ metadata.gz: cbfd9c2baf71f0c01a61bef4e3fdff1bd0847d904e3e4b52d36821fb1271051220938c0348c5391079d0e1dc218be2a33fb165e3e83258ccbbf59e34d91ad53e
7
+ data.tar.gz: 9338f46ba2bd1353227d8538adda63811f36c808e49e82ce8c0a26a6162ae43341506a9a3e163f0b9094ab5f6b825115963bc00641e56cebe978a3a5ca427f42
@@ -0,0 +1,8 @@
1
+ pkg/*
2
+ tmp
3
+ spec/support/*/Gemfile.lock
4
+ spec/support/*/public/javascripts
5
+ .ruby-version
6
+ .bundle
7
+ imports/*
8
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org/'
2
+ gemspec
@@ -0,0 +1,46 @@
1
+ # heroku-rack-ssl-enforcer-rails
2
+
3
+ Enforce SSL on Rails application on Heroku.
4
+
5
+ ## Usage
6
+
7
+ Only write this in Gemfile
8
+
9
+ ```ruby
10
+ gem 'heroku-rack-ssl-enforcer'
11
+ ```
12
+
13
+ This gem works on only ```herokuapp.com``` domain.
14
+ If you use custom domain, try [rack-ssl-enforcer](https://github.com/tobmatth/rack-ssl-enforcer) directly.
15
+
16
+ ## Contributing
17
+
18
+ 1. Fork it
19
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
20
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
21
+ 4. Push to the branch (`git push origin my-new-feature`)
22
+ 5. Create new Pull Request
23
+
24
+ ## License
25
+
26
+ The MIT License
27
+
28
+ Copyright (c) 2014 mallowlabs
29
+
30
+ Permission is hereby granted, free of charge, to any person obtaining a copy
31
+ of this software and associated documentation files (the "Software"), to deal
32
+ in the Software without restriction, including without limitation the rights
33
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34
+ copies of the Software, and to permit persons to whom the Software is
35
+ furnished to do so, subject to the following conditions:
36
+
37
+ The above copyright notice and this permission notice shall be included in
38
+ all copies or substantial portions of the Software.
39
+
40
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
46
+ THE SOFTWARE.
@@ -0,0 +1,20 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "heroku-rack-ssl-enforcer-rails"
3
+ s.version = '0.1.0'
4
+ s.platform = Gem::Platform::RUBY
5
+ s.authors = ["mallowlabs"]
6
+ s.email = ["mallowlabs@gmail.com"]
7
+ s.homepage = "https://github.com/mallowlabs/heroku-rack-ssl-enforcer-rails"
8
+ s.summary = "Enforce SSL on Rails application on Heroku"
9
+ s.description = "This gem adds automatically rack-ssl-enforcer on Rails application on Heroku"
10
+ s.license = "MIT"
11
+
12
+ s.required_rubygems_version = ">= 1.3.6"
13
+
14
+ s.add_dependency "railties"
15
+ s.add_dependency "rack-ssl-enforcer"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
19
+ s.require_path = 'lib'
20
+ end
@@ -0,0 +1,9 @@
1
+ require 'rack/ssl-enforcer'
2
+
3
+ module HerokuRackSslEnforcerRails
4
+ class Railtie < Rails::Railtie
5
+ initializer "heroku_rack_ssl_enforcer_rails.insert_middleware" do |app|
6
+ app.config.middleware.use Rack::SslEnforcer, :only_hosts => /.+\.herokuapp\.com/
7
+ end
8
+ end
9
+ end
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: heroku-rack-ssl-enforcer-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - mallowlabs
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: railties
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rack-ssl-enforcer
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: This gem adds automatically rack-ssl-enforcer on Rails application on
42
+ Heroku
43
+ email:
44
+ - mallowlabs@gmail.com
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gitignore"
50
+ - Gemfile
51
+ - README.md
52
+ - heroku-rack-ssl-enforcer-rails.gemspec
53
+ - lib/heroku-rack-ssl-enforcer-rails.rb
54
+ homepage: https://github.com/mallowlabs/heroku-rack-ssl-enforcer-rails
55
+ licenses:
56
+ - MIT
57
+ metadata: {}
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 1.3.6
72
+ requirements: []
73
+ rubyforge_project:
74
+ rubygems_version: 2.2.0
75
+ signing_key:
76
+ specification_version: 4
77
+ summary: Enforce SSL on Rails application on Heroku
78
+ test_files: []