lib/tapioca/generator.rb in tapioca-0.2.0 vs lib/tapioca/generator.rb in tapioca-0.2.1

- old
+ new

@@ -6,10 +6,12 @@ module Tapioca class Generator < ::Thor::Shell::Color extend(T::Sig) + SORBET_CONFIG = "sorbet/config" + DEFAULT_POSTREQUIRE = "sorbet/tapioca/require.rb" DEFAULT_OUTDIR = "sorbet/rbi/gems" 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", @@ -36,10 +38,10 @@ ).void end def initialize(outdir: nil, prerequire: nil, postrequire: nil, command: nil, typed_overrides: nil) @outdir = T.let(Pathname.new(outdir || DEFAULT_OUTDIR), Pathname) @prerequire = T.let(prerequire, T.nilable(String)) - @postrequire = T.let(postrequire, T.nilable(String)) + @postrequire = T.let(postrequire || DEFAULT_POSTREQUIRE, T.nilable(String)) @command = T.let(command || default_command, String) @typed_overrides = T.let(typed_overrides || {}, T::Hash[String, String]) @bundle = T.let(nil, T.nilable(Gemfile)) @loader = T.let(nil, T.nilable(Loader)) @compiler = T.let(nil, T.nilable(Compilers::SymbolTableCompiler))