cocoapods-developing-folder 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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 239df26f7c0cdfd28038b5d6860b569a47b703ad
|
4
|
+
data.tar.gz: abd7e951556b590cd3700c67170c39bf12fb1d80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5348d0b811a6cc93cf385a513b6c61a38b9ee3e011e43957e4151ca4f470d53bb098f57bb739ace3419d1d22a18d7c72de75a42f66ab48d3b10cc6dc09b892d7
|
7
|
+
data.tar.gz: 423b1af15cfc55f5b24bcec5de47dc44d4e96ba5d77340304d3110c8d72d1fa1db0342af3d3bb8909016fb3e8cba6d15b7d64b22964758a8c5c374f8013bd881
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# cocoapods-developing-folder
|
2
2
|
|
3
|
-
A cocoapods plugin
|
4
|
-
|
5
|
-
-
|
3
|
+
A cocoapods plugin provide a branch of tools for who heavily use development pods in project:
|
4
|
+
|
5
|
+
- Availability to preserves the folder structure in `development pods`
|
6
|
+
- Provides a new keyword `folder` to import all local pods in a specific folder and its subfolders
|
7
|
+
- Function to inhibit warnings for specific pods with a block.
|
6
8
|
|
7
9
|
|
8
10
|
## Installation
|
@@ -11,7 +13,7 @@ A cocoapods plugin that:
|
|
11
13
|
|
12
14
|
## Usage
|
13
15
|
|
14
|
-
####
|
16
|
+
#### 🔸 Preserves the folder structure
|
15
17
|
|
16
18
|
Add the following to your podfile
|
17
19
|
|
@@ -25,7 +27,7 @@ If you don't want to create groups for top level folders (Local pods are usually
|
|
25
27
|
use_folders :skip_top_level_group => ["modules"]
|
26
28
|
```
|
27
29
|
|
28
|
-
####
|
30
|
+
#### 🔸 Import all local pods in specific folder
|
29
31
|
|
30
32
|
Use `folder` just like `pod` keyword. (In fact, they are just ruby functions)
|
31
33
|
|
@@ -43,12 +45,36 @@ end
|
|
43
45
|
It will import all local pods in that folder and its subfolders recrusively, equivalent of:
|
44
46
|
|
45
47
|
```
|
46
|
-
pod "
|
47
|
-
pod "
|
48
|
-
pod "
|
48
|
+
pod "Ayanami", :path => "modules/Ayanami"
|
49
|
+
pod "Asuka", :path => "modules/Asuka"
|
50
|
+
pod "Shinji", :path => "modules/some/path/to/Shinji"
|
49
51
|
#...
|
50
52
|
```
|
51
53
|
|
54
|
+
#### 🔸 Inhibit warnings for specific pods
|
55
|
+
|
56
|
+
Add the following to your podfile
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
plugin 'cocoapods-developing-folder'
|
60
|
+
|
61
|
+
inhibit_warnings_with_condition do |pod_name, pod_target|
|
62
|
+
# your condition written in ruby, like:
|
63
|
+
# `not pod_name.start_with? "LE"` or
|
64
|
+
# `['Asuka', 'Ayanami', 'Shinji'].include? pod_name`
|
65
|
+
end
|
66
|
+
```
|
67
|
+
`pod_target` is a instance of `Pod::PodTarget` [class](https://github.com/CocoaPods/CocoaPods/blob/93011ece10dd76b8d783bc80db742dfd03f7cbac/lib/cocoapods/target/pod_target.rb), containing many more info than the name. You can use it to set up complex rules.
|
68
|
+
|
69
|
+
This function will override the warning inhibition settings by the original methods, like: `inhibit_all_warnings!`, `pod 'Ayanami', :inhibit_warnings => true`
|
70
|
+
|
71
|
+
This function is usually used for disabling warning inhibition for development pods and enabling for the others. When you try to implement this with offical methods, cocoapods may warn you at `pod install`:
|
72
|
+
|
73
|
+
> The pod #{pod_name} is linked to different targets which contain different settings to inhibit warnings. CocoaPods does not currently support different settings and will fall back to your preference set in the root target definition.
|
74
|
+
|
75
|
+
This function solve the problem.
|
76
|
+
|
77
|
+
|
52
78
|
# License
|
53
79
|
|
54
80
|
MIT
|
@@ -2,6 +2,7 @@ require 'cocoapods-developing-folder/command/folder_DSL.rb'
|
|
2
2
|
|
3
3
|
module Pod
|
4
4
|
class Podfile
|
5
|
+
|
5
6
|
def use_folders(*skipped_top_level_folder_names)
|
6
7
|
require 'cocoapods-developing-folder/command/preserve_folder.rb'
|
7
8
|
names_to_skip = []
|
@@ -11,5 +12,12 @@ module Pod
|
|
11
12
|
end
|
12
13
|
Pod.set_skipped_top_level_folder_names (names_to_skip or [])
|
13
14
|
end
|
15
|
+
|
16
|
+
|
17
|
+
def inhibit_warnings_with_condition(&condition)
|
18
|
+
require 'cocoapods-developing-folder/command/inhibit_warnings_with_condition.rb'
|
19
|
+
Pod.set_inhibit_waning_condition_block proc(&condition)
|
20
|
+
end
|
21
|
+
|
14
22
|
end
|
15
23
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
def self.inhibit_waning_condition_block
|
5
|
+
@inhibit_waning_condition_block
|
6
|
+
end
|
7
|
+
def self.set_inhibit_waning_condition_block(block)
|
8
|
+
@inhibit_waning_condition_block = block
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module Pod
|
13
|
+
class PodTarget
|
14
|
+
|
15
|
+
# the original code
|
16
|
+
# https://github.com/CocoaPods/CocoaPods/blob/93011ece10dd76b8d783bc80db742dfd03f7cbac/lib/cocoapods/target/pod_target.rb
|
17
|
+
|
18
|
+
# ---- patch ----
|
19
|
+
old_method = instance_method(:inhibit_warnings?)
|
20
|
+
|
21
|
+
define_method(:inhibit_warnings?) do
|
22
|
+
if Pod.inhibit_waning_condition_block == nil
|
23
|
+
# return the original
|
24
|
+
return old_method.bind(self).()
|
25
|
+
else
|
26
|
+
return Pod.inhibit_waning_condition_block.call(pod_name, self)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-developing-folder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- leavez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- lib/cocoapods-developing-folder/command.rb
|
57
57
|
- lib/cocoapods-developing-folder/command/folder.rb
|
58
58
|
- lib/cocoapods-developing-folder/command/folder_DSL.rb
|
59
|
+
- lib/cocoapods-developing-folder/command/inhibit_warnings_with_condition.rb
|
59
60
|
- lib/cocoapods-developing-folder/command/preserve_folder.rb
|
60
61
|
- lib/cocoapods-developing-folder/gem_version.rb
|
61
62
|
- lib/cocoapods_plugin.rb
|
@@ -81,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
82
|
version: '0'
|
82
83
|
requirements: []
|
83
84
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.4.8
|
85
86
|
signing_key:
|
86
87
|
specification_version: 4
|
87
88
|
summary: Preserve the folder hierarchy for development pods in xcode
|