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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9adeab367eb0148cb4955998b48150ee01572c73bb10dae433f06c070522751
4
- data.tar.gz: e0574ef0e9cd16b10bea3aed8de0aea289e7e9255211236a30e91ae49fef6b99
3
+ metadata.gz: 3eafc5b6d18708b232660dc63e6b27c965c43013c569da732780e72638543644
4
+ data.tar.gz: 0e11e2d36a118c0db1b5d3f7ff0e5c59fbe8e94df4910e75fd5d2598b84ed326
5
5
  SHA512:
6
- metadata.gz: 75e6ea96de075b554cf181d5298fb1527380d6aa3c7e0d982afe0e596849cd521b102add3d1f2e1ad2e45e0fef8ab76effb1815fc9ab8f03d2cc66c825dd0ca6
7
- data.tar.gz: 441d49f696d8afc564ff6baf409895f33192c8dd232f4d34c9eb2d11e5fee6eb13d703feeb7f9971a0299fde5ebacfc64ee43d924ca4e77baa2ec07cebe2afac
6
+ metadata.gz: bafb5ce2ad3372ced67f0f1b498ad0f4966772c93cae6a455e20ca445c077f95295f254e3dddc41a58d11fe34271610c1557faddd6da4fe9c85167a5a704a3ef
7
+ data.tar.gz: ad6ccabcfb8a866676cfa9e5cc3659d7dd7ab62913ef63689e5cd4101ccdfdadc5b1390633e9c8c7005c2515b1d6e01a8adba8082e68d976064077dc7652b67f
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module TimeSheet
2
- VERSION = "0.13.0"
2
+ VERSION = "0.14.0"
3
3
  end
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.13.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-26 00:00:00.000000000 Z
11
+ date: 2021-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spreadsheet