luxafor-toggl 1.0.1 → 1.0.3

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: 5c37b35241c1d38eaff675f160a50c2e52898d119c333aac472a1661b69dea22
4
- data.tar.gz: 75593c50f4592f51ac0b367bf45c63110878cf12d3dbb7ccd53405b267564a74
3
+ metadata.gz: 960ea1dc6e2b421684d69b67f14afa94be0ce90c1fc5249f64420e7b1654bcef
4
+ data.tar.gz: f2b7e3b4f579706c626f8ec4b9760abb4ed0e9a80f4667624db9d4a299fa9bbf
5
5
  SHA512:
6
- metadata.gz: 3a5287b2c72e9f58e4d4121774b6774864cef7608a188b324de4593ef61efc66bbdefdf66af3910c2d650c19f895147cd99bb7b9cd2eca3ff7adb95e3db1559d
7
- data.tar.gz: ab210611f22f40e8b1278b6fb4dc05bab134fa4e453ef40e9d98f8bc3b14291caecfe50b43e985e3f8bc2a9e470affcc55656917a9030eb645b2f13695cd2ded
6
+ metadata.gz: 376f4fc0dfa4564644ad12304877e59c7548adb32c597b98884c7eb457d277df2157416d1a93e11b73024c035167c87be3af78a84160e20ff47ac9c4cb9965d2
7
+ data.tar.gz: 1ef445cab13f0cac4f3f23b0dc332f343c4a0f290ee9ec697476cce4309c70a930771d51b926f4eee39cf01b6bb574eea58208607a719bf2fe4a56ae44cdfb13
@@ -22,8 +22,8 @@ module Luxafor
22
22
  attr_reader :toggl, :luxafor, :state_file
23
23
 
24
24
  def latest_task
25
- start = DateTime.now - 1
26
- @_latest_task = toggl.get_time_entries(start_date: start).last
25
+ start = DateTime.now - 1
26
+ @_latest_task ||= toggl.get_time_entries(start_date: start).max_by { |task| Time.parse(task["start"]) }
27
27
  end
28
28
 
29
29
  def current_state
@@ -1,5 +1,5 @@
1
1
  module Luxafor
2
2
  module Toggl
3
- VERSION = '1.0.1'.freeze
3
+ VERSION = '1.0.3'.freeze
4
4
  end
5
5
  end
data/lib/luxafor/toggl.rb CHANGED
@@ -1,18 +1,18 @@
1
- require "awesome_print"
2
- require "date"
3
- require "value_semantics"
1
+ # require "awesome_print"
2
+ require 'date'
3
+ require 'value_semantics'
4
4
 
5
5
  require 'luxafor'
6
6
  require 'togglv8'
7
7
 
8
- require "luxafor/toggl/version"
9
- require "luxafor/toggl/client"
10
- require "luxafor/toggl/state"
8
+ require 'luxafor/toggl/version'
9
+ require 'luxafor/toggl/client'
10
+ require 'luxafor/toggl/state'
11
11
 
12
12
  # As of Apr 2020, because of a 1/2 removed awesome print dep in the gem which hasnt been released.
13
13
  # See https://github.com/kanet77/togglv8/issues/17
14
14
  class Logger
15
- def ap(*args, **kwargs, &block)
15
+ def ap(*_args, **_kwargs, &_block)
16
16
  true
17
17
  end
18
18
  end
@@ -45,11 +45,11 @@ module Luxafor
45
45
  end
46
46
 
47
47
  def state_file
48
- @state ||= ENV.fetch("LUXAFOR_TOGGL_STATE_FILE", "/tmp/#{Etc.getpwuid(Process.euid).name}-luxafor-toggl-state.json")
48
+ @state ||= ENV.fetch('LUXAFOR_TOGGL_STATE_FILE', "/tmp/#{Etc.getpwuid(Process.euid).name}-luxafor-toggl-state.json")
49
49
  end
50
50
 
51
51
  def idle_time
52
- @idle_time ||= ENV.fetch("LUXAFOR_TOGGL_IDLE_TIME", 60 * 60 * 2).to_i # Default is 2 hours before you're idle
52
+ @idle_time ||= ENV.fetch('LUXAFOR_TOGGL_IDLE_TIME', 60 * 60 * 2).to_i # Default is 2 hours before you're idle
53
53
  end
54
54
 
55
55
  def toggl_client
