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.
- checksums.yaml +4 -4
- data/.version +1 -1
- data/lib/printer.rb +9 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e593a4c0712fbf4419176cea214fc137b9449e36a1d05e74e9bba4bc9329e106
|
|
4
|
+
data.tar.gz: 2841ef01cf81a2f9f8c82c07918fe5ec149295d655af19031b8c98082bfe7d84
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81f2d8cf8527676bc3af134b40f97252c96a464e0fa9c7aaf4f60e7e1463370d2e7cea990df87138ef67d06af4f25e987074ad71f0624abde3db6e4127f4a205
|
|
7
|
+
data.tar.gz: b1d369a79e34f00306cde60819c5bda650edc48326b0daba96557ce8de98af18b570af461ebb1e61d7cd98cbac612af60ca01641b417c55832a7fe687ffbaf03
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
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
|
-
|
|
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?
|