jmpod 0.1.1 → 0.1.2
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/Gemfile +3 -4
- data/Gemfile.lock +1 -1
- data/jmpod.gemspec +8 -0
- data/lib/jmpod/command/create/oc.rb +4 -6
- data/lib/jmpod/command/create/swift.rb +36 -0
- data/lib/jmpod/command/create/third.rb +40 -0
- data/lib/jmpod/command/create.rb +1 -1
- data/lib/jmpod/command/init/ci.rb +36 -0
- data/lib/jmpod/command/init/unit.rb +36 -0
- data/lib/jmpod/command/init.rb +14 -0
- data/lib/jmpod/command.rb +2 -3
- data/lib/jmpod/constant.rb +12 -0
- data/lib/jmpod/version.rb +1 -1
- metadata +6 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 2af0852f050b2a632032d245b33586aad40b9732649266ff63f2585143cef452
         | 
| 4 | 
            +
              data.tar.gz: 5569dfd88899fb8e41f7197500d452b8cb4fe283879be88b74d9fde1cbceb86f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 58665a6990d0e229e941019b0df7088258f6389a5eb1970c4744f59e8b9969ae57cc8c685092a108ec55146ea29871b798572bbc0c298daa7e00f01f1d92fa25
         | 
| 7 | 
            +
              data.tar.gz: 3431e264b60b0a406c52bd006ca2daa386917109b42a5adacd42c70fa394a23c1a900f99d5bb5c2860804cc0743dc0ee32f6547daa71374cf7851eb25ae7135d
         | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/jmpod.gemspec
    CHANGED
    
    | @@ -29,13 +29,21 @@ Gem::Specification.new do |spec| | |
| 29 29 | 
             
                `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
         | 
| 30 30 | 
             
              end
         | 
| 31 31 | 
             
              spec.bindir        = "bin"
         | 
| 32 | 
            +
              # 可执行文件
         | 
| 32 33 | 
             
              spec.executables   = %w{ jmpod }
         | 
| 33 34 | 
             
              spec.require_paths = %w{ lib }
         | 
| 34 35 |  | 
| 36 | 
            +
              # 生产依赖
         | 
| 37 | 
            +
              # spec.add_dependency 
         | 
| 38 | 
            +
             | 
| 39 | 
            +
              # 开发依赖
         | 
| 35 40 | 
             
              spec.add_development_dependency "bundler", "~> 1.17"
         | 
| 36 41 | 
             
              spec.add_development_dependency "rake", "~> 10.0"
         | 
| 42 | 
            +
             | 
| 43 | 
            +
              # 运行时依赖
         | 
| 37 44 | 
             
              spec.add_runtime_dependency "claide", ">= 1.0.2", "< 2.0"
         | 
| 38 45 | 
             
              spec.add_runtime_dependency "molinillo", "~> 0.6.6"
         | 
| 39 46 | 
             
              spec.add_runtime_dependency "colored2", "~> 3.1"
         | 
| 40 47 | 
             
              spec.add_runtime_dependency "cocoapods", ">= 1.8.4"
         | 
| 48 | 
            +
             | 
| 41 49 | 
             
            end
         | 
| @@ -3,11 +3,9 @@ module Jmpod | |
| 3 3 | 
             
                class Create < Command
         | 
| 4 4 | 
             
                  class Oc < Create
         | 
| 5 5 |  | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 6 | 
             
                    self.summary = '创建一个oc库'
         | 
| 9 7 | 
             
                    self.description = <<-DESC
         | 
| 10 | 
            -
                    创建一个oc pod  | 
| 8 | 
            +
                    创建一个oc pod 库, 包含unit、ci、fastlane,podrepopush 等文件.
         | 
| 11 9 | 
             
                  DESC
         | 
| 12 10 |  | 
| 13 11 | 
             
                    self.arguments = [
         | 
| @@ -16,6 +14,7 @@ module Jmpod | |
| 16 14 |  | 
| 17 15 | 
             
                    def initialize(argv)
         | 
| 18 16 | 
             
                      @name = argv.shift_argument
         | 
| 17 | 
            +
                      @constant = Constant.new(self)
         | 
| 19 18 | 
             
                      super
         | 
| 20 19 | 
             
                      @additional_args = argv.remainder!
         | 
| 21 20 | 
             
                    end
         | 
| @@ -29,9 +28,8 @@ module Jmpod | |
| 29 28 | 
             
                    end
         | 
| 30 29 |  | 
| 31 30 | 
             
                    def run
         | 
| 32 | 
            -
                       | 
| 33 | 
            -
                       | 
| 34 | 
            -
                      # puts "create a new oc pod done!"
         | 
| 31 | 
            +
                      system "pod lib create #{@name} objc --template-url=#{@constant.GitURL}pod-template.git"
         | 
| 32 | 
            +
                      puts "一个新的oc pod创建成!".green
         | 
| 35 33 | 
             
                    end
         | 
| 36 34 | 
             
                  end
         | 
| 37 35 | 
             
                end
         | 
| @@ -0,0 +1,36 @@ | |
| 1 | 
            +
            module Jmpod
         | 
| 2 | 
            +
              class Command
         | 
| 3 | 
            +
                class Create < Command
         | 
| 4 | 
            +
                  class Swift < Create
         | 
| 5 | 
            +
             | 
| 6 | 
            +
                    self.summary = '创建一个Swift库'
         | 
| 7 | 
            +
                    self.description = <<-DESC
         | 
| 8 | 
            +
                    创建一个swift pod 库
         | 
| 9 | 
            +
                  DESC
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                    self.arguments = [
         | 
| 12 | 
            +
                      CLAide::Argument.new('NAME', true),
         | 
| 13 | 
            +
                    ]
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                    def initialize(argv)
         | 
| 16 | 
            +
                      @name = argv.shift_argument
         | 
| 17 | 
            +
                      super
         | 
| 18 | 
            +
                      @additional_args = argv.remainder!
         | 
| 19 | 
            +
                    end
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                    def validate!
         | 
| 22 | 
            +
                      super
         | 
| 23 | 
            +
                      help! 'A name for the Pod is required.' unless @name
         | 
| 24 | 
            +
                      help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
         | 
| 25 | 
            +
                      help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
         | 
| 26 | 
            +
                      help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
         | 
| 27 | 
            +
                    end
         | 
| 28 | 
            +
             | 
| 29 | 
            +
                    def run
         | 
| 30 | 
            +
                      system "pod lib create #{@name} swift --template-url=http://34.80.176.10:8080/iOS-third/pod-template"
         | 
| 31 | 
            +
                      puts "一个新的swift pod创建成功!".green
         | 
| 32 | 
            +
                    end
         | 
| 33 | 
            +
                  end
         | 
| 34 | 
            +
                end
         | 
| 35 | 
            +
              end
         | 
| 36 | 
            +
            end
         | 
| @@ -0,0 +1,40 @@ | |
| 1 | 
            +
            module Jmpod
         | 
| 2 | 
            +
              class Command
         | 
| 3 | 
            +
                class Create < Command
         | 
| 4 | 
            +
                  class Third < Create
         | 
| 5 | 
            +
             | 
| 6 | 
            +
                    self.summary = 'fork一个第三方库'
         | 
| 7 | 
            +
                    self.description = <<-DESC
         | 
| 8 | 
            +
                    fork一个第三个库到私有仓库
         | 
| 9 | 
            +
                  DESC
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                    self.arguments = [
         | 
| 12 | 
            +
                      CLAide::Argument.new('URL', true),
         | 
| 13 | 
            +
                    ]
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                    def initialize(argv)
         | 
| 16 | 
            +
                      @url = argv.shift_argument
         | 
| 17 | 
            +
                      super
         | 
| 18 | 
            +
                      @additional_args = argv.remainder!
         | 
| 19 | 
            +
                    end
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                    def validate!
         | 
| 22 | 
            +
                      super
         | 
| 23 | 
            +
                      help! 'A url for the Pod is required.' unless @url
         | 
| 24 | 
            +
                      help! 'The Pod url cannot contain spaces.' if @url =~ /\s/
         | 
| 25 | 
            +
                      help! 'The Pod url cannot contain plusses.' if @url =~ /\+/
         | 
| 26 | 
            +
                      help! "The Pod url cannot begin with a '.'" if @url[0, 1] == '.'
         | 
| 27 | 
            +
                    end
         | 
| 28 | 
            +
             | 
| 29 | 
            +
                    def run
         | 
| 30 | 
            +
                      # fork 第三方仓库流程
         | 
| 31 | 
            +
                      puts "run"
         | 
| 32 | 
            +
                      `git clone #{@url}`
         | 
| 33 | 
            +
                      puts Dir.pwd
         | 
| 34 | 
            +
                      # `git remote set-url origin http://34.80.176.10:8080/ios/.git`
         | 
| 35 | 
            +
                      puts "fork 第三方库成功!".green
         | 
| 36 | 
            +
                    end
         | 
| 37 | 
            +
                  end
         | 
| 38 | 
            +
                end
         | 
| 39 | 
            +
              end
         | 
| 40 | 
            +
            end
         | 
    
        data/lib/jmpod/command/create.rb
    CHANGED
    
    
| @@ -0,0 +1,36 @@ | |
| 1 | 
            +
            module Jmpod
         | 
| 2 | 
            +
              class Command
         | 
| 3 | 
            +
                class Init < Command
         | 
| 4 | 
            +
                  class Ci < Create
         | 
| 5 | 
            +
             | 
| 6 | 
            +
                    self.summary = '创建ci'
         | 
| 7 | 
            +
                    self.description = <<-DESC
         | 
| 8 | 
            +
                    创建gitlab ci.
         | 
| 9 | 
            +
                  DESC
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                    self.arguments = [
         | 
| 12 | 
            +
                      CLAide::Argument.new('NAME', true),
         | 
| 13 | 
            +
                    ]
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                    def initialize(argv)
         | 
| 16 | 
            +
                      @name = argv.shift_argument
         | 
| 17 | 
            +
                      @constant = Constant.new(self)
         | 
| 18 | 
            +
                      super
         | 
| 19 | 
            +
                      @additional_args = argv.remainder!
         | 
| 20 | 
            +
                    end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                    def validate!
         | 
| 23 | 
            +
                      super
         | 
| 24 | 
            +
                      help! 'A name for the Pod is required.' unless @name
         | 
| 25 | 
            +
                      help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
         | 
| 26 | 
            +
                      help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
         | 
| 27 | 
            +
                      help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
         | 
| 28 | 
            +
                    end
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                    def run
         | 
| 31 | 
            +
                      puts "new ci".green
         | 
| 32 | 
            +
                    end
         | 
| 33 | 
            +
                  end
         | 
| 34 | 
            +
                end
         | 
| 35 | 
            +
              end
         | 
| 36 | 
            +
            end
         | 
| @@ -0,0 +1,36 @@ | |
| 1 | 
            +
            module Jmpod
         | 
| 2 | 
            +
              class Command
         | 
| 3 | 
            +
                class Init < Command
         | 
| 4 | 
            +
                  class Unit < Create
         | 
| 5 | 
            +
             | 
| 6 | 
            +
                    self.summary = '创建unit'
         | 
| 7 | 
            +
                    self.description = <<-DESC
         | 
| 8 | 
            +
                    集成单元测试.
         | 
| 9 | 
            +
                  DESC
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                    self.arguments = [
         | 
| 12 | 
            +
                      CLAide::Argument.new('NAME', true),
         | 
| 13 | 
            +
                    ]
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                    def initialize(argv)
         | 
| 16 | 
            +
                      @name = argv.shift_argument
         | 
| 17 | 
            +
                      @constant = Constant.new(self)
         | 
| 18 | 
            +
                      super
         | 
| 19 | 
            +
                      @additional_args = argv.remainder!
         | 
| 20 | 
            +
                    end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                    def validate!
         | 
| 23 | 
            +
                      super
         | 
| 24 | 
            +
                      help! 'A name for the Pod is required.' unless @name
         | 
| 25 | 
            +
                      help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
         | 
| 26 | 
            +
                      help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
         | 
| 27 | 
            +
                      help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
         | 
| 28 | 
            +
                    end
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                    def run
         | 
| 31 | 
            +
                      puts "new unit".green
         | 
| 32 | 
            +
                    end
         | 
| 33 | 
            +
                  end
         | 
| 34 | 
            +
                end
         | 
| 35 | 
            +
              end
         | 
| 36 | 
            +
            end
         | 
    
        data/lib/jmpod/command.rb
    CHANGED
    
    | @@ -15,11 +15,12 @@ module Jmpod | |
| 15 15 |  | 
| 16 16 | 
             
              class Command < CLAide::Command
         | 
| 17 17 | 
             
                require 'jmpod/command/create'
         | 
| 18 | 
            +
                require 'jmpod/command/init'
         | 
| 18 19 |  | 
| 19 20 | 
             
                self.abstract_command = true
         | 
| 20 21 | 
             
                self.command = 'jmpod'
         | 
| 21 22 | 
             
                self.version = VERSION
         | 
| 22 | 
            -
                self.description = ' | 
| 23 | 
            +
                self.description = 'jmpod, a tool to manager pod'
         | 
| 23 24 | 
             
                self.plugin_prefixes = %w(claide jmpod)
         | 
| 24 25 |  | 
| 25 26 | 
             
                def self.options
         | 
| @@ -29,8 +30,6 @@ module Jmpod | |
| 29 30 | 
             
                end
         | 
| 30 31 |  | 
| 31 32 | 
             
                def self.run(argv)
         | 
| 32 | 
            -
                  help! 'You cannot run CocoaPods as root.' if Process.uid == 0 && !Gem.win_platform?
         | 
| 33 | 
            -
             | 
| 34 33 | 
             
                  super(argv)
         | 
| 35 34 | 
             
                end
         | 
| 36 35 |  | 
    
        data/lib/jmpod/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: jmpod
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - jieming
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020-04- | 
| 11 | 
            +
            date: 2020-04-24 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -123,6 +123,10 @@ files: | |
| 123 123 | 
             
            - lib/jmpod/command/create/oc.rb
         | 
| 124 124 | 
             
            - lib/jmpod/command/create/swift.rb
         | 
| 125 125 | 
             
            - lib/jmpod/command/create/third.rb
         | 
| 126 | 
            +
            - lib/jmpod/command/init.rb
         | 
| 127 | 
            +
            - lib/jmpod/command/init/ci.rb
         | 
| 128 | 
            +
            - lib/jmpod/command/init/unit.rb
         | 
| 129 | 
            +
            - lib/jmpod/constant.rb
         | 
| 126 130 | 
             
            - lib/jmpod/version.rb
         | 
| 127 131 | 
             
            homepage: http://34.80.176.10:8080/iOS-third/jmpod
         | 
| 128 132 | 
             
            licenses: []
         |