@@ -1,42 +1,42 @@
1
- lib = File.expand_path("lib", __dir__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "luxafor/toggl/version"
3
+ require 'luxafor/toggl/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = "luxafor-toggl"
6
+ spec.name = 'luxafor-toggl'
7
7
  spec.version = Luxafor::Toggl::VERSION
8
- spec.authors = ["Gabriel Fortuna"]
9
- spec.email = ["gabriel@zero-one.io"]
8
+ spec.authors = ['Gabriel Fortuna']
9
+ spec.email = ['gabriel@zero-one.io']
10
10
 
11
- spec.summary = "Integrate your Luxafor flag with your toggl account"
12
- spec.description = "A simple utility to integrate and sync your Toggl activity with your Luxafor flag"
13
- spec.homepage = "https://www.zero-one.io"
14
- spec.licenses = "MIT"
11
+ spec.summary = 'Integrate your Luxafor flag with your toggl account'
12
+ spec.description = 'A simple utility to integrate and sync your Toggl activity with your Luxafor flag'
13
+ spec.homepage = 'https://www.zero-one.io'
14
+ spec.licenses = 'MIT'
15
15
 
16
- spec.metadata["allowed_push_host"] = "https://rubygems.org"
16
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
17
17
 
18
- spec.metadata["homepage_uri"] = spec.homepage
19
- spec.metadata["source_code_uri"] = "https://github.com/gee-forr/luxafor-toggl"
20
- # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
18
+ spec.metadata['homepage_uri'] = spec.homepage
19
+ spec.metadata['source_code_uri'] = 'https://github.com/gee-forr/luxafor-toggl'
20
+ # spec.metadata['changelog_uri'] = 'TODO: Put your gem's CHANGELOG.md URL here.'
21
21
 
22
22
  # Specify which files should be added to the gem when it is released.
23
23
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
24
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
25
25
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
26
  end
27
27
 
28
- spec.bindir = "exe"
28
+ spec.bindir = 'exe'
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
- spec.require_paths = ["lib"]
31
-
32
- spec.add_development_dependency 'awesome_print', '~> 1'
33
- spec.add_development_dependency 'bundler', '~> 2.0'
34
- spec.add_development_dependency 'pry', '0.13.1'
35
- spec.add_development_dependency 'rake', '>= 12.3.3'
36
- spec.add_development_dependency 'rspec', '~> 3.0'
37
-
38
- spec.add_dependency 'luxafor', '~> 0.1.0'
39
- spec.add_dependency 'oj', '~> 3.10', '>= 3.10.6'
40
- spec.add_dependency 'togglv8', '~> 1.2', '>= 1.2.1'
41
- spec.add_dependency 'value_semantics', '~> 3.2'
30
+ spec.require_paths = ['lib']
31
+
32
+ spec.add_development_dependency 'amazing_print', '>= 1.2'
33
+ spec.add_development_dependency 'bundler', '>= 2.0'
34
+ spec.add_development_dependency 'pry', '>= 0.13.1'
35
+ spec.add_development_dependency 'rake', '>= 12.3'
36
+ spec.add_development_dependency 'rspec', '>= 3.0'
37
+
38
+ spec.add_dependency 'luxafor', '~> 0.1'
39
+ spec.add_dependency 'oj', '>= 3.10.6'
40
+ spec.add_dependency 'togglv8-limitusus', '>= 1.2.2'
41
+ spec.add_dependency 'value_semantics', '~> 3.2'
42
42
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luxafor-toggl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Fortuna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-12 00:00:00.000000000 Z
11
+ date: 2023-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: awesome_print
14
+ name: amazing_print
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1'
19
+ version: '1.2'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1'
26
+ version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.13.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.13.1
55
55
  - !ruby/object:Gem::Dependency
@@ -58,26 +58,26 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 12.3.3
61
+ version: '12.3'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 12.3.3
68
+ version: '12.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '3.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
@@ -86,21 +86,18 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.1.0
89
+ version: '0.1'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.1.0
96
+ version: '0.1'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: oj
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '3.10'
104
101
  - - ">="
105
102
  - !ruby/object:Gem::Version
106
103
  version: 3.10.6
@@ -108,32 +105,23 @@ dependencies:
108
105
  prerelease: false
109
106
  version_requirements: !ruby/object:Gem::Requirement
110
107
  requirements:
111
- - - "~>"
112
- - !ruby/object:Gem::Version
113
- version: '3.10'
114
108
  - - ">="
115
109
  - !ruby/object:Gem::Version
116
110
  version: 3.10.6
117
111
  - !ruby/object:Gem::Dependency
118
- name: togglv8
112
+ name: togglv8-limitusus
119
113
  requirement: !ruby/object:Gem::Requirement
120
114
  requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '1.2'
124
115
  - - ">="
125
116
  - !ruby/object:Gem::Version
126
- version: 1.2.1
117
+ version: 1.2.2
127
118
  type: :runtime
128
119
  prerelease: false
129
120
  version_requirements: !ruby/object:Gem::Requirement
130
121
  requirements:
131
- - - "~>"
132
- - !ruby/object:Gem::Version
133
- version: '1.2'
134
122
  - - ">="
135
123
  - !ruby/object:Gem::Version
136
- version: 1.2.1
124
+ version: 1.2.2
137
125
  - !ruby/object:Gem::Dependency
138
126
  name: value_semantics
139
127
  requirement: !ruby/object:Gem::Requirement
@@ -194,8 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
182
  - !ruby/object:Gem::Version
195
183
  version: '0'
196
184
  requirements: []
197
- rubyforge_project:
198
- rubygems_version: 2.7.6
185
+ rubygems_version: 3.1.6
199
186
  signing_key:
200
187
  specification_version: 4
201
188
  summary: Integrate your Luxafor flag with your toggl account