rubisc 0.2.0 → 0.2.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/xcodeproj_scan +42 -0
  3. metadata +3 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 197848ffd9fc6c255962d98c3b3b1bfe456b06ce
4
- data.tar.gz: 85b3833b812595960f719c48b5a9b793db614c6f
3
+ metadata.gz: 0db0d819156697d9d8ab9d0a541105f3814747b7
4
+ data.tar.gz: ec925363a00c2d8b93a484115b89535e12c47ad8
5
5
  SHA512:
6
- metadata.gz: b1a57984823c174fc5fcab371d88282d6b6d1fd85d86c4c74814e67e4b42bf34adcf6a536a7f088afe82a0801e62eb5e36a3827fb82d03aa705d274d7c637a5f
7
- data.tar.gz: 560862c1f34c0a8a765d3a570223887b2ae1a057dfe1b5499da7e260bcc4f7507e4d9a4403d6965906e4276c2cc4aff33fa8bf25502c4cf2706b9b9c535138df
6
+ metadata.gz: 15db9f92066d516aa6d16b8ea33bae8f6afb1fd061ff25168d8183b80bd614a0330751300b1eea6e20efca7b3ada19c579b6a24d3fb8389814210e7fa7e99474
7
+ data.tar.gz: 0e3acd38b58aee97fcec55809147d5afbf6a73f967831f2513be65b61a8c0af97942d31021811062baa1ca0c0efc498572070c369e8f079fec8733590f18b779
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/ruby
2
+
3
+ require File.join(File.dirname(__FILE__), '..', 'lib','fileutil')
4
+
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"
8
+ exit
9
+ end
10
+ unless File.exist? ARGV[0]
11
+ puts "#{ARGV[0]} does not exist."
12
+ puts "Please provide the path to .xcodeproj file."
13
+ exit
14
+ end
15
+ unless File.exist? ARGV[1]
16
+ puts "#{ARGV[1]} does not exist."
17
+ puts "Please provide the project directory."
18
+ end
19
+
20
+ pbxproj="#{ARGV[0]}/project.pbxproj"
21
+ projdir=ARGV[1]
22
+
23
+ def scan pbx,dir
24
+ if dir!="." and dir!=".." and
25
+ if File.directory?(dir)
26
+ Dir.entries(dir).each do |sub|
27
+ if sub!="." and sub!=".."
28
+ scan pbx,"#{dir}/#{sub}"
29
+ end
30
+ end
31
+ else
32
+ match =dir.match /\/([^\/]*$)/
33
+ filename=match[1]
34
+ return if ['.DS_Store','Contents.json','project.pbxproj'].include? filename or filename.match /.*\.(xcworkspacedata|xcuserstate|xcscheme|xcbkptlist|md)/
35
+ puts "#{filename} not used" unless pbx.match filename
36
+ end
37
+ end
38
+ end
39
+
40
+ Rubisc::FileUtil::process_file pbxproj,false do |content|
41
+ scan content,projdir
42
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubisc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - luqyluqe
@@ -14,12 +14,14 @@ description: Wicked cool ruby scripts
14
14
  email: luqy.luqe@gmail.com
15
15
  executables:
16
16
  - substitute
17
+ - xcodeproj_scan
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
20
21
  - rubisc.rb
21
22
  - bin/substitute
22
23
  - lib/fileutil.rb
24
+ - bin/xcodeproj_scan
23
25
  homepage: https://github.com/luqyluqe/Rubisc
24
26
  licenses:
25
27
  - MIT