fewald-worklog 0.3.15 → 0.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/.version +1 -1
  3. data/lib/printer.rb +9 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da159df72952acb0df4908e1e5ed04b5a43def0d9d8f351b19f407aa672d108b
4
- data.tar.gz: 7afc0a6cd0da2f10456203c27b1c48ce0b1117f428932c1fb1157b32baaeeced
3
+ metadata.gz: e593a4c0712fbf4419176cea214fc137b9449e36a1d05e74e9bba4bc9329e106
4
+ data.tar.gz: 2841ef01cf81a2f9f8c82c07918fe5ec149295d655af19031b8c98082bfe7d84
5
5
  SHA512:
6
- metadata.gz: 47553eb33fd2b3dc6c2c664431f36d99ab395832c29a26e4d4a06a6482d9244ad7035cf956bbb91d3bcbc2ae17cb2f79863ce7b04cfc0316848662f31862cb18
7
- data.tar.gz: 5b1185d6bdd7fdef351ff7935a7d3b0512efa1027af2fc84972a682e06a8d03c0553127ebf8813a4067f2bdb9c4fc9f4bbce2aa66082da7ba29c17191f29a8f1
6
+ metadata.gz: 81f2d8cf8527676bc3af134b40f97252c96a464e0fa9c7aaf4f60e7e1463370d2e7cea990df87138ef67d06af4f25e987074ad71f0624abde3db6e4127f4a205
7
+ data.tar.gz: b1d369a79e34f00306cde60819c5bda650edc48326b0daba96557ce8de98af18b570af461ebb1e61d7cd98cbac612af60ca01641b417c55832a7fe687ffbaf03
data/.version CHANGED
@@ -1 +1 @@
1
- 0.3.15
1
+ 0.3.16
data/lib/printer.rb CHANGED
@@ -29,7 +29,15 @@ class Printer
29
29
  daily_log.date = Date.strptime(daily_log.date, '%Y-%m-%d') unless daily_log.date.respond_to?(:strftime)
30
30
 
31
31
  date_string = daily_log.date.strftime('%a, %B %-d, %Y')
32
- puts "Work log for #{Rainbow(date_string).gold}" unless date_inline
32
+ preamble = "Work log for #{Rainbow(date_string).gold}"
33
+ puts preamble unless date_inline
34
+
35
+ # Print only if there are entries to show, especially when epics_only is true
36
+ entries_count = daily_log.entries.count do |entry|
37
+ (!epics_only || entry.epic?) && filter.compact.all? { |k, v| entry.send(k) == v }
38
+ end
39
+
40
+ puts Rainbow('-' * preamble.gsub(/\e\[[0-9;]*m/, '').length).gold if entries_count.positive?
33
41
 
34
42
  daily_log.entries.each do |entry|
35
43
  next if epics_only && !entry.epic?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fewald-worklog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.15
4
+ version: 0.3.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Friedrich Ewald