Commit 85cfae9c authored by Ian Ynda-Hummel's avatar Ian Ynda-Hummel

Move config.yml path back to cocoapods dir.

parent 921fcee3
......@@ -132,6 +132,12 @@ module Pod
# @!group Paths
# @return [Pathname] the directory where repos, templates and configuration files are stored.
#
def cocoapods_dir
@cocoapods_dir ||= Pathname.new(ENV['CP_COCOAPODS_DIR'] || "~/.cocoapods").expand_path
end
# @return [Pathname] the directory where the CocoaPods sources are stored.
#
def repos_dir
......@@ -261,7 +267,7 @@ module Pod
# @return [Pathname] The path of the file which contains the user settings.
#
def user_settings_file
repos_dir + "config.yaml"
cocoapods_dir + "config.yaml"
end
# Sets the values of the attributes with the given hash.
......
......@@ -15,6 +15,10 @@ module Pod
@sut.should.be.instance_of Config
end
it "returns the path to the cocoapods dir" do
@sut.cocoapods_dir.should == Pathname.new("~/.cocoapods").expand_path
end
it "returns the path to the spec-repos dir" do
@sut.repos_dir.should == Pathname.new("~/.cocoapods/repos").expand_path
end
......@@ -26,6 +30,12 @@ module Pod
ENV.delete('CP_AGGRESSIVE_CACHE')
end
it "allows to specify the cocoapods dir with an environment variable" do
ENV['CP_COCOAPODS_DIR'] = '~/custom_cocoapods_dir'
@sut.cocoapods_dir.should == Pathname.new("~/custom_cocoapods_dir").expand_path
ENV.delete('CP_COCOAPODS_DIR')
end
it "allows to specify the repos dir with an environment variable" do
ENV['CP_REPOS_DIR'] = '~/custom_repos_dir'
@sut.repos_dir.should == Pathname.new("~/custom_repos_dir").expand_path
......
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