checkoff 0.155.0 → 0.157.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: 003a02adf378578fc1201a1794388d078e94fde1351c8bbde14dbcb20535fa35
4
- data.tar.gz: 92786995a858bdd10cf9703aa8735f0ce44d003ef4361064a0dde6b6cb2f6adc
3
+ metadata.gz: 87c0b892ddeb1ba74e3d3903131b8c07178a53ab6f202eeaeb628e064b6b3b69
4
+ data.tar.gz: 9d66bf594da9b4e50f177ad9d2ee86e29fd22daff64eaad423bb349148c58c91
5
5
  SHA512:
6
- metadata.gz: fe8555e631f96ba713fd5ebd4c1638481a08a75beffffae1ea24988144e885fbf9b488503b28fe53c93d8c77473c68229c92542744a7ec5ad618db990e68d110
7
- data.tar.gz: 48ddc9ef0cf88384d7c5c3cc7079ddfa037a60446f5741b52229df7cd8973dbdbbb641b08af57d501a89518ddc2629a1f10ec037a340cb943da212d780ad744c
6
+ metadata.gz: 191ea179fc32fc8b21a8d11db72659f5b365ea4346d8f529386c53aac0142f0a5cb8bf7a71d7e0f53b04ae61eda9d9515173fbf4e6e724c87c835084585fb1fe
7
+ data.tar.gz: 215b4747ea847ed2522fbb849caa8b0a283c6069b345126dea90b0d04931640532fc0ac4dccc3b0ec9c3258e5c986abd5b60427237801837e325459537194173
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.155.0)
15
+ checkoff (0.157.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -32,14 +32,14 @@ GEM
32
32
  minitest (>= 5.1)
33
33
  mutex_m
34
34
  tzinfo (~> 2.0)
35
- addressable (2.8.5)
35
+ addressable (2.8.6)
36
36
  public_suffix (>= 2.0.2, < 6.0)
37
37
  ansi (1.5.0)
38
38
  ast (2.4.2)
39
39
  backport (1.2.0)
40
40
  base64 (0.2.0)
41
41
  benchmark (0.3.0)
42
- bigdecimal (3.1.4)
42
+ bigdecimal (3.1.5)
43
43
  builder (3.2.4)
44
44
  bump (0.10.0)
45
45
  cache (0.4.1)
@@ -163,7 +163,7 @@ GEM
163
163
  reverse_markdown (2.1.1)
164
164
  nokogiri
165
165
  rexml (3.2.6)
166
- rubocop (1.58.0)
166
+ rubocop (1.59.0)
167
167
  json (~> 2.3)
168
168
  language_server-protocol (>= 3.17.0)
169
169
  parallel (~> 1.10)
@@ -111,21 +111,39 @@ module Checkoff
111
111
  tasks.select { |task| task.completed_at.nil? }
112
112
  end
113
113
 
114
- # pull task objects from a named project
114
+ # Pull task objects from a named project
115
+ #
115
116
  # @param [Asana::Resources::Project] project
116
117
  # @param [Boolean] only_uncompleted
117
118
  # @param [Array<String>] extra_fields
119
+ #
118
120
  # @return [Enumerable<Asana::Resources::Task>]
119
121
  def tasks_from_project(project,
120
122
  only_uncompleted: true,
121
123
  extra_fields: [])
124
+ tasks_from_project_gid(project.gid,
125
+ only_uncompleted: only_uncompleted,
126
+ extra_fields: extra_fields)
127
+ end
128
+ cache_method :tasks_from_project, SHORT_CACHE_TIME
129
+
130
+ # Pull task objects from a project identified by a gid
131
+ #
132
+ # @param [String] project_gid
133
+ # @param [Boolean] only_uncompleted
134
+ # @param [Array<String>] extra_fields
135
+ #
136
+ # @return [Enumerable<Asana::Resources::Task>]
137
+ def tasks_from_project_gid(project_gid,
138
+ only_uncompleted: true,
139
+ extra_fields: [])
122
140
  options = task_options
123
141
  options[:completed_since] = '9999-12-01' if only_uncompleted
124
- options[:project] = project.gid
142
+ options[:project] = project_gid
125
143
  options[:options][:fields] += extra_fields
126
144
  client.tasks.find_all(**options)
127
145
  end
128
- cache_method :tasks_from_project, SHORT_CACHE_TIME
146
+ cache_method :tasks_from_project_gid, SHORT_CACHE_TIME
129
147
 
130
148
  # @param [String] workspace_name
131
149
  # @param [Array<String>] extra_fields
@@ -178,7 +178,7 @@ module Checkoff
178
178
  date_or_time
179
179
  end
180
180
  out = date > start_date && date <= end_date
181
- logger.debug do
181
+ finer do
182
182
  "Checkoff::Timing#between_relative_days?(#{date_or_time.inspect} " \
183
183
  "(as date: #{date.inspect}) " \
184
184
  "#{beginning_num_days_from_now.inspect}, #{end_num_days_from_now.inspect}) " \
@@ -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.155.0'
6
+ VERSION = '0.157.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.155.0
4
+ version: 0.157.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-12-11 00:00:00.000000000 Z
11
+ date: 2023-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport