stool 0.2.13 → 0.2.14
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/lib/stool/Command/Lib.rb +1 -1
 - data/lib/stool/Command/Util/LibsCheck.rb +67 -0
 - data/lib/stool/Command/Util.rb +1 -1
 - data/lib/stool/Core/LibInfo.rb +27 -0
 - data/lib/stool/version.rb +1 -1
 - metadata +17 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b9d27028fa541aed46bab078b79debc53e027e9d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 92276702958f56348226459b19ca53e4cba78fe5
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 621a50637adc174bbda67e1df977cdfe689cc89e32d7d7a038f74d9f9b10d3980e40d35f3a26e04043d0b363dd61f63279ebcbc41e135d49ed5157cad861a42a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 99e3244502c08b6b0c173bc7e012cb1b3d2277e197b74e202732579580f35bf90d434622483c07f9b1ffefeb1bc47894bc327b7e97aa69ff07c4c6d650b349a0
         
     | 
    
        data/lib/stool/Command/Lib.rb
    CHANGED
    
    
| 
         @@ -0,0 +1,67 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'Core/LibInfo'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "spreadsheet/excel"
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module Stool
         
     | 
| 
      
 5 
     | 
    
         
            +
              class Command
         
     | 
| 
      
 6 
     | 
    
         
            +
                class Util < Command
         
     | 
| 
      
 7 
     | 
    
         
            +
                  class LibsCheck < Util
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                    self.command = 'libsCheck'
         
     | 
| 
      
 10 
     | 
    
         
            +
                    self.summary = 'Jenkins启动、关闭'
         
     | 
| 
      
 11 
     | 
    
         
            +
                    # self.arguments = [
         
     | 
| 
      
 12 
     | 
    
         
            +
                    #     CLAide::Argument.new('close', false),
         
     | 
| 
      
 13 
     | 
    
         
            +
                    # ]
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                    def initialize(argv)
         
     | 
| 
      
 16 
     | 
    
         
            +
                      @phenixRepo = File.join(Dir.home,'.cocoapods/repos/phenix')
         
     | 
| 
      
 17 
     | 
    
         
            +
                      super
         
     | 
| 
      
 18 
     | 
    
         
            +
                    end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                    def run
         
     | 
| 
      
 21 
     | 
    
         
            +
                      puts `pod repo update phenix`
         
     | 
| 
      
 22 
     | 
    
         
            +
                      #获取最高版本的pod
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                      Spreadsheet.client_encoding="utf-8"
         
     | 
| 
      
 25 
     | 
    
         
            +
                      #创建表格对象
         
     | 
| 
      
 26 
     | 
    
         
            +
                      book=Spreadsheet::Workbook.new
         
     | 
| 
      
 27 
     | 
    
         
            +
                      #创建工作表
         
     | 
| 
      
 28 
     | 
    
         
            +
                      sheet1=book.create_worksheet :name => "pod_summary"
         
     | 
| 
      
 29 
     | 
    
         
            +
                      #在表格第一行设置分类
         
     | 
| 
      
 30 
     | 
    
         
            +
                      sheet1.row(0)[0]="名字"
         
     | 
| 
      
 31 
     | 
    
         
            +
                      sheet1.row(0)[1]="简介"
         
     | 
| 
      
 32 
     | 
    
         
            +
                      sheet1.row(0)[1]="主页"
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                      libs = []
         
     | 
| 
      
 35 
     | 
    
         
            +
                      Dir.entries(@phenixRepo).sort.uniq.each do |dir|
         
     | 
| 
      
 36 
     | 
    
         
            +
                        if dir[0].eql?('t') || dir[0].eql?('T')
         
     | 
| 
      
 37 
     | 
    
         
            +
                          arr = Dir.entries(File.join(@phenixRepo,dir)).sort
         
     | 
| 
      
 38 
     | 
    
         
            +
                          if arr.last
         
     | 
| 
      
 39 
     | 
    
         
            +
                            puts
         
     | 
| 
      
 40 
     | 
    
         
            +
                            fname = Dir.entries(File.join(@phenixRepo,dir,arr.last)).last
         
     | 
| 
      
 41 
     | 
    
         
            +
                            libinfo = LibInfo.loadFromPath(File.join(@phenixRepo,dir,arr.last))
         
     | 
| 
      
 42 
     | 
    
         
            +
                            if libinfo
         
     | 
| 
      
 43 
     | 
    
         
            +
                              libs.push(libinfo)
         
     | 
