timetrap-harvest 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c0f2378c378124c4effb59b8ca947e0ede2fbf46
4
- data.tar.gz: 8f0dccc2ede7cf350205c725858b74ffa0772b60
2
+ SHA256:
3
+ metadata.gz: dfc2dc033e7e29b599547a5ac701f7d9520b1f78cf90b2afd438d6ed906226ae
4
+ data.tar.gz: 00d54310e96971fec2e6ffe0d0d9705a00c3af41af6f71af68ed4943390bc2f1
5
5
  SHA512:
6
- metadata.gz: 1f41c4ba176686f69de8e6dfabb55dc95d71c0e1bd7d21ec56e3a1ddb52a775000b7270f9a690dd63de956226ed2c927efec4c962b43ae3c19b49340686c4d1c
7
- data.tar.gz: 788c964ff4da77523b9b604db199851f3052771a00063cd67070b0c95d5a0c9810aed954022aafd5a927b98ba592d43a67d9df21add28e5fefbcabdc59069597
6
+ metadata.gz: 61fda5cc9dbec4479c2a9d370864af9f5ba92c1c89b1f2ac92b97347b6c75c5d93a30f94c8d5847aebb1531c74aaebb8fe265ba5ad8ddcef10da579dc6021462
7
+ data.tar.gz: 846de5ac2ec7544d10b144048956ba844814943caea0b4cd58182635fc22ef37e2c6975c167b4287dd2a52a4792dd81e0e5fa2a4d9aa7ac004bf530a28abe3e9
@@ -9,13 +9,15 @@ class TimetrapHarvest::Formatter
9
9
  end
10
10
 
11
11
  def format
12
- if alias_config
12
+ if alias_config && entry[:end]
13
13
  { notes: entry[:note],
14
14
  hours: hours_for_time(entry[:start], entry[:end]),
15
15
  project_id: project_id.to_i,
16
16
  task_id: task_id.to_i,
17
17
  spent_at: entry[:start].strftime('%Y%m%d')
18
18
  }
19
+ elsif !entry[:end]
20
+ { error: 'Entry not ended yet', note: entry[:note] }
19
21
  elsif code
20
22
  { error: 'Missing task alias config', note: entry[:note] }
21
23
  else
@@ -1,3 +1,3 @@
1
1
  module TimetrapHarvest
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timetrap-harvest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devon Blandin
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.2.0
109
+ rubygems_version: 2.7.6
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: A Harvest formatter for Timetrap