Sha256: 4d1f5383ff29a06d7c53c830516f2e77c3f7c9ed856ada5122093a1641021fee

Contents?: true

Size: 888 Bytes

Versions: 6

Compression:

Stored size: 888 Bytes

Contents

#!/usr/bin/env ruby

desc "lala"
task "top-level" do
  Hem.ui.info "top level"
end

namespace :test do
  desc "Does non-interactive things"
  task 'non-interactive' do
    Hem.ui.info Hem.ui.ask "A question", default: "Used defaults"
  end

  desc 'Performs interactive requests without echo'
  task 'no-echo' do
    Hem.ui.info Hem.ui.ask 'A question', echo: false
  end

  task "subcommand" do
    Hem.ui.info "Subcommand test"
  end

  desc "description"
  long_desc "long description"
  option "-o", "--option", "Option description"
  hidden true
  task "metadata", [ :arg ] do
    Hem.ui.info "metadata"
  end

  option "--testing=", "description"
  task 'option-test' do |task|
    Hem.ui.info task.opts[:testing]
  end

  task 'argument-test', [ :test ] do |task, args|
    Hem.ui.info args[:test]
  end

  task 'unparsed' do |task|
    Hem.ui.info task.opts[:_unparsed]
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hem-1.0.1.beta6 Hemfile
hem-1.0.1.beta5 Hemfile
hem-1.0.1.beta4 Hemfile
hem-1.0.1.beta3 Hemfile
hem-1.0.1.beta2 Hemfile
hem-1.0.1.beta1 Hemfile