checkoff 0.132.0 → 0.133.0

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: 8a15de58445eeb2a8825341add1da6ab709ddd7f588e6d7dd7677e225143c9be
4
- data.tar.gz: d1a927d6e93ab96e0057be99046ed237858b12b74ce858cdd7c76b6596a0108d
3
+ metadata.gz: 7939d56faf627c0cf1df999033e52d4af51ba20415ead6d0ad7851e9068db682
4
+ data.tar.gz: 6b48464946d3ec56a5d5da6dfcafa8aef58ad971e2a75288ada658a102a95e47
5
5
  SHA512:
6
- metadata.gz: 51ca950b44ff215eebf8cd7756b2a527952de5aba760f7e9bec5df6ba5d255cded0b67b00cac2add5b2f08a87955543b7ef9c9b83a0f7718d2e69599d85a9d4b
7
- data.tar.gz: b75ec0c19e1464bff3373f6e87bab3da5f5d867e514db516b461590b1a4aa4f7a7a8b4d786fb140cb4e9fe1c800569070854cdbda75956bb0b212aaae6401f24
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.132.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.1.1)
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.1.1)
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.1.2)
123
+ mutex_m (0.2.0)
124
124
  nokogiri (1.15.2)
125
125
  mini_portile2 (~> 2.8.2)
126
126
  racc (~> 1.4)
@@ -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
- path = "/workspaces/#{workspace.gid}/tasks/search"
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
 
@@ -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.132.0'
6
+ VERSION = '0.133.0'
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.132.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-07 00:00:00.000000000 Z
11
+ date: 2023-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport