cocoapods-patch 1.0.1 → 1.2.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: 9f8a1091ce7f95d367d0fb5cdcdc01533bade7aa87c3750c03607ca0d0d6893b
4
- data.tar.gz: 91ad3babdd2763618a7bedc0bb4186d63558df08c6bbc2a72453e4dcc2fbe555
3
+ metadata.gz: 1105a246c269e0a64d3e722c32abbec432a34c18e8292a30575278278c7f8eed
4
+ data.tar.gz: 7940be1b046e9da03058165b59a7e8ea17a5bb041d477b5d43a26d4453e78d39
5
5
  SHA512:
6
- metadata.gz: 56c086ce0f18238fedb169377d9de115cf50a660d2d5356b78c9c973441fe79e30f98372fcce72242431afcbbe418ae95aaaa23f5986ba9bdbdf551f8a8843ba
7
- data.tar.gz: 29cafa7c713700b5ff74a3c82ade35f20885d8411ee9a117be870e473ee60a8d4c58f377c0506ab9e2b4ef382734b1768c4318d65c930000008357178221749d
6
+ metadata.gz: 6dabcfc809340166278d5fa77752b09497b6c9010460e3ea6fb5d77807d93c12a1eda3bca71c4cafbe6dadf993ccd22c0280820290320ce64b243dca4deed096
7
+ data.tar.gz: 03bf7d46a65ff0553f3931b76e66f605a0194295170b3c93133f7bc63503de7a25d0b0bfc4e8003b491fdb26f9f0648d4d54b9273223cb678c31225692822e19
data/CHANGELOG.md CHANGED
@@ -12,6 +12,26 @@ To install or update cocoapods-patch see [README](https://github.com/DoubleSymme
12
12
 
13
13
  * None.
14
14
 
15
+ ## 1.2.0 (14.6.23)
16
+
17
+ ##### Enhancements
18
+
19
+ * cocoapods 1.12.0 compatibility.
20
+
21
+ ##### Bug Fixes
22
+
23
+ * None.
24
+
25
+ ## 1.0.2 (6.12.21)
26
+
27
+ ##### Enhancements
28
+
29
+ * None.
30
+
31
+ ##### Bug Fixes
32
+
33
+ * Revert to previous way of applying patches. There's a bug in Cocoapods that does not call hooks.
34
+
15
35
  ## 1.0.1 (2.11.21)
16
36
 
17
37
  ##### Enhancements
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPatch
2
- VERSION = "1.0.1"
2
+ VERSION = "1.2.0"
3
3
  end
data/lib/pod/hook.rb CHANGED
@@ -11,13 +11,30 @@ module CocoapodsPatch
11
11
  patches = patches_dir.each_child.select { |c| c.to_s.end_with?('.diff') }
12
12
  patches.each do |p|
13
13
  pod_name = File.basename(p, ".diff")
14
- context.sandbox.clean_pod(pod_name)
14
+ pod_dir = context.sandbox.pod_dir(pod_name)
15
+ context.sandbox.clean_pod(pod_name, pod_dir)
15
16
  end
16
17
  end
17
18
  end
19
+ end
20
+ end
21
+
22
+ class Pod::Installer
23
+ # Because our patches may also delete files, we need to apply them before the pod project is generated
24
+ # The project is generated in the `integrate` method, so we override it
25
+ # We first run our patch action and then the original implementation of the method
26
+ # Reference: https://github.com/CocoaPods/CocoaPods/blob/760828a07f8fcfbff03bce13f56a1789b6f5a95d/lib/cocoapods/installer.rb#L178
27
+ alias_method :integrate_old, :integrate
28
+
29
+ def integrate
30
+ # apply our patches
31
+ apply_patches
32
+ # run the original implementation
33
+ integrate_old
34
+ end
18
35
 
19
- Pod::HooksManager.register('cocoapods-patch', :pre_integrate) do |context|
20
- Pod::UI.puts 'Applying patches if necessary'
36
+ def apply_patches
37
+ Pod::UI.puts 'Applying patches if necessary'
21
38
  patches_dir = Pathname.new(Dir.pwd) + 'patches'
22
39
  if patches_dir.directory?
23
40
  patches = patches_dir.each_child.select { |c| c.to_s.end_with?('.diff') }
@@ -31,6 +48,7 @@ module CocoapodsPatch
31
48
  apply_patch(p)
32
49
  end
33
50
  end
34
- end
35
51
  end
36
52
  end
53
+
54
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-patch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Double Symmetry
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-02 00:00:00.000000000 Z
11
+ date: 2023-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.11.0
19
+ version: 1.12.0
20
20
  type: :runtime
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.11.0
26
+ version: 1.12.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -87,7 +87,7 @@ homepage: https://github.com/DoubleSymmetry/cocoapods-patch
87
87
  licenses:
88
88
  - MIT
89
89
  metadata: {}
90
- post_install_message:
90
+ post_install_message:
91
91
  rdoc_options: []
92
92
  require_paths:
93
93
  - lib
@@ -102,8 +102,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 3.0.3
106
- signing_key:
105
+ rubygems_version: 3.4.1
106
+ signing_key:
107
107
  specification_version: 4
108
108
  summary: Create & apply patches to Pods
109
109
  test_files: []