cocoapods-patch 0.0.9 → 1.0.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: f0aa117625e0803e3576bbb68fcbb3b005794e874324c83f215be1ab88e995cd
4
- data.tar.gz: 9a8b0648a734914a667805591fcc2d005ab797ba76efe76f8d8d86709299a1d5
3
+ metadata.gz: '09b3961ea67614d95650203463aa53b0e556e4630f52bc88a1d826670aa932db'
4
+ data.tar.gz: 2bbd9aeedbf8912b991c7e83762b12c5b1ef4def1d2fc0af03a066126fd6569f
5
5
  SHA512:
6
- metadata.gz: 793bafd2255d2e9d86881fdc6087e6cdd75d4d73cc36364a53cac6914bbfa8befc0735503542ff9e8c55aba4fbd223c28ef029af3172c56785bb115c31176415
7
- data.tar.gz: b0bc3602df6ca681dfdb14da70e4a05e3d2d5d311ab08b0c14b3df4e01c9d000b881e6c8acfb5272bf0353745855242ff21bcc8c6ebefa88fa38075237c234f1
6
+ metadata.gz: d973db22fe9a736b16df29b251cc3cd177ce6c7cac399f3f7f75ca55786776015e650fb680003c4376d144621c765c6eaca66d429e4eae8e00e86bcbea2f3bb9
7
+ data.tar.gz: ee4054f9540888b48282e1275355658d17bf1b744dbe2f3ad725b53b4cf0a980085f49d34eb6815fdbf03484b92bb3e253669702bd6804b6ff50aefcd470e5d0
data/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # Installation & Update
2
+
3
+ To install or update cocoapods-patch see [README](https://github.com/DoubleSymmetry/cocoapods-patch).
4
+
5
+ ## Main
6
+
7
+ ##### Enhancements
8
+
9
+ * None.
10
+
11
+ ##### Bug Fixes
12
+
13
+ * None.
14
+
15
+ ## 1.0.0 (1.11.21)
16
+
17
+ ##### Enhancements
18
+
19
+ * Use official pre_integrate hook
20
+ [dcvz](https://github.com/dcvz)
21
+ [#7](https://github.com/DoubleSymmetry/cocoapods-patch/pull/7)
22
+
23
+ ##### Bug Fixes
24
+
25
+ * None.
data/README.md CHANGED
@@ -15,6 +15,10 @@ Next, add a `plugin 'cocoapods-patch'` line to your Podfile to use the plugin. T
15
15
 
16
16
  That's it, you're done.
17
17
 
18
+ **NOTE:**
19
+ `cocoapods-patch` version 1.0.0 and above require you to use Cocoapods 1.11.0 or greater.
20
+ For anything below that please use version 0.0.5.
21
+
18
22
  ## Usage
19
23
 
20
24
  ### Creating a patch
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPatch
2
- VERSION = "0.0.9"
2
+ VERSION = "1.0.0"
3
3
  end
data/lib/pod/hook.rb CHANGED
@@ -15,29 +15,14 @@ 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
34
18
 
35
- def apply_patches
36
- Pod::UI.puts 'Applying patches if necessary'
37
- patches_dir = Pathname.new(Dir.pwd) + 'patches'
38
- if patches_dir.directory?
39
- patches = patches_dir.each_child.select { |c| c.to_s.end_with?('.diff') }
40
- patches.each { |p| apply_patch(p) }
19
+ Pod::HooksManager.register('cocoapods-patch', :pre_integrate) do |context|
20
+ Pod::UI.puts 'Applying patches if necessary'
21
+ patches_dir = Pathname.new(Dir.pwd) + 'patches'
22
+ if patches_dir.directory?
23
+ patches = patches_dir.each_child.select { |c| c.to_s.end_with?('.diff') }
24
+ patches.each { |p| apply_patch(p) }
25
+ end
41
26
  end
42
27
  end
43
28
  end
metadata CHANGED
@@ -1,71 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-patch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 1.0.0
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-05-10 00:00:00.000000000 Z
11
+ date: 2021-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: cocoapods
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
20
- type: :development
19
+ version: 1.11.0
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: '2.0'
26
+ version: 1.11.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '13.0'
33
+ version: '2.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '13.0'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.9'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.9'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: cocoapods
56
+ name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :runtime
61
+ version: '3.9'
62
+ type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.0'
68
+ version: '3.9'
69
69
  description: Create & apply patches to Pods
70
70
  email:
71
71
  - dev@doublesymmetry.com
@@ -73,6 +73,7 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - CHANGELOG.md
76
77
  - README.md
77
78
  - lib/cocoapods_patch.rb
78
79
  - lib/cocoapods_plugin.rb