lib/runeblog.rb in runeblog-0.1.5 vs lib/runeblog.rb in runeblog-0.1.6
- old
+ new
@@ -50,11 +50,11 @@
end
blog = self.new
blog.create_view("test_view")
rescue => err
puts "Can't create blog: '#{dir}' - #{err}" # CHANGE_FOR_CURSES?
- puts err.backtrace # CHANGE_FOR_CURSES?
+ puts err.backtrace.join("\n") # CHANGE_FOR_CURSES?
end
def initialize # assumes existing blog
# Crude - FIXME later -
# What views are there? Publishing, etc.
@@ -83,16 +83,16 @@
def view=(arg)
case arg
when RuneBlog::View
@view = arg
- @view.publisher = read_config(@view.dir + "/publish")
+ @view.publisher = RuneBlog::Publishing.new(read_config(@view.dir + "/publish"))
when String
new_view = str2view(arg)
raise NoSuchView(arg) if new_view.nil?
@view = new_view
- @view.publisher = read_config(@view.dir + "/publish")
+ @view.publisher = RuneBlog::Publishing.new(read_config(@view.dir + "/publish"))
else
raise CantAssignView(arg.class.to_s)
end
end
@@ -172,9 +172,10 @@
post.edit unless testing
post.build
post.num
rescue => err
puts err # error(err) # CHANGE_FOR_CURSES?
+ puts err.backtrace.join("\n") # CHANGE_FOR_CURSES?
end
def edit_initial_post(file, testing = false)
sourcefile = "#@root/src/#{file}"
result = system("#@editor #{sourcefile} +8") unless testing