yk_command 0.4.6 → 0.4.7
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/yk_command/analyze/analyze.rb +1 -1
- data/lib/yk_command/analyze/dependency_result.rb +56 -59
- data/lib/yk_command/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4e0f782818c147f0402b8b7139842c8030065818391319fb53c0ae57d544c67
|
4
|
+
data.tar.gz: f5f010db87a2ba242658d18728cbb9575e3a9f0d027a21b9c67e3ac006eb1f09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cda7886d0ae837cab8f503bd3c58f1390c5cd96d4d62feeb94bb744c266e11674ae28740f27a95b0ff24253189428f6f2d42a1fdb1053f5b552c145341b302cd
|
7
|
+
data.tar.gz: 86533c9b168b527136667553289b170feaf23b049699ab7035f32b08e68b8186cb8ee1708f2982141b93e01eba897be11285c293fa76523e28b19a3069152eaf
|
data/Gemfile.lock
CHANGED
@@ -142,7 +142,7 @@ module YkCommand
|
|
142
142
|
@podLock
|
143
143
|
)
|
144
144
|
|
145
|
-
specifications = analyzer.analyze.specifications.map(&:root).uniq
|
145
|
+
specifications = analyzer.analyze(:outdated ).specifications.map(&:root).uniq
|
146
146
|
array = []
|
147
147
|
dependency_result = DependencyResult.new(specifications, @podLock)
|
148
148
|
dependency_result.result_json
|
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'cocoapods'
|
2
2
|
require 'cocoapods-core/lockfile'
|
3
3
|
|
4
|
+
YK = 'yeah'+'ka'
|
5
|
+
|
4
6
|
COMPONENT_TYPE = ['基础组件', 'UI组件', '通用业务组件', '业务模块', '其它']
|
5
7
|
|
6
8
|
FOUNDATION_COMPONENT_NAMES = ['基础组件', 'UI组件', '通用业务组件', '业务模块', '其它']
|
@@ -39,7 +41,7 @@ module YkCommand
|
|
39
41
|
is_yk_dependency = is_yk_dependency pod_name
|
40
42
|
is_install_from_git_commit = !@pod_lock.checkout_options_for_pod_named(pod_name).nil?
|
41
43
|
dep_attribute_in_pod_file = find_info_in_specifications pod_name
|
42
|
-
|
44
|
+
pp "#{pod_name} #{spec_repo_name} #{version} local:#{is_local_dependency} ,yeahka:#{is_yk_dependency},git_commit: #{is_install_from_git_commit}"
|
43
45
|
map["name"] = pod_name
|
44
46
|
map["version"] = version
|
45
47
|
map["is_local_dependency"] = is_local_dependency
|
@@ -69,9 +71,9 @@ module YkCommand
|
|
69
71
|
next unless dep.name == name && !dep.external_source.nil?
|
70
72
|
|
71
73
|
dep.external_source.each do |k, v|
|
72
|
-
|
73
|
-
|
74
|
-
|
74
|
+
tag = if dep.external_source.include?(:git)
|
75
|
+
dep.external_source[:git].include?(YK)
|
76
|
+
end
|
75
77
|
end
|
76
78
|
end
|
77
79
|
tag
|
@@ -79,65 +81,60 @@ module YkCommand
|
|
79
81
|
|
80
82
|
def is_pod_from_local(name)
|
81
83
|
tag = false
|
82
|
-
|
83
84
|
@pod_lock.dependencies.each do |dep|
|
84
85
|
next unless dep.name == name && !dep.external_source.nil?
|
85
|
-
|
86
|
-
dep.external_source.each do |k, v|
|
87
|
-
next unless k == :path
|
88
|
-
|
89
|
-
tag = true
|
90
|
-
end
|
86
|
+
tag = dep.external_source.include?(:path)
|
91
87
|
end
|
92
|
-
|
93
|
-
|
88
|
+
tag
|
89
|
+
end
|
94
90
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
map = sp.attributes_hash
|
100
|
-
end
|
101
|
-
map
|
102
|
-
end
|
91
|
+
def find_info_in_specifications(name)
|
92
|
+
map = {}
|
93
|
+
@specifications.each do |sp|
|
94
|
+
next unless sp.name == name
|
103
95
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
# children_definitions = td.recursive_children
|
108
|
-
# children_definitions.each do |cd|
|
109
|
-
# dependencies_hash_array = cd.send(:get_hash_value, 'dependencies')
|
110
|
-
# next if dependencies_hash_array.nil? || dependencies_hash_array.count.zero?
|
111
|
-
#
|
112
|
-
# dependencies_hash_array.each do |item|
|
113
|
-
# next if item.class.name != 'Hash'
|
114
|
-
#
|
115
|
-
# item.each do |name, _|
|
116
|
-
# res.push name
|
117
|
-
# end
|
118
|
-
# end
|
119
|
-
# end
|
120
|
-
# end
|
121
|
-
# res
|
122
|
-
# end
|
123
|
-
#
|
124
|
-
# def find_dependencies(name, map, res, dependencies_map, root_name)
|
125
|
-
# return unless map[name]
|
126
|
-
#
|
127
|
-
# map[name].each do |k|
|
128
|
-
# find_dependencies(k.name, map, res, dependencies_map, root_name)
|
129
|
-
# dependency = dependencies_map[k.name.split('/')[0]]
|
130
|
-
# res.push dependency.name if dependency && dependency.name != root_name
|
131
|
-
# end
|
132
|
-
# res
|
133
|
-
# end
|
134
|
-
#
|
135
|
-
# def subspecs_with_name(spec, subspecs_short_names)
|
136
|
-
# subspecs_short_names.map do |name|
|
137
|
-
# spec.subspecs.find { |ss| ss.name.include? name }
|
138
|
-
# end
|
139
|
-
# end
|
140
|
-
#
|
141
|
-
#
|
96
|
+
map = sp.attributes_hash
|
97
|
+
end
|
98
|
+
map
|
142
99
|
end
|
100
|
+
|
101
|
+
# def podfile_dependencies(podfile)
|
102
|
+
# res = []
|
103
|
+
# podfile.root_target_definitions.each do |td|
|
104
|
+
# children_definitions = td.recursive_children
|
105
|
+
# children_definitions.each do |cd|
|
106
|
+
# dependencies_hash_array = cd.send(:get_hash_value, 'dependencies')
|
107
|
+
# next if dependencies_hash_array.nil? || dependencies_hash_array.count.zero?
|
108
|
+
#
|
109
|
+
# dependencies_hash_array.each do |item|
|
110
|
+
# next if item.class.name != 'Hash'
|
111
|
+
#
|
112
|
+
# item.each do |name, _|
|
113
|
+
# res.push name
|
114
|
+
# end
|
115
|
+
# end
|
116
|
+
# end
|
117
|
+
# end
|
118
|
+
# res
|
119
|
+
# end
|
120
|
+
#
|
121
|
+
# def find_dependencies(name, map, res, dependencies_map, root_name)
|
122
|
+
# return unless map[name]
|
123
|
+
#
|
124
|
+
# map[name].each do |k|
|
125
|
+
# find_dependencies(k.name, map, res, dependencies_map, root_name)
|
126
|
+
# dependency = dependencies_map[k.name.split('/')[0]]
|
127
|
+
# res.push dependency.name if dependency && dependency.name != root_name
|
128
|
+
# end
|
129
|
+
# res
|
130
|
+
# end
|
131
|
+
#
|
132
|
+
# def subspecs_with_name(spec, subspecs_short_names)
|
133
|
+
# subspecs_short_names.map do |name|
|
134
|
+
# spec.subspecs.find { |ss| ss.name.include? name }
|
135
|
+
# end
|
136
|
+
# end
|
137
|
+
#
|
138
|
+
#
|
139
|
+
end
|
143
140
|
end
|
data/lib/yk_command/version.rb
CHANGED