cocoapods-soul-component-plugin 0.0.20 → 0.0.22

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8150cf4de51ae2f04db9b7b144f1dcdd76f3235b5b9d8f3b283647f99414e0ee
4
- data.tar.gz: c6e52f9ee80b1bd0e14211a8a000cde0ef41050288f9a2af2b99a183205b486d
3
+ metadata.gz: 71b4e02d05524e1a078dce713c608783056e4e2be2a415c9b4a8b0fe527a2f9d
4
+ data.tar.gz: 1de96adb1816262d2fcf66556b50eed15b139be9426ebbfbec21e3de08b7ccdd
5
5
  SHA512:
6
- metadata.gz: 275197bfa5a1845155f3bb1bc9347e0279a84b804c19900d7d87e915e547ae3d574e8c918e4cd2dd421f04102f7c75e4644b9c9fc095a0944f4d38eaed8837dd
7
- data.tar.gz: c3e5386e58a20fc8a20d5e075af0c4cf5ee36b0970743f7aa55b194a6a948efd45cf66a9f224b4d6adf33113074e5a8604206ff23ea8cc340c602bf7e21d8155
6
+ metadata.gz: 8d18dbeea26f8ed11e6b1c46c65247c7b71fd40fba6573e72be5ce9cd64915bb8220a7e1c85d036fb5ab71a58c23a48ec20d2f89465f9007c7b8f5fd4205a7d0
7
+ data.tar.gz: c2d10fd835bc1f53441b7c8aaacea41221c38ff04712b1210d60f0bcae938c4c97fd3560bca5c99cd0c73f51876acbbc765ffd766aface1128c08fa1ca65eb0b
@@ -6,6 +6,7 @@ require 'json'
6
6
  require 'xcodeproj'
7
7
  require 'cocoapods-downloader'
8
8
  require 'cocoapods/user_interface'
9
+ # require 'hash-deep-merge'
9
10
  require_relative '../gem_version'
10
11
 
11
12
  module Pod
@@ -139,6 +140,7 @@ module CocoapodsSoulComponentPlugin
139
140
  project.save
140
141
  end
141
142
 
143
+
142
144
  def self.generateComponents
143
145
  components = []
144
146
  json = File.read(component_file_path)
@@ -149,38 +151,21 @@ module CocoapodsSoulComponentPlugin
149
151
  if File.exist?(component_user_file_path)
150
152
  json_user = File.read(component_user_file_path)
151
153
  obj_user = JSON.parse(json_user)
152
- dependency_user = obj_user['dependencies']
154
+ obj = obj.deep_merge!(obj_user)
155
+ puts "混入用户配置,结果为:#{obj}"
153
156
  end
154
157
 
155
158
  if @@import_dependency.length.positive?
156
159
  import_json = JSON.parse(self.import_dependency)
157
- dependency_import = import_json['dependencies']
160
+ obj = obj.deep_merge!(import_json)
161
+ puts "混入导入配置,结果为:#{obj}"
158
162
  end
159
163
 
160
164
  dependencies = obj['dependencies']
161
165
  dependencies.each do |each|
162
166
  component = Soul_Component.new(each[0], each[1]['local'], each[1]['submodule'], each[1]['version'], each[1]['git'],
163
167
  each[1]['branch'], each[1]['path'], each[1]['commit'])
164
- if dependency_user && dependency_user[component.name]
165
- component.local = dependency_user[component.name]['local'] if dependency_user[component.name]['local']
166
- component.submodule = dependency_user[component.name]['submodule'] if dependency_user[component.name]['submodule']
167
- component.version = dependency_user[component.name]['version']
168
- component.git = dependency_user[component.name]['git'] if dependency_user[component.name]['git']
169
- component.branch = dependency_user[component.name]['branch']
170
- component.path = dependency_user[component.name]['path']
171
- component.commit = dependency_user[component.name]['commit']
172
- Pod::UI.puts "使用用户配置覆盖。参数:#{component.to_hash}".green
173
- end
174
- if dependency_import && dependency_import[component.name]
175
- component.local = dependency_import[component.name]['local'] if dependency_import[component.name]['local']
176
- component.submodule = dependency_import[component.name]['submodule'] if dependency_import[component.name]['submodule']
177
- component.version = dependency_import[component.name]['version']
178
- component.git = dependency_import[component.name]['git'] if dependency_import[component.name]['git']
179
- component.branch = dependency_import[component.name]['branch']
180
- component.path = dependency_import[component.name]['path']
181
- component.commit = dependency_import[component.name]['commit']
182
- Pod::UI.puts "使用导入配置覆盖。参数:#{component.to_hash}".green
183
- end
168
+
184
169
  if @@use_source
185
170
  component.local = true
186
171
  if Pod::Downloader::Git.check_if_has_auth_clone(component.git) == false
@@ -213,7 +198,6 @@ module CocoapodsSoulComponentPlugin
213
198
 
214
199
  @@components.each do |each|
215
200
  if each.path.nil?
216
- if each.submodule == false
217
201
  if each.local == true
218
202
  local_path = each.name
219
203
 
@@ -241,9 +225,6 @@ module CocoapodsSoulComponentPlugin
241
225
  Pod::UI.puts "本地依赖 #{each.name} 已存在,不进行变更,如需更新请删除重新 install。位置:#{target_path}".yellow
242
226
  end
243
227
  end
244
- elsif each.local == true
245
- each.path = "SOPods/#{each.name}"
246
- end
247
228
  end
248
229
  end
249
230
  end
@@ -269,6 +250,7 @@ module Pod
269
250
  alias old_run run
270
251
 
271
252
  def run
253
+ # Pod::UI.puts "这是测试版本".red
272
254
  Pod::UI.puts "当前版本:#{CocoapodsSoulComponentPlugin::VERSION}".green
273
255
  CocoapodsSoulComponentPlugin.pre_run if CocoapodsSoulComponentPlugin.use_components
274
256
  old_run
@@ -297,7 +279,8 @@ module Pod
297
279
  # end
298
280
 
299
281
  CocoapodsSoulComponentPlugin.components.each do |each|
300
- next unless each.name == name
282
+ # 判断模块名是否相符,注意如果是子模块会带上SOPods的前缀
283
+ next unless each.name == name || each.name == 'SOPods/' + name
301
284
 
302
285
  requirements = if each.local == true
303
286
  [{ name: each.name, path: each.path }]
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module CocoapodsSoulComponentPlugin
3
- VERSION = '0.0.20'
3
+ VERSION = '0.0.22'
4
4
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-soul-component-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - fang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-30 00:00:00.000000000 Z
11
+ date: 2024-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
20
- type: :development
19
+ version: '0'
20
+ type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -31,7 +31,21 @@ dependencies:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
- type: :development
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: hash-deep-merge
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
@@ -69,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
83
  - !ruby/object:Gem::Version
70
84
  version: '0'
71
85
  requirements: []
72
- rubygems_version: 3.0.3.1
86
+ rubygems_version: 3.5.9
73
87
  signing_key:
74
88
  specification_version: 4
75
89
  summary: A longer description of cocoapods-soul-component-plugin.