cocoapods-patch 0.0.5 → 0.0.6
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 +4 -4
- data/lib/cocoapods-patch/command/patch/apply.rb +20 -10
- data/lib/cocoapods-patch/gem_version.rb +1 -1
- 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: 5f1fc48aa0350d562d1ad476ab439624105cee81c22bab3b604a73131e1dd6eb
|
4
|
+
data.tar.gz: b03c8bf4611c20f40536936fa02c2b43f833588b63038d083fe834be9a368a0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c96592ef2a7c17cbc4916afc582a0af9219bf2ecf351dbc6f21ab10a6660cb4de8e5a8fcd69c3cada1d5d69c6c29c53e654143f426193e23a0e4bf757acb4d78
|
7
|
+
data.tar.gz: c7c7d93705236d902f9ddd02d4102ae800c9280bc1f8549d31b600a7fc4a1c5b6616b2029a0e2468fa58678fabc3dc5d5a9d09ddcba34f83ad414251a7added1
|
@@ -30,15 +30,25 @@ end
|
|
30
30
|
|
31
31
|
# also used from the post-install hook
|
32
32
|
def apply_patch(patch_file)
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
33
|
+
working_dir = Dir.pwd
|
34
|
+
repo_root = `git rev-parse --show-toplevel`.strip
|
35
|
+
ios_project_path = Pathname.new(working_dir).relative_path_from(Pathname.new(repo_root))
|
36
|
+
|
37
|
+
directory_arg = (ios_project_path.to_s.eql? ".") ? "Pods" : File.join(ios_project_path, 'Pods')
|
38
|
+
|
39
|
+
Dir.chdir(repo_root) {
|
40
|
+
Pod::UI.puts "YOOOOO #{patch_file} - #{directory_arg}"
|
41
|
+
check_cmd = "git apply --check #{patch_file} --directory=#{directory_arg} -p2 2> /dev/null"
|
42
|
+
|
43
|
+
can_apply = system(check_cmd)
|
44
|
+
if can_apply
|
45
|
+
apply_cmd = check_cmd.gsub('--check ', '')
|
46
|
+
did_apply = system(apply_cmd)
|
47
|
+
if did_apply
|
48
|
+
Pod::UI.puts "Successfully applied #{patch_file}"
|
49
|
+
else
|
50
|
+
Pod::UI.warn "Failed to apply #{patch_file}"
|
51
|
+
end
|
42
52
|
end
|
43
|
-
|
53
|
+
}
|
44
54
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Double Symmetry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|