cocoapods-mtxx-bin 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +11 -0
- data/lib/cocoapods-mtxx-bin/command/bin/archive.rb +206 -0
- data/lib/cocoapods-mtxx-bin/command/bin/auto.rb +212 -0
- data/lib/cocoapods-mtxx-bin/command/bin/code.rb +232 -0
- data/lib/cocoapods-mtxx-bin/command/bin/imy.rb +45 -0
- data/lib/cocoapods-mtxx-bin/command/bin/init.rb +94 -0
- data/lib/cocoapods-mtxx-bin/command/bin/initHotKey.rb +70 -0
- data/lib/cocoapods-mtxx-bin/command/bin/install.rb +44 -0
- data/lib/cocoapods-mtxx-bin/command/bin/lib/lint.rb +67 -0
- data/lib/cocoapods-mtxx-bin/command/bin/repo/push.rb +115 -0
- data/lib/cocoapods-mtxx-bin/command/bin/repo/update.rb +42 -0
- data/lib/cocoapods-mtxx-bin/command/bin/repo.rb +14 -0
- data/lib/cocoapods-mtxx-bin/command/bin/spec/create.rb +73 -0
- data/lib/cocoapods-mtxx-bin/command/bin/spec/lint.rb +109 -0
- data/lib/cocoapods-mtxx-bin/command/bin/spec.rb +13 -0
- data/lib/cocoapods-mtxx-bin/command/bin/update.rb +154 -0
- data/lib/cocoapods-mtxx-bin/command/bin.rb +65 -0
- data/lib/cocoapods-mtxx-bin/command.rb +1 -0
- data/lib/cocoapods-mtxx-bin/config/config.rb +166 -0
- data/lib/cocoapods-mtxx-bin/config/config_asker.rb +60 -0
- data/lib/cocoapods-mtxx-bin/config/config_builder.rb +216 -0
- data/lib/cocoapods-mtxx-bin/config/config_hot_key.rb +103 -0
- data/lib/cocoapods-mtxx-bin/config/config_hot_key_asker.rb +57 -0
- data/lib/cocoapods-mtxx-bin/gem_version.rb +9 -0
- data/lib/cocoapods-mtxx-bin/helpers/Info.plist +0 -0
- data/lib/cocoapods-mtxx-bin/helpers/build_helper.rb +167 -0
- data/lib/cocoapods-mtxx-bin/helpers/build_utils.rb +64 -0
- data/lib/cocoapods-mtxx-bin/helpers/framework.rb +86 -0
- data/lib/cocoapods-mtxx-bin/helpers/framework_builder.rb +551 -0
- data/lib/cocoapods-mtxx-bin/helpers/library.rb +54 -0
- data/lib/cocoapods-mtxx-bin/helpers/library_builder.rb +90 -0
- data/lib/cocoapods-mtxx-bin/helpers/sources_helper.rb +35 -0
- data/lib/cocoapods-mtxx-bin/helpers/spec_creator.rb +170 -0
- data/lib/cocoapods-mtxx-bin/helpers/spec_files_helper.rb +80 -0
- data/lib/cocoapods-mtxx-bin/helpers/spec_source_creator.rb +304 -0
- data/lib/cocoapods-mtxx-bin/helpers/upload_helper.rb +104 -0
- data/lib/cocoapods-mtxx-bin/helpers.rb +5 -0
- data/lib/cocoapods-mtxx-bin/native/acknowledgements.rb +27 -0
- data/lib/cocoapods-mtxx-bin/native/analyzer.rb +85 -0
- data/lib/cocoapods-mtxx-bin/native/file_accessor.rb +28 -0
- data/lib/cocoapods-mtxx-bin/native/gen.rb +79 -0
- data/lib/cocoapods-mtxx-bin/native/installation_options.rb +25 -0
- data/lib/cocoapods-mtxx-bin/native/installer.rb +135 -0
- data/lib/cocoapods-mtxx-bin/native/linter.rb +26 -0
- data/lib/cocoapods-mtxx-bin/native/path_source.rb +33 -0
- data/lib/cocoapods-mtxx-bin/native/pod_source_installer.rb +19 -0
- data/lib/cocoapods-mtxx-bin/native/pod_target_installer.rb +94 -0
- data/lib/cocoapods-mtxx-bin/native/podfile.rb +91 -0
- data/lib/cocoapods-mtxx-bin/native/podfile_env.rb +37 -0
- data/lib/cocoapods-mtxx-bin/native/podfile_generator.rb +201 -0
- data/lib/cocoapods-mtxx-bin/native/podspec_finder.rb +25 -0
- data/lib/cocoapods-mtxx-bin/native/resolver.rb +238 -0
- data/lib/cocoapods-mtxx-bin/native/sandbox_analyzer.rb +34 -0
- data/lib/cocoapods-mtxx-bin/native/source.rb +35 -0
- data/lib/cocoapods-mtxx-bin/native/sources_manager.rb +19 -0
- data/lib/cocoapods-mtxx-bin/native/specification.rb +31 -0
- data/lib/cocoapods-mtxx-bin/native/target_validator.rb +41 -0
- data/lib/cocoapods-mtxx-bin/native/validator.rb +40 -0
- data/lib/cocoapods-mtxx-bin/native.rb +25 -0
- data/lib/cocoapods-mtxx-bin/source_provider_hook.rb +53 -0
- data/lib/cocoapods-mtxx-bin.rb +2 -0
- data/lib/cocoapods_plugin.rb +2 -0
- data/spec/command/bin_spec.rb +12 -0
- data/spec/spec_helper.rb +50 -0
- metadata +182 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'cocoapods'
|
2
|
+
require 'cocoapods-mtxx-bin/gem_version'
|
3
|
+
|
4
|
+
if Pod.match_version?('~> 1.4')
|
5
|
+
require 'cocoapods-mtxx-bin/native/podfile'
|
6
|
+
require 'cocoapods-mtxx-bin/native/installation_options'
|
7
|
+
require 'cocoapods-mtxx-bin/native/specification'
|
8
|
+
require 'cocoapods-mtxx-bin/native/path_source'
|
9
|
+
require 'cocoapods-mtxx-bin/native/analyzer'
|
10
|
+
require 'cocoapods-mtxx-bin/native/installer'
|
11
|
+
require 'cocoapods-mtxx-bin/native/podfile_generator'
|
12
|
+
require 'cocoapods-mtxx-bin/native/pod_source_installer'
|
13
|
+
require 'cocoapods-mtxx-bin/native/linter'
|
14
|
+
require 'cocoapods-mtxx-bin/native/resolver'
|
15
|
+
require 'cocoapods-mtxx-bin/native/source'
|
16
|
+
require 'cocoapods-mtxx-bin/native/validator'
|
17
|
+
require 'cocoapods-mtxx-bin/native/acknowledgements'
|
18
|
+
require 'cocoapods-mtxx-bin/native/sandbox_analyzer'
|
19
|
+
require 'cocoapods-mtxx-bin/native/podspec_finder'
|
20
|
+
require 'cocoapods-mtxx-bin/native/file_accessor'
|
21
|
+
require 'cocoapods-mtxx-bin/native/pod_target_installer'
|
22
|
+
require 'cocoapods-mtxx-bin/native/target_validator'
|
23
|
+
require 'cocoapods-mtxx-bin/native/gen'
|
24
|
+
|
25
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'cocoapods-mtxx-bin/native/sources_manager'
|
2
|
+
require 'cocoapods-mtxx-bin/command/bin/repo/update'
|
3
|
+
require 'cocoapods/user_interface'
|
4
|
+
|
5
|
+
Pod::HooksManager.register('cocoapods-mtxx-bin', :pre_install) do |_context, _|
|
6
|
+
require 'cocoapods-mtxx-bin/native'
|
7
|
+
|
8
|
+
# pod bin repo update 更新二进制私有源
|
9
|
+
Pod::Command::Bin::Repo::Update.new(CLAide::ARGV.new($ARGV)).run
|
10
|
+
|
11
|
+
# 有插件/本地库 且是dev环境下,默认进入源码白名单 过滤 archive命令
|
12
|
+
if _context.podfile.plugins.keys.include?('cocoapods-mtxx-bin') && _context.podfile.configuration_env == 'dev'
|
13
|
+
dependencies = _context.podfile.dependencies
|
14
|
+
dependencies.each do |d|
|
15
|
+
next unless d.respond_to?(:external_source) &&
|
16
|
+
d.external_source.is_a?(Hash) &&
|
17
|
+
!d.external_source[:path].nil? &&
|
18
|
+
$ARGV[1] != 'archive'
|
19
|
+
_context.podfile.set_use_source_pods d.name
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# 同步 BinPodfile 文件
|
24
|
+
project_root = Pod::Config.instance.project_root
|
25
|
+
path = File.join(project_root.to_s, 'BinPodfile')
|
26
|
+
|
27
|
+
next unless File.exist?(path)
|
28
|
+
|
29
|
+
contents = File.open(path, 'r:utf-8', &:read)
|
30
|
+
podfile = Pod::Config.instance.podfile
|
31
|
+
podfile.instance_eval do
|
32
|
+
begin
|
33
|
+
eval(contents, nil, path)
|
34
|
+
rescue Exception => e
|
35
|
+
message = "Invalid `#{path}` file: #{e.message}"
|
36
|
+
raise Pod::DSLError.new(message, path, e, contents)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
Pod::HooksManager.register('cocoapods-mtxx-bin', :source_provider) do |context, _|
|
42
|
+
sources_manager = Pod::Config.instance.sources_manager
|
43
|
+
podfile = Pod::Config.instance.podfile
|
44
|
+
if podfile
|
45
|
+
# 添加源码私有源 && 二进制私有源
|
46
|
+
added_sources = sources_manager.code_source_list
|
47
|
+
if podfile.use_binaries? || podfile.use_binaries_selector
|
48
|
+
added_sources << sources_manager.binary_source
|
49
|
+
added_sources.reverse!
|
50
|
+
end
|
51
|
+
added_sources.each { |source| context.add_source(source)}
|
52
|
+
end
|
53
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
ROOT = Pathname.new(File.expand_path('../../', __FILE__))
|
3
|
+
$:.unshift((ROOT + 'lib').to_s)
|
4
|
+
$:.unshift((ROOT + 'spec').to_s)
|
5
|
+
|
6
|
+
require 'bundler/setup'
|
7
|
+
require 'bacon'
|
8
|
+
require 'mocha-on-bacon'
|
9
|
+
require 'pretty_bacon'
|
10
|
+
require 'pathname'
|
11
|
+
require 'cocoapods'
|
12
|
+
|
13
|
+
Mocha::Configuration.prevent(:stubbing_non_existent_method)
|
14
|
+
|
15
|
+
require 'cocoapods_plugin'
|
16
|
+
|
17
|
+
#-----------------------------------------------------------------------------#
|
18
|
+
|
19
|
+
module Pod
|
20
|
+
|
21
|
+
# Disable the wrapping so the output is deterministic in the tests.
|
22
|
+
#
|
23
|
+
UI.disable_wrap = true
|
24
|
+
|
25
|
+
# Redirects the messages to an internal store.
|
26
|
+
#
|
27
|
+
module UI
|
28
|
+
@output = ''
|
29
|
+
@warnings = ''
|
30
|
+
|
31
|
+
class << self
|
32
|
+
attr_accessor :output
|
33
|
+
attr_accessor :warnings
|
34
|
+
|
35
|
+
def puts(message = '')
|
36
|
+
@output << "#{message}\n"
|
37
|
+
end
|
38
|
+
|
39
|
+
def warn(message = '', actions = [])
|
40
|
+
@warnings << "#{message}\n"
|
41
|
+
end
|
42
|
+
|
43
|
+
def print(message)
|
44
|
+
@output << message
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
#-----------------------------------------------------------------------------#
|
metadata
ADDED
@@ -0,0 +1,182 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cocoapods-mtxx-bin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jensen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-02-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: parallel
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: cocoapods
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.11.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.11.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: cocoapods-generate
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.0.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.0.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: cocoapods-mtxx-bin is a plugin which helps develpers switching pods between
|
84
|
+
source code and binary.
|
85
|
+
email:
|
86
|
+
- zys2@meitu.com
|
87
|
+
executables: []
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- LICENSE.txt
|
92
|
+
- README.md
|
93
|
+
- lib/cocoapods-mtxx-bin.rb
|
94
|
+
- lib/cocoapods-mtxx-bin/command.rb
|
95
|
+
- lib/cocoapods-mtxx-bin/command/bin.rb
|
96
|
+
- lib/cocoapods-mtxx-bin/command/bin/archive.rb
|
97
|
+
- lib/cocoapods-mtxx-bin/command/bin/auto.rb
|
98
|
+
- lib/cocoapods-mtxx-bin/command/bin/code.rb
|
99
|
+
- lib/cocoapods-mtxx-bin/command/bin/imy.rb
|
100
|
+
- lib/cocoapods-mtxx-bin/command/bin/init.rb
|
101
|
+
- lib/cocoapods-mtxx-bin/command/bin/initHotKey.rb
|
102
|
+
- lib/cocoapods-mtxx-bin/command/bin/install.rb
|
103
|
+
- lib/cocoapods-mtxx-bin/command/bin/lib/lint.rb
|
104
|
+
- lib/cocoapods-mtxx-bin/command/bin/repo.rb
|
105
|
+
- lib/cocoapods-mtxx-bin/command/bin/repo/push.rb
|
106
|
+
- lib/cocoapods-mtxx-bin/command/bin/repo/update.rb
|
107
|
+
- lib/cocoapods-mtxx-bin/command/bin/spec.rb
|
108
|
+
- lib/cocoapods-mtxx-bin/command/bin/spec/create.rb
|
109
|
+
- lib/cocoapods-mtxx-bin/command/bin/spec/lint.rb
|
110
|
+
- lib/cocoapods-mtxx-bin/command/bin/update.rb
|
111
|
+
- lib/cocoapods-mtxx-bin/config/config.rb
|
112
|
+
- lib/cocoapods-mtxx-bin/config/config_asker.rb
|
113
|
+
- lib/cocoapods-mtxx-bin/config/config_builder.rb
|
114
|
+
- lib/cocoapods-mtxx-bin/config/config_hot_key.rb
|
115
|
+
- lib/cocoapods-mtxx-bin/config/config_hot_key_asker.rb
|
116
|
+
- lib/cocoapods-mtxx-bin/gem_version.rb
|
117
|
+
- lib/cocoapods-mtxx-bin/helpers.rb
|
118
|
+
- lib/cocoapods-mtxx-bin/helpers/Info.plist
|
119
|
+
- lib/cocoapods-mtxx-bin/helpers/build_helper.rb
|
120
|
+
- lib/cocoapods-mtxx-bin/helpers/build_utils.rb
|
121
|
+
- lib/cocoapods-mtxx-bin/helpers/framework.rb
|
122
|
+
- lib/cocoapods-mtxx-bin/helpers/framework_builder.rb
|
123
|
+
- lib/cocoapods-mtxx-bin/helpers/library.rb
|
124
|
+
- lib/cocoapods-mtxx-bin/helpers/library_builder.rb
|
125
|
+
- lib/cocoapods-mtxx-bin/helpers/sources_helper.rb
|
126
|
+
- lib/cocoapods-mtxx-bin/helpers/spec_creator.rb
|
127
|
+
- lib/cocoapods-mtxx-bin/helpers/spec_files_helper.rb
|
128
|
+
- lib/cocoapods-mtxx-bin/helpers/spec_source_creator.rb
|
129
|
+
- lib/cocoapods-mtxx-bin/helpers/upload_helper.rb
|
130
|
+
- lib/cocoapods-mtxx-bin/native.rb
|
131
|
+
- lib/cocoapods-mtxx-bin/native/acknowledgements.rb
|
132
|
+
- lib/cocoapods-mtxx-bin/native/analyzer.rb
|
133
|
+
- lib/cocoapods-mtxx-bin/native/file_accessor.rb
|
134
|
+
- lib/cocoapods-mtxx-bin/native/gen.rb
|
135
|
+
- lib/cocoapods-mtxx-bin/native/installation_options.rb
|
136
|
+
- lib/cocoapods-mtxx-bin/native/installer.rb
|
137
|
+
- lib/cocoapods-mtxx-bin/native/linter.rb
|
138
|
+
- lib/cocoapods-mtxx-bin/native/path_source.rb
|
139
|
+
- lib/cocoapods-mtxx-bin/native/pod_source_installer.rb
|
140
|
+
- lib/cocoapods-mtxx-bin/native/pod_target_installer.rb
|
141
|
+
- lib/cocoapods-mtxx-bin/native/podfile.rb
|
142
|
+
- lib/cocoapods-mtxx-bin/native/podfile_env.rb
|
143
|
+
- lib/cocoapods-mtxx-bin/native/podfile_generator.rb
|
144
|
+
- lib/cocoapods-mtxx-bin/native/podspec_finder.rb
|
145
|
+
- lib/cocoapods-mtxx-bin/native/resolver.rb
|
146
|
+
- lib/cocoapods-mtxx-bin/native/sandbox_analyzer.rb
|
147
|
+
- lib/cocoapods-mtxx-bin/native/source.rb
|
148
|
+
- lib/cocoapods-mtxx-bin/native/sources_manager.rb
|
149
|
+
- lib/cocoapods-mtxx-bin/native/specification.rb
|
150
|
+
- lib/cocoapods-mtxx-bin/native/target_validator.rb
|
151
|
+
- lib/cocoapods-mtxx-bin/native/validator.rb
|
152
|
+
- lib/cocoapods-mtxx-bin/source_provider_hook.rb
|
153
|
+
- lib/cocoapods_plugin.rb
|
154
|
+
- spec/command/bin_spec.rb
|
155
|
+
- spec/spec_helper.rb
|
156
|
+
homepage: https://github.com/Zhangyanshen/cocoapods-mtxx-bin
|
157
|
+
licenses:
|
158
|
+
- MIT
|
159
|
+
metadata: {}
|
160
|
+
post_install_message:
|
161
|
+
rdoc_options: []
|
162
|
+
require_paths:
|
163
|
+
- lib
|
164
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
requirements: []
|
175
|
+
rubygems_version: 3.1.2
|
176
|
+
signing_key:
|
177
|
+
specification_version: 4
|
178
|
+
summary: cocoapods-mtxx-bin is a plugin which helps develpers switching pods between
|
179
|
+
source code and binary.
|
180
|
+
test_files:
|
181
|
+
- spec/command/bin_spec.rb
|
182
|
+
- spec/spec_helper.rb
|