Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix the messed up default file finder paths

  • Loading branch information...
commit 6c457b3eee72f51cddbbcad00f0f4c87baaa53e5 1 parent cdd6449
Scott Chacon authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/git-scribe.rb
10 lib/git-scribe.rb
View
@@ -7,6 +7,8 @@
class GitScribe
+ SCRIBE_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
+
def initialize(args)
@command = args.shift
@args = args
@@ -73,7 +75,9 @@ def prepare_output_dir
Dir.mkdir('output') rescue nil
Dir.chdir('output') do
Dir.mkdir('stylesheets') rescue nil
- from_stdir = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'stylesheets'))
+ puts SCRIBE_ROOT
+ from_stdir = File.join(SCRIBE_ROOT, 'stylesheets')
+ pp from_stdir
FileUtils.cp_r from_stdir, '.'
end
end
@@ -110,7 +114,7 @@ def local(file)
end
def base(file)
- File.expand_path(File.join(File.dirname(__FILE__), '..', '..', file))
+ File.join(SCRIBE_ROOT, file)
end
def do_epub
@@ -187,7 +191,7 @@ def do_site
content.gsub!(s['href'], s['link'])
end
- template_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'site', 'default'))
+ template_dir = File.join(SCRIBE_ROOT, 'site', 'default')
# copy the template files in
files = Dir.glob(template_dir + '/*')
Please sign in to comment.
Something went wrong with that request. Please try again.