lib/runeblog.rb in runeblog-0.0.2 vs lib/runeblog.rb in runeblog-0.0.3

- old
+ new

@@ -1,8 +1,10 @@ class RuneBlog - VERSION = "0.0.2" + VERSION = "0.0.3" + + Path = File.expand_path(File.join(File.dirname(__FILE__))) end # FIXME lots of structure changes require 'yaml' @@ -78,9 +80,17 @@ dirs = Dir.entries("#{root}/views/") - %w[. ..] dirs.reject! {|x| ! File.directory?("#{root}/views/#{x}") } @config.root = root @config.views = dirs @config.sequence = File.read(root + "/sequence").to_i +rescue + STDERR.puts "No config file found. Create a new blog?" + resp = gets.chomp + if resp.downcase == "y" + blog_new! + STDERR.puts "Created. Now run again." + end + exit end ### create_empty_post def create_empty_post