lib/pdk/validate/tasks/name.rb in pdk-1.13.0 vs lib/pdk/validate/tasks/name.rb in pdk-1.14.0
- old
+ new
@@ -1,8 +1,6 @@
-require 'pdk'
require 'pdk/validate/base_validator'
-require 'pdk/util'
module PDK
module Validate
class Tasks
class Name < BaseValidator
@@ -24,16 +22,20 @@
targets: pattern,
}
end
def self.create_spinner(targets = [], options = {})
+ require 'pdk/cli/util'
+
return unless PDK::CLI::Util.interactive?
options = options.merge(PDK::CLI::Util.spinner_opts_for_platform)
exec_group = options[:exec_group]
@spinner = if exec_group
exec_group.add_spinner(spinner_text(targets), options)
else
+ require 'pdk/cli/util/spinner'
+
TTY::Spinner.new("[:spinner] #{spinner_text(targets)}", options)
end
@spinner.auto_spin
end