Sha256: 7bc54ca21f628a1254dc13903b35fa89b7baebf6d238e25d4fd46b1715a2e49b

Contents?: true

Size: 1.14 KB

Versions: 18

Compression:

Stored size: 1.14 KB

Contents

require 'cocoapods-fy-bin/config/config_hot_key_asker'

module Pod
  class Command
    class Bin < Command
      class Imy < Bin
        self.summary = '快捷键'
        self.description = <<-DESC
          创建  文件,在其中保存插件需要的配置信息,
          如二进制私有源地址、源码私有源地址等。
        DESC

        self.arguments = [
            CLAide::Argument.new('1', false)
        ]

        def self.options
          [
          ].concat(super)
        end

        def initialize(argv)
          @hot_key = argv.shift_argument || '1'
          super
        end

        def run
          CBin.config_hot_key.set_hot_key_index(@hot_key)
          UI.puts  "cd #{CBin.config_hot_key.hot_key_dir}".yellow

          if Dir.exist?(CBin.config_hot_key.hot_key_dir)
            Dir.chdir(CBin.config_hot_key.hot_key_dir) do
              UI.puts " #{CBin.config_hot_key.hot_key_cmd}".yellow
              system CBin.config_hot_key.hot_key_cmd
            end
          else
            raise "配置项中文件目录不存在 #{CBin.config_hot_key.hot_key_dir}"
          end


        end

      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
cocoapods-fy-bin-0.1.8 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.1.7 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.1.6 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.1.5 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.1.4 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.1.3 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.1.2 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.1.1 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.1.0 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.0.9 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.0.8 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.0.7 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.0.6 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.0.5 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.0.4 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.0.3 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.0.2 lib/cocoapods-fy-bin/command/bin/imy.rb
cocoapods-fy-bin-0.0.1 lib/cocoapods-fy-bin/command/bin/imy.rb