work_md 0.2.4 → 0.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c18792b91679e26b6bf4e08499a20f147ab158ae7ffa1ad0b43cb159f4d4172
4
- data.tar.gz: 7a326af95178ba2f3b91bf20a4f67ba7e467da6f5b63465adae75553ecaee6e7
3
+ metadata.gz: 8d5b841881acd03d54092af4c2e04b6fa29356b784ac52905810a3ba021c01de
4
+ data.tar.gz: 324ad983b70bd2749e7c888a21949a7c8b66ca6bbe7c3c7ebabeaeaee7f83a3d
5
5
  SHA512:
6
- metadata.gz: 400b9fa6e7274f8c3cb610c1cd2b99e5b30f41ec5e8f3ad6939b1bf25d9ec491d343707eb0ffb2e9882b01153b5290bfe04089335e2686854fd1837df0d5bdab
7
- data.tar.gz: 8802acb02ea2f617948603aff2bf0fcffa13197a84620ec05c99f3cedf6fcd0620461a32b6546a67863ddd55e33e2be70746a2cf062e4788aa47eaaf885fdb83
6
+ metadata.gz: 7ab6691773bf32657133a362cfbb42a45e6fbace7a716dcd20f065fe081297ae720efc3b1bcaa86a297327d61886522b45101c3d65fc0bfa3edbdf2422611b28
7
+ data.tar.gz: e6de20ebdf9b3a5055bc4f1c0e822de41e37ee9ea4131ddc4268c0c47e0acc5d388f2c8864dbc0171dfd419264ea7aec9bc56fe26431475cd9351b12efa704e7
@@ -60,7 +60,7 @@ module WorkMd
60
60
  f.puts("- #{difficulty}\n\n")
61
61
  end
62
62
  f.puts("---\n\n")
63
- f.puts("### #{t[:pomodoros]}:\n\n")
63
+ f.puts("### #{t[:pomodoros]} (#{parser.average_pomodoros} #{t[:per_day]}):\n\n")
64
64
  f.puts(parser.pomodoros)
65
65
  end
66
66
 
@@ -14,7 +14,8 @@ module WorkMd
14
14
  meeting_annotations: 'Anotações de Reunião',
15
15
  interruptions: 'Interrupções',
16
16
  difficulties: 'Dificuldades',
17
- pomodoros: 'Pomodoros'
17
+ pomodoros: 'Pomodoros / Ciclos',
18
+ per_day: 'por dia'
18
19
  },
19
20
  'en' =>
20
21
  {
@@ -24,7 +25,8 @@ module WorkMd
24
25
  meeting_annotations: 'Meeting Annotations',
25
26
  interruptions: 'Interruptions',
26
27
  difficulties: 'Difficulties',
27
- pomodoros: 'Pomodoros'
28
+ pomodoros: 'Pomodoros / Cycles',
29
+ per_day: 'per day'
28
30
  }
29
31
  }.freeze
30
32
 
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # rubocop:disable Metrics/ClassLength
3
4
  module WorkMd
4
5
  module Parser
5
6
  class Engine
@@ -80,6 +81,14 @@ module WorkMd
80
81
  @difficulties ||= @parsed_files.map(&:difficulties).flatten
81
82
  end
82
83
 
84
+ def average_pomodoros
85
+ if @parsed_files.size.positive? && pomodoros.positive?
86
+ return (pomodoros / @parsed_files.size)
87
+ end
88
+
89
+ 0
90
+ end
91
+
83
92
  def pomodoros
84
93
  raise IS_NOT_FROZEN_ERROR_MESSAGE unless @frozen
85
94
 
@@ -152,3 +161,4 @@ module WorkMd
152
161
  end
153
162
  end
154
163
  end
164
+ # rubocop:enable Metrics/ClassLength
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WorkMd
4
- VERSION = '0.2.4'
4
+ VERSION = '0.2.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: work_md
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrique Fernandez Teixeira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-13 00:00:00.000000000 Z
11
+ date: 2021-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-box