cocoapods-patch 0.0.2 → 0.0.3
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 +28 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0630f65e8646fbca0c6a49834d7cb617ad8fc1895a23bb6eeca1c92cf6ba96fe
|
4
|
+
data.tar.gz: 7ddba775f9029c46588750f176870f6b5c5ec27ce0373db22ac5832dab354a85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e56809e31e8b3beecdc9bf9df7699915cb8591aa05d70b428ab47803414552d22e14cfce734ec5733002ae9ba5943e97539bbe4853dffea03f539a413a63b4a
|
7
|
+
data.tar.gz: 2511dc28bc71ef9f6d04470a315b12f7a442afdb9d1020798ea93ed8ef23faae065c2cedfe8819723e1809b97a114c5598aed7d6d40b8d5aa600cece249f1fc9
|
data/lib/cocoapods-patch/hook.rb
CHANGED
@@ -2,13 +2,33 @@ require 'cocoapods'
|
|
2
2
|
require 'pathname'
|
3
3
|
require_relative 'command/patch/apply'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
class Pod::Installer
|
6
|
+
# The only way to run my custom method after the pod integrates with the project (http://blog.bigbinary.com/2012/01/08/alias-vs-alias-method.html)
|
7
|
+
# Repace the method implementation integrate_user_project with ours
|
8
|
+
alias_method :perform_post_install_actions_old, :perform_post_install_actions
|
9
|
+
|
10
|
+
def perform_post_install_actions
|
11
|
+
# integrate with the user project
|
12
|
+
perform_post_install_actions_old
|
13
|
+
# run custom post_integrate_method
|
14
|
+
apply_patches
|
15
|
+
end
|
16
|
+
|
17
|
+
def apply_patches
|
18
|
+
Pod::UI.puts 'Applying patches if necessary'
|
19
|
+
patches_dir = Pathname.new(Dir.pwd) + 'patches'
|
20
|
+
patches = patches_dir.each_child.select { |c| c.to_s.end_with?('.diff') }
|
21
|
+
patches.each { |p| apply_patch(p) }
|
13
22
|
end
|
14
23
|
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
|
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: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Double Symmetry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|