time-sheet 0.13.0 → 0.14.0
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/lib/time_sheet/time/cmd.rb +23 -0
- data/lib/time_sheet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eafc5b6d18708b232660dc63e6b27c965c43013c569da732780e72638543644
|
4
|
+
data.tar.gz: 0e11e2d36a118c0db1b5d3f7ff0e5c59fbe8e94df4910e75fd5d2598b84ed326
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bafb5ce2ad3372ced67f0f1b498ad0f4966772c93cae6a455e20ca445c077f95295f254e3dddc41a58d11fe34271610c1557faddd6da4fe9c85167a5a704a3ef
|
7
|
+
data.tar.gz: ad6ccabcfb8a866676cfa9e5cc3659d7dd7ab62913ef63689e5cd4101ccdfdadc5b1390633e9c8c7005c2515b1d6e01a8adba8082e68d976064077dc7652b67f
|
data/lib/time_sheet/time/cmd.rb
CHANGED
@@ -39,6 +39,8 @@ class TimeSheet::Time::Cmd
|
|
39
39
|
invoice
|
40
40
|
when 'report', 'default'
|
41
41
|
report
|
42
|
+
when 'verify'
|
43
|
+
verify
|
42
44
|
when 'today', 't'
|
43
45
|
options[:from] = TimeSheet::Time::Util.today
|
44
46
|
options[:summary] = true
|
@@ -105,6 +107,7 @@ class TimeSheet::Time::Cmd
|
|
105
107
|
'available commands:',
|
106
108
|
" report (default): list entries conforming to given criteria",
|
107
109
|
" invoice: compress similar entries and filter petty ones. Optionally package for e.g. monthly invoicing",
|
110
|
+
" verify: check syntax and semantics in your input spreadsheets",
|
108
111
|
"\n general options:"
|
109
112
|
].join("\n")
|
110
113
|
|
@@ -144,6 +147,26 @@ class TimeSheet::Time::Cmd
|
|
144
147
|
end
|
145
148
|
end
|
146
149
|
|
150
|
+
def verify
|
151
|
+
convert_to_time
|
152
|
+
|
153
|
+
entries = TimeSheet::Time::Parser.new(options[:location]).entries
|
154
|
+
|
155
|
+
puts 'checking for changes in project with carried-over description ...'
|
156
|
+
entries.each do |entry|
|
157
|
+
next unless entry.matches?(options)
|
158
|
+
|
159
|
+
if entry.prev && entry.prev.project != entry.project
|
160
|
+
# we check for the same object because that means that the value has
|
161
|
+
# been carried over from the previous entry and that likely represents
|
162
|
+
# an oversight in these circumstances
|
163
|
+
if entry.prev.description.equal?(entry.description)
|
164
|
+
puts "-> | #{entry}"
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
147
170
|
def invoice
|
148
171
|
convert_to_time
|
149
172
|
|
data/lib/time_sheet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: time-sheet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Moritz Schepp
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spreadsheet
|