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
85cfae9c
Commit
85cfae9c
authored
Jul 28, 2013
by
Ian Ynda-Hummel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move config.yml path back to cocoapods dir.
parent
921fcee3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
config.rb
lib/cocoapods/config.rb
+7
-1
config_spec.rb
spec/unit/config_spec.rb
+10
-0
No files found.
lib/cocoapods/config.rb
View file @
85cfae9c
...
@@ -132,6 +132,12 @@ module Pod
...
@@ -132,6 +132,12 @@ module Pod
# @!group Paths
# @!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.
# @return [Pathname] the directory where the CocoaPods sources are stored.
#
#
def
repos_dir
def
repos_dir
...
@@ -261,7 +267,7 @@ module Pod
...
@@ -261,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
repo
s_dir
+
"config.yaml"
cocoapod
s_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 @
85cfae9c
...
@@ -15,6 +15,10 @@ module Pod
...
@@ -15,6 +15,10 @@ 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
@sut
.
cocoapods_dir
.
should
==
Pathname
.
new
(
"~/.cocoapods"
).
expand_path
end
it
"returns the path to the spec-repos dir"
do
it
"returns the path to the spec-repos dir"
do
@sut
.
repos_dir
.
should
==
Pathname
.
new
(
"~/.cocoapods/repos"
).
expand_path
@sut
.
repos_dir
.
should
==
Pathname
.
new
(
"~/.cocoapods/repos"
).
expand_path
end
end
...
@@ -26,6 +30,12 @@ module Pod
...
@@ -26,6 +30,12 @@ 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
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
it
"allows to specify the repos dir with an environment variable"
do
ENV
[
'CP_REPOS_DIR'
]
=
'~/custom_repos_dir'
ENV
[
'CP_REPOS_DIR'
]
=
'~/custom_repos_dir'
@sut
.
repos_dir
.
should
==
Pathname
.
new
(
"~/custom_repos_dir"
).
expand_path
@sut
.
repos_dir
.
should
==
Pathname
.
new
(
"~/custom_repos_dir"
).
expand_path
...
...
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