foreman-tasks 3.0.4 → 3.0.5
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/app/models/foreman_tasks/task/search.rb +1 -0
- data/lib/foreman_tasks/version.rb +1 -1
- data/test/unit/task_test.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e389326a8086026cc0359932b9d3a3c0c13621f9f0cb60e682d785ecbacddcc
|
4
|
+
data.tar.gz: '0880da8a4cd833615fe5aa9b79aab13a5dcf1df0f84aea891a2490c6f7a342ba'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15589c91365b2f7f0f14b38d000575048c2c9e316430eb1564357fd7aee02b9af275155e7021cc69bffc55e8eb46d83445554a46f615d703d6e5da52912a4a94
|
7
|
+
data.tar.gz: b5083cad3c0268b6c461574f7f9c86887bb395a85ec6cd41dd15d2816c07961bee099fc5e4d926029c1e57802c41852a4768c5c68674d26a8822e900ef879b59
|
@@ -21,6 +21,7 @@ module ForemanTasks
|
|
21
21
|
SQL
|
22
22
|
# Select only those tasks which either have the correct taxonomy or are not related to any
|
23
23
|
sql = "foreman_tasks_locks_taxonomy#{uniq_suffix}.resource_id #{operator} (?) OR foreman_tasks_locks_taxonomy#{uniq_suffix}.resource_id IS NULL"
|
24
|
+
value = value.split(',') if operator.index(/IN/i)
|
24
25
|
{ :conditions => sanitize_sql_for_conditions([sql, value]), :joins => joins }
|
25
26
|
end
|
26
27
|
|
data/test/unit/task_test.rb
CHANGED
@@ -134,6 +134,8 @@ class TasksTest < ActiveSupport::TestCase
|
|
134
134
|
test 'can search by taxonomies using IN' do
|
135
135
|
assert_nothing_raised(PG::SyntaxError) { ForemanTasks::Task.search_for('location_id ^ (1)').first }
|
136
136
|
assert_nothing_raised(PG::SyntaxError) { ForemanTasks::Task.search_for('organization_id ^ (1)').first }
|
137
|
+
assert_nothing_raised(PG::SyntaxError) { ForemanTasks::Task.search_for('location_id ^ (1,2)').first }
|
138
|
+
assert_nothing_raised(PG::SyntaxError) { ForemanTasks::Task.search_for('organization_id ^ (1,2)').first }
|
137
139
|
assert_nothing_raised(PG::SyntaxError) { ForemanTasks::Task.search_for('organization_id = 1').first }
|
138
140
|
end
|
139
141
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02
|
11
|
+
date: 2021-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dynflow
|