lib/tapioca/cli.rb in tapioca-0.10.1 vs lib/tapioca/cli.rb in tapioca-0.10.2
- old
+ new
@@ -35,21 +35,21 @@
option :postrequire, type: :string, default: DEFAULT_POSTREQUIRE_FILE
def configure
command = Commands::Configure.new(
sorbet_config: SORBET_CONFIG_FILE,
tapioca_config: options[:config],
- default_postrequire: options[:postrequire]
+ default_postrequire: options[:postrequire],
)
command.execute
end
desc "require", "generate the list of files to be required by tapioca"
option :postrequire, type: :string, default: DEFAULT_POSTREQUIRE_FILE
def require
command = Commands::Require.new(
requires_path: options[:postrequire],
- sorbet_config_path: SORBET_CONFIG_FILE
+ sorbet_config_path: SORBET_CONFIG_FILE,
)
Tapioca.silence_warnings do
command.execute
end
end
@@ -64,11 +64,11 @@
desc: FILE_HEADER_OPTION_DESC,
default: true
def todo
command = Commands::Todo.new(
todo_file: options[:todo_file],
- file_header: options[:file_header]
+ file_header: options[:file_header],
)
Tapioca.silence_warnings do
command.execute
end
end
@@ -103,11 +103,12 @@
desc: "Suppresses file creation output",
default: false
option :workers,
aliases: ["-w"],
type: :numeric,
- desc: "Number of parallel workers to use when generating RBIs (default: auto)"
+ desc: "Number of parallel workers to use when generating RBIs (default: 2)",
+ default: 2
option :rbi_max_line_length,
type: :numeric,
desc: "Set the max line length of generated RBIs. Signatures longer than the max line length will be wrapped",
default: DEFAULT_RBI_MAX_LINE_LENGTH
option :environment,
@@ -132,11 +133,11 @@
tapioca_path: TAPIOCA_DIR,
should_verify: options[:verify],
quiet: options[:quiet],
verbose: options[:verbose],
number_of_workers: options[:workers],
- rbi_formatter: rbi_formatter(options)
+ rbi_formatter: rbi_formatter(options),
)
Tapioca.silence_warnings do
if options[:list_compilers]
command.list_compilers
@@ -239,11 +240,11 @@
include_loc: options[:loc],
include_exported_rbis: options[:exported_gem_rbis],
number_of_workers: options[:workers],
auto_strictness: options[:auto_strictness],
dsl_dir: options[:dsl_dir],
- rbi_formatter: rbi_formatter(options)
+ rbi_formatter: rbi_formatter(options),
)
raise MalformattedArgumentError, "Options '--all' and '--verify' are mutually exclusive" if all && verify
unless gems.empty?
@@ -267,20 +268,18 @@
option :annotations_rbi_dir, type: :string, desc: "Path to annotations RBIs", default: DEFAULT_ANNOTATIONS_DIR
option :todo_rbi_file, type: :string, desc: "Path to the generated todo RBI file", default: DEFAULT_TODO_FILE
option :payload, type: :boolean, desc: "Check shims against Sorbet's payload", default: true
option :workers, aliases: ["-w"], type: :numeric, desc: "Number of parallel workers (default: auto)"
def check_shims
- Tapioca.disable_traces
-
command = Commands::CheckShims.new(
gem_rbi_dir: options[:gem_rbi_dir],
dsl_rbi_dir: options[:dsl_rbi_dir],
shim_rbi_dir: options[:shim_rbi_dir],
annotations_rbi_dir: options[:annotations_rbi_dir],
todo_rbi_file: options[:todo_rbi_file],
payload: options[:payload],
- number_of_workers: options[:workers]
+ number_of_workers: options[:workers],
)
command.execute
end
desc "annotations", "Pull gem RBI annotations from remote sources"
@@ -302,10 +301,10 @@
command = Commands::Annotations.new(
central_repo_root_uris: options[:sources],
auth: options[:auth],
netrc_file: netrc_file(options),
- typed_overrides: options[:typed_overrides]
+ typed_overrides: options[:typed_overrides],
)
command.execute
end
map ["--version", "-v"] => :__print_version