cocoapods-dongjia 1.1.1 → 1.1.2

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: 126bfc1cf1fdf266d9b8d0801f531d8dab5b5656ed3f6f7392144c1b0782a564
4
- data.tar.gz: 27bf7cf27a82203f6bce0b6a4c289830b18f50cd909896a23595af038663d635
3
+ metadata.gz: fa6197291c8d0327124cdfe9a152f5a4cddc91a15fb42571ca10c175f96fa730
4
+ data.tar.gz: 4e68535d83b1c174b1e01314cf00f4fecd45c0131de4fbb4b37e64ffb4504c10
5
5
  SHA512:
6
- metadata.gz: f5e54d1dca186cdf7c45aed044ccdbd41df1125925fb40e11bb49ef981fe3994ec48625e1c9a7cd3a6d3fb3a193672bba541dd9255da0d754e9da469ed3e0c32
7
- data.tar.gz: 78a68150bdf76f6a27f358a7bda31f1f81542e30cfde5b58ef39c8487fe5eb645d00229e4f3516ab6a734f65525b3bb9612701c6e5b3d3a511640a5e9be0beef
6
+ metadata.gz: 6d3a68721994c607cace3a8bca9bd89832887ef55646f5d9950c71c23099881f7299449cfd37940201a703116819d9173f18f99aaffa4a5dc0272ff7256ef598
7
+ data.tar.gz: dc481b20dc7a3505f0a089ef465a513e4e026086df1a89fe7d97563c30accab74cd6492897a8debf79645aae1ffa0ac1241bd4356584cd7b6a5567e115cda484
@@ -104,17 +104,18 @@ module Pod
104
104
  def get_images
105
105
  images = Set[]
106
106
  except_dirs = [
107
- 'QYResource.bundle',
108
- 'DJMate',
109
- 'IQKeyboardManager',
110
- 'EnterpriseEditionImages.xcassets',
107
+ 'QYResource.bundle',
108
+ 'DJMate',
109
+ 'IQKeyboardManager',
111
110
  'MJRefresh.bundle',
112
111
  'AlipaySDK.bundle',
113
112
  'AppIcon.appiconset',
114
- 'KPCameraImages.xcassets'
113
+ 'KPCameraImages.xcassets',
114
+ 'Umeng',
115
+ 'LaunchResource'
115
116
  ]
116
117
  except_files = [
117
- 'image_placeholder',
118
+ 'image_placeholder',
118
119
  'register_add_avatar'
119
120
  ]
120
121
  bk = Proc.new do |dir, name, ext|
@@ -127,20 +128,32 @@ module Pod
127
128
 
128
129
  # 分析
129
130
  def analyze(source_files, images)
130
- source_files.map { |x| x.file_ref.real_path }.each do | path |
131
+ source_file_paths = source_files.map { |x|
132
+ x.file_ref.real_path
133
+ }
134
+ .select { |x|
135
+ File.exist?(x)
136
+ }
137
+ count = source_file_paths.count
138
+ source_file_paths.each_index do | index |
139
+ percent = index.to_f / count.to_f * 100
140
+ print "\r" if index != 0
141
+ print "#{format("%.2f", percent)}%"
142
+ path = source_file_paths[index]
131
143
  File.open(path, 'r') do |f|
132
144
  image_using = []
133
145
  f.each_line do |line|
134
146
  next unless line.include?('"')
135
- images.each do |img|
136
- if line.include?('"' + img.name)
137
- image_using << img
138
- else
139
- # 根据下划线分割剔除最后一项,再尝试匹配
140
- if !img.fuzzy_name.empty?
141
- if line.include?('"' + img.fuzzy_name + '%') ||
142
- line.include?('"' + img.fuzzy_name + '"')
143
- image_using << img
147
+ ['"', '/'].each do |prefix|
148
+ images.each do |img|
149
+ if line.include?(prefix + img.name)
150
+ image_using << img
151
+ else
152
+ # 根据下划线分割剔除最后一项,再尝试匹配
153
+ if !img.fuzzy_name.empty?
154
+ ['%', '"'].each do |suffix|
155
+ image_using << img if line.include?(prefix + img.fuzzy_name + suffix)
156
+ end
144
157
  end
145
158
  end
146
159
  end
@@ -149,6 +162,7 @@ module Pod
149
162
  images = images - image_using
150
163
  end
151
164
  end
165
+ print "\r"
152
166
  images
153
167
  end
154
168
 
@@ -1,6 +1,7 @@
1
1
  module CocoapodsDongjia
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  UPDATE_DESC = <<-EOS
4
- - 修复依赖
4
+ - 修复路由抓取错误
5
+ - 修复 pod strip
5
6
  EOS
6
7
  end
@@ -39,7 +39,10 @@ EOS
39
39
  end
40
40
 
41
41
  if @prefix != nil
42
- @redirect_type = @defining_line[prefix_len, @defining_line.index(',') - prefix_len]
42
+ end_index = @defining_line.index(',') || @defining_line.index(')')
43
+ if !end_index.nil?
44
+ @redirect_type = @defining_line[prefix_len, end_index - prefix_len]
45
+ end
43
46
  end
44
47
  end
45
48
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-dongjia
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jiangzhuoyi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-23 00:00:00.000000000 Z
11
+ date: 2020-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -99,7 +99,9 @@ homepage: https://github.com/EXAMPLE/cocoapods-dongjia
99
99
  licenses:
100
100
  - MIT
101
101
  metadata:
102
- update_desc: " - 修复依赖\n"
102
+ update_desc: |2
103
+ - 修复路由抓取错误
104
+ - 修复 pod strip
103
105
  post_install_message:
104
106
  rdoc_options: []
105
107
  require_paths:
@@ -115,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
117
  - !ruby/object:Gem::Version
116
118
  version: '0'
117
119
  requirements: []
118
- rubygems_version: 3.0.3
120
+ rubygems_version: 3.1.4
119
121
  signing_key:
120
122
  specification_version: 4
121
123
  summary: A longer description of cocoapods-dongjia.