yk_command 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d89f3768c235497f3ae61c5e59802e4a2868ee40e5b62d47972a253bb132df1d
4
- data.tar.gz: 7b16ce57007246923d6971de227f2527029d7b33c1caa5cdd6d12501668d6ea8
3
+ metadata.gz: c4e0f782818c147f0402b8b7139842c8030065818391319fb53c0ae57d544c67
4
+ data.tar.gz: f5f010db87a2ba242658d18728cbb9575e3a9f0d027a21b9c67e3ac006eb1f09
5
5
  SHA512:
6
- metadata.gz: 772ca575c37fceeaee120d2f9bc9f366119be6dd85c1052ed2063d8046a163b9ca39b2c1e11ee54e18a1597fc6c656891b0397edc5ef245908f66c7aa4cf863f
7
- data.tar.gz: 764309eaa9f45ceac75ae7d354d72ec364d663a52840824c194c12f251ffcbc94c724b1f74cca5d22514e419113c61d4072d8102848ffa53f5a46e691e165882
6
+ metadata.gz: cda7886d0ae837cab8f503bd3c58f1390c5cd96d4d62feeb94bb744c266e11674ae28740f27a95b0ff24253189428f6f2d42a1fdb1053f5b552c145341b302cd
7
+ data.tar.gz: 86533c9b168b527136667553289b170feaf23b049699ab7035f32b08e68b8186cb8ee1708f2982141b93e01eba897be11285c293fa76523e28b19a3069152eaf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yk_command (0.4.6)
4
+ yk_command (0.4.7)
5
5
  bundler
6
6
  colored
7
7
  colored2
@@ -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
- # pp "#{pod_name} #{spec_repo_name} #{version} local:#{is_local_dependency} ,yeahka:#{is_yk_dependency},git_commit: #{is_install_from_git_commit}"
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
- next unless k == :git && v.include?('yeahka')
73
-
74
- tag = true
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
- tag
93
- end
88
+ tag
89
+ end
94
90
 
95
- def find_info_in_specifications(name)
96
- map = {}
97
- @specifications.each do |sp|
98
- next unless sp.name == name
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
- # def podfile_dependencies(podfile)
105
- # res = []
106
- # podfile.root_target_definitions.each do |td|
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YkCommand
4
- VERSION = '0.4.6'.freeze
4
+ VERSION = '0.4.7'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yk_command
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Major Tom