cocoapods-bin 0.0.4 → 0.0.5
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 +1 -1
- data/lib/cocoapods-bin/command/bin/search.rb +2 -1
- data/lib/cocoapods-bin/gem_version.rb +1 -1
- data/lib/cocoapods-bin/helpers/spec_files_helper.rb +6 -2
- data/lib/cocoapods-bin/native/analyzer.rb +1 -1
- data/lib/cocoapods-bin/native/installation_options.rb +2 -2
- data/lib/cocoapods-bin/native/installer.rb +1 -1
- data/lib/cocoapods-bin/native/linter.rb +2 -7
- data/lib/cocoapods-bin/native/path_source.rb +31 -0
- data/lib/cocoapods-bin/native/source.rb +4 -7
- data/lib/cocoapods-bin/native/specification.rb +5 -0
- data/lib/cocoapods-bin/native.rb +2 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1cb6338b68aa2761f9caf57f4acd33cb9c7eb41
|
4
|
+
data.tar.gz: e142ad3877f18be5337a13e234aba93d6a15ef36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 369ead0b474adce9f6cbb5126427b23436017ade6acbc3b9ec1c9b3ac07984a42838c2ece49371d466d5ee89c6e7414fe31759d8146a147df88b0f03c7eb8ee6
|
7
|
+
data.tar.gz: 010c1a8268188a6159a9e0c1de511a910ec11f67f2d457ed30a006f8144c24e889a24d28d68da8ae8957b7ff493dc5cf35c660d4ce25afdcb4cb60bdc34d4ff3
|
data/Gemfile.lock
CHANGED
@@ -38,7 +38,8 @@ module Pod
|
|
38
38
|
|
39
39
|
source = @code ? code_source : binary_source
|
40
40
|
|
41
|
-
|
41
|
+
aggregate = Pod::Source::Aggregate.new([source])
|
42
|
+
sets = aggregate.search_by_name(query_regex, true)
|
42
43
|
|
43
44
|
if(@use_pager)
|
44
45
|
UI.with_pager { print_sets(sets) }
|
@@ -10,12 +10,16 @@ module CBin
|
|
10
10
|
@binary_spec_files ||= Pathname.glob('*.binary.podspec{,.json}')
|
11
11
|
end
|
12
12
|
|
13
|
+
def binary_template_spec_files
|
14
|
+
@binary_spec_template_files ||= Pathname.glob('*.binary-template.podspec{,.json}')
|
15
|
+
end
|
16
|
+
|
13
17
|
def binary_template_spec_file
|
14
|
-
@binary_spec_template_file ||=
|
18
|
+
@binary_spec_template_file ||= binary_template_spec_files.first
|
15
19
|
end
|
16
20
|
|
17
21
|
def code_spec_files
|
18
|
-
@code_spec_files ||= spec_files - binary_spec_files
|
22
|
+
@code_spec_files ||= spec_files - binary_spec_files - binary_template_spec_files
|
19
23
|
end
|
20
24
|
|
21
25
|
def code_spec
|
@@ -9,7 +9,7 @@ module Pod
|
|
9
9
|
#
|
10
10
|
alias_method :old_update_repositories, :update_repositories
|
11
11
|
def update_repositories
|
12
|
-
if installation_options.
|
12
|
+
if installation_options.update_source_with_multi_threads
|
13
13
|
# 并发更新私有源
|
14
14
|
Parallel.each(sources, in_threads: 4) do |source|
|
15
15
|
if source.git?
|
@@ -15,10 +15,10 @@ module Pod
|
|
15
15
|
env_option :warn_for_unsecure_source, false
|
16
16
|
|
17
17
|
# 是否多进程执行 install_pod_sources
|
18
|
-
env_option :
|
18
|
+
env_option :install_with_multi_threads, true
|
19
19
|
|
20
20
|
# 是否多进程执行 update_repositories
|
21
|
-
env_option :
|
21
|
+
env_option :update_source_with_multi_threads, true
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -13,7 +13,7 @@ module Pod
|
|
13
13
|
|
14
14
|
alias_method :old_install_pod_sources, :install_pod_sources
|
15
15
|
def install_pod_sources
|
16
|
-
if installation_options.
|
16
|
+
if installation_options.install_with_multi_threads
|
17
17
|
if Pod.match_version?('~> 1.4.0')
|
18
18
|
install_pod_sources_for_version_in_1_4_0
|
19
19
|
elsif Pod.match_version?('~> 1.5')
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'cocoapods-bin/native/specification'
|
1
2
|
|
2
3
|
module Pod
|
3
4
|
class Specification
|
@@ -10,13 +11,7 @@ module Pod
|
|
10
11
|
#
|
11
12
|
def validate_root_name
|
12
13
|
if spec.root.name && file
|
13
|
-
acceptable_names =
|
14
|
-
spec.root.name + '.podspec',
|
15
|
-
spec.root.name + '.podspec.json',
|
16
|
-
# 支持 binary 后缀
|
17
|
-
spec.root.name + '.binary.podspec',
|
18
|
-
spec.root.name + '.binary.podspec.json'
|
19
|
-
]
|
14
|
+
acceptable_names = Specification::VALID_EXTNAME.map { |extname| "#{spec.root.name}#{extname}" }
|
20
15
|
names_match = acceptable_names.include?(file.basename.to_s)
|
21
16
|
unless names_match
|
22
17
|
results.add_error('name', 'The name of the spec should match the ' \
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'cocoapods-bin/native/specification'
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
module ExternalSources
|
5
|
+
# Provides support for fetching a specification file from a path local to
|
6
|
+
# the machine running the installation.
|
7
|
+
#
|
8
|
+
class PathSource < AbstractExternalSource
|
9
|
+
def normalized_podspec_path(declared_path)
|
10
|
+
extension = File.extname(declared_path)
|
11
|
+
|
12
|
+
if extension == '.podspec' || extension == '.json'
|
13
|
+
path_with_ext = declared_path
|
14
|
+
else
|
15
|
+
# 默认先从 binary podspec 找起,因为 binary podspec 的 subspec 可能比 code podspec 多
|
16
|
+
# 这里可能出现 code subspec 和 binary subspec 对应不上的情况,导致 lint 失败
|
17
|
+
# 所以不要在 code podspec 同一目录下保留 binary podspec
|
18
|
+
path_with_ext = Specification::VALID_EXTNAME
|
19
|
+
.map { |extname| "#{declared_path}/#{name}#{extname}" }
|
20
|
+
.find { |file| File.exist?(file) } || "#{declared_path}/#{name}.podspec"
|
21
|
+
end
|
22
|
+
|
23
|
+
UI.message "获取的 podspec 路径为 `#{path_with_ext}`"
|
24
|
+
|
25
|
+
podfile_dir = File.dirname(podfile_path || '')
|
26
|
+
|
27
|
+
File.expand_path(path_with_ext, podfile_dir)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -17,13 +17,10 @@ module Pod
|
|
17
17
|
raise ArgumentError, 'No version' unless version
|
18
18
|
path = pod_path(name) + version.to_s
|
19
19
|
|
20
|
-
specification_path =
|
21
|
-
"#{name}
|
22
|
-
|
23
|
-
|
24
|
-
"#{name}.binary.podspec",
|
25
|
-
"#{name}.binary.podspec.json"
|
26
|
-
].map { |file| path + file }.find { |path| path.exist? }
|
20
|
+
specification_path = Specification::VALID_EXTNAME
|
21
|
+
.map { |extname| "#{name}#{extname}" }
|
22
|
+
.map { |file| path + file }
|
23
|
+
.find { |path| path.exist? }
|
27
24
|
|
28
25
|
unless specification_path
|
29
26
|
raise StandardError, "Unable to find the specification #{name} " \
|
data/lib/cocoapods-bin/native.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'cocoapods'
|
2
2
|
|
3
3
|
if Pod.match_version?('~> 1.4')
|
4
|
+
require 'cocoapods-bin/native/specification'
|
5
|
+
require 'cocoapods-bin/native/path_source'
|
4
6
|
require 'cocoapods-bin/native/analyzer'
|
5
7
|
require 'cocoapods-bin/native/installer'
|
6
8
|
require 'cocoapods-bin/native/pod_source_installer'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-bin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tripleCC
|
@@ -108,12 +108,14 @@ files:
|
|
108
108
|
- lib/cocoapods-bin/native/installation_options.rb
|
109
109
|
- lib/cocoapods-bin/native/installer.rb
|
110
110
|
- lib/cocoapods-bin/native/linter.rb
|
111
|
+
- lib/cocoapods-bin/native/path_source.rb
|
111
112
|
- lib/cocoapods-bin/native/pod_source_installer.rb
|
112
113
|
- lib/cocoapods-bin/native/podfile.rb
|
113
114
|
- lib/cocoapods-bin/native/resolver.rb
|
114
115
|
- lib/cocoapods-bin/native/source.rb
|
115
116
|
- lib/cocoapods-bin/native/source_provider_hook.rb
|
116
117
|
- lib/cocoapods-bin/native/sources_manager.rb
|
118
|
+
- lib/cocoapods-bin/native/specification.rb
|
117
119
|
- lib/cocoapods-bin/native/validator.rb
|
118
120
|
- lib/cocoapods_plugin.rb
|
119
121
|
- spec/command/bin_spec.rb
|