dev-cmd/generate-*-api: don't use same constant name.

Otherwise Ruby warns.
This commit is contained in:
Mike McQuaid 2023-02-23 09:09:54 +00:00
parent 236208ff79
commit 2f47403f8c
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829
2 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ module Homebrew
end
end
JSON_TEMPLATE = <<~EOS
CASK_JSON_TEMPLATE = <<~EOS
---
layout: cask_json
---
@ -56,7 +56,7 @@ module Homebrew
json = JSON.pretty_generate(cask.to_hash_with_variations)
File.write("_data/cask/#{name}.json", "#{json}\n")
File.write("api/cask/#{name}.json", JSON_TEMPLATE)
File.write("api/cask/#{name}.json", CASK_JSON_TEMPLATE)
File.write("api/cask-source/#{name}.rb", path.read)
File.write("cask/#{name}.html", html_template(name))
end

View File

@ -22,7 +22,7 @@ module Homebrew
end
end
JSON_TEMPLATE = <<~EOS
FORMULA_JSON_TEMPLATE = <<~EOS
---
layout: formula_json
---
@ -57,7 +57,7 @@ module Homebrew
json = JSON.pretty_generate(formula.to_hash_with_variations)
File.write("_data/formula/#{name.tr("+", "_")}.json", "#{json}\n")
File.write("api/formula/#{name}.json", JSON_TEMPLATE)
File.write("api/formula/#{name}.json", FORMULA_JSON_TEMPLATE)
File.write("formula/#{name}.html", html_template(name))
end