cocoapods-nexus 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cocoapods-nexus.gemspec +1 -1
- data/lib/cocoapods-nexus/hook.rb +0 -1
- data/lib/cocoapods-nexus/hook/manager.rb +8 -1
- metadata +2 -3
- data/lib/cocoapods-nexus/hook/installer.rb +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ac4a898f34bf416710c9a860d1277a2b31e4724aa4227778db75a8a2fd66a50
|
4
|
+
data.tar.gz: 20eb9b143367130deb7da98ff04249773e5ca4ee92ef624b40ff79eb62a2416a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23514cadd69f45a3892775c5efb738a4173c4ee0e0edf5b7081a51a11cc7f141f611dbc1f56d3b914afd45852aea8729769c319cbfd46b88a3d332d313cb7040
|
7
|
+
data.tar.gz: 33d55877147c3bc40b7de688d3833d571cf324850ada1ef23c89f1712a1ca52c2fb1c2f29299f1a42d4fce15c6b7e0829a2ac60670eab6d3e3e381ad729b17fc
|
data/cocoapods-nexus.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'cocoapods-nexus'
|
7
|
-
spec.version = '0.0.
|
7
|
+
spec.version = '0.0.8'
|
8
8
|
spec.authors = ['mrdaios']
|
9
9
|
spec.email = ['mrdaios@gmail.com']
|
10
10
|
spec.description = 'a cocoapods plugin for nexus.'
|
data/lib/cocoapods-nexus/hook.rb
CHANGED
@@ -4,8 +4,9 @@ require 'cocoapods-nexus/nexus_source'
|
|
4
4
|
module Pod
|
5
5
|
class Source
|
6
6
|
class Manager
|
7
|
-
alias orgin_source_from_path source_from_path
|
8
7
|
|
8
|
+
alias orgin_source_from_path source_from_path
|
9
|
+
# 根据nexus配置文件加载source
|
9
10
|
def source_from_path(path)
|
10
11
|
@new_sources_by_path ||= Hash.new do |hash, key|
|
11
12
|
nexus_file_path = File.join(key, ".nexus")
|
@@ -17,6 +18,12 @@ module Pod
|
|
17
18
|
end
|
18
19
|
@new_sources_by_path[path]
|
19
20
|
end
|
21
|
+
|
22
|
+
alias orgin_source_with_url source_with_url
|
23
|
+
# 让nexus支持多repo
|
24
|
+
def source_with_url(url)
|
25
|
+
nil
|
26
|
+
end
|
20
27
|
end
|
21
28
|
end
|
22
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-nexus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mrdaios
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|
@@ -120,7 +120,6 @@ files:
|
|
120
120
|
- lib/cocoapods-nexus/downloader.rb
|
121
121
|
- lib/cocoapods-nexus/hook.rb
|
122
122
|
- lib/cocoapods-nexus/hook/analyzer.rb
|
123
|
-
- lib/cocoapods-nexus/hook/installer.rb
|
124
123
|
- lib/cocoapods-nexus/hook/manager.rb
|
125
124
|
- lib/cocoapods-nexus/hook/specification.rb
|
126
125
|
- lib/cocoapods-nexus/nexus_source.rb
|
@@ -1,49 +0,0 @@
|
|
1
|
-
# require 'cocoapods-core'
|
2
|
-
# require 'cocoapods-nexus/api'
|
3
|
-
|
4
|
-
# module Pod
|
5
|
-
# class Installer
|
6
|
-
# alias_method :old_root_specs, :root_specs
|
7
|
-
# def root_specs
|
8
|
-
# # 通过修改specs的source到nexus下载zip(不完美的解决方案)
|
9
|
-
# specs = old_root_specs
|
10
|
-
# specs = specs.map{|spec| modify_spec_if_find_last_version(spec)}
|
11
|
-
# specs
|
12
|
-
# end
|
13
|
-
|
14
|
-
# private
|
15
|
-
|
16
|
-
# def modify_spec_if_find_last_version(spec)
|
17
|
-
# attributes_hash = spec.attributes_hash
|
18
|
-
# spec_name = attributes_hash['name']
|
19
|
-
# spec_version = attributes_hash['version']
|
20
|
-
# artifacte = nexus_find_artifacte(spec_name: spec_name, spec_version: spec_version)
|
21
|
-
# if artifacte != nil
|
22
|
-
# asset_zip = artifacte['assets'].select{ |asset| asset['path'].end_with?('zip') }.first
|
23
|
-
# if asset_zip != nil
|
24
|
-
# attributes_hash['source'] = {
|
25
|
-
# 'http' => asset_zip['downloadUrl']
|
26
|
-
# }
|
27
|
-
# puts "Downloading #{spec_name}(#{spec_version})from nexus(#{asset_zip['downloadUrl']})"
|
28
|
-
# spec.attributes_hash = attributes_hash
|
29
|
-
# end
|
30
|
-
# end
|
31
|
-
# spec
|
32
|
-
# end
|
33
|
-
|
34
|
-
# def nexus_find_artifacte(spec_name:, spec_version:)
|
35
|
-
# artifacte = {}
|
36
|
-
# api.each do |api|
|
37
|
-
# artifactes = api.search_maven_component(artifact_id: spec_name)
|
38
|
-
# artifacte = artifactes.select{ |artifacte| artifacte['version'].start_with?(spec_version) }.sort_by{ |artifacte| artifacte['version'].downcase }.last
|
39
|
-
# break if artifacte != nil
|
40
|
-
# end
|
41
|
-
# artifacte
|
42
|
-
# end
|
43
|
-
|
44
|
-
# def api
|
45
|
-
# nexus_options = Pod::Config.instance.podfile.get_options || []
|
46
|
-
# @apis = @apis || nexus_options.map{|nexus| CocoapodsNexus::API.new(hostname: nexus['endpoint'], repo: nexus['repo'])}
|
47
|
-
# end
|
48
|
-
# end
|
49
|
-
# end
|