lib/tapioca/commands/dsl.rb in tapioca-0.10.1 vs lib/tapioca/commands/dsl.rb in tapioca-0.10.2

- old
+ new

@@ -1,11 +1,11 @@ # typed: strict # frozen_string_literal: true module Tapioca module Commands - class Dsl < Command + class Dsl < CommandWithoutTracker include SorbetHelper include RBIFilesHelper sig do params( @@ -19,11 +19,11 @@ quiet: T::Boolean, verbose: T::Boolean, number_of_workers: T.nilable(Integer), auto_strictness: T::Boolean, gem_dir: String, - rbi_formatter: RBIFormatter + rbi_formatter: RBIFormatter, ).void end def initialize( requested_constants:, outpath:, @@ -58,11 +58,11 @@ sig { void } def list_compilers Loaders::Dsl.load_application( tapioca_path: @tapioca_path, - eager_load: @requested_constants.empty? + eager_load: @requested_constants.empty?, ) pipeline = create_pipeline say("") @@ -84,11 +84,11 @@ sig { override.void } def execute Loaders::Dsl.load_application( tapioca_path: @tapioca_path, - eager_load: @requested_constants.empty? + eager_load: @requested_constants.empty?, ) if @should_verify say("Checking for out-of-date RBIs...") else @@ -110,11 +110,11 @@ compile_dsl_rbi( constant_name, contents, outpath: outpath, - quiet: @should_verify || (@quiet && !@verbose) + quiet: @should_verify || (@quiet && !@verbose), ) end processed_files.each { |filename| rbi_files_to_purge.delete(T.must(filename)) } @@ -131,11 +131,11 @@ validate_rbi_files( command: default_command(:dsl, @requested_constants.join(" ")), gem_dir: @gem_dir, dsl_dir: @outpath.to_s, auto_strictness: @auto_strictness, - compilers: pipeline.active_compilers + compilers: pipeline.active_compilers, ) end say("All operations performed in working directory.", [:green, :bold]) say("Please review changes and commit them.", [:green, :bold]) @@ -151,11 +151,11 @@ requested_compilers: constantize_compilers(@only), excluded_compilers: constantize_compilers(@exclude), error_handler: ->(error) { say_error(error, :bold, :red) }, - number_of_workers: @number_of_workers + number_of_workers: @number_of_workers, ) end sig { params(requested_constants: T::Array[String], path: Pathname).returns(T::Set[Pathname]) } def existing_rbi_filenames(requested_constants, path: @outpath) @@ -228,22 +228,22 @@ sig do params( constant_name: String, rbi: RBI::File, outpath: Pathname, - quiet: T::Boolean + quiet: T::Boolean, ).returns(T.nilable(Pathname)) end def compile_dsl_rbi(constant_name, rbi, outpath: @outpath, quiet: false) return if rbi.empty? filename = outpath / rbi_filename_for(constant_name) @rbi_formatter.write_header!( rbi, generate_command_for(constant_name), - reason: "dynamic methods in `#{constant_name}`" + reason: "dynamic methods in `#{constant_name}`", ) if @file_header rbi_string = @rbi_formatter.print_file(rbi) create_file(filename, rbi_string, verbose: !quiet) @@ -326,10 +326,10 @@ build_error_for_files(cause, diff_for_cause.map(&:first)) end.join("\n") raise Thor::Error, <<~ERROR #{set_color("RBI files are out-of-date. In your development environment, please run:", :green)} - #{set_color("`#{default_command(command)}`", [:green, :bold])} + #{set_color("`#{default_command(command)}`", :green, :bold)} #{set_color("Once it is complete, be sure to commit and push any changes", :green)} #{set_color("Reason:", :red)} #{reasons} ERROR