Commit 4d074081 authored by Eloy Duran's avatar Eloy Duran

Make Subspec ask the top level spec for header mappings.

parent 27fec6a8
platform :ios
dependency 'RestKit-ObjectMapping'
dependency 'RestKit-JSON-JSONKit'
dependency 'RestKit/ObjectMapping/JSONKit'
......@@ -3,19 +3,17 @@ PODS:
- LibComponentLogging-Core (1.1.4)
- LibComponentLogging-NSLog (1.0.2):
- LibComponentLogging-Core (>= 1.1.4)
- RestKit-JSON-JSONKit (0.9.3):
- JSONKit
- RestKit (= 0.9.3)
- RestKit-Network (0.9.3):
- RestKit (0.9.3)
- RestKit/Network (0.9.3):
- LibComponentLogging-NSLog
- RestKit (= 0.9.3)
- RestKit-ObjectMapping (0.9.3):
- RestKit/ObjectMapping (0.9.3):
- RestKit (= 0.9.3)
- RestKit-Network (= 0.9.3)
DOWNLOAD_ONLY:
- RestKit (0.9.3)
- RestKit/Network
- RestKit/ObjectMapping/JSONKit (0.9.3):
- JSONKit
- RestKit (= 0.9.3)
- RestKit/ObjectMapping (= 0.9.3)
DEPENDENCIES:
- RestKit-JSON-JSONKit
- RestKit-ObjectMapping
- RestKit/ObjectMapping/JSONKit
......@@ -21,11 +21,16 @@ module Pod
attr_accessor :defined_in_file
def initialize
@dependencies, @resources, @clean_paths, @subspecs = [], [], [], []
@xcconfig = Xcodeproj::Config.new
post_initialize
yield self if block_given?
end
# TODO This is just to work around a MacRuby bug
def post_initialize
@dependencies, @source_files, @resources, @clean_paths, @subspecs = [], [], [], [], []
@xcconfig = Xcodeproj::Config.new
end
# Attributes
attr_accessor :name
......@@ -306,7 +311,9 @@ module Pod
missing << "`homepage'" unless homepage
missing << "`author(s)'" unless authors
missing << "either `source' or `part_of'" unless source || part_of
missing << "`source_files'" unless source_files
missing << "`source_files'" if source_files.empty? && subspecs.empty?
# TODO
# * validate subspecs
incorrect = []
allowed = [nil, :ios, :osx]
......@@ -392,8 +399,7 @@ module Pod
@parent, @name = parent, name
# TODO a MacRuby bug, the correct super impl `initialize' is not called consistently
#super(&block)
@dependencies, @resources, @clean_paths, @subspecs = [], [], [], []
@xcconfig = Xcodeproj::Config.new
post_initialize
# A subspec is _always_ part of the source of its top level spec.
self.part_of = top_level_parent.name, version
......@@ -415,6 +421,9 @@ module Pod
"#{@parent.name}/#{@name}"
end
# TODO manually forwarding the attributes that we have so far needed to forward,
# but need to think if there's a better way to do this.
def summary
@summary ? @summary : top_level_parent.summary
end
......@@ -434,6 +443,10 @@ module Pod
def requires_arc
top_level_parent.requires_arc
end
def copy_header_mapping(from)
top_level_parent.copy_header_mapping(from)
end
end
end
......
Subproject commit d0a5f7b8b29c6cc81ff28760d756e5fb300a9e7f
Subproject commit 8b2cd6ae4b7c3ec41fe6adba6fa3b7b1f34aaadd
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