mn_utils_gem 1.15.4 → 1.15.5
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/gui.rb +4 -3
- data/lib/mn_utils_gem/sso.rb +2 -6
- data/lib/mn_utils_gem/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cb2242c85a59f5121267a32bf9780e98031b9528bf8ffb8ca95d61f07c7adfd
|
4
|
+
data.tar.gz: e707f6c3e714907f537f7a9273ed0f6f012c6fa33ec872a22e58c55b9e8d608e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f234616bd84ec8c81aad94d790049406d087b7c59c772127e8a7dd73c24511eb3660b81c3be5b47d9514ffff39f4485e7fba1c1b89f90596c8bec72ba9eec40
|
7
|
+
data.tar.gz: 172c9cd714f9c18ed0266698aa6005867ae16e5459a1851272d158efab6bba3328f15e49a67954305714a44a8866541f0f6faf4c113b876a5b8ed5b28872f30e
|
data/lib/mn_utils_gem/gui.rb
CHANGED
@@ -4,7 +4,7 @@ module MnUtilsGlobal
|
|
4
4
|
class Gui
|
5
5
|
|
6
6
|
def self.render_component(component)
|
7
|
-
Rails.cache.fetch(
|
7
|
+
Rails.cache.fetch(['MnUtilsGlobal', 'Gui', 'render_component', component], expires_in: 1.hour) do
|
8
8
|
render_component_html(component)
|
9
9
|
end
|
10
10
|
end
|
@@ -14,12 +14,13 @@ module MnUtilsGlobal
|
|
14
14
|
def self.render_component_html(component)
|
15
15
|
validate_component(component)
|
16
16
|
response = HTTParty.get("#{ENV['SRV_GUI_URL']}/service/gui/api/v1/component/#{component}", { timeout: 1 })
|
17
|
-
json = JSON.parse(response)
|
17
|
+
json = JSON.parse(response.body)
|
18
18
|
validate_json(json)
|
19
19
|
json['html'].html_safe
|
20
20
|
rescue StandardError => e
|
21
21
|
logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
22
|
-
logger.error
|
22
|
+
logger.error e.message
|
23
|
+
logger.error e.backtrace.join("\n")
|
23
24
|
return ''
|
24
25
|
end
|
25
26
|
|
data/lib/mn_utils_gem/sso.rb
CHANGED
@@ -81,9 +81,7 @@ module MnUtilsAuth
|
|
81
81
|
def redis_server
|
82
82
|
@redis_server ||= Redis.new(
|
83
83
|
url: ENV['MN_REDIS_URL'],
|
84
|
-
|
85
|
-
verify_mode: OpenSSL::SSL::VERIFY_NONE
|
86
|
-
},
|
84
|
+
ssl: ENV['MN_REDIS_SSL'].to_bool,
|
87
85
|
semian: {
|
88
86
|
name: 'user-service',
|
89
87
|
tickets: 4,
|
@@ -94,9 +92,7 @@ module MnUtilsAuth
|
|
94
92
|
}
|
95
93
|
)
|
96
94
|
rescue StandardError => e
|
97
|
-
@logger.error
|
98
|
-
@logger.error e.message
|
99
|
-
@logger.error e.backtrace.join("\n")
|
95
|
+
@logger.error e
|
100
96
|
nil
|
101
97
|
end
|
102
98
|
|
data/lib/mn_utils_gem/version.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.5
|
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-
|
11
|
+
date: 2019-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gelf
|