lib/lurker/cli.rb in lurker-0.6.0 vs lib/lurker/cli.rb in lurker-0.6.1

- old
+ new

@@ -1,9 +1,7 @@ require 'thor' require 'execjs' -require 'pdfkit' -# require 'coderay' require 'digest/sha1' require 'lurker/service' module Lurker # A Thor::Error to be thrown when an lurker directory is not found @@ -58,10 +56,11 @@ end end no_tasks do def convert_to_pdf + Lurker.safe_require('pdfkit') css = File.expand_path('application.css', self.class.precompiled_static_root) in_root do service_presenters.each do |service_presenter| html = "<html><body>" service_presenter.endpoints.each do |endpoint_prefix_group| @@ -202,10 +201,10 @@ def get_content(content_fname) return unless content_fname content_fname = File.expand_path(content_fname) if content_fname.ends_with? 'md' - require 'kramdown' + Lurker.safe_require('kramdown') Kramdown::Document.new(open(content_fname).read).to_html else '' end end