Skip to content

Commit

Permalink
Cache target definition label value
Browse files Browse the repository at this point in the history
  • Loading branch information
dnkoutso committed Jun 19, 2017
1 parent dae60a3 commit 4b2d244
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

##### Bug Fixes

* Cache target definition label value
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#387](https://github.com/CocoaPods/Core/pull/387)

* Correctly include parent dependencies when parsing testspecs
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#384](https://github.com/CocoaPods/Core/pull/384)
Expand Down
14 changes: 7 additions & 7 deletions lib/cocoapods-core/podfile/target_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ def empty?
# name.
#
def label
if root? && name == 'Pods'
'Pods'
elsif exclusive? || parent.nil?
"Pods-#{name}"
else
"#{parent.label}-#{name}"
end
@label ||= if root? && name == 'Pods'
'Pods'
elsif exclusive? || parent.nil?
"Pods-#{name}"
else
"#{parent.label}-#{name}"
end
end

alias_method :to_s, :label
Expand Down

0 comments on commit 4b2d244

Please sign in to comment.