lib/softcover/config.rb in softcover-0.9.12 vs lib/softcover/config.rb in softcover-0.9.13

- old
+ new

@@ -39,20 +39,24 @@ YAML::Store.new(file_path) end end def file_path - File.expand_path(self::PATH).tap do |path| - path.gsub!(/$/,"-test") if Softcover::test? + File.expand_path(path).tap do |full_path| + full_path.gsub!(/$/,"-test") if Softcover::test? end end end end class BookConfig < BaseConfig - PATH = ".softcover-book" + def self.path + ".softcover-book" + end end class Config < BaseConfig - PATH = "~/.softcover" + def self.path + File.exists?(".softcover") ? ".softcover" : "~/.softcover" + end end end \ No newline at end of file