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
ddc5ac50
Commit
ddc5ac50
authored
Nov 09, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make specs green.
parent
55d5c919
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
dependency.rb
lib/cocoapods/dependency.rb
+17
-17
specification_spec.rb
spec/unit/specification_spec.rb
+0
-1
No files found.
lib/cocoapods/dependency.rb
View file @
ddc5ac50
...
@@ -20,7 +20,7 @@ module Pod
...
@@ -20,7 +20,7 @@ module Pod
if
name_and_version_requirements
.
last
.
is_a?
(
Hash
)
if
name_and_version_requirements
.
last
.
is_a?
(
Hash
)
@external_spec_source
=
name_and_version_requirements
.
pop
@external_spec_source
=
name_and_version_requirements
.
pop
end
end
super
(
name_and_version_requirements
.
first
)
super
(
*
name_and_version_requirements
)
else
else
raise
Informative
,
"A dependency needs either a name and version requirements, "
\
raise
Informative
,
"A dependency needs either a name and version requirements, "
\
...
@@ -32,8 +32,7 @@ module Pod
...
@@ -32,8 +32,7 @@ module Pod
def
==
(
other
)
def
==
(
other
)
super
&&
super
&&
@only_part_of_other_pod
==
other
.
only_part_of_other_pod
&&
@only_part_of_other_pod
==
other
.
only_part_of_other_pod
&&
@external_spec_source
==
other
.
external_spec_source
&&
(
@specification
?
@specification
==
other
.
specification
:
@external_spec_source
==
other
.
external_spec_source
)
@specification
==
other
.
specification
end
end
def
external_podspec?
def
external_podspec?
...
@@ -46,22 +45,23 @@ module Pod
...
@@ -46,22 +45,23 @@ module Pod
def
specification
def
specification
@specification
||=
begin
@specification
||=
begin
# This is an external podspec
if
external_podspec?
pod_root
=
Config
.
instance
.
project_pods_root
+
@name
pod_root
=
Config
.
instance
.
project_pods_root
+
@name
spec
=
nil
spec
=
nil
if
@external_spec_source
[
:podspec
]
if
@external_spec_source
[
:podspec
]
Config
.
instance
.
project_pods_root
.
mkdir
Config
.
instance
.
project_pods_root
.
mkdir
spec
=
Config
.
instance
.
project_pods_root
+
"
#{
@name
}
.podspec"
spec
=
Config
.
instance
.
project_pods_root
+
"
#{
@name
}
.podspec"
# can be http, file, etc
# can be http, file, etc
require
'open-uri'
require
'open-uri'
open
(
@external_spec_source
[
:podspec
])
do
|
io
|
open
(
@external_spec_source
[
:podspec
])
do
|
io
|
spec
.
open
(
'w'
)
{
|
f
|
f
<<
io
.
read
}
spec
.
open
(
'w'
)
{
|
f
|
f
<<
io
.
read
}
end
else
Downloader
.
for_source
(
pod_root
,
@external_spec_source
).
download
spec
=
pod_root
+
"
#{
@name
}
.podspec"
end
end
else
Specification
.
from_file
(
spec
)
Downloader
.
for_source
(
pod_root
,
@external_spec_source
).
download
spec
=
pod_root
+
"
#{
@name
}
.podspec"
end
end
Specification
.
from_file
(
spec
)
end
end
end
end
...
...
spec/unit/specification_spec.rb
View file @
ddc5ac50
...
@@ -101,7 +101,6 @@ describe "A Pod::Specification loaded from a podspec" do
...
@@ -101,7 +101,6 @@ describe "A Pod::Specification loaded from a podspec" do
@spec
.
compiler_flags
=
"-Wunused-value"
@spec
.
compiler_flags
=
"-Wunused-value"
@spec
.
compiler_flags
.
should
==
"-Wunused-value -fobj-arc"
@spec
.
compiler_flags
.
should
==
"-Wunused-value -fobj-arc"
end
end
end
end
describe
"A Pod::Specification that's part of another pod's source"
do
describe
"A Pod::Specification that's part of another pod's source"
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