cocoapods-cafswitcher 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '029cde59eb4ac6185e6e5bded575dd366b62acc50467700e78097ba29e713159'
4
- data.tar.gz: c10b07deb75fbe4d456a4cd42f738657673e1aa78425996c2156ad15b2a19a80
3
+ metadata.gz: febf0dcfc7d5b512809d9192fa32ee0965419bf77ea2510593c5ded9e6295232
4
+ data.tar.gz: 3b55ab2f6515af3c57b528c6826c510b5e970b7ca28ba1ef7bab9d976fc53874
5
5
  SHA512:
6
- metadata.gz: 7adaed5194a9bfba2b40c17ee2a36320cc2acdcef024696cac4687a40f2b03973dd438486287dd68511c5e8006f5e35a946b1e65c79743b8c0fd6fd6d551dbc3
7
- data.tar.gz: 77543c965b8e281789de907b393f2edcb74845021f0912f0723936d14d083457b9cd7d35cf427069cd301216e8e2da7146cd4ccb2b83c82d37b2fa0e7bc9dd8c
6
+ metadata.gz: e0b70ab908288f28f0cef34cacb9b63e90127c6ab71b8840c182184f623590ba5f10b0e5faf85c98008691613906d73c0172782777c7899f8d1f7a046558ab8f
7
+ data.tar.gz: d7460548c7926c850427abcafb5607efb21e76d2a551eed2534b57e80795b038f67d283c464ddac6bf85a7bbabf72d2b8495dd8f70bae7d7853fd02c256766a8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-cafswitcher (0.0.6)
4
+ cocoapods-cafswitcher (0.0.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -162,24 +162,31 @@ Pod::HooksManager.register('cocoapods-cafswitcher', :pre_install) do |installer_
162
162
  Pod::UI.puts "\nchanged sub Pod is:\n " + changedSubPods.to_s if changedSubPods.length > 0
163
163
  # changedPod 里是根据subspec来存的,需要进行合并,找到pod库而不是含有subspec的库
164
164
  changedPods = Array.new
165
- changedSubPods.each {|subPod| changedPods << subPod.split("_")[0]}
165
+ changedSubPods.each do |subPod|
166
+ subPod.chomp!("_SOURCE")
167
+ subPod.chomp!("_ARCHIVE")
168
+ subPod.chomp!("_FRAMEWORK")
169
+ changedPods << subPod
170
+ end
166
171
  # changedPods = changedPods | needUpdatePodList
167
172
  changedPods.uniq!
168
173
 
169
174
  Pod::UI.puts "\nchanged Pod is:\n " + changedPods.to_s if changedPods.length > 0
170
-
175
+
171
176
  # 根据不同删除cache
172
177
  podRoot = config.project_pods_root
173
178
  changedPods.each do |changedPod|
174
179
  if needUpdatePodList.delete(changedPod)
175
- # TODO如果pod 里没有用到preserve_paths,需要清除 pod cache clean
180
+ Pod::UI.puts "正在清理#{changedPod}的缓存"
176
181
  cacheCleanCMD = "pod cache clean #{changedPod} --all"
177
182
  out = `#{cacheCleanCMD}`.lines.to_a
178
- puts out
183
+ Pod::UI.puts out
184
+ end
185
+ if changedPod =~ /^(?i)LJ/ or changedPod =~ /^(?i)Lianjia/
186
+ # 清除目录 pods 文件夹下的缓存
187
+ changedPodPath = podRoot + changedPod
188
+ FileUtils.rm_r(changedPodPath) if changedPodPath.exist?
179
189
  end
180
- # 清除目录 pods 文件夹下的缓存
181
- changedPodPath = podRoot + changedPod
182
- FileUtils.rm_r(changedPodPath) if changedPodPath.exist?
183
190
  end
184
191
 
185
192
  # 把新的配置写入file
@@ -1,3 +1,3 @@
1
1
  module CocoapodsCafswitcher
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -182,11 +182,7 @@ module Pod
182
182
  isPath = options.has_key?(:path)
183
183
  # pod_name = Specification.root_name(name)
184
184
  if isPath
185
- index = name =~ /[\/]/
186
- if not index
187
- index = name.length
188
- end
189
- Pod::Podfile.needUpdatePodList << name[0,index]
185
+ Pod::Podfile.needUpdatePodList << name[0,name=~/[\/]/]
190
186
  end
191
187
  requirements.pop if options.empty?
192
188
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-cafswitcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - handa