pod-builder 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0cdcd16503f8c363779e6b63a2a7c7ff66cc867a2092c65fb3a8bcb66758cfb
4
- data.tar.gz: 199fc74359e90c198cac6e8c5c1ea1e172ae93ffe584ccccf5c8d324cda0f761
3
+ metadata.gz: 24ce580a9fa3e410dab4cfcb639ba4e17f7b8b4b18a1c530667a5e271f05444f
4
+ data.tar.gz: bcc48ff2244170439b12f30c8853e05fb7225717cab020e6c049357c418f52ba
5
5
  SHA512:
6
- metadata.gz: 42587bceee70997a3a91ab5428945e9e98094500ceafca8a7de957fb60784e9e2bc84d9f823fa7c00866c5910e651aa48ad7b200924163a1d9879df241fcd541
7
- data.tar.gz: 60f520d51741fbff7d7216d018266182f4786a5b77c7eec21495d5199752edd850dbafaecd9644217d5bfb7643e41cce88d94b09c271372af2602846cd19db5a
6
+ metadata.gz: bd161a170715f3f4bb1639b5ac33d93c2e36d1bbdffa6389c09ab639e642240b0b829b755925d7ff57178fa6b49cdc2d45aa8c57e0cfbde5f228458b332e57b4
7
+ data.tar.gz: de14f5a02c0d0e712c6a561954a724394febd9abd0b9bf19d29b409bf79f4b1e7d3e616998c10a7dced86f7237c9d9c690280932757f8d9189ee89d39c752857
data/README.md CHANGED
@@ -343,7 +343,7 @@ You need to specify a `path` to the executable script which is relative to the _
343
343
 
344
344
  # Behind the scenes
345
345
 
346
- PodBuilder leverages CocoaPods code and [cocoapods-rome plugin](https://github.com/CocoaPods/Prebuilt) to compile pods into frameworks. Every compiled framework will be boxed (by adding it as a `vendored_framework`) as a subspec of a local podspec. When needed additional settings will be automatically ported from the original podspec, like for example xcconfig settings.
346
+ PodBuilder leverages CocoaPods to compile pods into frameworks. Every compiled framework will be boxed (by adding it as a `vendored_framework`) as a subspec of a local podspec. When needed additional settings will be automatically ported from the original podspec, like for example custom xcconfig settings.
347
347
 
348
348
  # FAQ
349
349
 
@@ -184,14 +184,26 @@ module PodBuilder
184
184
  @weak_frameworks = []
185
185
  @libraries = []
186
186
 
187
- @frameworks += extract_array(spec, "framework")
188
- @frameworks += extract_array(spec, "frameworks")
187
+ @frameworks += extract_array(spec.attributes_hash, "framework")
188
+ @frameworks += extract_array(spec.attributes_hash, "frameworks")
189
+ supported_platforms.each do |platform|
190
+ @frameworks += extract_array(spec.attributes_hash[platform], "framework")
191
+ @frameworks += extract_array(spec.attributes_hash[platform], "frameworks")
192
+ end
189
193
 
190
- @weak_frameworks += extract_array(spec, "weak_framework")
191
- @weak_frameworks += extract_array(spec, "weak_frameworks")
194
+ @weak_frameworks += extract_array(spec.attributes_hash, "weak_framework")
195
+ @weak_frameworks += extract_array(spec.attributes_hash, "weak_frameworks")
196
+ supported_platforms.each do |platform|
197
+ @weak_frameworks += extract_array(spec.attributes_hash[platform], "weak_framework")
198
+ @weak_frameworks += extract_array(spec.attributes_hash[platform], "weak_frameworks")
199
+ end
192
200
 
193
- @libraries += extract_array(spec, "library")
194
- @libraries += extract_array(spec, "libraries")
201
+ @libraries += extract_array(spec.attributes_hash, "library")
202
+ @libraries += extract_array(spec.attributes_hash, "libraries")
203
+ supported_platforms.each do |platform|
204
+ @libraries += extract_array(spec.attributes_hash[platform], "library")
205
+ @libraries += extract_array(spec.attributes_hash[platform], "libraries")
206
+ end
195
207
 
196
208
  @header_dir = spec.attributes_hash["header_dir"]
197
209
 
@@ -201,7 +213,7 @@ module PodBuilder
201
213
  @swift_version = spec.root.swift_version&.to_s
202
214
  @module_name = spec.root.module_name
203
215
 
204
- @default_subspecs = extract_array(spec, "default_subspecs")
216
+ @default_subspecs = extract_array(spec.attributes_hash, "default_subspecs")
205
217
  if default_subspec = spec.attributes_hash["default_subspec"]
206
218
  @default_subspecs.push(default_subspec)
207
219
  end
@@ -516,8 +528,12 @@ module PodBuilder
516
528
  return items.flatten.uniq.compact
517
529
  end
518
530
 
519
- def extract_array(spec, key)
520
- element = spec.attributes_hash.fetch(key, [])
531
+ def extract_array(dict, key)
532
+ if dict.nil?
533
+ return []
534
+ end
535
+
536
+ element = dict.fetch(key, [])
521
537
  if element.instance_of? String
522
538
  element = [element]
523
539
  end
@@ -1,4 +1,4 @@
1
1
  module PodBuilder
2
- VERSION = "3.3.0"
2
+ VERSION = "3.4.0"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pod-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Camin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-15 00:00:00.000000000 Z
11
+ date: 2021-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler