minimum_viable_product 0.0.26 → 0.0.27

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 410bf0c4955572b605a651b3aaab23c43da8583e
4
- data.tar.gz: 75dd7d56db510ccb4ec56d8f4c1cfa1c8ead57e8
3
+ metadata.gz: 382c97c15499f1cc581505110e8eee150118765f
4
+ data.tar.gz: 8839d176c765df3f2633c2750875dd63f8e0a054
5
5
  SHA512:
6
- metadata.gz: 2a5ed74c2fe76861438e449760c39abb7bcf1dba5ccea67b481eabde1427ed823a6977d2fd4f1bb6e6e3fe208c758a197eb52cefe635b7dfd110f904643bde75
7
- data.tar.gz: 66d7e3cbde153937fe2ad81cae8c30e720a3ae276a9e725faab9fbd7d91f64eca2cc4c8e82f286ac3f7e88bcd1b3cd065db243304cfba5eb84b0e6d7f651e0dd
6
+ metadata.gz: bc3632f643f75de65320e57ddff621424209712fb2172151a7056d5a11719ac1c8bf904b0ebd3ebe143fe9ee2707fcf221d85f9080940394344f5f17811915ed
7
+ data.tar.gz: fff37898e1d151cf29af6c0fd02ca447ae0e6431f13b783be976fd54fc40eda9d6e605ba4e5c46ea7a5822e8db3fdfefa0ca85852c9e084943552c7e471b3813
@@ -1,3 +1,12 @@
1
- if ENV['FORCE_SSL'].to_b == true
2
- Rails.application.config.middleware.use Rack::SslEnforcer
1
+ case ENV['FORCE_SSL']
2
+ when /t|true|yes|y|on/
3
+ Rails.application.config.middleware.use SslEnforcerOnlyProtocol, :https_port => ENV['HOST_PORT']
3
4
  end
5
+
6
+ BEGIN {
7
+ class SslEnforcerOnlyProtocol < Rack::SslEnforcer
8
+ def current_scheme
9
+ @request.scheme == 'https'
10
+ end
11
+ end
12
+ }
@@ -1,3 +1,3 @@
1
1
  module MinimumViableProduct
2
- VERSION = "0.0.26"
2
+ VERSION = "0.0.27"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimum_viable_product
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.26
4
+ version: 0.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Hunter