lib/tapioca/config.rb in tapioca-0.4.0 vs lib/tapioca/config.rb in tapioca-0.4.1
- old
+ new
@@ -10,28 +10,33 @@
const(:postrequire, String)
const(:generate_command, String)
const(:exclude, T::Array[String])
const(:typed_overrides, T::Hash[String, String])
const(:todos_path, String)
+ const(:generators, T::Array[String])
sig { returns(Pathname) }
def outpath
@outpath = T.let(@outpath, T.nilable(Pathname))
@outpath ||= Pathname.new(outdir)
end
private_class_method :new
- CONFIG_FILE_PATH = "sorbet/tapioca/config.yml"
- SORBET_CONFIG = "sorbet/config"
+ SORBET_PATH = T.let("sorbet", String)
+ SORBET_CONFIG = T.let("#{SORBET_PATH}/config", String)
+ TAPIOCA_PATH = T.let("#{SORBET_PATH}/tapioca", String)
+ TAPIOCA_CONFIG = T.let("#{TAPIOCA_PATH}/config.yml", String)
- DEFAULT_POSTREQUIRE = "sorbet/tapioca/require.rb"
- DEFAULT_RBIDIR = "sorbet/rbi"
- DEFAULT_OUTDIR = T.let("#{DEFAULT_RBIDIR}/gems", String)
+ DEFAULT_POSTREQUIRE = T.let("#{TAPIOCA_PATH}/require.rb", String)
+ DEFAULT_RBIDIR = T.let("#{SORBET_PATH}/rbi", String)
+ DEFAULT_DSLDIR = T.let("#{DEFAULT_RBIDIR}/dsl", String)
+ DEFAULT_GEMDIR = T.let("#{DEFAULT_RBIDIR}/gems", String)
+ DEFAULT_TODOSPATH = T.let("#{DEFAULT_RBIDIR}/todo.rbi", String)
+
DEFAULT_OVERRIDES = T.let({
# ActiveSupport overrides some core methods with different signatures
# so we generate a typed: false RBI for it to suppress errors
"activesupport" => "false",
}.freeze, T::Hash[String, String])
- DEFAULT_TODOSPATH = T.let("#{DEFAULT_RBIDIR}/todo.rbi", String)
end
end