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
f5d7b5bc
Commit
f5d7b5bc
authored
Mar 14, 2017
by
Dimitris Koutsogiorgas
Committed by
GitHub
Mar 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6558 from dnkoutso/fix_regression
Only share pod target xcscheme if present during validation.
parents
9d078b8b
2222aaaf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
CHANGELOG.md
CHANGELOG.md
+4
-0
validator.rb
lib/cocoapods/validator.rb
+6
-1
validator_spec.rb
spec/unit/validator_spec.rb
+18
-0
No files found.
CHANGELOG.md
View file @
f5d7b5bc
...
@@ -12,6 +12,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -12,6 +12,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
##### Bug Fixes
*
Only share pod target xcscheme if present during validation.
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6558
](
https://github.com/CocoaPods/CocoaPods/pull/6558
)
*
Properly compile storyboard for watch device family.
*
Properly compile storyboard for watch device family.
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6516
](
https://github.com/CocoaPods/CocoaPods/issues/6516
)
[
#6516
](
https://github.com/CocoaPods/CocoaPods/issues/6516
)
...
...
lib/cocoapods/validator.rb
View file @
f5d7b5bc
...
@@ -428,7 +428,8 @@ module Pod
...
@@ -428,7 +428,8 @@ module Pod
add_xctest
(
app_target
)
if
@installer
.
pod_targets
.
any?
{
|
pt
|
pt
.
spec_consumers
.
any?
{
|
c
|
c
.
frameworks
.
include?
(
'XCTest'
)
}
}
add_xctest
(
app_target
)
if
@installer
.
pod_targets
.
any?
{
|
pt
|
pt
.
spec_consumers
.
any?
{
|
c
|
c
.
frameworks
.
include?
(
'XCTest'
)
}
}
app_project
.
save
app_project
.
save
Xcodeproj
::
XCScheme
.
share_scheme
(
app_project
.
path
,
'App'
)
Xcodeproj
::
XCScheme
.
share_scheme
(
app_project
.
path
,
'App'
)
Xcodeproj
::
XCScheme
.
share_scheme
(
@installer
.
pods_project
.
path
,
pod_target
.
label
)
# Share the pods xcscheme only if it exists. For pre-built vendored pods there is no xcscheme generated.
Xcodeproj
::
XCScheme
.
share_scheme
(
@installer
.
pods_project
.
path
,
pod_target
.
label
)
if
shares_pod_target_xcscheme?
(
pod_target
)
end
end
def
add_swift_version
(
app_target
)
def
add_swift_version
(
app_target
)
...
@@ -669,6 +670,10 @@ module Pod
...
@@ -669,6 +670,10 @@ module Pod
add_result
(
:note
,
*
args
)
add_result
(
:note
,
*
args
)
end
end
def
shares_pod_target_xcscheme?
(
pod_target
)
Pathname
.
new
(
@installer
.
pods_project
.
path
+
pod_target
.
label
).
exist?
end
def
add_result
(
type
,
attribute_name
,
message
,
public_only
=
false
)
def
add_result
(
type
,
attribute_name
,
message
,
public_only
=
false
)
result
=
results
.
find
do
|
r
|
result
=
results
.
find
do
|
r
|
r
.
type
==
type
&&
r
.
attribute_name
&&
r
.
message
==
message
&&
r
.
public_only?
==
public_only
r
.
type
==
type
&&
r
.
attribute_name
&&
r
.
message
==
message
&&
r
.
public_only?
==
public_only
...
...
spec/unit/validator_spec.rb
View file @
f5d7b5bc
...
@@ -614,6 +614,7 @@ module Pod
...
@@ -614,6 +614,7 @@ module Pod
installer
.
stubs
(
:pods_project
).
returns
(
pods_project
)
installer
.
stubs
(
:pods_project
).
returns
(
pods_project
)
Xcodeproj
::
XCScheme
.
expects
(
:share_scheme
).
with
(
app_project_path
,
'App'
).
once
Xcodeproj
::
XCScheme
.
expects
(
:share_scheme
).
with
(
app_project_path
,
'App'
).
once
Xcodeproj
::
XCScheme
.
expects
(
:share_scheme
).
with
(
pods_project
.
path
,
'BananaLib'
).
once
Xcodeproj
::
XCScheme
.
expects
(
:share_scheme
).
with
(
pods_project
.
path
,
'BananaLib'
).
once
@validator
.
stubs
(
:shares_pod_target_xcscheme?
).
returns
(
true
)
@validator
.
instance_variable_set
(
:@installer
,
installer
)
@validator
.
instance_variable_set
(
:@installer
,
installer
)
@validator
.
send
(
:add_app_project_import
)
@validator
.
send
(
:add_app_project_import
)
...
@@ -636,6 +637,7 @@ module Pod
...
@@ -636,6 +637,7 @@ module Pod
installer
.
stubs
(
:pods_project
).
returns
(
pods_project
)
installer
.
stubs
(
:pods_project
).
returns
(
pods_project
)
Xcodeproj
::
XCScheme
.
expects
(
:share_scheme
).
with
(
app_project_path
,
'App'
).
once
Xcodeproj
::
XCScheme
.
expects
(
:share_scheme
).
with
(
app_project_path
,
'App'
).
once
Xcodeproj
::
XCScheme
.
expects
(
:share_scheme
).
with
(
pods_project
.
path
,
'BananaLib'
).
once
Xcodeproj
::
XCScheme
.
expects
(
:share_scheme
).
with
(
pods_project
.
path
,
'BananaLib'
).
once
@validator
.
stubs
(
:shares_pod_target_xcscheme?
).
returns
(
true
)
@validator
.
instance_variable_set
(
:@installer
,
installer
)
@validator
.
instance_variable_set
(
:@installer
,
installer
)
@validator
.
send
(
:add_app_project_import
)
@validator
.
send
(
:add_app_project_import
)
...
@@ -644,6 +646,22 @@ module Pod
...
@@ -644,6 +646,22 @@ module Pod
bc
.
build_settings
[
'FRAMEWORK_SEARCH_PATHS'
]
bc
.
build_settings
[
'FRAMEWORK_SEARCH_PATHS'
]
end
.
uniq
.
should
==
[
%w($(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks")
]
end
.
uniq
.
should
==
[
%w($(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks")
]
end
end
it
'does not share xcscheme for pod target if there isnt one'
do
@validator
.
send
(
:create_app_project
)
pods_project
=
Xcodeproj
::
Project
.
new
(
@validator
.
validation_dir
+
'Pods/Pods.xcodeproj'
)
app_project_path
=
@validator
.
validation_dir
+
'App.xcodeproj'
pod_target
=
fixture_pod_target
(
'banana-lib/BananaLib.podspec'
)
pod_target
.
stubs
(
:uses_swift?
=>
true
,
:pod_name
=>
'JSONKit'
)
pod_target
.
spec_consumers
.
first
.
stubs
(
:frameworks
).
returns
(
%w(XCTest)
)
installer
=
stub
(
:pod_targets
=>
[
pod_target
])
installer
.
stubs
(
:pods_project
).
returns
(
pods_project
)
Xcodeproj
::
XCScheme
.
expects
(
:share_scheme
).
with
(
app_project_path
,
'App'
).
once
Xcodeproj
::
XCScheme
.
expects
(
:share_scheme
).
with
(
pods_project
.
path
,
'BananaLib'
).
never
@validator
.
stubs
(
:shares_pod_target_xcscheme?
).
returns
(
false
)
@validator
.
instance_variable_set
(
:@installer
,
installer
)
@validator
.
send
(
:add_app_project_import
)
end
end
end
describe
'file pattern validation'
do
describe
'file pattern validation'
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