lib/markdown_exec.rb in markdown_exec-1.8.9 vs lib/markdown_exec.rb in markdown_exec-2.0.0

- old
+ new

@@ -8,10 +8,11 @@ require 'fileutils' require 'open3' require 'optparse' require 'shellwords' require 'tmpdir' +# require 'tty-file' require 'tty-prompt' require 'yaml' require_relative 'ansi_formatter' require_relative 'block_label' @@ -23,10 +24,11 @@ require_relative 'exceptions' require_relative 'fcb' require_relative 'filter' require_relative 'fout' require_relative 'hash_delegator' +require_relative 'input_sequencer' require_relative 'markdown_exec/version' require_relative 'mdoc' require_relative 'option_value' require_relative 'saved_assets' require_relative 'saved_files_matcher' @@ -101,11 +103,10 @@ module MarkdownExec include Exceptions ## # - # rubocop:disable Layout/LineLength # :reek:DuplicateMethodCall { allow_calls: ['block', 'item', 'lm', 'opts', 'option', '@options', 'required_blocks'] } # rubocop:enable Layout/LineLength # :reek:MissingSafeMethod { exclude: [ read_configuration_file! ] } # :reek:TooManyInstanceVariables ### temp # :reek:TooManyMethods ### temp @@ -291,18 +292,15 @@ end end ## position 1: block name (optional) # - block_name = rest.shift - @options[:block_name] = block_name if block_name.present? + @options[:block_name] = nil @options[:input_cli_rest] = @rest rescue FileMissingError warn_format('finalize_cli_argument_processing', "File missing -- #{$!}", { abort: true }) - # @options[:block_name] = '' - # @options[:filename] = '' - # exit 1 + exit 1 rescue StandardError error_handler('finalize_cli_argument_processing') end ## Sets up the options and returns the parsed arguments