Class: Pod::Podfile::TargetDefinition
- Inherits:
-
Object
- Object
- Pod::Podfile::TargetDefinition
- Defined in:
- lib/cocoapods-cafswitcher/podfile_switch.rb
Instance Method Summary collapse
- #clean(name, requirements) ⇒ Object
- #deep_copy(o) ⇒ Object
- #parse_isArchive(name, requirements) ⇒ Object
- #parse_isFramework(name, requirements) ⇒ Object
- #parse_isSource(name, requirements) ⇒ Object
-
#parse_needUpdatePod_git(name, requirements) ⇒ Object
def parse_debug_package(name, requirements) options = requirements.last return requirements unless options.is_a?(Hash).
- #parse_needUpdatePod_path(name, requirements) ⇒ Object
Instance Method Details
#clean(name, requirements) ⇒ Object
218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/cocoapods-cafswitcher/podfile_switch.rb', line 218 def clean(name, requirements) tmp_hash = deep_copy(requirements) = tmp_hash.last return tmp_hash unless .is_a?(Hash) isFramework = .delete(Pod::Podfile.isFramework) isSource = .delete(Pod::Podfile.isSource) isArchive = .delete(Pod::Podfile.isArchive) # isDebugPackage = options.delete(Pod::Podfile.isDebugPackage) # isReleasePackage = options.delete(Pod::Podfile.isReleasePackage) tmp_hash.pop if .empty? tmp_hash end |
#deep_copy(o) ⇒ Object
214 215 216 |
# File 'lib/cocoapods-cafswitcher/podfile_switch.rb', line 214 def deep_copy(o) Marshal.load(Marshal.dump(o)) end |
#parse_isArchive(name, requirements) ⇒ Object
141 142 143 144 145 146 147 148 149 150 |
# File 'lib/cocoapods-cafswitcher/podfile_switch.rb', line 141 def parse_isArchive(name, requirements) = requirements.last return requirements unless .is_a?(Hash) isArchive = .key?(Pod::Podfile.isArchive) # pod_name = Specification.root_name(name) Pod::Podfile.archiveList << name if isArchive requirements.pop if .empty? end |
#parse_isFramework(name, requirements) ⇒ Object
122 123 124 125 126 127 128 129 |
# File 'lib/cocoapods-cafswitcher/podfile_switch.rb', line 122 def parse_isFramework(name, requirements) = requirements.last return requirements unless .is_a?(Hash) isFramework = .key?(Pod::Podfile.isFramework) # pod_name = Specification.root_name(name) Pod::Podfile.frameworkList << name if isFramework requirements.pop if .empty? end |
#parse_isSource(name, requirements) ⇒ Object
131 132 133 134 135 136 137 138 139 |
# File 'lib/cocoapods-cafswitcher/podfile_switch.rb', line 131 def parse_isSource(name, requirements) = requirements.last return requirements unless .is_a?(Hash) isSource = .key?(Pod::Podfile.isSource) # pod_name = Specification.root_name(name) Pod::Podfile.sourceList << name if isSource requirements.pop if .empty? end |
#parse_needUpdatePod_git(name, requirements) ⇒ Object
def parse_debug_package(name, requirements)
= requirements.last
return requirements unless .is_a?(Hash)
isDebugPackage = .has_key?(Pod::Podfile.isDebugPackage)
# pod_name = Specification.root_name(name)
if isDebugPackage
Pod::Podfile.debugPackageList << name.gsub(/[\/]/, '_')
end
requirements.pop if .empty?
end
def parse_release_package(name, requirements)
= requirements.last
return requirements unless .is_a?(Hash)
isReleasePackage = .has_key?(Pod::Podfile.isReleasePackage)
# pod_name = Specification.root_name(name)
if isReleasePackage
Pod::Podfile.releasePackageList << name.gsub(/[\/]/, '_')
end
requirements.pop if .empty?
end
176 177 178 179 180 181 182 183 184 |
# File 'lib/cocoapods-cafswitcher/podfile_switch.rb', line 176 def parse_needUpdatePod_git(name, requirements) = requirements.last return requirements unless .is_a?(Hash) isGitPath = .key?(:git) # pod_name = Specification.root_name(name) Pod::Podfile.needUpdatePodList << name if isGitPath requirements.pop if .empty? end |
#parse_needUpdatePod_path(name, requirements) ⇒ Object
186 187 188 189 190 191 192 193 194 |
# File 'lib/cocoapods-cafswitcher/podfile_switch.rb', line 186 def parse_needUpdatePod_path(name, requirements) = requirements.last return requirements unless .is_a?(Hash) isPath = .key?(:path) # pod_name = Specification.root_name(name) Pod::Podfile.needUpdatePodList << name if isPath requirements.pop if .empty? end |