lib/post.rb in runeblog-0.2.24 vs lib/post.rb in runeblog-0.2.25
- old
+ new
@@ -91,11 +91,11 @@
end
def edit
log!(enter: __method__)
verify(File.exist?(@draft) => "File #{@draft} not found")
- result = system("vi #@draft +8") # TODO improve this
+ result = system!("vi #@draft +8") # TODO improve this
raise EditorProblem(draft) unless result
nil
rescue => err
error(err)
end
@@ -134,10 +134,10 @@
fname = File.basename(draft)
noext = fname.sub(/.lt3$/, "")
vdir = @root/:views/view
dir = vdir/:posts/noext + "/"
Dir.mkdir(dir) unless Dir.exist?(dir)
- system("cp #{draft} #{dir}")
+ system!("cp #{draft} #{dir}")
viewdir, slugdir, aslug = vdir, dir, noext[5..-1]
theme = viewdir/:themes/:standard
[noext, viewdir, slugdir, aslug, theme]
end