Skip to content

Commit

Permalink
don't include FileTest in top-level, fixes rtomayko#45
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomayko committed May 23, 2011
1 parent 61d84c8 commit 9e88a39
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rocco.rb
Expand Up @@ -52,8 +52,7 @@

# 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

Expand Down Expand Up @@ -159,7 +158,7 @@ def to_html
# 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
Expand Down

0 comments on commit 9e88a39

Please sign in to comment.