lib/tapioca/cli.rb in tapioca-0.11.6 vs lib/tapioca/cli.rb in tapioca-0.11.7

- old
+ new

@@ -128,10 +128,14 @@ default: false option :app_root, type: :string, desc: "The path to the Rails application", default: "." + option :halt_upon_load_error, + type: :boolean, + desc: "Halt upon a load error while loading the Rails application", + default: true def dsl(*constant_or_paths) set_environment(options) # Assume anything starting with a capital letter or colon is a class, otherwise a path constants, paths = constant_or_paths.partition { |c| c =~ /\A[A-Z:]/ } @@ -148,10 +152,11 @@ quiet: options[:quiet], verbose: options[:verbose], number_of_workers: options[:workers], rbi_formatter: rbi_formatter(options), app_root: options[:app_root], + halt_upon_load_error: options[:halt_upon_load_error], ) Tapioca.silence_warnings do if options[:list_compilers] command.list_compilers @@ -233,10 +238,14 @@ option :environment, aliases: ["-e"], type: :string, desc: "The Rack/Rails environment to use when generating RBIs", default: DEFAULT_ENVIRONMENT + option :halt_upon_load_error, + type: :boolean, + desc: "Halt upon a load error while loading the Rails application", + default: true def gem(*gems) Tapioca.silence_warnings do set_environment(options) all = options[:all] @@ -255,9 +264,10 @@ 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), + halt_upon_load_error: options[:halt_upon_load_error], ) raise MalformattedArgumentError, "Options '--all' and '--verify' are mutually exclusive" if all && verify unless gems.empty?