Permalink
Browse files

[LocalPod] Fix for unavailable #select! in 1.8.7.

  • Loading branch information...
1 parent 0c114e9 commit 663d8710b1b7717bb0a3c273c745565c25f1b790 @fabiopelosin fabiopelosin committed Jun 20, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/cocoapods/local_pod.rb
View
@@ -216,9 +216,12 @@ def relative_header_files
# files grouped by {Specification}.
#
def header_files_by_spec
- source_files_by_spec.dup.each do |spec, paths|
- paths.select! { |f| f.extname == '.h' }
+ result = {}
+ source_files_by_spec.each do |spec, paths|
+ headers = paths.select { |f| f.extname == '.h' }
+ result[spec] = headers unless headers.empty?
end
+ result
end
# @return [Array<Pathname>] The paths of the resources.
@@ -304,8 +307,7 @@ def all_specs_public_header_files
all_specs = top_specification.recursive_subspecs << top_specification
files = all_specs.map { |s| expanded_paths(s.source_files, :glob => '*.{h}') }
files.flatten!
- files.select! { |f| f && f.extname == '.h' }
- files.uniq!
+ files.select { |f| f && f.extname == '.h' }.uniq!
@alloy

alloy Jun 21, 2012

Owner

This can't be working can it? The list from select, which is a copy of files, is never saved.

@fabiopelosin

fabiopelosin Jun 21, 2012

Owner

It wasn't thats why the next commit is called [LocalPod] Fix #all_specs_public_header_files. :-)

@alloy

alloy Jun 21, 2012

Owner

Doh! I didn't look at the commits in the right direction.

files
end

0 comments on commit 663d871

Please sign in to comment.