lib/nanoc/cli/commands/deploy.rb in nanoc-3.7.4 vs lib/nanoc/cli/commands/deploy.rb in nanoc-3.7.5
- old
+ new
@@ -4,27 +4,25 @@
summary 'deploy the compiled site'
description "
Deploys the compiled site. The compiled site contents in the output directory will be uploaded to the destination, which is specified using the `--target` option.
"
-option :t, :target, 'specify the location to deploy to (default: `default`)', :argument => :required
+option :t, :target, 'specify the location to deploy to (default: `default`)', argument: :required
flag :C, :'no-check', 'do not run the issue checks marked for deployment'
flag :L, :list, 'list available locations to deploy to'
flag :D, :'list-deployers', 'list available deployers'
option :n, :'dry-run', 'show what would be deployed'
module Nanoc::CLI::Commands
-
class Deploy < ::Nanoc::CLI::CommandRunner
-
def run
load_site
# List deployers
if options[:'list-deployers']
deployers = Nanoc::PluginRegistry.instance.find_all(Nanoc::Extra::Deployer)
- deployer_names = deployers.keys.sort_by { |k| k.to_s }
+ deployer_names = deployers.keys.sort_by(&:to_s)
puts 'Available deployers:'
deployer_names.each do |name|
puts " #{name}"
end
return
@@ -83,14 +81,12 @@
# Run
deployer = deployer_class.new(
site.config[:output_dir],
config,
- :dry_run => options[:'dry-run'])
+ dry_run: options[:'dry-run'])
deployer.run
end
-
end
-
end
runner Nanoc::CLI::Commands::Deploy