cocoapods-bin 0.1.23 → 0.1.24
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/gem_version.rb +1 -1
- data/lib/cocoapods-bin/native/resolver.rb +37 -38
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cb60567dc623ef8e850e97e77d570543e9d9ced364a5e3d1eaa7e26a2bf77b5
|
4
|
+
data.tar.gz: 1b414882912dde9104b837f7974c9b05e63612eb445b523465b4101365b0c1bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 214006541f453363f4d8c1cd1b4d7e3c4058998fa4709be451cbae7b962aeeec77ab652362c6e11eb4487a699554b66b6b71ea06c0a53216839260bf662cd1f6
|
7
|
+
data.tar.gz: 9b9c9021311ca147bdd3529167e546e2e2cfc3642a39a56c63b204021c37be950d36451f07197f7d6403e069887a47986fc7007209ce39b5926447ea3a64fb56
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cocoapods-bin (0.1.
|
4
|
+
cocoapods-bin (0.1.24)
|
5
5
|
cocoapods (~> 1.4)
|
6
6
|
cocoapods-generate (~> 1.4)
|
7
7
|
parallel
|
@@ -72,7 +72,7 @@ GEM
|
|
72
72
|
nanaimo (0.2.6)
|
73
73
|
nap (1.1.0)
|
74
74
|
netrc (0.11.0)
|
75
|
-
parallel (1.
|
75
|
+
parallel (1.18.0)
|
76
76
|
prettybacon (0.0.2)
|
77
77
|
bacon (~> 1.2)
|
78
78
|
rake (13.0.0)
|
@@ -1,14 +1,13 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
1
|
+
require "parallel"
|
2
|
+
require "cocoapods"
|
3
|
+
require "cocoapods-bin/native/podfile"
|
4
|
+
require "cocoapods-bin/native/sources_manager"
|
5
|
+
require "cocoapods-bin/native/installation_options"
|
6
|
+
require "cocoapods-bin/gem_version"
|
7
7
|
|
8
8
|
module Pod
|
9
9
|
class Resolver
|
10
|
-
|
11
|
-
if Pod.match_version?('~> 1.6')
|
10
|
+
if Pod.match_version?("~> 1.6")
|
12
11
|
# 其实不用到 resolver_specs_by_target 再改 spec
|
13
12
|
# 在这个方法里面,通过修改 dependency 的 source 应该也可以
|
14
13
|
# 就是有一点,如果改了之后,对应的 source 没有符合 dependency 的版本
|
@@ -19,29 +18,29 @@ module Pod
|
|
19
18
|
sources_manager = Config.instance.sources_manager
|
20
19
|
if dependency && dependency.podspec_repo
|
21
20
|
sources_manager.aggregate_for_dependency(dependency)
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
# 采用 lock 中的 source ,会导致插件对 source 的先后调整失效
|
22
|
+
# elsif (locked_vertex = @locked_dependencies.vertex_named(dependency.name)) && (locked_dependency = locked_vertex.payload) && locked_dependency.podspec_repo
|
23
|
+
# sources_manager.aggregate_for_dependency(locked_dependency)
|
25
24
|
else
|
26
25
|
@aggregate ||= Source::Aggregate.new(sources)
|
27
26
|
end
|
28
27
|
end
|
29
28
|
end
|
30
29
|
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
if Pod.match_version?("~> 1.4")
|
31
|
+
def specifications_for_dependency(dependency, additional_requirements_frozen = [])
|
32
|
+
additional_requirements = additional_requirements_frozen.dup
|
34
33
|
additional_requirements.compact!
|
35
34
|
requirement = Requirement.new(dependency.requirement.as_list + additional_requirements.flat_map(&:as_list))
|
36
|
-
requirement = Requirement.new(dependency.requirement.as_list.map { |r| r +
|
35
|
+
requirement = Requirement.new(dependency.requirement.as_list.map { |r| r + ".a" } + additional_requirements.flat_map(&:as_list)) if podfile.allow_prerelease? && !requirement.prerelease?
|
37
36
|
|
38
|
-
if Pod.match_version?(
|
37
|
+
if Pod.match_version?("~> 1.7")
|
39
38
|
options = podfile.installation_options
|
40
39
|
else
|
41
40
|
options = installation_options
|
42
41
|
end
|
43
42
|
|
44
|
-
if Pod.match_version?(
|
43
|
+
if Pod.match_version?("~> 1.8")
|
45
44
|
specifications = find_cached_set(dependency).
|
46
45
|
all_specifications(options.warn_for_multiple_pod_sources, requirement)
|
47
46
|
else
|
@@ -55,13 +54,14 @@ module Pod
|
|
55
54
|
end
|
56
55
|
end
|
57
56
|
|
58
|
-
if Pod.match_version?(
|
57
|
+
if Pod.match_version?("~> 1.6")
|
59
58
|
alias_method :old_valid_possibility_version_for_root_name?, :valid_possibility_version_for_root_name?
|
59
|
+
|
60
60
|
def valid_possibility_version_for_root_name?(requirement, activated, spec)
|
61
61
|
return true if podfile.allow_prerelease?
|
62
62
|
old_valid_possibility_version_for_root_name?(requirement, activated, spec)
|
63
63
|
end
|
64
|
-
elsif Pod.match_version?(
|
64
|
+
elsif Pod.match_version?("~> 1.4")
|
65
65
|
def requirement_satisfied_by?(requirement, activated, spec)
|
66
66
|
version = spec.version
|
67
67
|
return false unless requirement.requirement.satisfied_by?(version)
|
@@ -75,10 +75,10 @@ module Pod
|
|
75
75
|
|
76
76
|
# >= 1.4.0 才有 resolver_specs_by_target 以及 ResolverSpecification
|
77
77
|
# >= 1.5.0 ResolverSpecification 才有 source,供 install 或者其他操作时,输入 source 变更
|
78
|
-
#
|
79
|
-
if Pod.match_version?(
|
78
|
+
#
|
79
|
+
if Pod.match_version?("~> 1.4")
|
80
80
|
old_resolver_specs_by_target = instance_method(:resolver_specs_by_target)
|
81
|
-
define_method(:resolver_specs_by_target) do
|
81
|
+
define_method(:resolver_specs_by_target) do
|
82
82
|
specs_by_target = old_resolver_specs_by_target.bind(self).call()
|
83
83
|
|
84
84
|
sources_manager = Config.instance.sources_manager
|
@@ -88,7 +88,7 @@ module Pod
|
|
88
88
|
specs_by_target.each do |target, rspecs|
|
89
89
|
# use_binaries 并且 use_source_pods 不包含
|
90
90
|
use_binary_rspecs = if podfile.use_binaries? || podfile.use_binaries_selector
|
91
|
-
rspecs.select do |rspec|
|
91
|
+
rspecs.select do |rspec|
|
92
92
|
([rspec.name, rspec.root.name] & use_source_pods).empty? &&
|
93
93
|
(podfile.use_binaries_selector.nil? || podfile.use_binaries_selector.call(rspec.spec))
|
94
94
|
end
|
@@ -96,7 +96,7 @@ module Pod
|
|
96
96
|
[]
|
97
97
|
end
|
98
98
|
|
99
|
-
# Parallel.map(rspecs, in_threads: 8) do |rspec|
|
99
|
+
# Parallel.map(rspecs, in_threads: 8) do |rspec|
|
100
100
|
specs_by_target[target] = rspecs.map do |rspec|
|
101
101
|
# 含有 subspecs 的组件暂不处理
|
102
102
|
# next rspec if rspec.spec.subspec? || rspec.spec.subspecs.any?
|
@@ -104,17 +104,17 @@ module Pod
|
|
104
104
|
# developments 组件采用默认输入的 spec (development pods 的 source 为 nil)
|
105
105
|
next rspec unless rspec.spec.respond_to?(:spec_source) && rspec.spec.spec_source
|
106
106
|
|
107
|
-
# 采用二进制依赖并且不为开发组件
|
107
|
+
# 采用二进制依赖并且不为开发组件
|
108
108
|
use_binary = use_binary_rspecs.include?(rspec)
|
109
|
-
source = use_binary ? sources_manager.binary_source : sources_manager.code_source
|
109
|
+
source = use_binary ? sources_manager.binary_source : sources_manager.code_source
|
110
110
|
|
111
111
|
spec_version = rspec.spec.version
|
112
112
|
|
113
|
-
UI.message "- 开始处理 #{rspec.spec.name} #{spec_version} 组件."
|
113
|
+
UI.message "- 开始处理 #{rspec.spec.name} #{spec_version} 组件."
|
114
114
|
|
115
115
|
begin
|
116
116
|
# 从新 source 中获取 spec
|
117
|
-
specification = source.specification(rspec.root.name, spec_version)
|
117
|
+
specification = source.specification(rspec.root.name, spec_version)
|
118
118
|
|
119
119
|
# 组件是 subspec
|
120
120
|
specification = specification.subspec_by_name(rspec.name, false, true) if rspec.spec.subspec?
|
@@ -122,31 +122,31 @@ module Pod
|
|
122
122
|
# 造成 subspec_by_name 返回 nil,这个是正常现象
|
123
123
|
next unless specification
|
124
124
|
|
125
|
-
if Pod.match_version?(
|
125
|
+
if Pod.match_version?("~> 1.7")
|
126
126
|
used_by_only = rspec.used_by_non_library_targets_only
|
127
127
|
else
|
128
128
|
used_by_only = rspec.used_by_tests_only
|
129
129
|
end
|
130
130
|
# used_by_only = rspec.respond_to?(:used_by_tests_only) ? rspec.used_by_tests_only : rspec.used_by_non_library_targets_only
|
131
131
|
# 组装新的 rspec ,替换原 rspec
|
132
|
-
rspec = if Pod.match_version?(
|
132
|
+
rspec = if Pod.match_version?("~> 1.4.0")
|
133
133
|
ResolverSpecification.new(specification, used_by_only)
|
134
134
|
else
|
135
135
|
ResolverSpecification.new(specification, used_by_only, source)
|
136
136
|
end
|
137
137
|
rspec
|
138
|
-
rescue Pod::StandardError => error
|
138
|
+
rescue Pod::StandardError => error
|
139
139
|
# 没有从新的 source 找到对应版本组件,直接返回原 rspec
|
140
140
|
missing_binary_specs << rspec.spec if use_binary
|
141
141
|
rspec
|
142
142
|
end
|
143
143
|
|
144
|
-
rspec
|
144
|
+
rspec
|
145
145
|
end.compact
|
146
146
|
end
|
147
147
|
|
148
|
-
missing_binary_specs.uniq.each do |spec|
|
149
|
-
UI.message "【#{spec.name} | #{spec.version}】组件无对应二进制版本 , 将采用源码依赖."
|
148
|
+
missing_binary_specs.uniq.each do |spec|
|
149
|
+
UI.message "【#{spec.name} | #{spec.version}】组件无对应二进制版本 , 将采用源码依赖."
|
150
150
|
end if missing_binary_specs.any?
|
151
151
|
|
152
152
|
specs_by_target
|
@@ -154,7 +154,7 @@ module Pod
|
|
154
154
|
end
|
155
155
|
end
|
156
156
|
|
157
|
-
if Pod.match_version?(
|
157
|
+
if Pod.match_version?("~> 1.4.0")
|
158
158
|
# 1.4.0 没有 spec_source
|
159
159
|
class Specification
|
160
160
|
class Set
|
@@ -165,10 +165,10 @@ module Pod
|
|
165
165
|
define_method(:initialize) do |name, version, source|
|
166
166
|
old_initialize.bind(self).call(name, version, source)
|
167
167
|
|
168
|
-
@spec_source = source
|
168
|
+
@spec_source = source
|
169
169
|
end
|
170
170
|
|
171
|
-
def respond_to?(method, include_all = false)
|
171
|
+
def respond_to?(method, include_all = false)
|
172
172
|
return super unless method == :spec_source
|
173
173
|
true
|
174
174
|
end
|
@@ -177,4 +177,3 @@ module Pod
|
|
177
177
|
end
|
178
178
|
end
|
179
179
|
end
|
180
|
-
|
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.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tripleCC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-14 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.0.
|
164
|
+
rubygems_version: 3.0.6
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: cocoapods-bin is a plugin which helps develpers switching pods between source
|