lib/pdk/cli/console.rb in pdk-2.6.1 vs lib/pdk/cli/console.rb in pdk-2.7.0

- old
+ new

@@ -1,18 +1,18 @@ module PDK::CLI @console_cmd = @base_cmd.define_command do name 'console' - usage _('console [console_options]') - summary _('(Experimental) Start a session of the puppet debugger console.') + usage 'console [console_options]' + summary '(Experimental) Start a session of the puppet debugger console.' default_subcommand 'help' - description _(<<-EOF + description <<-EOF The pdk console runs a interactive session of the puppet debugger tool to test out snippets of code, run language evaluations, datatype prototyping and much more. A virtual playground for your puppet code! For usage details see the puppet debugger docs at https://docs.puppet-debugger.com. EOF - ) + PDK::CLI.puppet_version_options(self) PDK::CLI.puppet_dev_option(self) # we have to skip option parsing because it is expected the user # will be passing additional args that are passed to the debugger skip_option_parsing @@ -21,11 +21,11 @@ run do |_opts, args, _cmd| require 'pdk/cli/util' require 'pdk/util' PDK::CLI::Util.ensure_in_module!( - message: _('Console can only be run from inside a valid module directory'), + message: 'Console can only be run from inside a valid module directory', log_level: :fatal, ) PDK::CLI::Util.module_version_check @@ -76,18 +76,18 @@ lock_file_path = PDK::Util::Bundler::BundleHelper.new.gemfile_lock PDK.logger.debug("Checking lockfile #{lock_file_path} for #{gem_name}") lock_file = ::Bundler::LockfileParser.new(::Bundler.read_file(lock_file_path)) !lock_file.specs.find { |spec| spec.name.eql?(gem_name) }.nil? rescue ::Bundler::GemfileNotFound => e - PDK.logger.debug _(e.message) + PDK.logger.debug e.message false end def check_fixtures_dir existing_path = base_module_path.split(':').find do |path| PDK::Util::Filesystem.directory?(path) && Dir.entries(path).length > 2 end - PDK.logger.warn _('Module fixtures not found, please run pdk bundle exec rake spec_prep.') unless existing_path + PDK.logger.warn 'Module fixtures not found, please run pdk bundle exec rake spec_prep.' unless existing_path end # @return [Array] - array of split options [{:"puppet-version"=>"6.9.0"}, ['--loglevel=debug']] # options are for the pdk and debugger pass through def process_opts(opts)