checkoff 0.138.0 → 0.139.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/checkoff/sections.rb +11 -5
- data/lib/checkoff/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62b3b8a6d0c4f413c114a5dae032f078c21db566333168896a02f9206f3d1c7a
|
4
|
+
data.tar.gz: 3611366f9bfb7be6556fc704ea69e5c50b8293ec463606d425e97f118e008298
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d646bcb803baff2c70873e6706d4fe7db2eb0ad20343efe85f839cf9d18716760cf1c1a95329deeb3bf773610589468d4ce645bc3c7c64f916be9e274474654
|
7
|
+
data.tar.gz: 488b3bc30fbabe4cfd721ad9b23061793dd6989eaea628c197d348ad6dd6084fb96e63e03af1da49ef932732cc11f630428622582a626f7968e62fabb0af4c4c
|
data/Gemfile.lock
CHANGED
data/lib/checkoff/sections.rb
CHANGED
@@ -147,13 +147,16 @@ module Checkoff
|
|
147
147
|
# @param workspace_name [String]
|
148
148
|
# @param project_name [String, Symbol]
|
149
149
|
# @param section_name [String, nil]
|
150
|
+
# @param extra_section_fields [Array<String>]
|
150
151
|
#
|
151
152
|
# @sg-ignore
|
152
153
|
# @return [Asana::Resources::Section]
|
153
|
-
def section_or_raise(workspace_name, project_name, section_name)
|
154
|
-
s = section(workspace_name, project_name, section_name
|
154
|
+
def section_or_raise(workspace_name, project_name, section_name, extra_section_fields: [])
|
155
|
+
s = section(workspace_name, project_name, section_name,
|
156
|
+
extra_section_fields: extra_section_fields)
|
155
157
|
if s.nil?
|
156
|
-
valid_sections = sections_or_raise(workspace_name, project_name
|
158
|
+
valid_sections = sections_or_raise(workspace_name, project_name,
|
159
|
+
extra_fields: extra_section_fields).map(&:name)
|
157
160
|
|
158
161
|
raise "Could not find section #{section_name.inspect} under project #{project_name.inspect} " \
|
159
162
|
"under workspace #{workspace_name.inspect}. Valid sections: #{valid_sections.inspect}"
|
@@ -279,9 +282,12 @@ module Checkoff
|
|
279
282
|
# @param workspace_name [String]
|
280
283
|
# @param project_name [String, Symbol]
|
281
284
|
# @param section_name [String, nil]
|
285
|
+
# @param extra_section_fields [Array<String>]
|
286
|
+
#
|
282
287
|
# @return [Asana::Resources::Section, nil]
|
283
|
-
def section(workspace_name, project_name, section_name)
|
284
|
-
sections = sections_or_raise(workspace_name, project_name
|
288
|
+
def section(workspace_name, project_name, section_name, extra_section_fields: [])
|
289
|
+
sections = sections_or_raise(workspace_name, project_name,
|
290
|
+
extra_fields: extra_section_fields)
|
285
291
|
sections.find { |section| section_key(section.name)&.chomp(':') == section_name&.chomp(':') }
|
286
292
|
end
|
287
293
|
end
|
data/lib/checkoff/version.rb
CHANGED