checkoff 0.131.0 → 0.133.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -0
- data/Gemfile.lock +4 -4
- data/lib/checkoff/monkeypatches/resource_marshalling.rb +5 -1
- data/lib/checkoff/task_searches.rb +27 -2
- 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: 7939d56faf627c0cf1df999033e52d4af51ba20415ead6d0ad7851e9068db682
|
4
|
+
data.tar.gz: 6b48464946d3ec56a5d5da6dfcafa8aef58ad971e2a75288ada658a102a95e47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48eec1f70323b78b165435b238ce25b0faaac5fcbc76fd0de68b0f8e30c34ce5fb1cb690093685be3ac0c39abb1df9c3c141a3a437c972e45dc11738b4e9e7a6
|
7
|
+
data.tar.gz: 6eba3315a48d7608a1cdd0a2626685eb9f29dc7bb1b02464e76224769deb876ff123dfb88203fef8c75f2dc216e481f0bc79559a35ebb35b3c2ae0523fd96567
|
data/.circleci/config.yml
CHANGED
@@ -119,6 +119,8 @@ jobs:
|
|
119
119
|
- run_with_languages:
|
120
120
|
label: Make RubyGems release
|
121
121
|
command: |
|
122
|
+
set -x
|
123
|
+
|
122
124
|
# Coax overcommit into working
|
123
125
|
git config --global user.email "test@test.test"
|
124
126
|
git config --global user.name "Test Test"
|
@@ -127,6 +129,7 @@ jobs:
|
|
127
129
|
|
128
130
|
git status
|
129
131
|
bundle exec bump --commit-message ' [skip ci]' --tag --tag-prefix=v minor
|
132
|
+
bundle install
|
130
133
|
# bundle exec needed for overcommit hooks
|
131
134
|
#
|
132
135
|
# if this step fails, check that
|
data/Gemfile.lock
CHANGED
@@ -12,7 +12,7 @@ GIT
|
|
12
12
|
PATH
|
13
13
|
remote: .
|
14
14
|
specs:
|
15
|
-
checkoff (0.
|
15
|
+
checkoff (0.133.0)
|
16
16
|
activesupport
|
17
17
|
asana (> 0.10.0)
|
18
18
|
cache_method
|
@@ -37,7 +37,7 @@ GEM
|
|
37
37
|
ansi (1.5.0)
|
38
38
|
ast (2.4.2)
|
39
39
|
backport (1.2.0)
|
40
|
-
base64 (0.
|
40
|
+
base64 (0.2.0)
|
41
41
|
benchmark (0.2.1)
|
42
42
|
bigdecimal (3.1.4)
|
43
43
|
builder (3.2.4)
|
@@ -56,7 +56,7 @@ GEM
|
|
56
56
|
dalli (3.2.6)
|
57
57
|
diff-lcs (1.5.0)
|
58
58
|
docile (1.4.0)
|
59
|
-
drb (2.
|
59
|
+
drb (2.2.0)
|
60
60
|
ruby2_keywords
|
61
61
|
e2mmap (0.1.0)
|
62
62
|
fakeweb (1.3.0)
|
@@ -120,7 +120,7 @@ GEM
|
|
120
120
|
multi_json (1.15.0)
|
121
121
|
multi_xml (0.6.0)
|
122
122
|
multipart-post (2.1.1)
|
123
|
-
mutex_m (0.
|
123
|
+
mutex_m (0.2.0)
|
124
124
|
nokogiri (1.15.2)
|
125
125
|
mini_portile2 (~> 2.8.2)
|
126
126
|
racc (~> 1.4)
|
@@ -21,13 +21,17 @@ module Asana
|
|
21
21
|
class Resource
|
22
22
|
# @return [Hash]
|
23
23
|
def marshal_dump
|
24
|
-
{ 'data' => @_data
|
24
|
+
{ 'data' => @_data,
|
25
|
+
'client' => @_client }
|
25
26
|
end
|
26
27
|
|
27
28
|
# @param data [Hash]
|
28
29
|
#
|
29
30
|
# @return [void]
|
30
31
|
def marshal_load(data)
|
32
|
+
# @sg-ignore
|
33
|
+
# @type [Asana::Client]
|
34
|
+
@_client = data.fetch('client')
|
31
35
|
# @sg-ignore
|
32
36
|
# @type [Hash]
|
33
37
|
@_data = data.fetch('data')
|
@@ -54,15 +54,41 @@ module Checkoff
|
|
54
54
|
@asana_resources_collection_class = asana_resources_collection_class
|
55
55
|
end
|
56
56
|
|
57
|
+
# Perform an equivalent search API to an Asana search URL in the
|
58
|
+
# web UI. Not all URL parameters are supported; each one must be
|
59
|
+
# added here manually. In addition, not all are supported in the
|
60
|
+
# Asana API in a compatible way, so they may result in more tasks
|
61
|
+
# being fetched than actually returned as filtering is done
|
62
|
+
# manually.
|
63
|
+
#
|
57
64
|
# @param [String] workspace_name
|
58
65
|
# @param [String] url
|
59
66
|
# @param [Array<String>] extra_fields
|
67
|
+
#
|
60
68
|
# @return [Enumerable<Asana::Resources::Task>]
|
61
69
|
def task_search(workspace_name, url, extra_fields: [])
|
62
70
|
workspace = workspaces.workspace_or_raise(workspace_name)
|
63
71
|
# @sg-ignore
|
64
72
|
api_params, task_selector = @search_url_parser.convert_params(url)
|
65
|
-
|
73
|
+
raw_task_search(api_params, workspace_gid: workspace.gid, task_selector: task_selector,
|
74
|
+
extra_fields: extra_fields)
|
75
|
+
end
|
76
|
+
cache_method :task_search, LONG_CACHE_TIME
|
77
|
+
|
78
|
+
# Perform a search using the Asana Task Search API:
|
79
|
+
#
|
80
|
+
# https://developers.asana.com/reference/searchtasksforworkspace
|
81
|
+
#
|
82
|
+
# @param [Hash<Symbol, Object>] api_params
|
83
|
+
# @param [String] workspace_gid
|
84
|
+
# @param [String] url
|
85
|
+
# @param [Array<String>] extra_fields
|
86
|
+
# @param [Array] task_selector
|
87
|
+
#
|
88
|
+
# @return [Enumerable<Asana::Resources::Task>]
|
89
|
+
def raw_task_search(api_params, workspace_gid:, extra_fields: [], task_selector: [])
|
90
|
+
# @sg-ignore
|
91
|
+
path = "/workspaces/#{workspace_gid}/tasks/search"
|
66
92
|
options = calculate_api_options(extra_fields)
|
67
93
|
tasks = @asana_resources_collection_class.new(parse(client.get(path,
|
68
94
|
params: api_params,
|
@@ -71,7 +97,6 @@ module Checkoff
|
|
71
97
|
client: client)
|
72
98
|
tasks.select { |task| task_selectors.filter_via_task_selector(task, task_selector) }
|
73
99
|
end
|
74
|
-
cache_method :task_search, LONG_CACHE_TIME
|
75
100
|
|
76
101
|
private
|
77
102
|
|
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.133.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: 2023-11-
|
11
|
+
date: 2023-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|