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
3e1f0a59
Commit
3e1f0a59
authored
Dec 14, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Config] Read user settings from `~/.cocoapods/config.yaml`.
Closes #658.
parent
99ef21e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
15 deletions
+33
-15
Gemfile.lock
Gemfile.lock
+1
-1
config.rb
lib/cocoapods/config.rb
+32
-14
No files found.
Gemfile.lock
View file @
3e1f0a59
...
@@ -17,7 +17,7 @@ GIT
...
@@ -17,7 +17,7 @@ GIT
GIT
GIT
remote: git://github.com/CocoaPods/cocoapods-downloader
remote: git://github.com/CocoaPods/cocoapods-downloader
revision:
d07096a3ab8c74ac34853fccfa968d55097fcbf2
revision:
b349db398d5e9205a67974f70906fec2c7a0e588
specs:
specs:
cocoapods-downloader (0.1.0)
cocoapods-downloader (0.1.0)
...
...
lib/cocoapods/config.rb
View file @
3e1f0a59
...
@@ -86,28 +86,46 @@ module Pod
...
@@ -86,28 +86,46 @@ module Pod
#--------------------------------------#
#--------------------------------------#
def
initialize
def
initialize
@repos_dir
=
Pathname
.
new
(
File
.
expand_path
(
"~/.cocoapods"
))
configure_with
(
defaults
)
@verbose
=
@silent
=
@skip_repo_update
=
false
@clean
=
@generate_docs
=
@doc_install
=
@integrate_targets
=
@new_version_message
=
true
config_file
=
Pathname
.
new
(
ENV
[
'HOME'
]
+
"/.cocoapods/config.yaml"
)
if
config_file
.
exist?
require
'yaml'
user_config
=
YAML
.
load_file
(
config_file
)
configure_with
(
user_config
)
end
@repos_dir
=
Pathname
.
new
(
ENV
[
'HOME'
]
+
"/.cocoapods"
)
@project_root
=
Pathname
.
pwd
@project_pods_root
=
Pathname
.
pwd
+
'Pods'
end
end
# @return [Pathname] the root of the CocoaPods instance where the Podfile
# is located.
#
#
# @todo Move to initialization.
#
#
def
project_root
def
defaults
@project_root
||=
Pathname
.
pwd
{
:verbose
=>
false
,
:silent
=>
false
,
:skip_repo_update
=>
false
,
:clean
=>
true
,
:generate_docs
=>
true
,
:doc_install
=>
true
,
:integrate_targets
=>
true
,
:skip_repo_update
=>
true
,
:new_version_message
=>
true
,
}
end
end
# @return [Pathname] The root of the sandbox.
def
configure_with
(
values
)
#
values
.
each
do
|
key
,
value
|
# @todo Why is this needed? Can't clients use config.sandbox.root?
self
.
instance_variable_set
(
"@
#{
key
}
"
,
value
)
#
end
def
project_pods_root
@project_pods_root
||=
project_root
+
'Pods'
end
end
# @return [Podfile] The Podfile to use for the current execution.
# @return [Podfile] The Podfile to use for the current execution.
#
#
def
podfile
def
podfile
...
...
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