diff --git a/Library/Homebrew/dev-cmd/spdx.json b/Library/Homebrew/data/spdx.json similarity index 100% rename from Library/Homebrew/dev-cmd/spdx.json rename to Library/Homebrew/data/spdx.json diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index cebaa0766d..f2482be03a 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -111,8 +111,8 @@ module Homebrew # Check style in a single batch run up front for performance style_results = Style.check_style_json(style_files, options) if style_files # load licenses - path = File.join(File.dirname(__FILE__), "spdx.json") - spdx_ids = JSON.parse(File.open(File.expand_path(path)).read) + full_path = File.join(File.dirname(__FILE__), "../data/spdx.json") + spdx_ids = JSON.parse(File.open(full_path).read) new_formula_problem_lines = [] audit_formulae.sort.each do |f| only = only_cops ? ["style"] : args.only diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index 09ca81f4f1..91b1cc77ff 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -97,7 +97,7 @@ module Homebrew describe "#audit_license" do let(:spdx_ids) { - full_path = File.join(File.expand_path(File.dirname(__FILE__) + "../../../dev-cmd/"), "spdx.json") + full_path = File.join(File.expand_path(File.dirname(__FILE__) + "../../../data/"), "spdx.json") JSON.parse(File.open(full_path).read) }