lib/tapioca/cli.rb in tapioca-0.10.2 vs lib/tapioca/cli.rb in tapioca-0.10.3

- old
+ new

@@ -7,10 +7,12 @@ include ConfigHelper include EnvHelper FILE_HEADER_OPTION_DESC = "Add a \"This file is generated\" header on top of each generated RBI file" + check_unknown_options! + class_option :config, aliases: ["-c"], banner: "<config file path>", type: :string, desc: "Path to the Tapioca configuration file", @@ -119,10 +121,14 @@ option :list_compilers, aliases: ["-l"], type: :boolean, desc: "List all loaded compilers", default: false + option :app_root, + type: :string, + desc: "The path to the Rails application", + default: "." def dsl(*constants) set_environment(options) command = Commands::Dsl.new( requested_constants: constants, @@ -134,10 +140,11 @@ should_verify: options[:verify], quiet: options[:quiet], verbose: options[:verbose], number_of_workers: options[:workers], rbi_formatter: rbi_formatter(options), + app_root: options[:app_root], ) Tapioca.silence_warnings do if options[:list_compilers] command.list_compilers @@ -277,11 +284,14 @@ annotations_rbi_dir: options[:annotations_rbi_dir], todo_rbi_file: options[:todo_rbi_file], payload: options[:payload], number_of_workers: options[:workers], ) - command.execute + + Tapioca.silence_warnings do + command.execute + end end desc "annotations", "Pull gem RBI annotations from remote sources" option :sources, type: :array, default: [CENTRAL_REPO_ROOT_URI], desc: "URIs of the sources to pull gem RBI annotations from" @@ -303,10 +313,13 @@ central_repo_root_uris: options[:sources], auth: options[:auth], netrc_file: netrc_file(options), typed_overrides: options[:typed_overrides], ) - command.execute + + Tapioca.silence_warnings do + command.execute + end end map ["--version", "-v"] => :__print_version desc "--version, -v", "show version"