Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
43d71e2e
Commit
43d71e2e
authored
Jul 29, 2013
by
Ian Ynda-Hummel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename cocoapods_dir to home_dir
parent
726799b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
config.rb
lib/cocoapods/config.rb
+3
-3
config_spec.rb
spec/unit/config_spec.rb
+6
-6
No files found.
lib/cocoapods/config.rb
View file @
43d71e2e
...
@@ -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.
...
...
spec/unit/config_spec.rb
View file @
43d71e2e
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment