don't include FileTest in top-level, fixes #45

This commit is contained in:
Ryan Tomayko 2011-05-22 20:36:44 -07:00
parent 61d84c85c2
commit 9e88a3925c

View File

@ -52,8 +52,7 @@ require 'net/http'
# Code is run through [Pygments](http://pygments.org/) for syntax
# highlighting. If it's not installed, locally, use a webservice.
include FileTest
if !ENV['PATH'].split(':').any? { |dir| executable?("#{dir}/pygmentize") }
if !ENV['PATH'].split(':').any? { |dir| File.executable?("#{dir}/pygmentize") }
warn "WARNING: Pygments not found. Using webservice."
end
@ -159,7 +158,7 @@ class Rocco
# Returns `true` if `pygmentize` is available locally, `false` otherwise.
def pygmentize?
@_pygmentize ||= ENV['PATH'].split(':').
any? { |dir| executable?("#{dir}/pygmentize") }
any? { |dir| File.executable?("#{dir}/pygmentize") }
end
# If `pygmentize` is available, we can use it to autodetect a file's