pod-builder 0.8.3 → 0.8.4

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: e144495c0856e1ee8b9b63cf3ce66f3f34fc7d408970ec8786f49ed82a338685
4
- data.tar.gz: 5c73c6d88a311aee634e5f50b77aeb438955164253be72e4fa4888fb6be06355
3
+ metadata.gz: e686529fa18b1c7110ca3d6aff4ed5637d930c49df6a89d065f3db842fbe267c
4
+ data.tar.gz: 90c3ba1c7879e7bbcd6a32ef5581027c3c0ce2f4ae3fd2371c35e42bb8123fb7
5
5
  SHA512:
6
- metadata.gz: 88937db38c5ae2e8a3c30129b09dceb436c8468122ae6b691d6022b8f10da11055a1c83fba4b236b2ea3bb1c95764f2c0f217ddfab0abe3a61a5d675ac59edaa
7
- data.tar.gz: 3d1bed1971282a7f82ad70179da2a114f634611920e6a8c691f145f9d17689d38e6fafed625c1c0f98e8da642bb6f4c63b49274b6606e173a0600ee133c41732
6
+ metadata.gz: 2e50247e73514004127e846bb9cfb24d663db691a64bba527ee77e580773fac9d0cce2ab517d6fc384cab6b4dd56a7bb69d1750f12b5a2d29fb118e168fce308
7
+ data.tar.gz: f8d701b9b1470804e712dadd39b77fb9e0f33301056a7ddfe00870c27275bd6907db12e7baed13afe3ad38f9377c2a255072785e67549c88c9839eb830052633
@@ -373,17 +373,45 @@ module PodBuilder
373
373
  return element
374
374
  end
375
375
 
376
- def source_files_from(spec)
377
- root_source_files = spec.root.attributes_hash.fetch("source_files", [])
378
- if root_source_files.is_a? String
379
- root_source_files = root_source_files.split(",")
376
+ def source_files_from_string(source)
377
+ files = []
378
+ if source.is_a? String
379
+ matches = source.match(/(.*)({(.),?(.)?})/)
380
+ if matches&.size == 5
381
+ source = matches[1] + matches[3]
382
+ if matches[4].length > 0
383
+ source += "," + matches[1] + matches[4]
384
+ end
385
+ end
386
+
387
+ return source.split(",")
388
+ else
389
+ return source
380
390
  end
381
- source_files = spec.attributes_hash.fetch("source_files", [])
382
- if source_files.is_a? String
383
- source_files = source_files.split(",")
391
+ end
392
+
393
+ def source_files_from(spec)
394
+ files = spec.root.attributes_hash.fetch("source_files", [])
395
+ root_source_files = source_files_from_string(files)
396
+
397
+ files = spec.attributes_hash.fetch("source_files", [])
398
+ source_files = source_files_from_string(files)
399
+
400
+ subspec_source_files = []
401
+ if spec.name == spec.root.name
402
+ default_podspecs = spec.attributes_hash.fetch("default_subspecs", [])
403
+ if default_podspecs.is_a? String
404
+ default_podspecs = [default_podspecs]
405
+ end
406
+ default_podspecs.each do |subspec_name|
407
+ if subspec = spec.subspecs.detect { |x| x.name == "#{spec.root.name}/#{subspec_name}" }
408
+ files = subspec.attributes_hash.fetch("source_files", [])
409
+ subspec_source_files += source_files_from_string(files)
410
+ end
411
+ end
384
412
  end
385
413
 
386
- return source_files + root_source_files
414
+ return source_files + root_source_files + subspec_source_files
387
415
  end
388
416
 
389
417
  def spec_and_dependencies(spec, all_specs)
@@ -1,4 +1,4 @@
1
1
  module PodBuilder
2
- VERSION = "0.8.3"
2
+ VERSION = "0.8.4"
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: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Camin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-29 00:00:00.000000000 Z
11
+ date: 2019-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler