chore: Enable the new Rubocop rules (#7122)

fixes: https://linear.app/chatwoot/issue/CW-1574/renable-the-disabled-rubocop-rules
This commit is contained in:
Sojan Jose
2023-05-19 14:37:10 +05:30
committed by GitHub
parent b988a01df3
commit 7ab7bac6bf
215 changed files with 609 additions and 608 deletions

View File

@@ -6,7 +6,7 @@ module Featurable
check_for_column: false
}.freeze
FEATURE_LIST = YAML.safe_load(File.read(Rails.root.join('config/features.yml'))).freeze
FEATURE_LIST = YAML.safe_load(Rails.root.join('config/features.yml').read).freeze
FEATURES = FEATURE_LIST.each_with_object({}) do |feature, result|
result[result.keys.size + 1] = "feature_#{feature['name']}".to_sym
@@ -46,7 +46,7 @@ module Featurable
end
def all_features
FEATURE_LIST.map { |f| f['name'] }.index_with do |feature_name|
FEATURE_LIST.pluck('name').index_with do |feature_name|
feature_enabled?(feature_name)
end
end