Commit a5a409a8 authored by Ben Asher's avatar Ben Asher Committed by GitHub

Merge pull request #5963 from b-ray/fix/lint-libraries

Fix linting of private pods when using libraries
parents d4e32b7b f876535c
...@@ -34,6 +34,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -34,6 +34,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Ben Asher](https://github.com/benasher44) [Ben Asher](https://github.com/benasher44)
[#5860](https://github.com/CocoaPods/CocoaPods/issues/5860) [#5860](https://github.com/CocoaPods/CocoaPods/issues/5860)
* Fix linting of private pods when using libraries.
[Stefan Pühringer](https://github.com/b-ray)
[#5891](https://github.com/CocoaPods/CocoaPods/issues/5891)
## 1.1.0.rc.2 (2016-09-13) ## 1.1.0.rc.2 (2016-09-13)
##### Enhancements ##### Enhancements
......
...@@ -72,11 +72,11 @@ module Pod ...@@ -72,11 +72,11 @@ module Pod
# #
def add_files(namespace, relative_header_paths) def add_files(namespace, relative_header_paths)
relative_header_paths.map do |relative_header_path| relative_header_paths.map do |relative_header_path|
add_file(namespace, relative_header_path, relative_header_path.basename) add_file(namespace, relative_header_path)
end end
end end
# Adds a header to the directory under different name. # Adds a header to the directory.
# #
# @param [Pathname] namespace # @param [Pathname] namespace
# the path where the header file should be stored relative to the # the path where the header file should be stored relative to the
...@@ -86,23 +86,17 @@ module Pod ...@@ -86,23 +86,17 @@ module Pod
# the path of the header file relative to the Pods project # the path of the header file relative to the Pods project
# (`PODS_ROOT` variable of the xcconfigs). # (`PODS_ROOT` variable of the xcconfigs).
# #
# @param [String] final_name
# the name under which the file should be available in the
# headers directory.
#
# @note This method does _not_ add the file to the search paths. # @note This method does _not_ add the file to the search paths.
# #
# @return [Pathname] # @return [Pathname]
# #
def add_file(namespace, relative_header_path, final_name) def add_file(namespace, relative_header_path)
namespaced_path = root + namespace namespaced_path = root + namespace
namespaced_path.mkpath unless File.exist?(namespaced_path) namespaced_path.mkpath unless File.exist?(namespaced_path)
absolute_source = (sandbox.root + relative_header_path) absolute_source = (sandbox.root + relative_header_path)
source = absolute_source.relative_path_from(namespaced_path) source = absolute_source.relative_path_from(namespaced_path)
Dir.chdir(namespaced_path) do FileUtils.ln_sf(source, namespaced_path)
FileUtils.ln_sf(source, final_name)
end
namespaced_path + relative_header_path.basename namespaced_path + relative_header_path.basename
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment