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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c59c8e933514a6d3ca2f5f0cfa17da2335c24d1821aa9a9d96c8abcf0a935fe7
4
- data.tar.gz: 3d7b88cdd625b8ac450b5f36dec1de26374c8a2b265e49c779e581ffc93cef48
3
+ metadata.gz: 4df371b5aa1cfdad4ad156735395fab15e6542eba6418d53985c8181e12ad5ea
4
+ data.tar.gz: 14a678308db6edb2aabcb753400cf33b8f00a820170f2613e40ef63ae6462580
5
5
  SHA512:
6
- metadata.gz: acd6a37cd6260beece7fc8729b6aa91d40c4b9fff1c8f64620a84ca67cf528e7dcefffc132e010076da9d8083f4da4863753a1eb1b9eaaa10bc8f60d18655d2a
7
- data.tar.gz: 4e7aa88a764c0716b28396479cc9c82fdfbf9c00ec4f66576bff55ebc42a630c9814ee7a8528d399c56b10ce297ea662e861cf836a97f5be52bc3d3fd44cd89e
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
 
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = '0.15.10'.freeze
2
+ VERSION = '0.15.11'.freeze
3
3
  end
@@ -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.10
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-10 00:00:00.000000000 Z
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