checkoff 0.39.0 → 0.39.1

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: d4aa495392c511216d69ccb2d8ba6fa8efa6fb6a2466fad23dca9f8ee89ff9fa
4
- data.tar.gz: 0a48cd6720b49c8b7988ad8469f5b6ca3b89a5a2abeff47855386560a495c007
3
+ metadata.gz: dde98e951a53086231de929b8eab46e11ab7056e853879da48363a17e36c9404
4
+ data.tar.gz: c3e8bd5a59452d1e3cbaa5776b1b36b9ea9097062cee836dbc54b42c2b400e36
5
5
  SHA512:
6
- metadata.gz: 7c9535b045a9a35fd7a5df91d01f843d001c1f51761a638d50474c6437aa75781871d9afecb85664eb90a35e06a9b5be4511f8a943ca9928ab042c30fc7881e1
7
- data.tar.gz: 03ced5118890e61a65defd98e65cc3cde499861959da931287e6430cb3dc024215157584d45307269dd2fd0428f39bff54958d503520c7b5f823ad2de25c5d38
6
+ metadata.gz: 9c673008ef9a2985c5ffa0b22bbda49199c4b072bd6c90c2642bf318d5a1fa455b85677016e046cd0f10aada9cff0507f1ba4b53317d5407a13c746e8a625247
7
+ data.tar.gz: f1eba99cad086db81ba4b69a28cefd754ac4c98d3a9016ed191e065481011b5971194be2c80a303d55daa48c195ef4506d7ae3c364719cc707faab05c259e1b5
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.39.0)
15
+ checkoff (0.39.1)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -74,7 +74,7 @@ GEM
74
74
  multi_json
75
75
  gli (2.21.0)
76
76
  hashdiff (1.0.1)
77
- i18n (1.13.0)
77
+ i18n (1.14.0)
78
78
  concurrent-ruby (~> 1.0)
79
79
  imagen (0.1.8)
80
80
  parser (>= 2.5, != 2.5.1.1)
@@ -39,6 +39,10 @@ module Checkoff
39
39
 
40
40
  # Given a workspace name and project name, then provide a Hash of
41
41
  # tasks with section name -> task list of the uncompleted tasks
42
+ # @param workspace_name [String]
43
+ # @param project_name [String, Symbol]
44
+ # @param extra_fields [Array<String>]
45
+ # @return [Hash{[String, nil] => Array<Asana::Resources::Task>}]
42
46
  def tasks_by_section(workspace_name, project_name, extra_fields: [])
43
47
  project = project_or_raise(workspace_name, project_name)
44
48
  if project_name == :my_tasks
@@ -64,6 +68,10 @@ module Checkoff
64
68
  cache_method :tasks, SHORT_CACHE_TIME
65
69
 
66
70
  # Pulls just names of tasks from a given section.
71
+ # @param workspace_name [String]
72
+ # @param project_name [String, Symbol]
73
+ # @param section_name [String, nil]
74
+ # @return [Array<String>]
67
75
  def section_task_names(workspace_name, project_name, section_name)
68
76
  tasks = tasks(workspace_name, project_name, section_name)
69
77
  tasks.map(&:name)
@@ -88,6 +96,8 @@ module Checkoff
88
96
 
89
97
  # Given a project object, pull all tasks, then provide a Hash of
90
98
  # tasks with section name -> task list of the uncompleted tasks
99
+ # @param project [Asana::Resources::Project]
100
+ # @return [Hash<[String,nil], Array<Asana::Resources::Task>>]
91
101
  def tasks_by_section_for_project(project, extra_fields: [])
92
102
  raw_tasks = projects.tasks_from_project(project, extra_fields: extra_fields)
93
103
  active_tasks = projects.active_tasks(raw_tasks)
@@ -102,6 +112,9 @@ module Checkoff
102
112
  end
103
113
 
104
114
  # Given a list of tasks, pull a Hash of tasks with section name -> task list
115
+ # @param tasks [Array<Asana::Resources::Task>]
116
+ # @param project_gid [String]
117
+ # @return [Hash<[String,nil], Array<Asana::Resources::Task>>]
105
118
  def by_section(tasks, project_gid)
106
119
  by_section = {}
107
120
  sections = client.sections.get_sections_for_project(project_gid: project_gid)
@@ -27,6 +27,8 @@ module Checkoff
27
27
  end
28
28
 
29
29
  # pulls a Hash of subtasks broken out by section
30
+ # @param tasks [Array<Asana::Resources::Task>]
31
+ # @return [Hash<[nil,String], Array<Asana::Resources::Task>>]
30
32
  def by_section(tasks)
31
33
  current_section = nil
32
34
  by_section = { nil => [] }
@@ -14,7 +14,6 @@ require_relative 'tasks'
14
14
  module Checkoff
15
15
  # Filter lists of tasks using declarative selectors.
16
16
  class TaskSelectors
17
- # @type [Integer]
18
17
  MINUTE = 60
19
18
  HOUR = MINUTE * 60
20
19
  DAY = 24 * HOUR
@@ -30,8 +29,10 @@ module Checkoff
30
29
  @tasks = tasks
31
30
  end
32
31
 
32
+ # @param [Asana::Resources::Task] task
33
33
  # @param [Hash<Symbol, Object>] task_selector Filter based on
34
34
  # description. Examples: {tag: 'foo'} {:not {tag: 'foo'} (:tag 'foo')
35
+ # @return [Boolean]
35
36
  def filter_via_task_selector(task, task_selector)
36
37
  evaluator = TaskSelectorEvaluator.new(task: task, tasks: tasks)
37
38
  evaluator.evaluate(task_selector)
@@ -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.39.0'
6
+ VERSION = '0.39.1'
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.39.0
4
+ version: 0.39.1
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-05-29 00:00:00.000000000 Z
11
+ date: 2023-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport