lib/settings.rb in inqlude-0.0.3 vs lib/settings.rb in inqlude-0.0.4
- old
+ new
@@ -14,12 +14,12 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
class Settings
- def manifest_dir
- local_dir "manifests"
+ def manifest_path
+ local_path "manifests"
end
def cache_dir
local_dir "cache"
end
@@ -28,13 +28,17 @@
Inqlude::VERSION
end
private
- def local_dir dirname
+ def local_path dirname
home = ENV["HOME"] + "/.inqlude/"
Dir::mkdir home unless File.exists? home
- path = home + dirname
+ home + dirname
+ end
+
+ def local_dir dirname
+ path = local_path dirname
Dir::mkdir path unless File.exists? path
path
end
end