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