lib/caramelize/output_wiki/gollum.rb in caramelize-1.0.0 vs lib/caramelize/output_wiki/gollum.rb in caramelize-1.1.0
- old
+ new
@@ -1,5 +1,7 @@
+require 'gollum-lib'
+
module Caramelize
module OutputWiki
class Gollum
attr_reader :wiki_path
@@ -15,15 +17,15 @@
end
# Commit the given page into the gollum-wiki-repository.
# Make sure the target markup is correct before calling this method.
def commit_revision(page, markup)
- gollum_page = gollum.page(page.title)
+ gollum_page = gollum.page(page.path)
if gollum_page
gollum.update_page(gollum_page, gollum_page.name, gollum_page.format, page.body, build_commit(page))
else
- gollum.write_page(page.title, markup, page.body, build_commit(page))
+ gollum.write_page(page.path, markup, page.body, build_commit(page))
end
end
def rename_page(page_title, rename)
gollum_page = gollum.page(page_title)