clean.rb passing rubocop
This commit is contained in:
parent
f2bad8524f
commit
6f89fd5f3f
|
@ -8,7 +8,6 @@ AllCops:
|
|||
- lib/jekyll/collection.rb
|
||||
- lib/jekyll/command.rb
|
||||
- lib/jekyll/commands/build.rb
|
||||
- lib/jekyll/commands/clean.rb
|
||||
- lib/jekyll/commands/doctor.rb
|
||||
- lib/jekyll/commands/help.rb
|
||||
- lib/jekyll/commands/new.rb
|
||||
|
|
|
@ -4,8 +4,9 @@ module Jekyll
|
|||
class << self
|
||||
def init_with_program(prog)
|
||||
prog.command(:clean) do |c|
|
||||
c.syntax 'clean [subcommand]'
|
||||
c.description 'Clean the site (removes site output and metadata file) without building.'
|
||||
c.syntax "clean [subcommand]"
|
||||
c.description "Clean the site
|
||||
(removes site output and metadata file) without building."
|
||||
|
||||
add_build_options(c)
|
||||
|
||||
|
@ -17,13 +18,13 @@ module Jekyll
|
|||
|
||||
def process(options)
|
||||
options = configuration_from_options(options)
|
||||
destination = options['destination']
|
||||
metadata_file = File.join(options['source'], '.jekyll-metadata')
|
||||
sass_cache = File.join(options['source'], '.sass-cache')
|
||||
destination = options["destination"]
|
||||
metadata_file = File.join(options["source"], ".jekyll-metadata")
|
||||
sass_cache = File.join(options["source"], ".sass-cache")
|
||||
|
||||
remove(destination, checker_func: :directory?)
|
||||
remove(metadata_file, checker_func: :file?)
|
||||
remove(sass_cache, checker_func: :directory?)
|
||||
remove(destination, :checker_func => :directory?)
|
||||
remove(metadata_file, :checker_func => :file?)
|
||||
remove(sass_cache, :checker_func => :directory?)
|
||||
end
|
||||
|
||||
def remove(filename, checker_func: :file?)
|
||||
|
|
Loading…
Reference in New Issue