checkoff 0.196.0 → 0.198.0
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/internal/project_hashes.rb +7 -1
- data/lib/checkoff/internal/task_hashes.rb +7 -1
- data/lib/checkoff/portfolios.rb +8 -4
- 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: 2c2d5e95525ee6f4fa4506259270332a7a18afa5417d58c9d0ed2ddae51a395e
|
4
|
+
data.tar.gz: 5ba739c55f15d9c283f43251476b3196dcc0528e1e6420f9f39f880df42797cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dac7e5be72bd4dc9f562a9e1763fa051b2c3afee4c1fd8312519905879a6ca9488b372515d054c22e5934a3bfb9365ebe1b9bab2e2f3660db748f2a921f2ee36
|
7
|
+
data.tar.gz: 88adbefe25c581a67aeb07e695b863f55a36f5b6eab7548ca13e7e3b15a1480a20e5625dbbc1ccad4149d7823000fbf1747211052d25b73a565e385a09112dfb
|
data/Gemfile.lock
CHANGED
@@ -25,7 +25,13 @@ module Checkoff
|
|
25
25
|
# @param project_hash [Hash]
|
26
26
|
# @return [void]
|
27
27
|
def unwrap_custom_fields(project_hash)
|
28
|
-
|
28
|
+
# @sg-ignore
|
29
|
+
# @type [Array<Hash>,nil]
|
30
|
+
custom_fields = project_hash.fetch('custom_fields', nil)
|
31
|
+
|
32
|
+
return if custom_fields.nil?
|
33
|
+
|
34
|
+
unwrapped_custom_fields = custom_fields.group_by do |cf|
|
29
35
|
cf['name']
|
30
36
|
end.transform_values(&:first)
|
31
37
|
project_hash['unwrapped']['custom_fields'] = unwrapped_custom_fields
|
@@ -33,7 +33,13 @@ module Checkoff
|
|
33
33
|
# @param task_hash [Hash]
|
34
34
|
# @return [void]
|
35
35
|
def unwrap_custom_fields(task_hash)
|
36
|
-
|
36
|
+
# @sg-ignore
|
37
|
+
# @type [Array<Hash>,nil]
|
38
|
+
custom_fields = task_hash.fetch('custom_fields', nil)
|
39
|
+
|
40
|
+
return if custom_fields.nil?
|
41
|
+
|
42
|
+
unwrapped_custom_fields = custom_fields.group_by do |cf|
|
37
43
|
cf['name']
|
38
44
|
end.transform_values(&:first)
|
39
45
|
task_hash['unwrapped']['custom_fields'] = unwrapped_custom_fields
|
data/lib/checkoff/portfolios.rb
CHANGED
@@ -7,6 +7,7 @@ require 'cache_method'
|
|
7
7
|
require_relative 'internal/config_loader'
|
8
8
|
require_relative 'workspaces'
|
9
9
|
require_relative 'clients'
|
10
|
+
require_relative 'projects'
|
10
11
|
|
11
12
|
# https://developers.asana.com/reference/portfolios
|
12
13
|
|
@@ -27,12 +28,15 @@ module Checkoff
|
|
27
28
|
# @param workspaces [Checkoff::Workspaces]
|
28
29
|
# @param clients [Checkoff::Clients]
|
29
30
|
# @param client [Asana::Client]
|
31
|
+
# @param projects [Checkoff::Projects]
|
30
32
|
def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana),
|
31
33
|
clients: Checkoff::Clients.new(config: config),
|
32
34
|
client: clients.client,
|
35
|
+
projects: Checkoff::Projects.new(config: config, client: client),
|
33
36
|
workspaces: Checkoff::Workspaces.new(config: config, client: client))
|
34
37
|
@workspaces = workspaces
|
35
38
|
@client = client
|
39
|
+
@projects = projects
|
36
40
|
end
|
37
41
|
|
38
42
|
# @param workspace_name [String]
|
@@ -95,10 +99,7 @@ module Checkoff
|
|
95
99
|
#
|
96
100
|
# @return [Enumerable<Asana::Resources::Project>]
|
97
101
|
def projects_in_portfolio_obj(portfolio, extra_project_fields: [])
|
98
|
-
options =
|
99
|
-
fields: ['name'],
|
100
|
-
}
|
101
|
-
options[:fields] += extra_project_fields
|
102
|
+
options = projects.project_options(extra_project_fields: extra_project_fields)
|
102
103
|
client.portfolios.get_items_for_portfolio(portfolio_gid: portfolio.gid, options: options)
|
103
104
|
end
|
104
105
|
|
@@ -107,6 +108,9 @@ module Checkoff
|
|
107
108
|
# @return [Checkoff::Workspaces]
|
108
109
|
attr_reader :workspaces
|
109
110
|
|
111
|
+
# @return [Checkoff::Projects]
|
112
|
+
attr_reader :projects
|
113
|
+
|
110
114
|
# @return [Asana::Client]
|
111
115
|
attr_reader :client
|
112
116
|
|
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.
|
4
|
+
version: 0.198.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|