toggl-worktime 0.3.1 → 0.3.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
2
  SHA256:
3
- metadata.gz: cd9c63f2884fb32f927ce384477911a5a87984cc18a6ffa7d6cec577ed5eb9b6
4
- data.tar.gz: 2ce8946cf15a0b258d18820cc5347656cc2c7b089ae21122571b158cd32c5f2e
3
+ metadata.gz: 2b9f8888bd43de3a041b90dab1ffd3a8b6ba389543926f28d7c55d43373a15bc
4
+ data.tar.gz: 37d614878ec772bba329858b12d8849f90d7cd1d1ddf201126889bb8473693ce
5
5
  SHA512:
6
- metadata.gz: 1fda7e45a8e887561adc06a3e24f98f0c50a225b8188756c8cfa6576ed9bc27274505069342e077c32de17f846013728be73813f2478715e530b5d759198358f
7
- data.tar.gz: eae7f300a27c108b2db455c6459eaa1c05319de6f2ccad040b5ec0d490fc8aece985b75e784108f341130d5ee961323a68881439a93aa9a17fac3a8231d9e3d8
6
+ metadata.gz: f66f944ca82d54c014c9e9a577614d624edbaf40a8a81d2c7a2107b0ae8a0ba659b05125ca9664f06321b655795ae7fe920605662c58446c5974650e310661e6
7
+ data.tar.gz: 14173ac55e5944be336b33fd0d8f25a86c9e4e917465e7d2a9ab69dedad671c2e193b065e99d4ceeaca43338dc6d1388bc6954756dc61e81ae791047ff445faf
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.3.1](https://github.com/limitusus/toggl-worktime/tree/v0.3.1) (2018-09-26)
4
+ [Full Changelog](https://github.com/limitusus/toggl-worktime/compare/v0.3.0...v0.3.1)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - Bugfix/interval [\#6](https://github.com/limitusus/toggl-worktime/pull/6) ([limitusus](https://github.com/limitusus))
9
+
3
10
  ## [v0.3.0](https://github.com/limitusus/toggl-worktime/tree/v0.3.0) (2018-08-01)
4
11
  [Full Changelog](https://github.com/limitusus/toggl-worktime/compare/v0.2.0...v0.3.0)
5
12
 
@@ -28,15 +28,21 @@ module Toggl
28
28
  next
29
29
  end
30
30
  work_time << [@current_start, @current_stop]
31
- @total_time += @current_stop - @current_start
31
+ count_total_time
32
32
  @current_start = start
33
33
  @current_stop = stop
34
34
  end
35
35
  work_time << [@current_start, @last_stop]
36
- @total_time += @current_stop - @current_start
36
+ count_total_time
37
37
  work_time
38
38
  end
39
39
 
40
+ def count_total_time
41
+ return if @current_start.nil? || @current_stop.nil?
42
+
43
+ @total_time += @current_stop - @current_start
44
+ end
45
+
40
46
  def time_entries_each
41
47
  zone_offset = Toggl::Worktime::Time.zone_offset(@config.timezone)
42
48
  @time_entries.each do |te|
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Toggl
4
4
  module Worktime
5
- VERSION = '0.3.1'
5
+ VERSION = '0.3.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toggl-worktime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomoya KABE