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
c37de717
Commit
c37de717
authored
Jan 29, 2013
by
Eloy Durán
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #768 from drodriguez/gh-708-podspec-nil-options
Fix podspec in Podfile with no options.
parents
1990ff72
da643ea1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
4 deletions
+71
-4
podfile.rb
lib/cocoapods/podfile.rb
+1
-1
1st.podspec
spec/fixtures/podspecs/1st.podspec
+12
-0
2nd.podspec
spec/fixtures/podspecs/2nd.podspec
+12
-0
podfile_spec.rb
spec/unit/podfile_spec.rb
+46
-3
No files found.
lib/cocoapods/podfile.rb
View file @
c37de717
...
...
@@ -403,7 +403,7 @@ module Pod
name
=
File
.
extname
(
name
)
==
'.podspec'
?
name
:
"
#{
name
}
.podspec"
file
=
config
.
project_root
+
name
else
file
=
config
.
project_root
.
glob
(
'*.podspec'
).
first
file
=
Pathname
.
glob
(
config
.
project_root
+
'*.podspec'
).
first
end
spec
=
Specification
.
from_file
(
file
)
...
...
spec/fixtures/podspecs/1st.podspec
0 → 100644
View file @
c37de717
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
'FirstLib'
s
.
version
=
'1.0'
s
.
homepage
=
'https://firstlib.local/firstlib'
s
.
summary
=
'The First Lib'
s
.
authors
=
{
'First Lib Creator'
=>
'creator@firstlib.local'
}
s
.
source
=
{
:git
=>
'https://firstlib.local/firstlib.git'
,
:tag
=>
'1.0'
}
s
.
source_files
=
'Classes/*.{h,m}'
s
.
license
=
'MIT'
s
.
dependency
'FirstDep'
end
spec/fixtures/podspecs/2nd.podspec
0 → 100644
View file @
c37de717
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
'SecondLib'
s
.
version
=
'1.0'
s
.
homepage
=
'https://secondlib.local/secondlib'
s
.
summary
=
'The Second Lib'
s
.
authors
=
{
'Second Lib Creator'
=>
'creator@secondlib.local'
}
s
.
source
=
{
:git
=>
'https://secondlib.local/secondlib.git'
,
:tag
=>
'1.0'
}
s
.
source_files
=
'Classes/*.{h,m}'
s
.
license
=
'MIT'
s
.
dependency
'SecondDep'
end
spec/unit/podfile_spec.rb
View file @
c37de717
...
...
@@ -341,16 +341,59 @@ describe "Pod::Podfile" do
end
end
describe
"concerning the podspec method"
do
xit
"it can use use the dependencies of a podspec"
do
before
do
FileUtils
.
cp
(
fixture
(
'podspecs/1st.podspec'
),
config
.
project_root
)
FileUtils
.
cp
(
fixture
(
'podspecs/2nd.podspec'
),
config
.
project_root
)
end
it
"it uses the first podspec in the project root by default"
do
podfile
=
Pod
::
Podfile
.
new
do
platform
:ios
podspec
end
podfile
.
dependencies
.
size
.
should
==
1
podfile
.
dependency_by_top_level_spec_name
(
'FirstDep'
).
should
==
Pod
::
Dependency
.
new
(
'FirstDep'
)
end
xit
"it allows to specify the name of a podspec"
do
it
"it allows to specify the name of a podspec"
do
podfile
=
Pod
::
Podfile
.
new
do
platform
:ios
podspec
:name
=>
'2nd.podspec'
end
podfile
.
dependencies
.
size
.
should
==
1
podfile
.
dependency_by_top_level_spec_name
(
'SecondDep'
).
should
==
Pod
::
Dependency
.
new
(
'SecondDep'
)
end
xit
"it allows to specify the path of a podspec"
do
it
"it allows to specify the name of a podspec without extension"
do
podfile
=
Pod
::
Podfile
.
new
do
platform
:ios
podspec
:name
=>
'2nd'
end
podfile
.
dependencies
.
size
.
should
==
1
podfile
.
dependency_by_top_level_spec_name
(
'SecondDep'
).
should
==
Pod
::
Dependency
.
new
(
'SecondDep'
)
end
it
"it allows to specify the path of a podspec"
do
podfile
=
Pod
::
Podfile
.
new
do
platform
:ios
podspec
:path
=>
(
config
.
project_root
+
'2nd.podspec'
).
to_s
end
podfile
.
dependencies
.
size
.
should
==
1
podfile
.
dependency_by_top_level_spec_name
(
'SecondDep'
).
should
==
Pod
::
Dependency
.
new
(
'SecondDep'
)
end
it
"it allows to specify the path of a podspec without extension"
do
podfile
=
Pod
::
Podfile
.
new
do
platform
:ios
podspec
:path
=>
(
config
.
project_root
+
'2nd'
).
to_s
end
podfile
.
dependencies
.
size
.
should
==
1
podfile
.
dependency_by_top_level_spec_name
(
'SecondDep'
).
should
==
Pod
::
Dependency
.
new
(
'SecondDep'
)
end
end
...
...
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