Sha256: 3155a2edd6f139be8b0899a4dea007f8acef1ba757d5fef28759deefc55a66cb

Contents?: true

Size: 786 Bytes

Versions: 9

Compression:

Stored size: 786 Bytes

Contents

class TechcorCli
  desc "Edits one metric of the project"
  long_desc "Allows to edit one of the project's metrics"
  arg_name '{value}'
  command :edit_property do |command|
    command.arg_name 'project name'
    command.desc 'name of the project, property of which you want to edit'
    command.flag :pn, :project_name

    command.arg_name 'metric name'
    command.desc 'name of the metric, which you want to edit'
    command.flag :mn, :metric_name

    command.action do |global, options, args|
      project_name = options[:project_name]
      metric_name = options[:metric_name]
      value = args.first
      puts "Metric #{metric_name} in project #{project_name} now has value #{value}." if EditProperty.new(project_name, metric_name, value, `whoami`).call
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
techcor-0.0.10 lib/commands/gli/edit_property.rb
techcor-0.0.9 lib/commands/gli/edit_property.rb
techcor-0.0.8 lib/commands/gli/edit_property.rb
techcor-0.0.7 lib/commands/gli/edit_property.rb
techcor-0.0.6 lib/commands/gli/edit_property.rb
techcor-0.0.5 lib/commands/gli/edit_property.rb
techcor-0.0.4 lib/commands/gli/edit_property.rb
techcor-0.0.3 lib/commands/gli/edit_property.rb
techcor-0.0.2 lib/commands/gli/edit_property.rb