Sha256: 072060329c3c80fda9d8daf25fe06128d5bd97bd29259cc2d458d8b126461a55

Contents?: true

Size: 523 Bytes

Versions: 16

Compression:

Stored size: 523 Bytes

Contents

class Kubes::CLI::New
  class Hook < Kubes::CLI::Sequence
    argument :type, default: "kubes", description: "IE: docker, kubectl, kubes" # description doesnt really show up

    def self.options
      [
        [:force, aliases: ["y"], type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files"],
      ]
    end
    options.each { |args| class_option(*args) }

  public
    def create_hook
      set_source("new/hooks")
      template "#{type}.rb", ".kubes/config/hooks/#{type}.rb"
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
kubes-0.9.3 lib/kubes/cli/new/hook.rb
kubes-0.9.2 lib/kubes/cli/new/hook.rb
kubes-0.9.1 lib/kubes/cli/new/hook.rb
kubes-0.9.0 lib/kubes/cli/new/hook.rb
kubes-0.8.10 lib/kubes/cli/new/hook.rb
kubes-0.8.9 lib/kubes/cli/new/hook.rb
kubes-0.8.8 lib/kubes/cli/new/hook.rb
kubes-0.8.7 lib/kubes/cli/new/hook.rb
kubes-0.8.6 lib/kubes/cli/new/hook.rb
kubes-0.8.5 lib/kubes/cli/new/hook.rb
kubes-0.8.4 lib/kubes/cli/new/hook.rb
kubes-0.8.3 lib/kubes/cli/new/hook.rb
kubes-0.8.2 lib/kubes/cli/new/hook.rb
kubes-0.8.1 lib/kubes/cli/new/hook.rb
kubes-0.8.0 lib/kubes/cli/new/hook.rb
kubes-0.7.10 lib/kubes/cli/new/hook.rb