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