avoid using FORMULA_RENAMES directly
This commit is contained in:
parent
571011ad59
commit
fe032e3e96
@ -245,8 +245,8 @@ class FormulaAuditor
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if FORMULA_RENAMES.key? name
|
if oldname = CoreFormulaRepository.instance.formula_renames[name]
|
||||||
problem "'#{name}' is reserved as the old name of #{FORMULA_RENAMES[name]}"
|
problem "'#{name}' is reserved as the old name of #{oldname}"
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ class Report
|
|||||||
next unless newname = Tap.fetch($1, $2).formula_renames[oldname]
|
next unless newname = Tap.fetch($1, $2).formula_renames[oldname]
|
||||||
else
|
else
|
||||||
oldname = path.basename(".rb").to_s
|
oldname = path.basename(".rb").to_s
|
||||||
next unless newname = FORMULA_RENAMES[oldname]
|
next unless newname = CoreFormulaRepository.instance.formula_renames[oldname]
|
||||||
end
|
end
|
||||||
|
|
||||||
if fetch(:A, []).include?(newpath = path.dirname.join("#{newname}.rb"))
|
if fetch(:A, []).include?(newpath = path.dirname.join("#{newname}.rb"))
|
||||||
|
@ -289,7 +289,7 @@ class Formulary
|
|||||||
return FormulaLoader.new(name, path)
|
return FormulaLoader.new(name, path)
|
||||||
end
|
end
|
||||||
|
|
||||||
if newref = FORMULA_RENAMES[ref]
|
if newref = CoreFormulaRepository.instance.formula_renames[ref]
|
||||||
formula_with_that_oldname = core_path(newref)
|
formula_with_that_oldname = core_path(newref)
|
||||||
if formula_with_that_oldname.file?
|
if formula_with_that_oldname.file?
|
||||||
return FormulaLoader.new(newref, formula_with_that_oldname)
|
return FormulaLoader.new(newref, formula_with_that_oldname)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user