From 10081be705c2658c3ff670e2580997dc87f51065 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Sat, 20 Jan 2024 07:19:53 -0500 Subject: [PATCH] Fix lint errors --- lib/dotenv/cli.rb | 2 +- lib/dotenv/missing_keys.rb | 2 +- lib/dotenv/template.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dotenv/cli.rb b/lib/dotenv/cli.rb index 1a586a51..4d3b6f48 100644 --- a/lib/dotenv/cli.rb +++ b/lib/dotenv/cli.rb @@ -13,7 +13,7 @@ def initialize(argv = []) @filenames = [] @overload = false - super "Usage: dotenv [options]" + super("Usage: dotenv [options]") separator "" on("-f FILES", Array, "List of env files to parse") do |list| diff --git a/lib/dotenv/missing_keys.rb b/lib/dotenv/missing_keys.rb index ecedcbf6..ad6110b8 100644 --- a/lib/dotenv/missing_keys.rb +++ b/lib/dotenv/missing_keys.rb @@ -3,7 +3,7 @@ class Error < StandardError; end class MissingKeys < Error # :nodoc: def initialize(keys) - key_word = "key#{keys.size > 1 ? "s" : ""}" + key_word = "key#{(keys.size > 1) ? "s" : ""}" super("Missing required configuration #{key_word}: #{keys.inspect}") end end diff --git a/lib/dotenv/template.rb b/lib/dotenv/template.rb index 1aa37a4b..ce42e36c 100644 --- a/lib/dotenv/template.rb +++ b/lib/dotenv/template.rb @@ -20,7 +20,7 @@ def template_line(line) var, value = line.split("=") template = var.gsub(EXPORT_COMMAND, "") is_a_comment = var.strip[0].eql?("#") - value.nil? || is_a_comment ? line : "#{var}=#{template}" + (value.nil? || is_a_comment) ? line : "#{var}=#{template}" end end end