cocoapods-modularization 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-modularization/command/mod/create.rb +47 -2
- data/lib/cocoapods-modularization/command/mod/template.rb +1 -1
- data/lib/cocoapods-modularization/gem_version.rb +1 -1
- data/lib/cocoapods-modularization/meta/meta_constants.rb +5 -1
- data/lib/cocoapods-modularization/meta/meta_reference.rb +1 -0
- 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: 9a957978551a03bbb2981d82db79af963b278e30bb7b6aabf9f548d8f2b0d19f
|
4
|
+
data.tar.gz: 3d85b136021d97324b0d4a35ded4e6a6bcd80c3ec307cb5e837ec7678fd88d3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47a8dfee525a1e511964224caeecde0cad4d5219535f98fd8b187652eb5633ba67bc4612ab257c084a9bf5c759177dabba8d4d4a1b239c9176d020a2678cf213
|
7
|
+
data.tar.gz: 02b2e788c363579782ce2a51989e1e98aebef66bc0890327025e7850bb323b0d00ee955a8f8a56dabe056867254cdaf87d87d9675da20d39e39272071ea35e50
|
@@ -9,12 +9,22 @@ module Pod
|
|
9
9
|
DESC
|
10
10
|
|
11
11
|
self.arguments = [
|
12
|
-
CLAide::Argument.new('NAME', true)
|
12
|
+
CLAide::Argument.new('NAME', true),
|
13
|
+
CLAide::Argument.new('PATH', true),
|
13
14
|
]
|
14
15
|
|
16
|
+
def self.options
|
17
|
+
[
|
18
|
+
['--template-url=URL', 'The URL of the git repo containing a compatible template'],
|
19
|
+
].concat(super)
|
20
|
+
end
|
21
|
+
|
15
22
|
def initialize(argv)
|
16
23
|
@name = argv.shift_argument
|
24
|
+
@path = argv.shift_argument
|
25
|
+
@template_url = argv.option('template-url', TEMPLATE_REPO)
|
17
26
|
super
|
27
|
+
@additional_args = argv.remainder!
|
18
28
|
end
|
19
29
|
|
20
30
|
def validate!
|
@@ -26,7 +36,42 @@ module Pod
|
|
26
36
|
end
|
27
37
|
|
28
38
|
def run
|
29
|
-
|
39
|
+
clone_template
|
40
|
+
configure_template
|
41
|
+
print_info
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
extend Executable
|
47
|
+
executable :git
|
48
|
+
|
49
|
+
TEMPLATE_REPO = 'https://github.com/CocoaPods/pod-template.git'.freeze
|
50
|
+
TEMPLATE_INFO_URL = 'https://github.com/CocoaPods/pod-template'.freeze
|
51
|
+
CREATE_NEW_POD_INFO_URL = 'https://guides.cocoapods.org/making/making-a-cocoapod'.freeze
|
52
|
+
|
53
|
+
def clone_template
|
54
|
+
puts "Cloning `#{template_repo_url}` into `#{@name}`."
|
55
|
+
git! ['clone', template_repo_url, @name]
|
56
|
+
end
|
57
|
+
|
58
|
+
def configure_template
|
59
|
+
Dir.chdir(@name) do
|
60
|
+
if File.exist?('configure')
|
61
|
+
system({ 'COCOAPODS_VERSION' => Pod::VERSION }, './configure', @name, @path, *@additional_args)
|
62
|
+
else
|
63
|
+
UI.warn 'Template does not have a configure file.'
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def print_info
|
69
|
+
puts "\nTo learn more about the template see `#{template_repo_url}`."
|
70
|
+
puts "To learn more about creating a new pod, see `#{CREATE_NEW_POD_INFO_URL}`."
|
71
|
+
end
|
72
|
+
|
73
|
+
def template_repo_url
|
74
|
+
@template_url || TEMPLATE_REPO
|
30
75
|
end
|
31
76
|
end
|
32
77
|
end
|
@@ -24,7 +24,7 @@ module Pod
|
|
24
24
|
if File.exist?(build_path)
|
25
25
|
FileUtils.rm_rf(build_path)
|
26
26
|
end
|
27
|
-
`git clone
|
27
|
+
`git clone https://gitlab.appshahe.com/ios-specs/template.git .build`
|
28
28
|
|
29
29
|
unless File.exist?("#{Dir.pwd}/.build")
|
30
30
|
puts "./.build not found"
|
@@ -27,7 +27,7 @@ module Pod
|
|
27
27
|
podfile_local_hash = generate_yml_to_hash(podfile_local_path)
|
28
28
|
|
29
29
|
# cache branch if local_path is set
|
30
|
-
|
30
|
+
if !enable_branch || !podfile_local_hash.empty?
|
31
31
|
branch_caches = Array.new
|
32
32
|
podfile_local_hash.each do |key, value|
|
33
33
|
next unless value.kind_of?(Hash)
|
@@ -129,6 +129,10 @@ module Pod
|
|
129
129
|
def branch_key
|
130
130
|
'branch'
|
131
131
|
end
|
132
|
+
|
133
|
+
def configuration
|
134
|
+
'configuration'
|
135
|
+
end
|
132
136
|
end
|
133
137
|
end
|
134
138
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-modularization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lazy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|