foreman-tasks 0.15.10 → 0.15.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/lib/actions/bulk_action.rb +1 -1
- data/lib/foreman_tasks/version.rb +1 -1
- data/test/unit/actions/bulk_action_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: 4df371b5aa1cfdad4ad156735395fab15e6542eba6418d53985c8181e12ad5ea
|
4
|
+
data.tar.gz: 14a678308db6edb2aabcb753400cf33b8f00a820170f2613e40ef63ae6462580
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c665d42181bf30b86106da534c3cbb644a11fdc289af03c7dff951999991c952fdd99b2dc18caead3d525f3dbe46952b770dab17a0b944662de62309fd160be5
|
7
|
+
data.tar.gz: 991d4ededda66b5ae4ef7320febaa856300b7e512110893adc661c38df3e080e18889d880c849fcb5dd1791bf70063efa18ab5860a0f761756920a37b5804e8f
|
@@ -46,7 +46,7 @@ module Actions
|
|
46
46
|
def create_sub_plans
|
47
47
|
action_class = input[:action_class].constantize
|
48
48
|
target_class = input[:target_class].constantize
|
49
|
-
targets = target_class.where(:id => current_batch)
|
49
|
+
targets = target_class.unscoped.where(:id => current_batch)
|
50
50
|
|
51
51
|
missing = Array.new((current_batch - targets.map(&:id)).count) { nil }
|
52
52
|
|
@@ -28,6 +28,7 @@ module ForemanTasks
|
|
28
28
|
end
|
29
29
|
|
30
30
|
specify 'it plans a task for each target' do
|
31
|
+
Target.expects(:unscoped).returns(Target)
|
31
32
|
Target.expects(:where).with(:id => targets.map(&:id)).returns(targets)
|
32
33
|
|
33
34
|
task.sub_tasks.count.must_equal targets.count
|
@@ -37,6 +38,7 @@ module ForemanTasks
|
|
37
38
|
end
|
38
39
|
|
39
40
|
specify 'it plans a task for each target even if target cannot be found' do
|
41
|
+
Target.expects(:unscoped).returns(Target)
|
40
42
|
Target.expects(:where).with(:id => targets.map(&:id)).returns(targets.take(4))
|
41
43
|
|
42
44
|
task.sub_tasks.count.must_equal targets.count
|
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: 0.15.
|
4
|
+
version: 0.15.11
|
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: 2019-09-
|
11
|
+
date: 2019-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks-core
|