lib/runeblog.rb in runeblog-0.1.85 vs lib/runeblog.rb in runeblog-0.1.86

- old
+ new

@@ -13,11 +13,11 @@ class RuneBlog DotDir = ".blogs" ConfigFile = "config" - GemData = RuneBlog::Path + "/../themes" + Themes = RuneBlog::Path + "/../themes" make_exception(:FileNotFound, "File $1 was not found") make_exception(:BlogRepoAlreadyExists, "Blog repo $1 already exists") make_exception(:CantAssignView, "$1 is not a view") make_exception(:ViewAlreadyExists, "View $1 already exists") @@ -82,11 +82,10 @@ self.class.blog = self # Weird. Like a singleton - dumbass circular dependency? $_blog = self # Dumber still? @root = root_dir file = @root + "/" + ConfigFile -STDERR.puts "--- init: file = #{file}" errmsg = "No config file! file = #{file.inspect} dir = #{Dir.pwd}" raise errmsg unless File.exist?(file) @root, @view_name, @editor = read_config(file, :root, :current_view, :editor) md = Dir.pwd.match(%r[.*/views/(.*?)/]) @@ -178,23 +177,23 @@ create_dir(vdir) up = Dir.pwd Dir.chdir(vdir) x = RuneBlog::Default - create_dir('themes') +# create_dir('themes') + copy!("#{Themes}", "themes") create_dir('assets') create_dir('posts') create_dir('staging') create_dir('staging/assets') create_dir('remote') create_dir('remote/assets') - Dir.chdir("themes") { system("tar zxvf #{GemData}/standard.tgz >/dev/null 2>&1") } copy!("themes/standard/*", "staging/") copy("themes/standard/assets/*", "remote/assets/") - + pub = "user: xxx\nserver: xxx\ndocroot: xxx\npath: xxx\nproto: xxx\n" dump(pub, "publish") # Add to global.lt3 here? FIXME @@ -360,11 +359,10 @@ view_line = File.readlines(draft).grep(/^.views /) raise "More than one .views call!" if view_line.size > 1 raise "No .views call!" if view_line.size < 1 view_line = view_line.first views = view_line[7..-1].split -STDERR.puts "--- gv: #{views.inspect}" views end # Remember: A post in multiple views will trigger multiple # views needing to be rebuilt (and published) @@ -407,10 +405,9 @@ # Structure is borked? copy!("#{@theme}/*", "#{staging}") copy(lt3, staging) html = noext[5..-1] Dir.chdir(staging) do - STDERR.puts "--- gp: pwd = #{Dir.pwd} draft = #{draft} html = #{html}" livetext draft, html # link to POST?? copy html, "../remote" collect_recent_posts("recent.html") copy("recent.html", "../remote")