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.
- checksums.yaml +4 -4
 - data/bin/xcodeproj_scan +42 -0
 - metadata +3 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 0db0d819156697d9d8ab9d0a541105f3814747b7
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: ec925363a00c2d8b93a484115b89535e12c47ad8
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 15db9f92066d516aa6d16b8ea33bae8f6afb1fd061ff25168d8183b80bd614a0330751300b1eea6e20efca7b3ada19c579b6a24d3fb8389814210e7fa7e99474
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 0e3acd38b58aee97fcec55809147d5afbf6a73f967831f2513be65b61a8c0af97942d31021811062baa1ca0c0efc498572070c369e8f079fec8733590f18b779
         
     | 
    
        data/bin/xcodeproj_scan
    ADDED
    
    | 
         @@ -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. 
     | 
| 
      
 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
         
     |