lib/runeblog.rb in runeblog-0.1.71 vs lib/runeblog.rb in runeblog-0.1.73

- old
+ new

@@ -75,11 +75,10 @@ create_dir(dir) # New code goes here! Dir.chdir(dir) do create_dir("drafts") create_dir("views") -#??? create_dir("generated") #? create_dir("assets") new_sequence end blog = self.new blog.create_view(first_view) @@ -167,17 +166,18 @@ Dir.chdir(vdir) x = RuneBlog::Default create_dir('themes') # create_dir("local") create_dir("generated") - create_dir("generated/blog") create_dir('assets') Dir.chdir("themes") { system("tar zxvf #{GemData}/standard.tgz 2>/dev/null") } pub = "user: xxx\nserver: xxx\ndocroot: xxx\npath: xxx\nproto: xxx\n" dump(pub, "publish") +# Add to global.lt3 here? FIXME + view = RuneBlog::View.new(arg) self.view = view vdir = self.view.dir dir0 = "#{vdir}/themes/standard/blog" dir1 = "#{vdir}/generated/blog" @@ -210,13 +210,14 @@ tag = prefix(id) result = files.grep(/#{tag}-/) result end - def create_new_post(title, testing = false) + def create_new_post(title, testing = false, teaser: nil, body: nil) +# STDERR.puts "-- create_new_post: teaser = #{teaser.inspect} body = #{body.inspect}" save = Dir.pwd Dir.chdir(self.view.dir) - post = Post.create(title) + post = Post.create(title, teaser, body) post.edit unless testing meta = post.build Dir.chdir(save) meta.num rescue => err