Skip to content

Commit

Permalink
fix rubocop offenses in exe/jekyll
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtyF committed Jun 15, 2016
1 parent a9666bf commit c3313d8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ AllCops:
Include:
- lib/**/*.rb
Exclude:
- exe/jekyll
- lib/jekyll/collection.rb
- lib/jekyll/command.rb
- lib/jekyll/configuration.rb
Expand Down
30 changes: 17 additions & 13 deletions exe/jekyll
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,35 @@ STDOUT.sync = true

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w( .. lib ))

require 'jekyll'
require 'mercenary'
require "jekyll"
require "mercenary"

Jekyll::PluginManager.require_from_bundler

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 <subcommand> [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.description "Jekyll is a blog-aware, static site generator in Ruby"
p.syntax "jekyll <subcommand> [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"

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
Expand Down

0 comments on commit c3313d8

Please sign in to comment.