abt-cli 0.0.19 → 0.0.20
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6348f086170cb21625ec22595423cebbca76b0455f6dc2ad552ef072019b3929
|
4
|
+
data.tar.gz: e53c442f505ba9141e62d2b4c7883ec010c966b4d1deef0d71651b94ea11db93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 977ff0fbc908433afdf996cdd354bd33ea9a315cfebcbc456f42df731309f0502801516995f0ded85a58f8efcfeb0fe9830dd31c51efcb05f4acb58ddb3e3833
|
7
|
+
data.tar.gz: 45d25bbae2c077af24c304132703ca8ebc7a0968c04aafc598ca48a66cd3f303fe5cc108e193e24bd8f5cbb09e37d831eeba3518c360bafb1112f4ae443138cd
|
@@ -14,7 +14,7 @@ module Abt
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def perform
|
17
|
-
unless config.
|
17
|
+
unless project_gid == config.path.project_gid
|
18
18
|
abort 'This is a no-op for tasks outside the current project'
|
19
19
|
end
|
20
20
|
require_task!
|
@@ -57,11 +57,7 @@ module Abt
|
|
57
57
|
|
58
58
|
def task
|
59
59
|
@task ||= begin
|
60
|
-
|
61
|
-
nil
|
62
|
-
else
|
63
|
-
api.get("tasks/#{task_gid}", opt_fields: 'name,memberships.section.name,permalink_url')
|
64
|
-
end
|
60
|
+
api.get("tasks/#{task_gid}", opt_fields: 'name,memberships.section.name,permalink_url')
|
65
61
|
end
|
66
62
|
end
|
67
63
|
end
|
@@ -65,7 +65,7 @@ module Abt
|
|
65
65
|
|
66
66
|
# The below filtering is the best we can do with Asanas api, see this:
|
67
67
|
# https://forum.asana.com/t/tasks-query-completed-since-is-broken-for-sections/21461
|
68
|
-
tasks.
|
68
|
+
tasks.select { |task| !task['completed'] }
|
69
69
|
end
|
70
70
|
|
71
71
|
def sections
|
@@ -33,7 +33,7 @@ module Abt
|
|
33
33
|
@tasks ||= begin
|
34
34
|
warn 'Fetching tasks...'
|
35
35
|
tasks = api.get_paged('tasks', project: project['gid'], opt_fields: 'name,completed')
|
36
|
-
tasks.
|
36
|
+
tasks.select { |task| !task['completed'] }
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
@@ -88,18 +88,18 @@ module Abt
|
|
88
88
|
|
89
89
|
def prompt_section(message)
|
90
90
|
cli.warn 'Fetching sections...'
|
91
|
-
sections = api.get_paged("projects/#{path.project_gid}/sections")
|
91
|
+
sections = api.get_paged("projects/#{path.project_gid}/sections", opt_fields: 'name')
|
92
92
|
cli.prompt.choice(message, sections)
|
93
93
|
end
|
94
94
|
|
95
95
|
def prompt_workspace
|
96
96
|
cli.warn 'Fetching workspaces...'
|
97
|
-
workspaces = api.get_paged('workspaces')
|
97
|
+
workspaces = api.get_paged('workspaces', opt_fields: 'name')
|
98
98
|
if workspaces.empty?
|
99
99
|
cli.abort 'Your asana access token does not have access to any workspaces'
|
100
100
|
elsif workspaces.one?
|
101
101
|
workspace = workspaces.first
|
102
|
-
cli.warn "Selected Asana workspace #{workspace['name']}"
|
102
|
+
cli.warn "Selected Asana workspace: #{workspace['name']}"
|
103
103
|
else
|
104
104
|
workspace = cli.prompt.choice('Select Asana workspace', workspaces)
|
105
105
|
end
|
data/lib/abt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abt-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesper Sørensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-inflector
|