cocoapods-fix-module 0.0.7 → 0.1.1

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.
@@ -0,0 +1,67 @@
1
+
2
+ module Pod
3
+ class PodTarget
4
+
5
+ def contain_vendored_libraries_and_no_vendored_frameworks?
6
+ return @uses_libraries_no_frameworks if defined? @uses_libraries_no_frameworks
7
+ @uses_libraries_no_frameworks = begin
8
+ accessors = file_accessors.reject { |a| a.spec.test_specification? }
9
+ !accessors.empty? && accessors.all?{ |a| a.vendored_frameworks.blank? } && accessors.any?{ |a| not a.vendored_libraries.blank? }
10
+ end
11
+ end
12
+
13
+ def should_generate_module_map_for_a_pod_should_not_build?
14
+ @should_generate_module_map_for_a_pod_should_not_build ||= begin
15
+ self.defines_module? && contain_vendored_libraries_and_no_vendored_frameworks?
16
+ end
17
+ end
18
+
19
+ end
20
+ end
21
+
22
+
23
+
24
+
25
+ module Pod
26
+ class Target
27
+ # @since 1.5.0
28
+ # checked 1.6 1.7 1.8
29
+ # except `requires_frameworks?` is renamed to `build_as_framework?`, but is have an alias.
30
+ class BuildSettings
31
+
32
+ class PodTargetSettings
33
+
34
+ # Patch (because there is a should_build? check)
35
+ #
36
+ FIX_MODULE_OLD_module_map_file_to_import = instance_method(:module_map_file_to_import)
37
+ define_method(:module_map_file_to_import) do
38
+
39
+ if (not target.should_build?) && target.should_generate_module_map_for_a_pod_should_not_build?
40
+ # ---- Code bellow is copied form the original method ----
41
+ #
42
+ # ---------------- this line is deleted ------------------
43
+ # return unless target.should_build?
44
+ # -------------------------------------------------------
45
+ #
46
+ return if target.requires_frameworks?
47
+ return unless target.defines_module?
48
+
49
+ if target.uses_swift?
50
+ # for swift, we have a custom build phase that copies in the module map, appending the .Swift module
51
+ "${PODS_CONFIGURATION_BUILD_DIR}/#{target.label}/#{target.product_module_name}.modulemap"
52
+ else
53
+ "${PODS_ROOT}/#{target.module_map_path.relative_path_from(target.sandbox.root)}"
54
+ end
55
+ # ---- Code above is copied form the original method ----
56
+ else
57
+ # call original
58
+ FIX_MODULE_OLD_module_map_file_to_import.bind(self).()
59
+ end
60
+
61
+ end # patch ended
62
+
63
+ end
64
+
65
+ end
66
+ end
67
+ end
@@ -1,9 +1,14 @@
1
1
 
2
2
  Pod::HooksManager.register('cocoapods-fix-module', :pre_install) do |installer_context|
3
- # if Pod::VERSION.start_with? "1.5"
4
- # require 'cocoapods-fix-module/patch1.5'
5
- # else
6
- # 1.6 or above
7
- require 'cocoapods-fix-module/patch'
8
- # end
3
+ if Pod::VERSION.start_with? "1.6."
4
+ require 'cocoapods-fix-module/patch1.6'
5
+ elsif Pod::VERSION.start_with? "1.7."
6
+ require 'cocoapods-fix-module/patch1.7'
7
+ elsif Pod::VERSION.start_with? "1.8."
8
+ require 'cocoapods-fix-module/patch1.8'
9
+ else
10
+ Pod::UI.warn "cocoapods-fix-module have not been tested for Cocoapods #{Pod::VERSION}, use at your own risk"
11
+ require 'cocoapods-fix-module/patch1.8'
12
+ end
9
13
  end
14
+
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-fix-module
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leavez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-30 00:00:00.000000000 Z
11
+ date: 2019-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -60,15 +60,38 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - ".gitignore"
63
+ - DEMO/.bundle/config
64
+ - DEMO/.gitignore
65
+ - DEMO/DEMO.xcodeproj/project.pbxproj
66
+ - DEMO/DEMO.xcworkspace/contents.xcworkspacedata
67
+ - DEMO/DEMO.xcworkspace/pod.json
68
+ - DEMO/DEMO/AppDelegate.swift
69
+ - DEMO/DEMO/Assets.xcassets/AppIcon.appiconset/Contents.json
70
+ - DEMO/DEMO/Assets.xcassets/Contents.json
71
+ - DEMO/DEMO/Base.lproj/LaunchScreen.storyboard
72
+ - DEMO/DEMO/Info.plist
73
+ - DEMO/DEMO/ViewController.swift
74
+ - DEMO/DEMO/demos/BDWebImage_demo.m
75
+ - DEMO/DEMOTests/DEMOTests.swift
76
+ - DEMO/DEMOTests/Info.plist
77
+ - DEMO/Gemfile
78
+ - DEMO/Gemfile.lock
79
+ - DEMO/Podfile
80
+ - DEMO/Podfile.lock
63
81
  - Gemfile
82
+ - Gemfile.lock
64
83
  - LICENSE.txt
65
84
  - README.md
66
85
  - Rakefile
67
86
  - cocoapods-fix-module.gemspec
68
87
  - lib/cocoapods-fix-module.rb
69
88
  - lib/cocoapods-fix-module/gem_version.rb
70
- - lib/cocoapods-fix-module/patch.rb
89
+ - lib/cocoapods-fix-module/hint_no_app_target_support.rb
71
90
  - lib/cocoapods-fix-module/patch1.5.rb
91
+ - lib/cocoapods-fix-module/patch1.6.rb
92
+ - lib/cocoapods-fix-module/patch1.7.rb
93
+ - lib/cocoapods-fix-module/patch1.8.rb
94
+ - lib/cocoapods-fix-module/patch_common.rb
72
95
  - lib/cocoapods_plugin.rb
73
96
  - spec/command/module_spec.rb
74
97
  - spec/spec_helper.rb