checkoff 0.22.0 → 0.23.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53900365a6e35f146515f3a6043bb12907a67cefa1d0fd86f92b90e700946946
|
4
|
+
data.tar.gz: 57ccc5292ae4f07fe278697c7377d6187859c5a0b1b0be6b301ca945a18579eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f08fb1c0242675a728cf58151c4e9a990cd8bf961fd75ce7e01b154c39e759b557289651ff16033599809f1df251d4bbed45f02c07cb37aa70e7abfb8e714169
|
7
|
+
data.tar.gz: 248aa5d50f3245dc1af18f4afcef40194d32a57deeb12bec0444965bacbdef523a4a60dda7f473a09deaa8ef1b8a1d499c2d434a02ac83bad41d9c6cd39ebc4b
|
data/Gemfile.lock
CHANGED
@@ -48,6 +48,7 @@ module Checkoff
|
|
48
48
|
'no_value' => CustomFieldVariant::NoValue,
|
49
49
|
'is_not' => CustomFieldVariant::IsNot,
|
50
50
|
'less_than' => CustomFieldVariant::LessThan,
|
51
|
+
'greater_than' => CustomFieldVariant::GreaterThan,
|
51
52
|
}.freeze
|
52
53
|
|
53
54
|
def convert_single_custom_field_params(gid, single_custom_field_params)
|
@@ -14,34 +14,40 @@ module Checkoff
|
|
14
14
|
private
|
15
15
|
|
16
16
|
attr_reader :gid, :remaining_params
|
17
|
-
end
|
18
17
|
|
19
|
-
|
20
|
-
class LessThan < CustomFieldVariant
|
21
|
-
def convert
|
22
|
-
max_param = "custom_field_#{gid}.max"
|
18
|
+
def fetch_solo_param(param_name)
|
23
19
|
case remaining_params.keys
|
24
|
-
when [
|
25
|
-
|
20
|
+
when [param_name]
|
21
|
+
param_values = remaining_params.fetch(param_name)
|
22
|
+
unless param_values.length == 1
|
23
|
+
raise "Teach me how to handle these remaining keys for #{param_name}: #{remaining_params}"
|
24
|
+
end
|
25
|
+
|
26
|
+
param_values[0]
|
26
27
|
else
|
27
28
|
raise "Teach me how to handle #{remaining_params}"
|
28
29
|
end
|
29
30
|
end
|
31
|
+
end
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
-
def
|
34
|
-
|
35
|
-
unless max_values.length == 1
|
36
|
-
raise "Teach me how to handle these remaining keys for #{max_param}: #{remaining_params}"
|
37
|
-
end
|
38
|
-
|
39
|
-
max_value = max_values[0]
|
33
|
+
# custom_field_#{gid}.variant = 'less_than'
|
34
|
+
class LessThan < CustomFieldVariant
|
35
|
+
def convert
|
36
|
+
max_value = fetch_solo_param("custom_field_#{gid}.max")
|
40
37
|
empty_task_selector = []
|
41
38
|
[{ "custom_fields.#{gid}.less_than" => max_value }, empty_task_selector]
|
42
39
|
end
|
43
40
|
end
|
44
41
|
|
42
|
+
# custom_field_#{gid}.variant = 'greater_than'
|
43
|
+
class GreaterThan < CustomFieldVariant
|
44
|
+
def convert
|
45
|
+
max_value = fetch_solo_param("custom_field_#{gid}.min")
|
46
|
+
empty_task_selector = []
|
47
|
+
[{ "custom_fields.#{gid}.greater_than" => max_value }, empty_task_selector]
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
45
51
|
# custom_field_#{gid}.variant = 'is_not'
|
46
52
|
class IsNot < CustomFieldVariant
|
47
53
|
def convert
|
data/lib/checkoff/version.rb
CHANGED
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.
|
4
|
+
version: 0.23.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-01-
|
11
|
+
date: 2023-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|