lib/cli.rb in trollolo-0.0.10 vs lib/cli.rb in trollolo-0.0.11
- old
+ new
@@ -158,16 +158,18 @@
process_global_options options
require_trello_credentials
chart = BurndownChart.new @@settings
puts "Preparing directory..."
- chart.setup(options[:output],board_id(options["board-id"]))
+ chart.setup(options[:output], board_id(options["board-id"]))
end
desc "burndown", "Update burndown chart"
option :output, :aliases => :o, :desc => "Output directory", :required => false
option :new_sprint, :aliases => :n, :desc => "Create new sprint"
+ option :total_days, type: :numeric, desc: "Provide how many days the sprint longs. 10 days by default"
+ option :weekend_lines, type: :array, desc: "Set the weekend_lines. [3.5, 8.5] by default"
option :plot, :type => :boolean, :desc => "also plot the new data"
option 'with-fast-lane', :desc => "Plot Fast Lane with new cards bars", :required => false, :type => :boolean
option 'no-tasks', :desc => "Do not plot tasks line", :required => false, :type => :boolean
option 'push-to-api', :desc => 'Push collected data to api endpoint (in json)', :required => false
def burndown
@@ -175,11 +177,11 @@
require_trello_credentials
chart = BurndownChart.new @@settings
begin
if options[:new_sprint]
- chart.create_next_sprint(options[:output] || Dir.pwd)
+ chart.create_next_sprint(options[:output] || Dir.pwd, { total_days: options[:total_days], weekend_lines: options[:weekend_lines] })
end
chart.update(options)
puts "Updated data for sprint #{chart.sprint}"
rescue TrolloloError => e
STDERR.puts e
@@ -264,10 +266,10 @@
require_trello_credentials
trello = TrelloWrapper.new(@@settings)
members = trello.organization(options["org-name"]).members
- members.sort! { |a,b| a.username <=> b.username }
+ members.sort! { |a, b| a.username <=> b.username }
members.each do |member|
puts "#{member.username} (#{member.full_name})"
end
end