Commit 798459a2 authored by Ian Ynda-Hummel's avatar Ian Ynda-Hummel

Fix up some comments and add a missing test for config.

parent 0478e8bf
...@@ -132,7 +132,8 @@ module Pod ...@@ -132,7 +132,8 @@ module Pod
# @!group Paths # @!group Paths
# @return [Pathname] the directory where repos, templates and configuration files are stored. # @return [Pathname] the directory where repos, templates and configuration
# files are stored.
# #
def home_dir def home_dir
@home_dir ||= Pathname.new(ENV['CP_HOME_DIR'] || "~/.cocoapods").expand_path @home_dir ||= Pathname.new(ENV['CP_HOME_DIR'] || "~/.cocoapods").expand_path
...@@ -146,6 +147,9 @@ module Pod ...@@ -146,6 +147,9 @@ module Pod
attr_writer :repos_dir attr_writer :repos_dir
# @return [Pathname] the deprecated directory where the CocoaPods sources
# were stored.
#
def old_repos_dir def old_repos_dir
@old_repos_dir ||= Pathname.new('~/.cocoapods').expand_path @old_repos_dir ||= Pathname.new('~/.cocoapods').expand_path
end end
......
...@@ -260,6 +260,7 @@ module Pod ...@@ -260,6 +260,7 @@ module Pod
end end
# @return [Pathname] The path of the old master repo. # @return [Pathname] The path of the old master repo.
#
def old_master_repo_dir def old_master_repo_dir
config.old_repos_dir + 'master' config.old_repos_dir + 'master'
end end
......
...@@ -23,6 +23,10 @@ module Pod ...@@ -23,6 +23,10 @@ module Pod
@sut.repos_dir.should == Pathname.new("~/.cocoapods/repos").expand_path @sut.repos_dir.should == Pathname.new("~/.cocoapods/repos").expand_path
end end
it "returns the path to the deprecated spec-repos dir" do
@sut.repos_dir.should == Pathname.new("~/.cocoapods").expand_path
end
it "allows to specify whether the aggressive cache should be used with an environment variable" do it "allows to specify whether the aggressive cache should be used with an environment variable" do
@sut.aggressive_cache = false @sut.aggressive_cache = false
ENV['CP_AGGRESSIVE_CACHE'] = 'TRUE' ENV['CP_AGGRESSIVE_CACHE'] = 'TRUE'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment