bolt 0.21.3 → 0.21.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bolt might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/exe/bolt-inventory-pdb +8 -2
- data/lib/bolt/applicator.rb +89 -11
- data/lib/bolt/bolt_option_parser.rb +18 -3
- data/lib/bolt/boltdir.rb +42 -0
- data/lib/bolt/catalog.rb +7 -52
- data/lib/bolt/catalog/compiler.rb +48 -0
- data/lib/bolt/catalog/logging.rb +15 -0
- data/lib/bolt/cli.rb +146 -85
- data/lib/bolt/config.rb +121 -156
- data/lib/bolt/error.rb +25 -2
- data/lib/bolt/executor.rb +3 -4
- data/lib/bolt/inventory.rb +3 -3
- data/lib/bolt/logger.rb +3 -3
- data/lib/bolt/outputter/human.rb +10 -0
- data/lib/bolt/outputter/json.rb +6 -0
- data/lib/bolt/pal.rb +10 -11
- data/lib/bolt/pal/logging.rb +3 -14
- data/lib/bolt/puppetdb/client.rb +7 -27
- data/lib/bolt/puppetdb/config.rb +50 -23
- data/lib/bolt/r10k_log_proxy.rb +30 -0
- data/lib/bolt/util.rb +2 -2
- data/lib/bolt/util/puppet_log_level.rb +20 -0
- data/lib/bolt/version.rb +1 -1
- data/lib/bolt_ext/puppetdb_inventory.rb +3 -9
- data/lib/bolt_spec/plans.rb +174 -0
- data/lib/bolt_spec/plans/mock_executor.rb +217 -0
- metadata +23 -3
- data/lib/bolt/util/on_access.rb +0 -26
data/lib/bolt/util/on_access.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module Util
|
5
|
-
class OnAccess
|
6
|
-
def initialize(&block)
|
7
|
-
@constructor = block
|
8
|
-
@obj = nil
|
9
|
-
end
|
10
|
-
|
11
|
-
# If a method is called and we haven't constructed the object,
|
12
|
-
# construct it. Then pass the call to the object.
|
13
|
-
# rubocop:disable Style/MethodMissingSuper
|
14
|
-
# rubocop:disable Style/MissingRespondToMissing
|
15
|
-
def method_missing(method, *args, &block)
|
16
|
-
if @obj.nil?
|
17
|
-
@obj = @constructor.call
|
18
|
-
end
|
19
|
-
|
20
|
-
@obj.send(method, *args, &block)
|
21
|
-
end
|
22
|
-
# rubocop:enable Style/MethodMissingSuper
|
23
|
-
# rubocop:enable Style/MissingRespondToMissing
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|