cocoapods-bin 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/cocoapods-bin.rb +3 -1
- data/lib/cocoapods-bin/command.rb +2 -0
- data/lib/cocoapods-bin/command/bin.rb +4 -2
- data/lib/cocoapods-bin/command/bin/archive.rb +21 -15
- data/lib/cocoapods-bin/command/bin/init.rb +14 -9
- data/lib/cocoapods-bin/command/bin/lib.rb +3 -1
- data/lib/cocoapods-bin/command/bin/lib/lint.rb +13 -9
- data/lib/cocoapods-bin/command/bin/list.rb +16 -12
- data/lib/cocoapods-bin/command/bin/open.rb +10 -8
- data/lib/cocoapods-bin/command/bin/repo.rb +3 -1
- data/lib/cocoapods-bin/command/bin/repo/push.rb +22 -14
- data/lib/cocoapods-bin/command/bin/repo/update.rb +6 -4
- data/lib/cocoapods-bin/command/bin/search.rb +9 -7
- data/lib/cocoapods-bin/command/bin/spec.rb +3 -1
- data/lib/cocoapods-bin/command/bin/spec/create.rb +15 -8
- data/lib/cocoapods-bin/command/bin/spec/lint.rb +18 -10
- data/lib/cocoapods-bin/command/bin/umbrella.rb +13 -7
- data/lib/cocoapods-bin/config/config.rb +18 -14
- data/lib/cocoapods-bin/config/config_asker.rb +22 -19
- data/lib/cocoapods-bin/gem_version.rb +5 -3
- data/lib/cocoapods-bin/helpers.rb +2 -0
- data/lib/cocoapods-bin/helpers/framework.rb +5 -3
- data/lib/cocoapods-bin/helpers/framework_builder.rb +31 -24
- data/lib/cocoapods-bin/helpers/sources_helper.rb +6 -4
- data/lib/cocoapods-bin/helpers/spec_creator.rb +28 -18
- data/lib/cocoapods-bin/helpers/spec_files_helper.rb +28 -15
- data/lib/cocoapods-bin/native.rb +16 -14
- data/lib/cocoapods-bin/native/acknowledgements.rb +5 -2
- data/lib/cocoapods-bin/native/analyzer.rb +6 -5
- data/lib/cocoapods-bin/native/installation_options.rb +13 -11
- data/lib/cocoapods-bin/native/installer.rb +54 -47
- data/lib/cocoapods-bin/native/linter.rb +4 -2
- data/lib/cocoapods-bin/native/path_source.rb +9 -7
- data/lib/cocoapods-bin/native/pod_source_installer.rb +10 -6
- data/lib/cocoapods-bin/native/podfile.rb +11 -7
- data/lib/cocoapods-bin/native/podfile_env.rb +11 -9
- data/lib/cocoapods-bin/native/podspec_finder.rb +3 -0
- data/lib/cocoapods-bin/native/resolver.rb +65 -45
- data/lib/cocoapods-bin/native/sandbox_analyzer.rb +27 -25
- data/lib/cocoapods-bin/native/source.rb +7 -4
- data/lib/cocoapods-bin/native/sources_manager.rb +11 -9
- data/lib/cocoapods-bin/native/specification.rb +14 -12
- data/lib/cocoapods-bin/native/validator.rb +3 -3
- data/lib/cocoapods-bin/source_provider_hook.rb +12 -8
- data/lib/cocoapods_plugin.rb +2 -0
- metadata +3 -3
@@ -1,32 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Pod
|
2
4
|
class Installer
|
3
5
|
class Analyzer
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
6
|
+
class SandboxAnalyzer
|
7
|
+
# def pod_changed?(pod)
|
8
|
+
# spec = root_spec(pod)
|
9
|
+
# 有 subspec 的情况下,root spec 对应的 used_files 可能始终为空
|
10
|
+
# 要添加为空 && 没有 subspec 的情况
|
11
|
+
# file_accessors = spec.available_platforms.map { |platform| Sandbox::FileAccessor.new(sandbox.pod_dir(pod), spec.consumer(platform)) }
|
12
|
+
# files = [
|
13
|
+
# file_accessors.map(&:vendored_frameworks),
|
14
|
+
# file_accessors.map(&:vendored_libraries),
|
15
|
+
# file_accessors.map(&:resource_bundle_files),
|
16
|
+
# file_accessors.map(&:prefix_header),
|
17
|
+
# file_accessors.map(&:resources),
|
18
|
+
# file_accessors.map(&:source_files),
|
19
|
+
# file_accessors.map(&:module_map),
|
20
|
+
# ]
|
21
|
+
# used_files = files.flatten.compact.map(&:to_s).uniq
|
22
|
+
# p pod if used_files.empty?
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
# return true if spec.version != sandbox_version(pod)
|
25
|
+
# return true if spec.checksum != sandbox_checksum(pod)
|
26
|
+
# return true if resolved_spec_names(pod) != sandbox_spec_names(pod)
|
27
|
+
# return true if sandbox.predownloaded?(pod)
|
28
|
+
# return true if folder_empty?(pod)
|
29
|
+
# false
|
28
30
|
# end
|
29
|
-
|
31
|
+
end
|
30
32
|
end
|
31
33
|
end
|
32
|
-
end
|
34
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'cocoapods'
|
2
4
|
|
3
5
|
module Pod
|
@@ -15,12 +17,13 @@ module Pod
|
|
15
17
|
def specification_path(name, version)
|
16
18
|
raise ArgumentError, 'No name' unless name
|
17
19
|
raise ArgumentError, 'No version' unless version
|
20
|
+
|
18
21
|
path = pod_path(name) + version.to_s
|
19
22
|
|
20
23
|
specification_path = Specification::VALID_EXTNAME
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
+
.map { |extname| "#{name}#{extname}" }
|
25
|
+
.map { |file| path + file }
|
26
|
+
.find(&:exist?)
|
24
27
|
|
25
28
|
unless specification_path
|
26
29
|
raise StandardError, "Unable to find the specification #{name} " \
|
@@ -29,4 +32,4 @@ module Pod
|
|
29
32
|
specification_path
|
30
33
|
end
|
31
34
|
end
|
32
|
-
end
|
35
|
+
end
|
@@ -1,18 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'cocoapods'
|
2
4
|
require 'cocoapods-bin/config/config'
|
3
5
|
|
4
6
|
module Pod
|
5
7
|
class Source
|
6
8
|
class Manager
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
# 源码 source
|
10
|
+
def code_source
|
11
|
+
source_with_name_or_url(CBin.config.code_repo_url)
|
12
|
+
end
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
# 二进制 source
|
15
|
+
def binary_source
|
16
|
+
source_with_name_or_url(CBin.config.binary_repo_url)
|
17
|
+
end
|
16
18
|
end
|
17
19
|
end
|
18
|
-
end
|
20
|
+
end
|
@@ -1,11 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'cocoapods-bin/native/sources_manager'
|
2
4
|
|
3
5
|
module Pod
|
4
6
|
class Specification
|
5
|
-
VALID_EXTNAME = %w[.binary.podspec.json .binary.podspec .podspec.json .podspec]
|
6
|
-
DEFAULT_TEMPLATE_EXTNAME = %w[.binary-template.podspec .binary-template.podspec.json]
|
7
|
+
VALID_EXTNAME = %w[.binary.podspec.json .binary.podspec .podspec.json .podspec].freeze
|
8
|
+
DEFAULT_TEMPLATE_EXTNAME = %w[.binary-template.podspec .binary-template.podspec.json].freeze
|
7
9
|
|
8
|
-
# TODO
|
10
|
+
# TODO
|
9
11
|
# 可以在这里根据组件依赖二进制或源码调整 sources 的先后顺序
|
10
12
|
# 如果是源码,则调整 code_source 到最前面
|
11
13
|
# 如果是二进制,则调整 binary_source 到最前面
|
@@ -13,17 +15,17 @@ module Pod
|
|
13
15
|
#
|
14
16
|
# 先要把 Podfile 里面的配置数据保存到单例中,再在这里判断,就不需要 resolver 了
|
15
17
|
# 但是现在这个插件依旧可用,重构需要时间 = = ,没什么动力去重构了呀。。。
|
16
|
-
#
|
18
|
+
#
|
17
19
|
# class Set
|
18
|
-
#
|
20
|
+
# old_initialize = instance_method(:initialize)
|
19
21
|
# define_method(:initialize) do |name, sources|
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
22
|
+
# if name == 'TDFAdaptationKit'
|
23
|
+
# sources_manager = Pod::Config.instance.sources_manager
|
24
|
+
# # sources = [sources_manager.binary_source, *sources].uniq
|
25
|
+
# sources = [sources_manager.code_source, *sources].uniq
|
26
|
+
# end
|
27
|
+
# old_initialize.bind(self).call(name, sources)
|
26
28
|
# end
|
27
29
|
# end
|
28
30
|
end
|
29
|
-
end
|
31
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
3
|
module Pod
|
3
4
|
class Validator
|
@@ -10,7 +11,6 @@ module Pod
|
|
10
11
|
# 'This will be an error in future releases. Please update the URL to use https.')
|
11
12
|
# end
|
12
13
|
|
13
|
-
def validate_source_url(spec)
|
14
|
-
end
|
14
|
+
def validate_source_url(spec); end
|
15
15
|
end
|
16
|
-
end
|
16
|
+
end
|
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'cocoapods-bin/native/sources_manager'
|
2
4
|
|
3
|
-
Pod::HooksManager.register('cocoapods-bin', :pre_install) do |
|
4
|
-
|
5
|
+
Pod::HooksManager.register('cocoapods-bin', :pre_install) do |_context, _|
|
6
|
+
require 'cocoapods-bin/native'
|
5
7
|
end
|
6
8
|
|
7
9
|
Pod::HooksManager.register('cocoapods-bin', :source_provider) do |context, _|
|
@@ -9,9 +11,11 @@ Pod::HooksManager.register('cocoapods-bin', :source_provider) do |context, _|
|
|
9
11
|
podfile = Pod::Config.instance.podfile
|
10
12
|
|
11
13
|
if podfile
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
# 添加二进制私有源 && 源码私有源
|
15
|
+
added_sources = [sources_manager.code_source, sources_manager.binary_source]
|
16
|
+
if podfile.use_binaries? || podfile.use_binaries_selector
|
17
|
+
added_sources.reverse!
|
18
|
+
end
|
19
|
+
added_sources.each { |source| context.add_source(source) }
|
20
|
+
end
|
21
|
+
end
|
data/lib/cocoapods_plugin.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-bin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tripleCC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
|
-
rubygems_version: 3.
|
164
|
+
rubygems_version: 3.1.2
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: cocoapods-bin is a plugin which helps develpers switching pods between source
|