lib/tapioca/commands/gem.rb in tapioca-0.9.2 vs lib/tapioca/commands/gem.rb in tapioca-0.9.3

- old
+ new

@@ -15,11 +15,10 @@ postrequire: String, typed_overrides: T::Hash[String, String], outpath: Pathname, file_header: T::Boolean, include_doc: T::Boolean, - include_loc: T::Boolean, include_exported_rbis: T::Boolean, number_of_workers: T.nilable(Integer), auto_strictness: T::Boolean, dsl_dir: String, rbi_formatter: RBIFormatter @@ -32,11 +31,10 @@ postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, - include_loc:, include_exported_rbis:, number_of_workers: nil, auto_strictness: true, dsl_dir: DEFAULT_DSL_DIR, rbi_formatter: DEFAULT_RBI_FORMATTER @@ -58,11 +56,10 @@ @loader = T.let(nil, T.nilable(Runtime::Loader)) @bundle = T.let(nil, T.nilable(Gemfile)) @existing_rbis = T.let(nil, T.nilable(T::Hash[String, String])) @expected_rbis = T.let(nil, T.nilable(T::Hash[String, String])) @include_doc = T.let(include_doc, T::Boolean) - @include_loc = T.let(include_loc, T::Boolean) @include_exported_rbis = include_exported_rbis end sig { override.void } def execute @@ -95,16 +92,16 @@ else say("No operations performed, all RBIs are up-to-date.", [:green, :bold]) end end - sig { params(should_verify: T::Boolean, exclude: T::Array[String]).void } - def sync(should_verify: false, exclude: []) + sig { params(should_verify: T::Boolean).void } + def sync(should_verify: false) if should_verify say("Checking for out-of-date RBIs...") say("") - perform_sync_verification(exclude: exclude) + perform_sync_verification return end anything_done = [ perform_removals, @@ -183,11 +180,11 @@ @rbi_formatter.write_header!(rbi, default_command(:gem, gem.name), reason: "types exported from the `#{gem.name}` gem",) if @file_header - rbi.root = Tapioca::Gem::Pipeline.new(gem, include_doc: @include_doc, include_loc: @include_loc).compile + rbi.root = Tapioca::Gem::Pipeline.new(gem, include_doc: @include_doc).compile merge_with_exported_rbi(gem, rbi) if @include_exported_rbis if rbi.empty? @rbi_formatter.write_empty_body_comment!(rbi) @@ -202,16 +199,14 @@ T.unsafe(Pathname).glob((@outpath / "#{gem.name}@*.rbi").to_s) do |file| remove_file(file) unless file.basename.to_s == gem.rbi_file_name end end - sig { params(exclude: T::Array[String]).void } - def perform_sync_verification(exclude: []) + sig { void } + def perform_sync_verification diff = {} removed_rbis.each do |gem_name| - next if exclude.include?(gem_name) - filename = existing_rbi(gem_name) diff[filename] = :removed end added_rbis.each do |gem_name|