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
798459a2
Commit
798459a2
authored
Jul 30, 2013
by
Ian Ynda-Hummel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up some comments and add a missing test for config.
parent
0478e8bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
config.rb
lib/cocoapods/config.rb
+5
-1
sources_manager.rb
lib/cocoapods/sources_manager.rb
+1
-0
config_spec.rb
spec/unit/config_spec.rb
+4
-0
No files found.
lib/cocoapods/config.rb
View file @
798459a2
...
@@ -132,7 +132,8 @@ module Pod
...
@@ -132,7 +132,8 @@ module Pod
# @!group Paths
# @!group Paths
# @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
home_dir
def
home_dir
@home_dir
||=
Pathname
.
new
(
ENV
[
'CP_HOME_DIR'
]
||
"~/.cocoapods"
).
expand_path
@home_dir
||=
Pathname
.
new
(
ENV
[
'CP_HOME_DIR'
]
||
"~/.cocoapods"
).
expand_path
...
@@ -146,6 +147,9 @@ module Pod
...
@@ -146,6 +147,9 @@ module Pod
attr_writer
:repos_dir
attr_writer
:repos_dir
# @return [Pathname] the deprecated directory where the CocoaPods sources
# were stored.
#
def
old_repos_dir
def
old_repos_dir
@old_repos_dir
||=
Pathname
.
new
(
'~/.cocoapods'
).
expand_path
@old_repos_dir
||=
Pathname
.
new
(
'~/.cocoapods'
).
expand_path
end
end
...
...
lib/cocoapods/sources_manager.rb
View file @
798459a2
...
@@ -260,6 +260,7 @@ module Pod
...
@@ -260,6 +260,7 @@ module Pod
end
end
# @return [Pathname] The path of the old master repo.
# @return [Pathname] The path of the old master repo.
#
def
old_master_repo_dir
def
old_master_repo_dir
config
.
old_repos_dir
+
'master'
config
.
old_repos_dir
+
'master'
end
end
...
...
spec/unit/config_spec.rb
View file @
798459a2
...
@@ -23,6 +23,10 @@ module Pod
...
@@ -23,6 +23,10 @@ module Pod
@sut
.
repos_dir
.
should
==
Pathname
.
new
(
"~/.cocoapods/repos"
).
expand_path
@sut
.
repos_dir
.
should
==
Pathname
.
new
(
"~/.cocoapods/repos"
).
expand_path
end
end
it
"returns the path to the deprecated spec-repos dir"
do
@sut
.
repos_dir
.
should
==
Pathname
.
new
(
"~/.cocoapods"
).
expand_path
end
it
"allows to specify whether the aggressive cache should be used with an environment variable"
do
it
"allows to specify whether the aggressive cache should be used with an environment variable"
do
@sut
.
aggressive_cache
=
false
@sut
.
aggressive_cache
=
false
ENV
[
'CP_AGGRESSIVE_CACHE'
]
=
'TRUE'
ENV
[
'CP_AGGRESSIVE_CACHE'
]
=
'TRUE'
...
...
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