cocoapods-patch 1.0.1 → 1.0.2

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: 9c776a1fc38b8a256df3593271ef62449d5eb48dd754198e718005c1107f3136
4
+ data.tar.gz: ab2a05988e78230620cfd26cd9d68442fcb85b9b1e6b9823bf1737c6d03d6863
5
5
  SHA512:
6
- metadata.gz: 56c086ce0f18238fedb169377d9de115cf50a660d2d5356b78c9c973441fe79e30f98372fcce72242431afcbbe418ae95aaaa23f5986ba9bdbdf551f8a8843ba
7
- data.tar.gz: 29cafa7c713700b5ff74a3c82ade35f20885d8411ee9a117be870e473ee60a8d4c58f377c0506ab9e2b4ef382734b1768c4318d65c930000008357178221749d
6
+ metadata.gz: e48a2c658ca3d8e47b03294312b945c2a4b9a797f0b6348ecf45b5877db0aaff2beb4470ead4292e1c84e99534f08624bdc345abd6c928bf000559fde0e2c55c
7
+ data.tar.gz: 9ef7532fd542f35a45cad2c239266944b8c671d9e5fec3f0c3d15394cd30b60fbdcc1ce6e795ac887f336efdc2b5898f3a633045efe083d7b4092cf1a44f074c
data/CHANGELOG.md CHANGED
@@ -12,6 +12,16 @@ To install or update cocoapods-patch see [README](https://github.com/DoubleSymme
12
12
 
13
13
  * None.
14
14
 
15
+ ## 1.0.2 (6.12.21)
16
+
17
+ ##### Enhancements
18
+
19
+ * None.
20
+
21
+ ##### Bug Fixes
22
+
23
+ * Revert to previous way of applying patches. There's a bug in Cocoapods that does not call hooks.
24
+
15
25
  ## 1.0.1 (2.11.21)
16
26
 
17
27
  ##### Enhancements
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPatch
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/pod/hook.rb CHANGED
@@ -15,9 +15,25 @@ module CocoapodsPatch
15
15
  end
16
16
  end
17
17
  end
18
+ end
19
+ end
20
+
21
+ class Pod::Installer
22
+ # Because our patches may also delete files, we need to apply them before the pod project is generated
23
+ # The project is generated in the `integrate` method, so we override it
24
+ # We first run our patch action and then the original implementation of the method
25
+ # Reference: https://github.com/CocoaPods/CocoaPods/blob/760828a07f8fcfbff03bce13f56a1789b6f5a95d/lib/cocoapods/installer.rb#L178
26
+ alias_method :integrate_old, :integrate
27
+
28
+ def integrate
29
+ # apply our patches
30
+ apply_patches
31
+ # run the original implementation
32
+ integrate_old
33
+ end
18
34
 
19
- Pod::HooksManager.register('cocoapods-patch', :pre_integrate) do |context|
20
- Pod::UI.puts 'Applying patches if necessary'
35
+ def apply_patches
36
+ Pod::UI.puts 'Applying patches if necessary'
21
37
  patches_dir = Pathname.new(Dir.pwd) + 'patches'
22
38
  if patches_dir.directory?
23
39
  patches = patches_dir.each_child.select { |c| c.to_s.end_with?('.diff') }
@@ -31,6 +47,7 @@ module CocoapodsPatch
31
47
  apply_patch(p)
32
48
  end
33
49
  end
34
- end
35
50
  end
36
51
  end
52
+
53
+
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.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Double Symmetry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-02 00:00:00.000000000 Z
11
+ date: 2021-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods