lib/pennyworth/cli.rb in pennyworth-6.3.0 vs lib/pennyworth/cli.rb in pennyworth-7.0.0
- old
+ new
@@ -68,21 +68,23 @@
elsif options.snakecase? then say(value.snakecase)
elsif options.size? then say(value.size)
else say("Type 'pennyworth help string' for usage.")
end
end
+ # rubocop:enable Metrics/CyclomaticComplexity
+ # rubocop:enable Metrics/PerceivedComplexity
desc "-i, [--install]", "Install Alfred Workflows."
map %w[-i --install] => :install
- # rubocop:disable Metrics/LineLength
def install
say
alfred_settings_root = self.class.configuration.to_h[:alfred_settings_root]
if valid_file?(alfred_settings_root, "Invalid directory for Alfred settings root")
- if yes? "Installing Alfred Workflows will destroy exiting workflows of the same name. Continue (y/n)?"
+ if yes? "Installing Alfred Workflows will destroy exiting, identical, workflows. " \
+ "Continue (y/n)?"
say_status :info, "Installing Alfred Workflows...", :green
workflows = Dir.glob File.join(self.class.source_root, "workflows", "**")
alfred_workflows_root = File.join alfred_settings_root, "workflows"
workflows.each do |workflow|
@@ -133,6 +135,7 @@
map %w[-h --help] => :help
def help task = nil
say and super
end
end
+ # rubocop:enable Metrics/ClassLength
end