lib/nanoc/cli/command_runner.rb in nanoc-3.7.3 vs lib/nanoc/cli/command_runner.rb in nanoc-3.7.4
- old
+ new
@@ -36,13 +36,14 @@
new(opts, args, cmd).call
end
# @return [Boolean] true if the current working directory is a nanoc site
# directory, false otherwise
- def is_in_site_dir?
+ def in_site_dir?
Nanoc::Site.cwd_is_nanoc_site?
end
+ alias_method :is_in_site_dir?, :in_site_dir?
# Asserts that the current working directory contains a site
# ({Nanoc::Site} instance). If no site is present, prints an error
# message and exits.
#
@@ -69,11 +70,11 @@
# @see Nanoc::CLI.debug?
def debug?
Nanoc::CLI.debug?
end
- protected
+ protected
# Sets the data source's VCS to the VCS with the given name. Does nothing
# when the site's data source does not support VCSes (i.e. does not
# implement #vcs=).
#
@@ -90,10 +91,10 @@
raise Nanoc::Errors::GenericTrivial, "A VCS named #{vcs_name} was not found"
end
site.data_sources.each do |data_source|
# Skip if not possible
- next if !data_source.respond_to?(:vcs=)
+ next unless data_source.respond_to?(:vcs=)
# Set VCS
data_source.vcs = vcs_class.new
end
end