cocoapods-developing-folder 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/cocoapods-developing-folder/gem_version.rb +1 -1
- data/lib/cocoapods-developing-folder/local_pod_DSL.rb +37 -23
- 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: cebe079c88fb59c78cd6d95c7dbe8ed6ceba9e76a1a61156f20c7eea0092377f
|
4
|
+
data.tar.gz: 67df2aa202eb343e88837d46796bd1fc095dac0040b164a423694220d029c098
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02c4f1be44f649d24cdf0b42564f4932b865d86f311ce98b05534762ad9ad308a4e9512b54237c395f69f99ebad15be37111f058e69979b82ebdd751197e5e14
|
7
|
+
data.tar.gz: cc8f0c64933bffca62b16a07c0ceaec5c3aa9227e87221832343ef6385250c4624d60a2c5b8cc0bc14c3792aad60002ffb5bfa5c0993e61dfcc5e1a50fd63534
|
data/README.md
CHANGED
@@ -32,6 +32,8 @@ It will search your project root path. If you want smaller or larger search rang
|
|
32
32
|
``` ruby
|
33
33
|
# in the podfile
|
34
34
|
local_pod_searching_root "../Libs"
|
35
|
+
# Array is also supported.
|
36
|
+
# local_pod_searching_root ["../Libs", "../../modules"]
|
35
37
|
```
|
36
38
|
|
37
39
|
#### 🔸 Import all local pods in specific folder
|
@@ -3,12 +3,18 @@ require_relative 'utiltiy'
|
|
3
3
|
|
4
4
|
module Pod
|
5
5
|
|
6
|
-
class_attr_accessor :
|
6
|
+
class_attr_accessor :local_pod_DSL_root_paths
|
7
7
|
|
8
8
|
class Podfile
|
9
9
|
|
10
10
|
def local_pod_searching_root(path)
|
11
|
-
|
11
|
+
if path.kind_of? Array
|
12
|
+
Pod.local_pod_DSL_root_paths = path
|
13
|
+
elsif path.kind_of? String
|
14
|
+
Pod.local_pod_DSL_root_paths = [path]
|
15
|
+
else
|
16
|
+
raise "[Error] wrong type for `local_pod_searching_root`"
|
17
|
+
end
|
12
18
|
end
|
13
19
|
end
|
14
20
|
end
|
@@ -22,32 +28,40 @@ module Pod
|
|
22
28
|
def local_pod(name, *requirements)
|
23
29
|
options = requirements.last
|
24
30
|
|
25
|
-
|
31
|
+
rootPaths = Pod.local_pod_DSL_root_paths || ["./"]
|
26
32
|
if options and options.kind_of? Hash and options[:root_path] != nil
|
27
|
-
|
33
|
+
rootPaths = [ options[:root_path] ]
|
28
34
|
end
|
29
|
-
basePath = Pathname.new rootPath
|
30
35
|
|
31
|
-
|
32
|
-
|
33
|
-
if p.basename.to_s == "#{name}.podspec"
|
34
|
-
path = p
|
35
|
-
break
|
36
|
-
end
|
37
|
-
end
|
36
|
+
rootPodName = Specification.root_name name
|
37
|
+
found = false
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
rootPaths.each do |rootPath|
|
40
|
+
basePath = Pathname.new rootPath
|
41
|
+
|
42
|
+
path = nil
|
43
|
+
basePath.find do |p|
|
44
|
+
if p.basename.to_s == "#{rootPodName}.podspec"
|
45
|
+
path = p
|
46
|
+
break
|
47
|
+
end
|
48
|
+
end
|
49
|
+
next if path.nil?
|
50
|
+
|
51
|
+
path = unify_path(path.parent)
|
52
|
+
path = path.to_s
|
53
|
+
|
54
|
+
if options and options.kind_of? Hash
|
55
|
+
options[:path] = path
|
56
|
+
pod(name, *requirements)
|
57
|
+
else
|
58
|
+
pod(name, *requirements, :path => path)
|
59
|
+
end
|
60
|
+
found = true
|
61
|
+
break
|
42
62
|
end
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
if options and options.kind_of? Hash
|
47
|
-
options[:path] = path
|
48
|
-
pod(name, *requirements)
|
49
|
-
else
|
50
|
-
pod(name, *requirements, :path => path)
|
63
|
+
if not found
|
64
|
+
raise "\ncannot find local pod: #{name}. Searching roots: #{rootPaths}"
|
51
65
|
end
|
52
66
|
end
|
53
67
|
|
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.5.
|
4
|
+
version: 0.5.3
|
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-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|