cocoapods-tj 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-tj/command/bin/spec/create.rb +4 -2
- data/lib/cocoapods-tj/command/bin.rb +1 -1
- data/lib/cocoapods-tj/gem_version.rb +1 -1
- data/lib/cocoapods-tj/helpers/spec_creator.rb +12 -6
- data/lib/cocoapods-tj/helpers/spec_files_helper.rb +3 -3
- data/lib/cocoapods-tj/native/pod_source_installer.rb +7 -7
- data/lib/cocoapods-tj/native/podfile_generator.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: 9b193a6c5aed30e2c45bbd8e398530bd1da8d7db9b681d69bbb2fdef1c3231be
|
4
|
+
data.tar.gz: 3123030cefc773344aa59231faa1750b2b7877124c17302ab2098d4622a87e69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8113752741960702b582e48c83434385fdb93fd7f9daa814d1db726588f9acd1fb4473fc31f285645f3938bfc6f4bfd7da81192324481e498ced46d05a085391
|
7
|
+
data.tar.gz: f47235caa4e106f9305b88c26c445bcf059de3f4638a980d500dd98440a4d4095ff125a3e2111fb2dbbf3f60847944189d640d50415689f238fc95055d6257cd
|
@@ -14,12 +14,14 @@ module Pod
|
|
14
14
|
[
|
15
15
|
['--platforms=ios', '生成二进制 spec 支持的平台'],
|
16
16
|
['--template-podspec=A.binary-template.podspec', '生成拥有 subspec 的二进制 spec 需要的模版 podspec, 插件会更改 version 和 source'],
|
17
|
-
['--no-overwrite', '不允许覆盖']
|
17
|
+
['--no-overwrite', '不允许覆盖'],
|
18
|
+
['--binary_source', '生成的二进制podspec的source地址']
|
18
19
|
].concat(super)
|
19
20
|
end
|
20
21
|
|
21
22
|
def initialize(argv)
|
22
23
|
@platforms = argv.option('platforms', 'ios')
|
24
|
+
@binary_source = argv.option('binary_source', '')
|
23
25
|
@allow_overwrite = argv.flag?('overwrite', true)
|
24
26
|
@template_podspec = argv.option('template-podspec')
|
25
27
|
@podspec = argv.shift_argument
|
@@ -34,7 +36,7 @@ module Pod
|
|
34
36
|
|
35
37
|
if binary_spec && !@allow_overwrite
|
36
38
|
else
|
37
|
-
spec_file = create_binary_spec_file(code_spec, template_spec)
|
39
|
+
spec_file = create_binary_spec_file(code_spec,@binary_source, template_spec)
|
38
40
|
end
|
39
41
|
end
|
40
42
|
|
@@ -8,7 +8,7 @@ require 'cocoapods-tj/command/bin/local'
|
|
8
8
|
require 'cocoapods-tj/command/bin/update'
|
9
9
|
require 'cocoapods-tj/command/bin/install'
|
10
10
|
require 'cocoapods-tj/command/bin/imy'
|
11
|
-
|
11
|
+
require 'cocoapods-tj/command/bin/spec/create'
|
12
12
|
require 'cocoapods-tj/helpers'
|
13
13
|
|
14
14
|
module Pod
|
@@ -7,11 +7,13 @@ module CBin
|
|
7
7
|
class Specification
|
8
8
|
class Creator
|
9
9
|
attr_reader :code_spec
|
10
|
+
attr_reader :binary_source #二进制仓库地址
|
10
11
|
attr_reader :template_spec
|
11
12
|
attr_reader :spec
|
12
13
|
|
13
|
-
def initialize(code_spec, template_spec, platforms = 'ios')
|
14
|
+
def initialize(code_spec, binary_source, template_spec, platforms = 'ios')
|
14
15
|
@code_spec = code_spec
|
16
|
+
@binary_source = binary_source
|
15
17
|
@template_spec = template_spec
|
16
18
|
@platforms = Array(platforms)
|
17
19
|
validate!
|
@@ -50,7 +52,7 @@ module CBin
|
|
50
52
|
end
|
51
53
|
|
52
54
|
def filename
|
53
|
-
@filename ||= "#{spec.name}.
|
55
|
+
@filename ||= "#{spec.name}.podspec.json"
|
54
56
|
end
|
55
57
|
|
56
58
|
private
|
@@ -67,7 +69,7 @@ module CBin
|
|
67
69
|
extnames += code_spec_consumer.resources.map { |r| File.basename(r) }
|
68
70
|
end
|
69
71
|
if extnames.any?
|
70
|
-
@spec.resources =
|
72
|
+
@spec.resources = framework_contents_root().flat_map { |r| extnames.map { |e| "#{r}/#{e}" } }
|
71
73
|
end
|
72
74
|
|
73
75
|
# Source Location
|
@@ -85,7 +87,7 @@ module CBin
|
|
85
87
|
spec_hash.delete('preserve_paths')
|
86
88
|
|
87
89
|
spec_hash.delete('vendored_libraries')
|
88
|
-
spec_hash['vendored_libraries'] = binary_vendored_libraries
|
90
|
+
# spec_hash['vendored_libraries'] = binary_vendored_libraries
|
89
91
|
|
90
92
|
|
91
93
|
platforms = spec_hash['platforms']
|
@@ -104,7 +106,7 @@ module CBin
|
|
104
106
|
|
105
107
|
@spec.source_files = binary_source_files
|
106
108
|
@spec.public_header_files = binary_public_header_files
|
107
|
-
@spec.vendored_libraries = binary_vendored_libraries
|
109
|
+
# @spec.vendored_libraries = binary_vendored_libraries
|
108
110
|
|
109
111
|
@spec.resources = binary_resources if @spec.attributes_hash.keys.include?("resources")
|
110
112
|
|
@@ -114,7 +116,7 @@ module CBin
|
|
114
116
|
end
|
115
117
|
|
116
118
|
def binary_source
|
117
|
-
{
|
119
|
+
{ git: @binary_source, tag:code_spec.version }
|
118
120
|
end
|
119
121
|
|
120
122
|
def code_spec_consumer(_platform = :ios)
|
@@ -125,6 +127,10 @@ module CBin
|
|
125
127
|
["#{code_spec.root.name}.framework", "#{code_spec.root.name}.framework/Versions/A"].map { |path| "#{path}/#{name}" }
|
126
128
|
end
|
127
129
|
|
130
|
+
def framework_contents_root()
|
131
|
+
["#{code_spec.root.name}.framework", "#{code_spec.root.name}.framework/Versions/A"]
|
132
|
+
end
|
133
|
+
|
128
134
|
def binary_source_files
|
129
135
|
{ http: format(CBin.config.binary_download_url, code_spec.root.name, code_spec.version), type: CBin.config.download_file_type }
|
130
136
|
end
|
@@ -14,7 +14,7 @@ module CBin
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def binary_template_spec_files
|
17
|
-
@binary_spec_template_files ||= Pathname.glob('*.
|
17
|
+
@binary_spec_template_files ||= Pathname.glob('*.template.podspec{,.json}')
|
18
18
|
end
|
19
19
|
|
20
20
|
def binary_template_spec_file
|
@@ -50,7 +50,7 @@ module CBin
|
|
50
50
|
path
|
51
51
|
end
|
52
52
|
|
53
|
-
def create_binary_spec_file(code_spec,
|
53
|
+
def create_binary_spec_file(code_spec,binary_source,template_spec)
|
54
54
|
|
55
55
|
|
56
56
|
unless code_spec
|
@@ -60,7 +60,7 @@ module CBin
|
|
60
60
|
raise Pod::Informative, '拥有 subspec 的组件,在生成二进制 podspec 时,必须要提供模版 podspec.'
|
61
61
|
end
|
62
62
|
|
63
|
-
@spec_creator = CBin::Specification::Creator.new(code_spec, template_spec)
|
63
|
+
@spec_creator = CBin::Specification::Creator.new(code_spec, binary_source , template_spec)
|
64
64
|
@spec_creator.create
|
65
65
|
@spec_creator.write_spec_file
|
66
66
|
@spec_creator.filename
|
@@ -5,14 +5,14 @@ require 'cocoapods-tj/native/installation_options'
|
|
5
5
|
module Pod
|
6
6
|
class Installer
|
7
7
|
class PodSourceInstaller
|
8
|
-
attr_accessor :installation_options
|
8
|
+
# attr_accessor :installation_options
|
9
9
|
|
10
|
-
alias old_verify_source_is_secure verify_source_is_secure
|
11
|
-
def verify_source_is_secure(root_spec)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
10
|
+
# alias old_verify_source_is_secure verify_source_is_secure
|
11
|
+
# def verify_source_is_secure(root_spec)
|
12
|
+
# if installation_options.warn_for_unsecure_source?
|
13
|
+
# old_verify_source_is_secure(root_spec)
|
14
|
+
# end
|
15
|
+
# end
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-tj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- song
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|