checkoff 0.15.0 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/checkoff/cli.rb +1 -1
- data/lib/checkoff/create-entity.sh +1 -1
- data/lib/checkoff/custom_fields.rb +1 -1
- data/lib/checkoff/projects.rb +2 -2
- data/lib/checkoff/tags.rb +1 -1
- data/lib/checkoff/tasks.rb +4 -3
- data/lib/checkoff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f76aad85729841bb8aae082caf52fe536536ea1fe9c633161b24e6a6a1ed0bc
|
4
|
+
data.tar.gz: fcfd8fab426da094602e01072361853746d24543628cf86bf61962fcc5868aab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b45c61fb70079f118ab185d1ba6d0f6a36cde05cbb991c70af694168fba992871c05a75866b63387fe2fb3ea59ac1a5afd54d5fc66a8653cd067db63f8c8fc70
|
7
|
+
data.tar.gz: 409861138d0df6b7f854a9769c141d55945e5b05ddb510c7b6a620888efd9b0297bfea7f57195ab0f9f8b1b7913e690c3e8c2d012a609df34e16dd6e344f99d1
|
data/Gemfile.lock
CHANGED
data/lib/checkoff/cli.rb
CHANGED
@@ -48,7 +48,7 @@ module Checkoff
|
|
48
48
|
cache_method :${underscored_singular_name}_or_raise, LONG_CACHE_TIME
|
49
49
|
|
50
50
|
def ${underscored_singular_name}(workspace_name, ${underscored_singular_name}_name)
|
51
|
-
workspace = workspaces.
|
51
|
+
workspace = workspaces.workspace_or_raise(workspace_name)
|
52
52
|
${underscored_plural_name} = client.${underscored_plural_name}.get_${underscored_plural_name}_for_workspace(workspace_gid: workspace.gid)
|
53
53
|
${underscored_plural_name}.find { |${underscored_singular_name}| ${underscored_singular_name}.name == ${underscored_singular_name}_name }
|
54
54
|
end
|
@@ -37,7 +37,7 @@ module Checkoff
|
|
37
37
|
cache_method :custom_field_or_raise, LONG_CACHE_TIME
|
38
38
|
|
39
39
|
def custom_field(workspace_name, custom_field_name)
|
40
|
-
workspace = workspaces.
|
40
|
+
workspace = workspaces.workspace_or_raise(workspace_name)
|
41
41
|
custom_fields = client.custom_fields.get_custom_fields_for_workspace(workspace_gid: workspace.gid)
|
42
42
|
custom_fields.find { |custom_field| custom_field.name == custom_field_name }
|
43
43
|
end
|
data/lib/checkoff/projects.rb
CHANGED
@@ -89,14 +89,14 @@ module Checkoff
|
|
89
89
|
cache_method :projects, LONG_CACHE_TIME
|
90
90
|
|
91
91
|
def projects_by_workspace_name(workspace_name)
|
92
|
-
workspace = @workspaces.
|
92
|
+
workspace = @workspaces.workspace_or_raise(workspace_name)
|
93
93
|
raise "Could not find workspace named #{workspace_name}" unless workspace
|
94
94
|
|
95
95
|
projects.find_by_workspace(workspace: workspace.gid)
|
96
96
|
end
|
97
97
|
|
98
98
|
def my_tasks(workspace_name)
|
99
|
-
workspace = @workspaces.
|
99
|
+
workspace = @workspaces.workspace_or_raise(workspace_name)
|
100
100
|
result = client.user_task_lists.get_user_task_list_for_user(user_gid: 'me',
|
101
101
|
workspace: workspace.gid)
|
102
102
|
gid = result.gid
|
data/lib/checkoff/tags.rb
CHANGED
@@ -37,7 +37,7 @@ module Checkoff
|
|
37
37
|
cache_method :tag_or_raise, LONG_CACHE_TIME
|
38
38
|
|
39
39
|
def tag(workspace_name, tag_name)
|
40
|
-
workspace = workspaces.
|
40
|
+
workspace = workspaces.workspace_or_raise(workspace_name)
|
41
41
|
tags = client.tags.get_tags_for_workspace(workspace_gid: workspace.gid)
|
42
42
|
tags.find { |tag| tag.name == tag_name }
|
43
43
|
end
|
data/lib/checkoff/tasks.rb
CHANGED
@@ -16,12 +16,15 @@ module Checkoff
|
|
16
16
|
|
17
17
|
def initialize(config: Checkoff::ConfigLoader.load(:asana),
|
18
18
|
sections: Checkoff::Sections.new(config: config),
|
19
|
+
clients: Checkoff::Clients.new(config: config),
|
20
|
+
client: clients.client,
|
19
21
|
time_class: Time,
|
20
22
|
asana_task: Asana::Resources::Task)
|
21
23
|
@config = config
|
22
24
|
@sections = sections
|
23
25
|
@time_class = time_class
|
24
26
|
@asana_task = asana_task
|
27
|
+
@client = client
|
25
28
|
end
|
26
29
|
|
27
30
|
def task_ready?(task)
|
@@ -64,9 +67,7 @@ module Checkoff
|
|
64
67
|
|
65
68
|
private
|
66
69
|
|
67
|
-
|
68
|
-
@sections.client
|
69
|
-
end
|
70
|
+
attr_reader :client
|
70
71
|
|
71
72
|
def projects
|
72
73
|
@projects ||= @sections.projects
|
data/lib/checkoff/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: checkoff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|