cocoapods-fix-module 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ffe52ae83b3a589de087178508764ff0402f9f0
4
- data.tar.gz: 19e1a654050283dcd33cc9035ef60597a7fba283
3
+ metadata.gz: c7c23b319d8524ea1e986fac6222acba692288de
4
+ data.tar.gz: 7ca8dd68331536137f9dbfcda26558dc430630f3
5
5
  SHA512:
6
- metadata.gz: 2c7782189a64692b7a4605bf561ce77a479ac8c4890d1bdb932660313bacc7d61b7616700bc202aaf0360d16967c14c2eb45b4551a066458615b4545080f1a6e
7
- data.tar.gz: acd641a68a2b3cdadeb624e17ed2eabc9baa90717261e077ff0d231035d7f35e0ba102b5f0676c76bd60a84406edabd50ebe5d190f007336b6d3e76bc5e123cc
6
+ metadata.gz: d9b52ab918ac476303a9c2272ad05ca77448d7995413e5293b8e008aa4b616382add50032c2147e877c857894a890da13d239e4ceaef9c3d2214b8ed06d57d27
7
+ data.tar.gz: 9ec5e9ef4254ade75e657d1d98644097ab9fe953bc0bf0c13e911b59299cafb9585128f083cd6d0f2a6d28538471562e44bdb2be2789c8799d2f92301f11d81a
@@ -1,3 +1,3 @@
1
1
  module CocoapodsFixModule
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -14,7 +14,29 @@
14
14
  # - create_umbrella_header
15
15
  # - create_module_map
16
16
  #
17
- #
17
+
18
+ module Pod
19
+ class PodTarget
20
+
21
+ def contain_vendored_libraries_and_no_vendored_frameworks?
22
+ return @uses_libraries_no_frameworks if defined? @uses_libraries_no_frameworks
23
+ @uses_libraries_no_frameworks = begin
24
+ accessors = file_accessors.reject { |a| a.spec.test_specification? }
25
+ !accessors.empty? && accessors.all? do |file_accessor|
26
+ !file_accessor.vendored_libraries.blank? && file_accessor.vendored_frameworks.blank?
27
+ end
28
+ end
29
+ end
30
+
31
+ def should_generate_module_map_for_a_pod_should_not_build?
32
+ @should_generate_module_map_for_a_pod_should_not_build ||= begin
33
+ self.uses_modular_headers? && contain_vendored_libraries_and_no_vendored_frameworks?
34
+ end
35
+ end
36
+
37
+ end
38
+ end
39
+
18
40
  module Pod
19
41
  class Installer
20
42
  class Xcode
@@ -25,7 +47,7 @@ module Pod
25
47
  FIX_MODULE_OLD_install = instance_method(:install!)
26
48
  define_method(:install!) do
27
49
 
28
- if (not target.should_build?) && target.send(:uses_modular_headers?)
50
+ if (not target.should_build?) && target.should_generate_module_map_for_a_pod_should_not_build?
29
51
  # special handling for pod with no source code
30
52
 
31
53
  # Most code below are copied from original install! method
@@ -100,7 +122,7 @@ module Pod
100
122
  FIX_MODULE_OLD_module_map_file_to_import = instance_method(:module_map_file_to_import)
101
123
  define_method(:module_map_file_to_import) do
102
124
 
103
- if (not target.should_build?) && target.send(:uses_modular_headers?)
125
+ if (not target.should_build?) && target.should_generate_module_map_for_a_pod_should_not_build?
104
126
  # ---- Code bellow is copied form the original method ----
105
127
  #
106
128
  # ---------------- this line is deleted ------------------
@@ -13,8 +13,30 @@
13
13
  # we treat it differently: like nomarl pods,
14
14
  # - create_umbrella_header
15
15
  # - create_module_map
16
- #
17
- #
16
+
17
+ module Pod
18
+ class PodTarget
19
+
20
+ def contain_vendored_libraries_and_no_vendored_frameworks?
21
+ return @uses_libraries_no_frameworks if defined? @uses_libraries_no_frameworks
22
+ @uses_libraries_no_frameworks = begin
23
+ accessors = file_accessors.reject { |a| a.spec.test_specification? }
24
+ !accessors.empty? && accessors.all? do |file_accessor|
25
+ !file_accessor.vendored_libraries.blank? && file_accessor.vendored_frameworks.blank?
26
+ end
27
+ end
28
+ end
29
+
30
+ def should_generate_module_map_for_a_pod_should_not_build?
31
+ @should_generate_module_map_for_a_pod_should_not_build ||= begin
32
+ self.uses_modular_headers? && contain_vendored_libraries_and_no_vendored_frameworks?
33
+ end
34
+ end
35
+
36
+ end
37
+ end
38
+
39
+
18
40
  module Pod
19
41
  class Installer
20
42
  class Xcode
@@ -25,7 +47,7 @@ module Pod
25
47
  FIX_MODULE_OLD_install = instance_method(:install!)
26
48
  define_method(:install!) do
27
49
 
28
- if (not target.should_build?) && target.send(:uses_modular_headers?)
50
+ if (not target.should_build?) && target.should_generate_module_map_for_a_pod_should_not_build?
29
51
  # special handling for pod with no source code
30
52
 
31
53
  # Most code below are copied from original install! method
@@ -99,7 +121,7 @@ module Pod
99
121
  ## ---- modified
100
122
  # next unless pod_target.should_build? && pod_target.defines_module?
101
123
  next unless pod_target.defines_module?
102
- next unless (pod_target.should_build? || pod_target.send(:uses_modular_headers?) )
124
+ next unless (pod_target.should_build? || pod_target.should_generate_module_map_for_a_pod_should_not_build? )
103
125
  ## ---- modifed end
104
126
  #
105
127
  # contentx below is copied from original method
@@ -143,7 +165,7 @@ module Pod
143
165
  def self.search_paths_for_dependent_targets(target, dependent_targets, test_xcconfig = false)
144
166
  ## ---- modified
145
167
  # dependent_targets = dependent_targets.select(&:should_build?)
146
- dependent_targets = dependent_targets.select { |target| target.should_build? || target.send(:uses_modular_headers?) }
168
+ dependent_targets = dependent_targets.select { |target| target.should_build? || target.should_generate_module_map_for_a_pod_should_not_build? }
147
169
  ## ---- modifed end
148
170
  #
149
171
  # contentx below is copied from original method
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-fix-module
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leavez