toggl-worktime 0.4.2 → 0.5.0

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: '08aaa1d1a5914f406a4627d9274b8d940a839f0939f8820643a7601e659d61d2'
4
- data.tar.gz: 03ebb7c4a4977c37b23f6f472ef1df4928477a50ce7a871fcba07329fe08526a
3
+ metadata.gz: add6d0443e9304c9d56e19c15016f35fa58a09d12156273ef4274bc1d9e042d8
4
+ data.tar.gz: 4966886f5bddb1931c5e24f9cd29339c6dfb910af7ac2bde3c676b0c32fc5d79
5
5
  SHA512:
6
- metadata.gz: 7906aee8b83c562f3d3831d273ddecdc9fe9ee4aed942853b131d67d8571e3df1f76636fe033d12601fc7bb813fbbd97caf50b36355630972c24677bd1aaf549
7
- data.tar.gz: '0364812529d1480a72ba9c7e0ddb5bd254e0c0f4426f9e93e86612e2f9dc24a193f1a49fceb144d237cf600b52a1e68f4f789127da62bdc5820b793cc17939e8'
6
+ metadata.gz: 5c4cc9f560556a9841ffa9f2f4ff0f7340e846aecf265bfb150eb32d5445e687adc96aebb958b9e82f1e3897a1d1a9552e191199a28512fc607eeb5d5726ac7b
7
+ data.tar.gz: b8c25aeec554ee77ff4cbc48944b73c5d97b898a95012d26411cbaec2c904f94874eace7af05560adbc14ea54d531658ceb153440b91c400af3ab34e21b57ba3
data/CHANGELOG.md CHANGED
@@ -1,8 +1,24 @@
1
1
  # Changelog
2
2
 
3
- ## [0.4.1](https://github.com/limitusus/toggl-worktime/tree/0.4.1) (2021-06-22)
3
+ ## [0.5.0](https://github.com/limitusus/toggl-worktime/tree/0.5.0) (2024-06-02)
4
4
 
5
- [Full Changelog](https://github.com/limitusus/toggl-worktime/compare/v0.4.0...0.4.1)
5
+ [Full Changelog](https://github.com/limitusus/toggl-worktime/compare/v0.4.2...0.5.0)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Use togglv9 as Toggl API v8 is deprecated [\#14](https://github.com/limitusus/toggl-worktime/pull/14) ([limitusus](https://github.com/limitusus))
10
+
11
+ ## [v0.4.2](https://github.com/limitusus/toggl-worktime/tree/v0.4.2) (2023-05-06)
12
+
13
+ [Full Changelog](https://github.com/limitusus/toggl-worktime/compare/v0.4.1...v0.4.2)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Use the newer version of togglv8 gem, for a newer version of faraday gem [\#13](https://github.com/limitusus/toggl-worktime/pull/13) ([limitusus](https://github.com/limitusus))
18
+
19
+ ## [v0.4.1](https://github.com/limitusus/toggl-worktime/tree/v0.4.1) (2021-06-22)
20
+
21
+ [Full Changelog](https://github.com/limitusus/toggl-worktime/compare/v0.4.0...v0.4.1)
6
22
 
7
23
  **Merged pull requests:**
8
24
 
@@ -14,7 +30,8 @@
14
30
 
15
31
  **Merged pull requests:**
16
32
 
17
- - Use newer rake [\#9](https://github.com/limitusus/toggl-worktime/pull/9) ([limitusus](https://github.com/limitusus))
33
+ - Update README [\#11](https://github.com/limitusus/toggl-worktime/pull/11) ([limitusus](https://github.com/limitusus))
34
+ - Use newer rake [\#10](https://github.com/limitusus/toggl-worktime/pull/10) ([limitusus](https://github.com/limitusus))
18
35
  - Implement calendar mode [\#8](https://github.com/limitusus/toggl-worktime/pull/8) ([limitusus](https://github.com/limitusus))
19
36
 
20
37
  ## [v0.3.2](https://github.com/limitusus/toggl-worktime/tree/v0.3.2) (2018-09-26)
@@ -43,8 +60,6 @@
43
60
 
44
61
  **Merged pull requests:**
45
62
 
46
- - Update README [\#11](https://github.com/limitusus/toggl-worktime/pull/11) ([limitusus](https://github.com/limitusus))
47
- - Use newer rake [\#10](https://github.com/limitusus/toggl-worktime/pull/10) ([limitusus](https://github.com/limitusus))
48
63
  - Config YAML [\#5](https://github.com/limitusus/toggl-worktime/pull/5) ([limitusus](https://github.com/limitusus))
49
64
  - Specify year [\#4](https://github.com/limitusus/toggl-worktime/pull/4) ([limitusus](https://github.com/limitusus))
50
65
 
data/README.md CHANGED
@@ -102,10 +102,6 @@ abcdef0123456789
102
102
 
103
103
  You can get your API token from Toggl at your profile settings page.
104
104
 
105
- NOTE: as of togglv8 v1.2.1, `.toggl` file **MUST NOT** end with a newline (`\010` or LF).
106
- The recommended way to create the file is `echo -n 'YOUR_TOGGL_API_TOKEN' > ~/.toggl`.
107
- This issue [will be fixed in the next togglv8 release](https://github.com/kanet77/togglv8/pull/21).
108
-
109
105
  ### Configuration
110
106
 
111
107
  Place configuration file in `~/.toggl_worktime`.
data/Rakefile CHANGED
@@ -12,5 +12,5 @@ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
12
12
  config.user = 'limitusus'
13
13
  config.project = 'toggl-worktime'
14
14
  config.since_tag = 'v0.1.0'
15
- config.future_release = '0.4.1'
15
+ config.future_release = '0.5.0'
16
16
  end
@@ -10,7 +10,7 @@ module Toggl
10
10
  attr_reader :work_time
11
11
 
12
12
  def initialize(config:)
13
- @toggl = TogglV8::API.new
13
+ @toggl = TogglV9::API.new
14
14
  @config = config
15
15
  @merger = nil
16
16
  @work_time = nil
@@ -45,7 +45,7 @@ module Toggl
45
45
 
46
46
  def time_entries_each
47
47
  zone_offset = Toggl::Worktime::Time.zone_offset(@config.timezone)
48
- @time_entries.each do |te|
48
+ @time_entries.sort { |a, b| a['start'] <=> b['start'] }.each do |te|
49
49
  start = parse_date(te['start'], zone_offset)
50
50
  stop = parse_date(te['stop'], zone_offset)
51
51
  @last_stop = stop
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Toggl
4
4
  module Worktime
5
- VERSION = '0.4.2'
5
+ VERSION = '0.5.0'
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'togglv8'
3
+ require 'togglv9'
4
4
  require 'date'
5
5
  require 'json'
6
6
  require 'toggl/worktime/version'
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ['lib']
24
24
 
25
25
  spec.add_dependency 'awesome_print'
26
- spec.add_dependency 'togglv8-limitusus', '>= 1.2.2'
26
+ spec.add_dependency 'togglv9', '>= 0.1.0'
27
27
  spec.add_dependency 'tty-table'
28
28
  spec.add_development_dependency 'bundler', '>= 2.2.10'
29
29
  spec.add_development_dependency 'github_changelog_generator'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toggl-worktime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomoya KABE
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-06 00:00:00.000000000 Z
11
+ date: 2024-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: togglv8-limitusus
28
+ name: togglv9
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.2.2
33
+ version: 0.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 1.2.2
40
+ version: 0.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: tty-table
43
43
  requirement: !ruby/object:Gem::Requirement