Skip to content

Commit

Permalink
Appease Standard.rb
Browse files Browse the repository at this point in the history
Use parentheses for ternary expressions with complex conditions.

NOTE: I didn't change these lines, but I think an update to Standard is
catching these lingering lint violations?
  • Loading branch information
stevenharman committed Jun 15, 2023
1 parent 075e043 commit 1a880cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/dotenv/missing_keys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/dotenv/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1a880cd

Please sign in to comment.