From c9023bdbd09fbe74d3a4a1dd09f8092cca5b7d33 Mon Sep 17 00:00:00 2001 From: Brett Terpstra Date: Sat, 11 Mar 2023 10:50:15 -0600 Subject: [PATCH] remove extra divider - FIXED: Remove extra divider line before grand total in byday table --- Gemfile.lock | 2 +- README.md | 2 +- lib/doing/plugins/export/byday.rb | 3 +-- lib/doing/version.rb | 2 +- lib/doing/wwid/display.rb | 23 +++++++++++++++-------- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0a035444..563968c9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - doing (2.1.79) + doing (2.1.80) chronic (~> 0.10, >= 0.10.2) deep_merge (~> 1.2, >= 1.2.1) gli (~> 2.20, >= 2.20.1) diff --git a/README.md b/README.md index a29b6e67..9845f508 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ _If you're one of the rare people like me who find this useful, feel free to -The current version of `doing` is 2.1.78. +The current version of `doing` is 2.1.79. Find all of the documentation in the [doing wiki][wiki]. diff --git a/lib/doing/plugins/export/byday.rb b/lib/doing/plugins/export/byday.rb index fd22f117..3f3f210b 100644 --- a/lib/doing/plugins/export/byday.rb +++ b/lib/doing/plugins/export/byday.rb @@ -57,10 +57,9 @@ def self.render(wwid, items, variables: {}) out << divider end all_total = "Grand Total: #{total.time_string(format: :clock)}" - out << divider out << "{wd}|{xrb}#{all_total.rjust(width + 20)}{wd}|{x}" out << divider - Doing::Pager.page Doing::Color.template(out.join("\n")) + Doing::Color.template(out.join("\n")) end Doing::Plugins.register 'byday', :export, self diff --git a/lib/doing/version.rb b/lib/doing/version.rb index f68be57f..e8386d79 100644 --- a/lib/doing/version.rb +++ b/lib/doing/version.rb @@ -1,3 +1,3 @@ module Doing - VERSION = '2.1.79' + VERSION = '2.1.80' end diff --git a/lib/doing/wwid/display.rb b/lib/doing/wwid/display.rb index 2f73047d..8c0bcc1a 100644 --- a/lib/doing/wwid/display.rb +++ b/lib/doing/wwid/display.rb @@ -137,14 +137,21 @@ def today(times = true, output = nil, opt) opt[:totals] ||= false opt[:sort_tags] ||= false - cfg = Doing.setting('templates').deep_merge(Doing.setting('templates.default'), { extend_existing_arrays: true, sort_merged_arrays: true }).deep_merge({ - 'wrap_width' => Doing.setting('wrap_width') || 0, - 'date_format' => Doing.setting('default_date_format'), - 'order' => Doing.setting('order') || :asc, - 'tags_color' => Doing.setting('tags_color'), - 'duration' => Doing.setting('duration'), - 'interval_format' => Doing.setting('interval_format') - }, { extend_existing_arrays: true, sort_merged_arrays: true }) + cfg = Doing.setting('templates') + .deep_merge(Doing.setting('templates.default'), { + extend_existing_arrays: true, + sort_merged_arrays: true + }).deep_merge({ + 'wrap_width' => Doing.setting('wrap_width') || 0, + 'date_format' => Doing.setting('default_date_format'), + 'order' => Doing.setting('order') || :asc, + 'tags_color' => Doing.setting('tags_color'), + 'duration' => Doing.setting('duration'), + 'interval_format' => Doing.setting('interval_format') + }, { + extend_existing_arrays: true, + sort_merged_arrays: true + }) template = opt[:template] || cfg['template']