rubisc 0.2.2 → 0.2.3
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/bin/xcodeproj-scan +13 -8
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eedf13ecdac2902231403b087e74470eea1fb6b6
|
|
4
|
+
data.tar.gz: cfc6111bef3c6b7dfa052b90f5645f2f3c8dfab2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a2ca06f49c91ef5c553847e9b9425aea856ee8aa2e974ccc4e183388a9c1012025295356179e9488d71ac519e5702a5d8f23fe7b5b47ee5f580573db2a5b099
|
|
7
|
+
data.tar.gz: 70e35c5b27712635ead3ee7a887a98949af01cb0296fe3941974cf5a16afa84a42fe5031ebff71f1225b273406a1e5fcc59b6fd41627c419a1355cb932be2da6
|
data/bin/xcodeproj-scan
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
require File.join(File.dirname(__FILE__), '..', 'lib','fileutil')
|
|
4
4
|
|
|
5
5
|
unless ARGV[0] and ARGV[1]
|
|
6
|
-
puts "Usage: xcodeproj_scan <path_to_xcodeproj> <project_directory>"
|
|
7
|
-
puts "Example: xcodeproj_scan /Users/rubisc/Proj/Proj.xcodeproj /Users/rubisc/Proj"
|
|
6
|
+
puts "Usage: xcodeproj_scan <path_to_xcodeproj> <project_directory> <file_extension>"
|
|
7
|
+
puts "Example: xcodeproj_scan /Users/rubisc/Proj/Proj.xcodeproj /Users/rubisc/Proj xib"
|
|
8
8
|
exit
|
|
9
9
|
end
|
|
10
10
|
unless File.exist? ARGV[0]
|
|
11
|
-
|
|
11
|
+
puts "#{ARGV[0]} does not exist."
|
|
12
12
|
puts "Please provide the path to .xcodeproj file."
|
|
13
13
|
exit
|
|
14
14
|
end
|
|
@@ -19,24 +19,29 @@ end
|
|
|
19
19
|
|
|
20
20
|
pbxproj="#{ARGV[0]}/project.pbxproj"
|
|
21
21
|
projdir=ARGV[1]
|
|
22
|
+
suffix=ARGV[2]
|
|
22
23
|
|
|
23
|
-
def scan pbx,dir
|
|
24
|
+
def scan pbx,dir,suffix
|
|
24
25
|
if dir!="." and dir!=".." and
|
|
25
26
|
if File.directory?(dir)
|
|
26
27
|
Dir.entries(dir).each do |sub|
|
|
27
28
|
if sub!="." and sub!=".."
|
|
28
|
-
scan pbx,"#{dir}/#{sub}"
|
|
29
|
+
scan pbx,"#{dir}/#{sub}",suffix
|
|
29
30
|
end
|
|
30
31
|
end
|
|
31
32
|
else
|
|
32
33
|
match =dir.match /\/([^\/]*$)/
|
|
33
34
|
filename=match[1]
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
if suffix
|
|
36
|
+
return unless filename.match suffix
|
|
37
|
+
else
|
|
38
|
+
return if ['.DS_Store','Contents.json','project.pbxproj'].include? filename or filename.match /.*\.(xcworkspacedata|xcuserstate|xcscheme|xcbkptlist|md)/
|
|
39
|
+
end
|
|
40
|
+
puts "#{filename} not used" unless pbx.match /isa.*=.*PBXBuildFile[^\}]*#{filename}/
|
|
36
41
|
end
|
|
37
42
|
end
|
|
38
43
|
end
|
|
39
44
|
|
|
40
45
|
Rubisc::FileUtil::process_file pbxproj,false do |content|
|
|
41
|
-
scan content,projdir
|
|
46
|
+
scan content,projdir,suffix
|
|
42
47
|
end
|