diff --git a/.rubocop.yml b/.rubocop.yml index 431b08ff..ac0ce379 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,7 +4,6 @@ AllCops: Include: - lib/**/*.rb Exclude: - - exe/jekyll - lib/jekyll/collection.rb - lib/jekyll/command.rb - lib/jekyll/configuration.rb diff --git a/exe/jekyll b/exe/jekyll index 43364b99..997c64b0 100755 --- a/exe/jekyll +++ b/exe/jekyll @@ -1,10 +1,10 @@ #!/usr/bin/env ruby STDOUT.sync = true -$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w( .. lib )) +$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w( .. lib ))) -require 'jekyll' -require 'mercenary' +require "jekyll" +require "mercenary" Jekyll::PluginManager.require_from_bundler @@ -12,22 +12,26 @@ Jekyll::Deprecator.process(ARGV) Mercenary.program(:jekyll) do |p| p.version Jekyll::VERSION - p.description 'Jekyll is a blog-aware, static site generator in Ruby' - p.syntax 'jekyll [options]' + p.description "Jekyll is a blog-aware, static site generator in Ruby" + p.syntax "jekyll [options]" - p.option 'source', '-s', '--source [DIR]', 'Source directory (defaults to ./)' - p.option 'destination', '-d', '--destination [DIR]', 'Destination directory (defaults to ./_site)' - p.option 'safe', '--safe', 'Safe mode (defaults to false)' - p.option 'plugins_dir', '-p', '--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]', Array, 'Plugins directory (defaults to ./_plugins)' - p.option 'layouts_dir', '--layouts DIR', String, 'Layouts directory (defaults to ./_layouts)' - p.option 'profile', '--profile', 'Generate a Liquid rendering profile' + p.option "source", "-s", "--source [DIR]", "Source directory (defaults to ./)" + p.option "destination", "-d", "--destination [DIR]", + "Destination directory (defaults to ./_site)" + p.option "safe", "--safe", "Safe mode (defaults to false)" + p.option "plugins_dir", "-p", "--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]", Array, + "Plugins directory (defaults to ./_plugins)" + p.option "layouts_dir", "--layouts DIR", String, + "Layouts directory (defaults to ./_layouts)" + p.option "profile", "--profile", "Generate a Liquid rendering profile" Jekyll::External.require_if_present(Jekyll::External.blessed_gems) do |g| - cmd = g.split('-').last + cmd = g.split("-").last p.command(cmd.to_sym) do |c| c.syntax cmd c.action do - Jekyll.logger.abort_with "You must install the '#{g}' gem to use the 'jekyll #{cmd}' command." + Jekyll.logger.abort_with "You must install the '#{g}' gem" \ + " to use the 'jekyll #{cmd}' command." end end end