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
d7c82883
Commit
d7c82883
authored
Feb 21, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Config] Add support for YAML Podfile
parent
4d91b1e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
13 deletions
+9
-13
config.rb
lib/cocoapods/config.rb
+5
-10
config_spec.rb
spec/unit/config_spec.rb
+4
-3
No files found.
lib/cocoapods/config.rb
View file @
d7c82883
...
...
@@ -146,18 +146,14 @@ module Pod
# @return [Podfile] The Podfile to use for the current execution.
#
def
podfile
@podfile
||=
begin
Podfile
.
from_file
(
podfile_path
)
if
podfile_path
.
exist?
end
@podfile
||=
Podfile
.
from_file
(
podfile_path
)
if
podfile_path
.
exist?
end
attr_writer
:podfile
# @return [Lockfile] The Lockfile to use for the current execution.
#
def
lockfile
@lockfile
||=
begin
Lockfile
.
from_file
(
lockfile_path
)
if
lockfile_path
.
exist?
end
@lockfile
||=
Lockfile
.
from_file
(
lockfile_path
)
if
lockfile_path
.
exist?
end
#--------------------------------------#
...
...
@@ -192,10 +188,9 @@ module Pod
#
def
podfile_path
unless
@podfile_path
@podfile_path
=
installation_root
+
'CocoaPods.podfile'
unless
@podfile_path
.
exist?
@podfile_path
=
installation_root
+
'Podfile'
end
path
=
installation_root
+
'Podfile.yaml'
path
=
installation_root
+
'Podfile'
unless
path
.
exist?
@podfile_path
=
path
end
@podfile_path
end
...
...
spec/unit/config_spec.rb
View file @
d7c82883
...
...
@@ -8,6 +8,7 @@ module Pod
end
describe
"In general"
do
it
"returns the singleton config instance"
do
config
.
should
.
be
.
instance_of
Config
end
...
...
@@ -32,9 +33,9 @@ module Pod
config
.
podfile_path
.
should
==
temporary_directory
+
'Podfile'
end
it
"
returns the path to the project Podfile if specified with the extension
"
do
(
temporary_directory
+
'
CocoaPods.podfile
'
).
open
(
'w'
)
{
|
f
|
f
<<
'# Yo'
}
config
.
podfile_path
.
should
==
temporary_directory
+
'
CocoaPods.podfile
'
it
"
can detect yaml Podfiles
"
do
(
temporary_directory
+
'
Podfile.yaml
'
).
open
(
'w'
)
{
|
f
|
f
<<
'# Yo'
}
config
.
podfile_path
.
should
==
temporary_directory
+
'
Podfile.yaml
'
end
it
"returns the path to the Pods directory that holds the dependencies"
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