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
c3a06d54
Unverified
Commit
c3a06d54
authored
Oct 01, 2016
by
Danielle Tomlinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
611432dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
21 deletions
+6
-21
Gemfile.lock
Gemfile.lock
+3
-3
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+1
-1
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+2
-17
No files found.
Gemfile.lock
View file @
c3a06d54
GIT
GIT
remote: https://github.com/CocoaPods/CLAide.git
remote: https://github.com/CocoaPods/CLAide.git
revision:
61071679fc965083b6d43fdc1aa042afbaf172d1
revision:
8106d0d779ae1c9f571404a9f38950905ad5c803
branch: master
branch: master
specs:
specs:
claide (1.0.0)
claide (1.0.0)
GIT
GIT
remote: https://github.com/CocoaPods/Core.git
remote: https://github.com/CocoaPods/Core.git
revision: f
c8c258d0bce73e091f09de260a1a65bed3482a
1
revision: f
ef34047643147b09955f8aeb1277a47d01ff1c
1
branch: master
branch: master
specs:
specs:
cocoapods-core (1.1.0.rc.2)
cocoapods-core (1.1.0.rc.2)
...
@@ -24,7 +24,7 @@ GIT
...
@@ -24,7 +24,7 @@ GIT
GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
remote: https://github.com/CocoaPods/Xcodeproj.git
revision:
c8b7277072c3c2432ac99ef9b45cd1a6d181409e
revision:
4020ac913be863bdc4925fbb132aa94af71850f4
branch: master
branch: master
specs:
specs:
xcodeproj (1.3.1)
xcodeproj (1.3.1)
...
...
lib/cocoapods/installer/analyzer.rb
View file @
c3a06d54
...
@@ -428,7 +428,7 @@ module Pod
...
@@ -428,7 +428,7 @@ module Pod
end
end
error_messages
=
targets_by_spec
.
map
do
|
spec
,
targets
|
error_messages
=
targets_by_spec
.
map
do
|
spec
,
targets
|
swift_targets
=
targets
.
reject
{
|
target
|
target
.
blank?
}
swift_targets
=
targets
.
reject
{
|
target
|
target
.
swift_version
.
blank?
}
next
if
swift_targets
.
empty?
||
swift_targets
.
uniq
(
&
:swift_version
).
count
==
1
next
if
swift_targets
.
empty?
||
swift_targets
.
uniq
(
&
:swift_version
).
count
==
1
target_errors
=
swift_targets
.
map
(
&
error_message_for_target
).
join
(
', '
)
target_errors
=
swift_targets
.
map
(
&
error_message_for_target
).
join
(
', '
)
"-
#{
spec
.
name
}
required by
#{
target_errors
}
"
"-
#{
spec
.
name
}
required by
#{
target_errors
}
"
...
...
spec/unit/installer/analyzer_spec.rb
View file @
c3a06d54
...
@@ -674,9 +674,10 @@ module Pod
...
@@ -674,9 +674,10 @@ module Pod
podfile
.
target_definitions
[
'SampleProject'
].
stubs
(
:swift_version
).
returns
(
'3.0'
)
podfile
.
target_definitions
[
'SampleProject'
].
stubs
(
:swift_version
).
returns
(
'3.0'
)
podfile
.
target_definitions
[
'TestRunner'
].
stubs
(
:swift_version
).
returns
(
'2.3'
)
podfile
.
target_definitions
[
'TestRunner'
].
stubs
(
:swift_version
).
returns
(
'2.3'
)
analyzer
=
Pod
::
Installer
::
Analyzer
.
new
(
config
.
sandbox
,
podfile
)
analyzer
=
Pod
::
Installer
::
Analyzer
.
new
(
config
.
sandbox
,
podfile
)
should
.
raise
Informative
do
should
.
raise
Informative
do
analyzer
.
analyze
analyzer
.
analyze
end
.
message
.
should
.
match
/The following pods are integrated into
Swift
targets that do not have the same Swift version:/
end
.
message
.
should
.
match
/The following pods are integrated into targets that do not have the same Swift version:/
end
end
it
'does not raise when targets integrate the same pod but only one of the targets is a swift target'
do
it
'does not raise when targets integrate the same pod but only one of the targets is a swift target'
do
...
@@ -695,22 +696,6 @@ module Pod
...
@@ -695,22 +696,6 @@ module Pod
lambda
{
analyzer
.
analyze
}.
should
.
not
.
raise
lambda
{
analyzer
.
analyze
}.
should
.
not
.
raise
end
end
it
'does not raise when swift targets with different swift versions integrate a non-swift pod'
do
podfile
=
Podfile
.
new
do
source
SpecHelper
.
test_repo_url
project
'SampleProject/SampleProject'
platform
:ios
,
'8.0'
pod
'JSONKit'
target
'SampleProject'
target
'TestRunner'
end
podfile
.
target_definitions
[
'SampleProject'
].
stubs
(
:swift_version
).
returns
(
'3.0'
)
# when the swift version is set at the project level, but unset in one target, swift_version is empty
podfile
.
target_definitions
[
'TestRunner'
].
stubs
(
:swift_version
).
returns
(
''
)
analyzer
=
Pod
::
Installer
::
Analyzer
.
new
(
config
.
sandbox
,
podfile
)
lambda
{
analyzer
.
analyze
}.
should
.
not
.
raise
end
#--------------------------------------#
#--------------------------------------#
it
'computes the state of the Sandbox respect to the resolved dependencies'
do
it
'computes the state of the Sandbox respect to the resolved 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