checkoff 0.34.0 → 0.34.1

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: 4765aedff037e2fd029982dbbeca62019cf9edf5e28b80bfaab298e75895f8fe
4
- data.tar.gz: 1dc2e1f230a95dc3f2bbc0f77710e7a644441b2532e1f53151eadb99e0021ebf
3
+ metadata.gz: b31221009bc4a8eff20ae5ee62909ffd5391cdb7621ab30ca59ef196391588ad
4
+ data.tar.gz: 878750bf24c6587dce1380fcce8fb041f4b5d65db99d3e98cb836e9d8df7273c
5
5
  SHA512:
6
- metadata.gz: 8a2b92adf00c68e573356dca4f6d3dc906052c8bad787187d3f53a364ec75398e25b1f46576baa6a54386c0fde67e3c8c062ca5370946bc700829469035c28dd
7
- data.tar.gz: 43c625cbed5a5c006c5b7caff410481890e073e4ecb779e4a59d46141d384839088740741ba4dc40c995e1d70cdc4a1da9d60b8f8dc7f3db0846a739ab41a090
6
+ metadata.gz: '0645801524c2e2e787277bc5b86bceda7b19899e870b6df54878d1ece0fee340ce72ca733be852c4035aca6333355ba9c0854cd6bdad6df634e7f537bb396b23'
7
+ data.tar.gz: 1d164eb6a946a0e8fe3be22461b70fa9d9720a69820c31867d78fc8f0d054758f6212d3f3de6f834480b9dba7db1179f367c22bac9fbb5585c7b8acfea9564e3
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.34.0)
15
+ checkoff (0.34.1)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -27,7 +27,8 @@ module Checkoff
27
27
  def client
28
28
  @client ||= @asana_client_class.new do |c|
29
29
  c.authentication :access_token, @config.fetch(:personal_access_token)
30
- c.default_headers 'asana-enable' => 'new_project_templates,new_user_task_lists,new_memberships,new_goal_memberships'
30
+ c.default_headers 'asana-enable' =>
31
+ 'new_project_templates,new_user_task_lists,new_memberships,new_goal_memberships'
31
32
  end
32
33
  end
33
34
 
@@ -40,15 +40,13 @@ module Checkoff
40
40
  # Pull a specific task by name
41
41
  def task(workspace_name, project_name, task_name,
42
42
  section_name: :unspecified,
43
- only_uncompleted: true)
44
- project = projects.project(workspace_name, project_name)
45
- tasks = if section_name == :unspecified
46
- projects.tasks_from_project(project,
47
- only_uncompleted: only_uncompleted)
48
- else
49
- @sections.tasks(workspace_name, project_name, section_name,
50
- only_uncompleted: only_uncompleted)
51
- end
43
+ only_uncompleted: true,
44
+ extra_fields: [])
45
+ tasks = tasks_from_section(workspace_name,
46
+ project_name,
47
+ section_name: section_name,
48
+ only_uncompleted: only_uncompleted,
49
+ extra_fields: extra_fields)
52
50
  tasks.find { |task| task.name == task_name }
53
51
  end
54
52
 
@@ -67,6 +65,22 @@ module Checkoff
67
65
 
68
66
  private
69
67
 
68
+ def tasks_from_section(workspace_name, project_name,
69
+ section_name:,
70
+ only_uncompleted:,
71
+ extra_fields:)
72
+ if section_name == :unspecified
73
+ project = projects.project(workspace_name, project_name)
74
+ projects.tasks_from_project(project,
75
+ only_uncompleted: only_uncompleted,
76
+ extra_fields: extra_fields)
77
+ else
78
+ @sections.tasks(workspace_name, project_name, section_name,
79
+ only_uncompleted: only_uncompleted,
80
+ extra_fields: extra_fields)
81
+ end
82
+ end
83
+
70
84
  attr_reader :client
71
85
 
72
86
  def projects
@@ -3,5 +3,5 @@
3
3
  # Command-line and gem client for Asana (unofficial)
4
4
  module Checkoff
5
5
  # Version of library
6
- VERSION = '0.34.0'
6
+ VERSION = '0.34.1'
7
7
  end
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.34.0
4
+ version: 0.34.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: 2023-04-16 00:00:00.000000000 Z
11
+ date: 2023-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport