checkoff 0.156.0 → 0.157.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7e1681e39cd8f9271a9314abcf687982bf375b762d3c64cf5e7c43f3b61b589
4
- data.tar.gz: 2fe95b6c69f11f2b545afae74e8c7983773b229045cdcbdb7bb98557466f31c6
3
+ metadata.gz: 87c0b892ddeb1ba74e3d3903131b8c07178a53ab6f202eeaeb628e064b6b3b69
4
+ data.tar.gz: 9d66bf594da9b4e50f177ad9d2ee86e29fd22daff64eaad423bb349148c58c91
5
5
  SHA512:
6
- metadata.gz: a6197bbbe0a690f572f2776111b0be018d26848a926c5d7b801d310c2101f6c2f96bd557b925f24de57990b7aed1a66630f7fbee9c52951514d95672cde3d811
7
- data.tar.gz: e23898385246ac5ff3c2c331d2e87b76ba6d1e081d7adec40c8b26646bb9b42866de6ba84247e1ba2d4ca89a054be4fe44ea9494cce96a019d99e291fd6279f2
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.156.0)
15
+ checkoff (0.157.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -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
@@ -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.156.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.156.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-14 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