From febc82fe5e1d699f99cb38ee0ddce72e9ffcce9c Mon Sep 17 00:00:00 2001 From: Taico Aerts <t.v.aerts@tudelft.nl> Date: Fri, 9 Sep 2022 17:09:08 +0200 Subject: [PATCH] Fix rubocop errors The namespaced env cache breaks multiple rubocop rules with regards to using map on a hash-like object. However, the suggested fixes break the intention of the code. Therefore, I have added it to be ignored. --- .rubocop.yml | 1 + lib/namespaced_env_cache.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index f4552f1af..5e6705c20 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,6 +10,7 @@ AllCops: - 'db/**/*' - 'scripts/**/*' - 'bin/**/*' + - 'lib/namespaced_env_cache.rb' NewCops: enable SuggestExtensions: false diff --git a/lib/namespaced_env_cache.rb b/lib/namespaced_env_cache.rb index 211945125..af5130e70 100644 --- a/lib/namespaced_env_cache.rb +++ b/lib/namespaced_env_cache.rb @@ -71,6 +71,7 @@ module QPixel end private + def construct_ns_key(key, include_community: true) c_id = RequestContext.community_id if include_community "#{Rails.env}://#{[c_id, key].compact.join('/')}" -- GitLab