cocoapods-patch 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-patch/gem_version.rb +1 -1
- data/lib/cocoapods-patch/hook.rb +9 -18
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9894b0de3c7d124458215a8f93fb28437b98fdaad904eac8019e90a97fa2263
|
4
|
+
data.tar.gz: 4f0e69e6cfb98e6de924a1399d6f75720063be8e148796c00bcf61b2fe222222
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26fe03a6d87d55716158439f59dc213aede0bf6bf49b76d03d2b8556e9815d889314abc072435c1aa026189bc888f0f8ff4331fb03d6b3549b92f64b03ae905c
|
7
|
+
data.tar.gz: e404b677a854b965b1951206ff0dd466de15b3b52fdca78691e89fb83ffed67ea6c5534867d6b1e6fc791bb1bc123aac47f96b691ce72a6b2d0e316ca8d75726
|
data/lib/cocoapods-patch/hook.rb
CHANGED
@@ -3,15 +3,17 @@ require 'pathname'
|
|
3
3
|
require_relative 'command/patch/apply'
|
4
4
|
|
5
5
|
class Pod::Installer
|
6
|
-
#
|
7
|
-
#
|
8
|
-
|
6
|
+
# Because our patches may also delete files, we need to apply them before the pod project is generated
|
7
|
+
# The project is generated in the `integrate` method, so we override it
|
8
|
+
# We first run our patch action and then the original implementation of the method
|
9
|
+
# Reference: https://github.com/CocoaPods/CocoaPods/blob/760828a07f8fcfbff03bce13f56a1789b6f5a95d/lib/cocoapods/installer.rb#L178
|
10
|
+
alias_method :integrate_old, :integrate
|
9
11
|
|
10
|
-
def
|
11
|
-
#
|
12
|
-
perform_post_install_actions_old
|
13
|
-
# run custom post_integrate_method
|
12
|
+
def integrate
|
13
|
+
# apply our patches
|
14
14
|
apply_patches
|
15
|
+
# run the original implementation
|
16
|
+
integrate_old
|
15
17
|
end
|
16
18
|
|
17
19
|
def apply_patches
|
@@ -21,14 +23,3 @@ class Pod::Installer
|
|
21
23
|
patches.each { |p| apply_patch(p) }
|
22
24
|
end
|
23
25
|
end
|
24
|
-
|
25
|
-
# module CocoapodsPatch
|
26
|
-
# module Hooks
|
27
|
-
# Pod::HooksManager.register('cocoapods-patch', :post_integrate) do |context|
|
28
|
-
# Pod::UI.puts 'Applying patches if necessary'
|
29
|
-
# patches_dir = Pathname.new(context.sandbox_root) + '..' + 'patches'
|
30
|
-
# patches = patches_dir.each_child.select { |c| c.to_s.end_with?('.diff') }
|
31
|
-
# patches.each { |p| apply_patch(p) }
|
32
|
-
# end
|
33
|
-
# end
|
34
|
-
# end
|