lib/librarian/environment.rb in librarian-0.0.26 vs lib/librarian/environment.rb in librarian-0.1.0.beta.1
- old
+ new
@@ -10,10 +10,11 @@
require "librarian/logger"
require "librarian/specfile"
require "librarian/resolver"
require "librarian/dsl"
require "librarian/source"
+require "librarian/version"
module Librarian
class Environment
include Support::AbstractMethod
@@ -91,15 +92,20 @@
def resolver
Resolver.new(self)
end
+ def tmp_path
+ part = config_db["tmp"] || "tmp"
+ project_path.join(part)
+ end
+
def cache_path
- project_path.join("tmp/librarian/cache")
+ tmp_path.join("librarian/cache")
end
def scratch_path
- project_path.join("tmp/librarian/scratch")
+ tmp_path.join("librarian/scratch")
end
def project_relative_path_to(path)
Pathname.new(path).relative_path_from(project_path)
end