Sha256: a2a924ab41c684bee284eadff0be29e0cbfb9a71eaf9afe6062b49385183ad67

Contents?: true

Size: 902 Bytes

Versions: 8

Compression:

Stored size: 902 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
  argument 'arg'
  task "metadata" do
    Hem.ui.info "metadata"
  end

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

  argument 'test'
  task 'argument-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

8 entries across 8 versions & 1 rubygems

Version Path
hem-1.2.4 Hemfile
hem-1.2.3 Hemfile
hem-1.2.2 Hemfile
hem-1.2.1 Hemfile
hem-1.2.0 Hemfile
hem-1.1.2 Hemfile
hem-1.1.1 Hemfile
hem-1.1.0 Hemfile