lib/burndown_chart.rb in trollolo-0.0.10 vs lib/burndown_chart.rb in trollolo-0.0.11
- old
+ new
@@ -129,11 +129,11 @@
end
end
def burndown_data_filename
- "burndown-data-#{sprint.to_s.rjust(2,"0")}.yaml"
+ "burndown-data-#{sprint.to_s.rjust(2, "0")}.yaml"
end
def setup(burndown_dir, board_id)
self.board_id = board_id
FileUtils.mkdir_p burndown_dir
@@ -207,12 +207,14 @@
if options.has_key?('push-to-api')
push_to_api(options['push-to-api'], data)
end
end
- def create_next_sprint(burndown_dir)
+ def create_next_sprint(burndown_dir, options = {})
load_last_sprint(burndown_dir)
self.sprint = self.sprint + 1
+ @data["meta"]["total_days"] = options[:total_days] if options[:total_days]
+ @data["meta"]["weekend_lines"] = options[:weekend_lines] unless options[:weekend_lines].blank?
@data["days"] = []
write_data File.join(burndown_dir, burndown_data_filename)
end
end