docubot 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ module FileUtils
20
20
  end
21
21
 
22
22
  module DocuBot
23
- VERSION = '0.3'
23
+ VERSION = '0.3.3'
24
24
  DIR = File.expand_path( File.dirname( __FILE__ ) )
25
25
 
26
26
  TEMPLATE_DIR = DIR / 'docubot/templates'
@@ -26,6 +26,18 @@ class DocuBot::CHMWriter < DocuBot::HTMLWriter
26
26
  process.Terminate if process.CommandLine.include? @chm_path.gsub('/','\\')
27
27
  end
28
28
  end
29
+
30
+ # Help find hhc.exe
31
+ possible_hhc_spots = [ "C:\\Program Files\\HTML Help Workshop", "C:\\Program Files (x86)\\HTML Help Workshop" ]
32
+ path_directories = ENV['PATH'].split(';').concat( possible_hhc_spots )
33
+ ENV['PATH'] = path_directories.join(';')
34
+ unless path_directories.any?{ |dir| File.exists?( File.join(dir, 'hhc.exe' ) ) }
35
+ warn "Cannot find hhc.exe in your PATH or the standard install spots.\nDid you install HTML Help Workshop?"
36
+ FileUtils.rm( [ @hhc, @hhp, @hhk ] )
37
+ FileUtils.rm_r( @html_path )
38
+ exit 1
39
+ end
40
+
29
41
  `hhc.exe "#{FileUtils.win_path @hhp}"`.gsub( /[\r\n]+/, "\n" )
30
42
  puts "...%.2fs to create the CHM" % (Time.now-lap)
31
43
  lap = Time.now
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docubot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Kistner