Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #39 from eee-c/test-fixes

Images test fixes
  • Loading branch information...
commit 83a3b8cbe18c05d1d26f20e9142e5aadd5c69d89 2 parents 34ff9bd + 65b6c02
@matthewmccullough matthewmccullough authored
View
12 lib/git-scribe/generate.rb
@@ -165,7 +165,7 @@ def do_site
page_template = liquid_template('page.html')
# write the index page
- main_data = {
+ main_data = {
'book_title' => book_title,
'sections' => sections
}
@@ -175,7 +175,7 @@ def do_site
# write the title page
File.open('title.html', 'w+') do |f|
- data = {
+ data = {
'title' => sections.first['title'],
'sub' => sections.first['sub'],
'prev' => {'link' => 'index.html', 'title' => "Main"},
@@ -204,7 +204,7 @@ def do_site
if i <= sections.size
next_section = sections[i+1]
end
- data = {
+ data = {
'title' => section['title'],
'sub' => section['sub'],
'prev' => sections[i-1],
@@ -241,7 +241,7 @@ def generate_toc_files
source.scan(/\<h([2|3]) id=\"(.*?)\"\>(.*?)\<\/h[2|3]\>/).each do |header|
sec = {'id' => header[1], 'name' => header[2]}
- if header[0] == '2'
+ if header[0] == '2'
toc << {'section' => sec, 'subsections' => []}
else
toc[toc.size - 1]['subsections'] << sec
@@ -310,7 +310,7 @@ def generate_toc_files
File.open('book.opf', 'w+') do |f|
lang = @config['language'] || 'en'
author = @config['author'] || 'Author'
- cover = @config['cover'] || 'image/cover.jpg'
+ cover = @config['cover'] || 'images/cover.jpg'
data = {'title' => book_title,
'language' => lang,
'author' => author,
@@ -344,7 +344,7 @@ def ex(command)
def windows?
RbConfig::CONFIG['host_os'] =~ /mswin|windows|mingw|cygwin/i
end
-
+
def classpath_delimiter
if windows?
";"
View
4 template/book/book.asc
@@ -13,7 +13,7 @@ This is where the first chapter of the book might go. Each chapter
will be under a seperate heading like that. Images can be embedded
in the book like this:
-image::image/octocat_professor.png[description]
+image::images/octocat_professor.png[description]
=== Subsection one
@@ -51,7 +51,7 @@ if n < 0: print 'Hello World!'
=== Splitting up the book
Now, if you prefer to write so that each chapter is in a seperate file,
-which is probably a good idea, you can instead have each chapter as
+which is probably a good idea, you can instead have each chapter as
another file and then simply add include lines in this file. Here is
what including another chapter looks like:
View
4 test/gen_test.rb
@@ -36,7 +36,7 @@
assert_equal 'book.html', file
out = Dir.glob('output/**/*')
assert out.include? 'output/book.html'
- assert out.include? 'output/image'
+ assert out.include? 'output/images'
assert out.include? 'output/stylesheets/scribe.css'
end
end
@@ -51,7 +51,7 @@
assert out.include? 'output/index.html'
assert out.include? 'output/the_first_chapter.html'
assert out.include? 'output/the_second_chapter.html'
- assert out.include? 'output/image'
+ assert out.include? 'output/images'
assert out.include? 'output/stylesheets/scribe.css'
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.