mn_utils_gem 1.15.5 → 1.15.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mn_utils_gem/sso.rb +7 -1
- data/lib/mn_utils_gem/version.rb +1 -1
- data/lib/mn_utils_gem.rb +0 -1
- metadata +2 -3
- data/lib/mn_utils_gem/string_to_bool.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34ccf6b962ba9d0c600c9c382909d963c90c974b3917ade3bfdfe8400f485958
|
4
|
+
data.tar.gz: e18cec25d4609bd243bcc6dbc77365be5ba6697ac2219c4060307c24d03691dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 716223af250d3b715100dd0eae29d5111d1f06ef292077b90d229ba832ebee4afe4525c028df20c4ea17c10636ed2e14c76d9a4dbe51762e238e6124c8cd366a
|
7
|
+
data.tar.gz: c6b4481774032e00d0059543949a6e7a8d30fe9d831af7165acb63b47884d2d7cd89e41af31412e37465e1af0b25388bb102d5c6a34087b46793228cd15b2eef
|
data/lib/mn_utils_gem/sso.rb
CHANGED
@@ -81,7 +81,7 @@ module MnUtilsAuth
|
|
81
81
|
def redis_server
|
82
82
|
@redis_server ||= Redis.new(
|
83
83
|
url: ENV['MN_REDIS_URL'],
|
84
|
-
ssl: ENV['MN_REDIS_SSL']
|
84
|
+
ssl: string_to_bool(ENV['MN_REDIS_SSL']),
|
85
85
|
semian: {
|
86
86
|
name: 'user-service',
|
87
87
|
tickets: 4,
|
@@ -100,5 +100,11 @@ module MnUtilsAuth
|
|
100
100
|
"#{SSO_COOKIE_VALUE_PREFIX}#{SecureRandom.uuid}"
|
101
101
|
end
|
102
102
|
|
103
|
+
def string_to_bool(s)
|
104
|
+
return true if s =~ (/^(true|t|yes|y|1)$/i)
|
105
|
+
return false if s.empty? || s =~ (/^(false|f|no|n|0)$/i)
|
106
|
+
|
107
|
+
raise ArgumentError.new "invalid value: #{s}"
|
108
|
+
end
|
103
109
|
end
|
104
110
|
end
|
data/lib/mn_utils_gem/version.rb
CHANGED
data/lib/mn_utils_gem.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mn_utils_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.15.
|
4
|
+
version: 1.15.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shamim Mirzai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gelf
|
@@ -174,7 +174,6 @@ files:
|
|
174
174
|
- lib/mn_utils_gem/gui.rb
|
175
175
|
- lib/mn_utils_gem/site_action.rb
|
176
176
|
- lib/mn_utils_gem/sso.rb
|
177
|
-
- lib/mn_utils_gem/string_to_bool.rb
|
178
177
|
- lib/mn_utils_gem/transactional_email.rb
|
179
178
|
- lib/mn_utils_gem/version.rb
|
180
179
|
homepage: https://github.com/mumsnet/mn_utils_gem
|