checkoff 0.60.0 → 0.61.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: 560f8d3dadb4f15e7b3329091bd82e301b23dd479f558e1a637a04aa8bc2067b
4
- data.tar.gz: bdfbe8d442602eaa15bb0c995677d88ad4897b8b8f068f04e087ca28ed02d255
3
+ metadata.gz: 9e011633f4a639594a0b4ea46cabc90841d2694197c09f6518225695b4e04701
4
+ data.tar.gz: cb8e3691a46709bc2d54aacae3e92f2e3e505f6431c9bb879411a4bffa7f155e
5
5
  SHA512:
6
- metadata.gz: 5044cbdbe5d31947c795bdf3ca9d90ab71614059779c1a3ac3a3c19430a227ca89a1ee9ff661b3c523eef9cc9b019843aae41c4240d321b91725efc7dacc1731
7
- data.tar.gz: ab7bf654fdd30941dfe00ad78351b6b5aa36275b36103b491954f953cf10a643a16d6895cb8c091db52b3586ea3fbe7c12f0be94beecd2498a83242a07d781ab
6
+ metadata.gz: a75b29b334eb70a0a1dfb188e8e2ec69c5883348099d5dded33c279caf0b589336705bf7efb302354e2a045b5ea860b70b8c432bf22d5d0d57b2f388a1757f0b
7
+ data.tar.gz: 1fe68b769a151ab2af8a5cd6e9502e0197af0a437bd9f48f1661f7b4e18200210920b5c81cd386c3ac13fb76feaec958617916621474ccbf00a96925d2719812
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.60.0)
15
+ checkoff (0.61.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -5,6 +5,29 @@ require_relative 'task/function_evaluator'
5
5
  module Checkoff
6
6
  module SelectorClasses
7
7
  module Task
8
+ # :section_name_starts_with? function
9
+ class SectionNameStartsWithPFunctionEvaluator < FunctionEvaluator
10
+ def matches?
11
+ fn?(selector, :section_name_starts_with?)
12
+ end
13
+
14
+ # @param _index [Integer]
15
+ def evaluate_arg?(_index)
16
+ false
17
+ end
18
+
19
+ # @sg-ignore
20
+ # @param task [Asana::Resources::Task]
21
+ # @param section_name_prefix [String]
22
+ # @return [Boolean]
23
+ def evaluate(task, section_name_prefix)
24
+ section_names = task.memberships.map do |membership|
25
+ membership.fetch('section').fetch('name')
26
+ end
27
+ section_names.any? { |section_name| section_name.start_with? section_name_prefix }
28
+ end
29
+ end
30
+
8
31
  # :in_section_named? function
9
32
  class InSectionNamedPFunctionEvaluator < FunctionEvaluator
10
33
  def matches?
@@ -18,7 +41,7 @@ module Checkoff
18
41
 
19
42
  # @sg-ignore
20
43
  # @param task [Asana::Resources::Task]
21
- # @param tag_name [String]
44
+ # @param section_name [String]
22
45
  # @return [Boolean]
23
46
  def evaluate(task, section_name)
24
47
  section_names = task.memberships.map do |membership|
@@ -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.60.0'
6
+ VERSION = '0.61.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.60.0
4
+ version: 0.61.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-10-05 00:00:00.000000000 Z
11
+ date: 2023-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport