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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c391a47b0dbf8f5c95c3856faa56f720f675cc555dbcafb72a7f3856c3187fb
4
- data.tar.gz: 97777b5efe0b54c066172c5292874903d5c1c2e4312b2a26970b4a28aad30083
3
+ metadata.gz: 5cb2242c85a59f5121267a32bf9780e98031b9528bf8ffb8ca95d61f07c7adfd
4
+ data.tar.gz: e707f6c3e714907f537f7a9273ed0f6f012c6fa33ec872a22e58c55b9e8d608e
5
5
  SHA512:
6
- metadata.gz: 7b6551ee194d6630667b322fe7fca58437a7a88a21c7a0a1d31577cdb1c646f60ce49183b795f3db685b33dc1b7140634c7543e7a3a60cb71b1795f4255c8942
7
- data.tar.gz: 00a41d109b6da32378ea82f3d22adb7bcf170487f2e84ca37e32a28c5f8002fec3d0ab7e71aea8a63cb48e3422b09452a956621740ccf4cbbe88ef7bbba9d0cc
6
+ metadata.gz: 3f234616bd84ec8c81aad94d790049406d087b7c59c772127e8a7dd73c24511eb3660b81c3be5b47d9514ffff39f4485e7fba1c1b89f90596c8bec72ba9eec40
7
+ data.tar.gz: 172c9cd714f9c18ed0266698aa6005867ae16e5459a1851272d158efab6bba3328f15e49a67954305714a44a8866541f0f6faf4c113b876a5b8ed5b28872f30e
@@ -4,7 +4,7 @@ module MnUtilsGlobal
4
4
  class Gui
5
5
 
6
6
  def self.render_component(component)
7
- Rails.cache.fetch("gui-component-#{component}", expires_in: 1.hour) do
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("ViewHelper::render_gui_component error #{e.backtrace}")
22
+ logger.error e.message
23
+ logger.error e.backtrace.join("\n")
23
24
  return ''
24
25
  end
25
26
 
@@ -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
- ssl_params: {
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 "****** failed redis with url #{ENV['MN_REDIS_URL']}"
98
- @logger.error e.message
99
- @logger.error e.backtrace.join("\n")
95
+ @logger.error e
100
96
  nil
101
97
  end
102
98
 
@@ -1,3 +1,3 @@
1
1
  module MnUtilsGem
2
- VERSION = "1.15.4"
2
+ VERSION = "1.15.5"
3
3
  end
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
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-05-30 00:00:00.000000000 Z
11
+ date: 2019-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gelf