| 
      
 44 
     | 
    
         
            +
                            end
         
     | 
| 
      
 45 
     | 
    
         
            +
                          end
         
     | 
| 
      
 46 
     | 
    
         
            +
                        end
         
     | 
| 
      
 47 
     | 
    
         
            +
                      end
         
     | 
| 
      
 48 
     | 
    
         
            +
                      puts Dir.entries(@phenixRepo).count
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                      libs.each_with_index {|lib,idx|
         
     | 
| 
      
 51 
     | 
    
         
            +
                        sheet1.row(idx+1)[0]= lib.name
         
     | 
| 
      
 52 
     | 
    
         
            +
                        sheet1.row(idx+1)[1]= lib.summary
         
     | 
| 
      
 53 
     | 
    
         
            +
                        sheet1.row(idx+1)[2]= lib.homepage
         
     | 
| 
      
 54 
     | 
    
         
            +
                        # sheet1.row(i+1)[0]= libs[i].name
         
     | 
| 
      
 55 
     | 
    
         
            +
                        # sheet1.row(i+1)[1]= libs[i].summary
         
     | 
| 
      
 56 
     | 
    
         
            +
                      }
         
     | 
| 
      
 57 
     | 
    
         
            +
                      #在指定路径下面创建test1.xls表格,并写book对象
         
     | 
| 
      
 58 
     | 
    
         
            +
                      path = File.join(Dir.home,'pod_summary.xls')
         
     | 
| 
      
 59 
     | 
    
         
            +
                      book.write path
         
     | 
| 
      
 60 
     | 
    
         
            +
                      puts "已经生成Excel文件<#{path}>"
         
     | 
| 
      
 61 
     | 
    
         
            +
                      `open #{path}`
         
     | 
| 
      
 62 
     | 
    
         
            +
                    end
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                  end
         
     | 
| 
      
 65 
     | 
    
         
            +
                end
         
     | 
| 
      
 66 
     | 
    
         
            +
              end
         
     | 
| 
      
 67 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/stool/Command/Util.rb
    CHANGED
    
    
    
        data/lib/stool/Core/LibInfo.rb
    CHANGED
    
    | 
         @@ -2,16 +2,37 @@ require 'Core/BaseObj' 
     | 
|
| 
       2 
2 
     | 
    
         
             
            require 'Core/Git'
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
            module Pod
         
     | 
| 
      
 5 
     | 
    
         
            +
              class String
         
     | 
| 
      
 6 
     | 
    
         
            +
                class << self
         
     | 
| 
      
 7 
     | 
    
         
            +
                  def strip_heredoc
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                  end
         
     | 
| 
      
 10 
     | 
    
         
            +
                  def method_missing(method_id, *arguments, &block)
         
     | 
| 
      
 11 
     | 
    
         
            +
                    # puts "***" + "method_id = #{method_id}"
         
     | 
| 
      
 12 
     | 
    
         
            +
                  end
         
     | 
| 
      
 13 
     | 
    
         
            +
                end
         
     | 
| 
      
 14 
     | 
    
         
            +
              end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
       5 
16 
     | 
    
         
             
              class Ios
         
     | 
| 
       6 
17 
     | 
    
         
             
                def method_missing(method_id, *arguments, &block)
         
     | 
| 
       7 
18 
     | 
    
         
             
                  # puts "***" + "method_id = #{method_id}"
         
     | 
| 
       8 
19 
     | 
    
         
             
                end
         
     | 
| 
       9 
20 
     | 
    
         
             
              end
         
     | 
| 
       10 
21 
     | 
    
         | 
| 
      
 22 
     | 
    
         
            +
              class Osx
         
     | 
| 
      
 23 
     | 
    
         
            +
                def method_missing(method_id, *arguments, &block)
         
     | 
| 
      
 24 
     | 
    
         
            +
                  # puts "***" + "method_id = #{method_id}"
         
     | 
| 
      
 25 
     | 
    
         
            +
                end
         
     | 
| 
      
 26 
     | 
    
         
            +
              end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
       11 
28 
     | 
    
         
             
              class Spec
         
     | 
| 
       12 
29 
     | 
    
         
             
                attr_accessor :name
         
     | 
| 
       13 
30 
     | 
    
         
             
                attr_accessor :version
         
     | 
| 
       14 
31 
     | 
    
         
             
                attr_accessor :ios
         
     | 
| 
      
 32 
     | 
    
         
            +
                attr_accessor :osx
         
     | 
