Skip to content

Commit

Permalink
Coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Feb 2, 2024
1 parent 39c99a7 commit 11428e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@ Style/HashTransformKeys:

Style/HashTransformValues:
Enabled: true

Gemspec/DevelopmentDependencies:
Enabled: false

Gemspec/RequireMFA:
Enabled: false
12 changes: 5 additions & 7 deletions lib/active_settings/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ def reload_env
end
# rubocop:enable Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity

# rubocop:disable Security/YAMLLoad
def load_yaml_file(file)
begin
YAML.load(ERB.new(File.read(file)).result, aliases: true).to_hash
rescue ArgumentError => e
YAML.load(ERB.new(File.read(file)).result).to_hash
end
YAML.load(ERB.new(File.read(file)).result, aliases: true).to_hash
rescue ArgumentError
YAML.load(ERB.new(File.read(file)).result).to_hash
end
# rubocop:enable Security/YAMLLoad

def method_missing(name, *args, &block)
instance.send(name, *args, &block)
Expand Down Expand Up @@ -133,11 +133,9 @@ def build_namespace_file_path(file, namespace)
end


# rubocop:disable Security/YAMLLoad
def load_yaml_file(file)
self.class.load_yaml_file(file)
end
# rubocop:enable Security/YAMLLoad


def reload_env!
Expand Down

0 comments on commit 11428e9

Please sign in to comment.