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
f051e278
Commit
f051e278
authored
Jun 22, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Target] Ensure that Target#archs is always initialized as array
parent
0c7f0228
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
2 deletions
+18
-2
target_installer.rb
lib/cocoapods/installer/target_installer.rb
+1
-1
target.rb
lib/cocoapods/target.rb
+7
-1
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+1
-0
pod_target.rb
lib/cocoapods/target/pod_target.rb
+1
-0
aggregate_target_spec.rb
spec/unit/target/aggregate_target_spec.rb
+4
-0
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+4
-0
No files found.
lib/cocoapods/installer/target_installer.rb
View file @
f051e278
...
@@ -67,7 +67,7 @@ module Pod
...
@@ -67,7 +67,7 @@ module Pod
def
custom_build_settings
def
custom_build_settings
settings
=
{}
settings
=
{}
unless
target
.
nil?
||
target
.
archs
.
empty?
unless
target
.
archs
.
empty?
settings
[
'ARCHS'
]
=
target
.
archs
settings
[
'ARCHS'
]
=
target
.
archs
end
end
...
...
lib/cocoapods/target.rb
View file @
f051e278
...
@@ -16,6 +16,12 @@ module Pod
...
@@ -16,6 +16,12 @@ module Pod
attr_accessor
:host_requires_frameworks
attr_accessor
:host_requires_frameworks
alias_method
:host_requires_frameworks?
,
:host_requires_frameworks
alias_method
:host_requires_frameworks?
,
:host_requires_frameworks
# Initialize a new target
#
def
initialize
@archs
=
[]
end
# @return [String] the name of the library.
# @return [String] the name of the library.
#
#
def
name
def
name
...
@@ -105,7 +111,7 @@ module Pod
...
@@ -105,7 +111,7 @@ module Pod
#
#
attr_accessor
:native_target
attr_accessor
:native_target
# @return [
String
] The value for the ARCHS build setting.
# @return [
Array<String>
] The value for the ARCHS build setting.
#
#
attr_accessor
:archs
attr_accessor
:archs
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
f051e278
...
@@ -13,6 +13,7 @@ module Pod
...
@@ -13,6 +13,7 @@ module Pod
# @param [Sandbox] sandbox @see sandbox
# @param [Sandbox] sandbox @see sandbox
#
#
def
initialize
(
target_definition
,
sandbox
)
def
initialize
(
target_definition
,
sandbox
)
super
()
@target_definition
=
target_definition
@target_definition
=
target_definition
@sandbox
=
sandbox
@sandbox
=
sandbox
@pod_targets
=
[]
@pod_targets
=
[]
...
...
lib/cocoapods/target/pod_target.rb
View file @
f051e278
...
@@ -41,6 +41,7 @@ module Pod
...
@@ -41,6 +41,7 @@ module Pod
def
initialize
(
specs
,
target_definitions
,
sandbox
,
scoped
=
false
)
def
initialize
(
specs
,
target_definitions
,
sandbox
,
scoped
=
false
)
raise
"Can't initialize a PodTarget without specs!"
if
specs
.
nil?
||
specs
.
empty?
raise
"Can't initialize a PodTarget without specs!"
if
specs
.
nil?
||
specs
.
empty?
raise
"Can't initialize a PodTarget without TargetDefinition!"
if
target_definitions
.
nil?
||
target_definitions
.
empty?
raise
"Can't initialize a PodTarget without TargetDefinition!"
if
target_definitions
.
nil?
||
target_definitions
.
empty?
super
()
@specs
=
specs
@specs
=
specs
@target_definitions
=
target_definitions
@target_definitions
=
target_definitions
@sandbox
=
sandbox
@sandbox
=
sandbox
...
...
spec/unit/target/aggregate_target_spec.rb
View file @
f051e278
...
@@ -13,6 +13,10 @@ module Pod
...
@@ -13,6 +13,10 @@ module Pod
@target
.
target_definition
.
should
==
@target_definition
@target
.
target_definition
.
should
==
@target_definition
end
end
it
'is initialized with empty archs'
do
@target
.
archs
.
should
==
[]
end
it
'returns the label of the target definition'
do
it
'returns the label of the target definition'
do
@target
.
label
.
should
==
'Pods'
@target
.
label
.
should
==
'Pods'
end
end
...
...
spec/unit/target/pod_target_spec.rb
View file @
f051e278
...
@@ -24,6 +24,10 @@ module Pod
...
@@ -24,6 +24,10 @@ module Pod
@pod_target
.
target_definitions
.
should
==
[
@target_definition
]
@pod_target
.
target_definitions
.
should
==
[
@target_definition
]
end
end
it
'is initialized with empty archs'
do
@pod_target
.
archs
.
should
==
[]
end
it
'returns its name'
do
it
'returns its name'
do
@pod_target
.
name
.
should
==
'BananaLib'
@pod_target
.
name
.
should
==
'BananaLib'
@pod_target
.
scoped
.
first
.
name
.
should
==
'Pods-BananaLib'
@pod_target
.
scoped
.
first
.
name
.
should
==
'Pods-BananaLib'
...
...
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