| 
      
 33 
     | 
    
         
            +
                #简介
         
     | 
| 
      
 34 
     | 
    
         
            +
                attr_accessor :summary
         
     | 
| 
      
 35 
     | 
    
         
            +
                attr_accessor :homepage
         
     | 
| 
       15 
36 
     | 
    
         
             
                # attr_accessor :name
         
     | 
| 
       16 
37 
     | 
    
         
             
                # attr_accessor :name
         
     | 
| 
       17 
38 
     | 
    
         | 
| 
         @@ -23,6 +44,7 @@ module Pod 
     | 
|
| 
       23 
44 
     | 
    
         | 
| 
       24 
45 
     | 
    
         
             
                def initialize
         
     | 
| 
       25 
46 
     | 
    
         
             
                  @ios = Ios.new()
         
     | 
| 
      
 47 
     | 
    
         
            +
                  @osx = Osx.new()
         
     | 
| 
       26 
48 
     | 
    
         
             
                  yield self if block_given?
         
     | 
| 
       27 
49 
     | 
    
         
             
                end
         
     | 
| 
       28 
50 
     | 
    
         | 
| 
         @@ -49,6 +71,9 @@ module Stool 
     | 
|
| 
       49 
71 
     | 
    
         
             
                attr_accessor :version
         
     | 
| 
       50 
72 
     | 
    
         
             
                #本地缓存类型(Framework or code)
         
     | 
| 
       51 
73 
     | 
    
         
             
                attr_accessor :cacheType
         
     | 
| 
      
 74 
     | 
    
         
            +
                #简介
         
     | 
| 
      
 75 
     | 
    
         
            +
                attr_accessor :summary
         
     | 
| 
      
 76 
     | 
    
         
            +
                attr_accessor :homepage
         
     | 
| 
       52 
77 
     | 
    
         | 
| 
       53 
78 
     | 
    
         
             
                @public
         
     | 
| 
       54 
79 
     | 
    
         | 
| 
         @@ -78,6 +103,8 @@ module Stool 
     | 
|
| 
       78 
103 
     | 
    
         
             
                  spec = Pod::Spec.fromFile(path)
         
     | 
| 
       79 
104 
     | 
    
         
             
                  @name = spec.name
         
     | 
| 
       80 
105 
     | 
    
         
             
                  @version = spec.version
         
     | 
| 
      
 106 
     | 
    
         
            +
                  @summary = spec.summary
         
     | 
| 
      
 107 
     | 
    
         
            +
                  @homepage = spec.homepage
         
     | 
| 
       81 
108 
     | 
    
         
             
                end
         
     | 
| 
       82 
109 
     | 
    
         | 
| 
       83 
110 
     | 
    
         
             
                def gitUp
         
     | 
    
        data/lib/stool/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: stool
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.2.14
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Fiend
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2018-07- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2018-07-19 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: atomos
         
     | 
| 
         @@ -86,6 +86,20 @@ dependencies: 
     | 
|
| 
       86 
86 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       87 
87 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       88 
88 
     | 
    
         
             
                    version: 1.5.0
         
     | 
| 
      
 89 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 90 
     | 
    
         
            +
              name: spreadsheet
         
     | 
| 
      
 91 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 92 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 93 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 94 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 95 
     | 
    
         
            +
                    version: 1.1.6
         
     | 
| 
      
 96 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 97 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 98 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 99 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 100 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 101 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 102 
     | 
    
         
            +
                    version: 1.1.6
         
     | 
| 
       89 
103 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       90 
104 
     | 
    
         
             
              name: bundler
         
     | 
| 
       91 
105 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -150,6 +164,7 @@ files: 
     | 
|
| 
       150 
164 
     | 
    
         
             
            - lib/stool/Command/Repo/CacheClean.rb
         
     | 
| 
       151 
165 
     | 
    
         
             
            - lib/stool/Command/Util.rb
         
     | 
| 
       152 
166 
     | 
    
         
             
            - lib/stool/Command/Util/Jenkins.rb
         
     | 
| 
      
 167 
     | 
    
         
            +
            - lib/stool/Command/Util/LibsCheck.rb
         
     | 
| 
       153 
168 
     | 
    
         
             
            - lib/stool/Command/WorkSpace.rb
         
     | 
| 
       154 
169 
     | 
    
         
             
            - lib/stool/Command/WorkSpace/list.rb
         
     | 
| 
       155 
170 
     | 
    
         
             
            - lib/stool/Command/WorkSpace/update.rb
         
     |