Commit 43d71e2e authored by Ian Ynda-Hummel's avatar Ian Ynda-Hummel

rename cocoapods_dir to home_dir

parent 726799b0
......@@ -134,8 +134,8 @@ module Pod
# @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
def home_dir
@home_dir ||= Pathname.new(ENV['CP_HOME_DIR'] || "~/.cocoapods").expand_path
end
# @return [Pathname] the directory where the CocoaPods sources are stored.
......@@ -267,7 +267,7 @@ module Pod
# @return [Pathname] The path of the file which contains the user settings.
#
def user_settings_file
cocoapods_dir + "config.yaml"
home_dir + "config.yaml"
end
# Sets the values of the attributes with the given hash.
......
......@@ -15,8 +15,8 @@ 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
it "returns the path to the home dir" do
@sut.home_dir.should == Pathname.new("~/.cocoapods").expand_path
end
it "returns the path to the spec-repos dir" do
......@@ -30,10 +30,10 @@ 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')
it "allows to specify the home dir with an environment variable" do
ENV['CP_HOME_DIR'] = '~/custom_home_dir'
@sut.cocoapods_dir.should == Pathname.new("~/custom_home_dir").expand_path
ENV.delete('CP_HOME_DIR')
end
it "allows to specify the repos dir with an environment variable" do
......
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