kafo 7.2.0 → 7.4.0
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/Rakefile +6 -5
- data/lib/kafo/data_type_parser.rb +19 -2
- data/lib/kafo/kafo_configure.rb +2 -2
- data/lib/kafo/param.rb +1 -1
- data/lib/kafo/progress_bar.rb +1 -1
- data/lib/kafo/version.rb +1 -1
- data/modules/kafo_configure/metadata.json +1 -1
- 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: 2d04f6f1cc8a7839323067b6cf40b090fe57a19674c73aa9571e95e8f93521d3
|
4
|
+
data.tar.gz: d0274c02639fe01e19aa6ef79fcd5e86cd29f45b8b8f28461c59a192559a21b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df7b79c1ab6245d04018b0890ea04db6e6e6585fd05ca75ac6782d81b35078b3e0043c60ab86a4072f727440b904ca706e2daf2083858b50fa3eb1e2c4956acf
|
7
|
+
data.tar.gz: 8b2fcefa6a4bf7789b4fcd081a10630ace85c2901f94e9f2dd7778f7e32c45273d195383e387e57ff36f83dcfe0176d7d263adb02693937f1319da7bd9ac3c8b
|
data/Rakefile
CHANGED
@@ -31,11 +31,12 @@ namespace 'test' do
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
require 'rubocop/rake_task'
|
35
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
36
|
+
# These make the rubocop experience maybe slightly less terrible
|
37
|
+
task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
|
38
|
+
# Use Rubocop's Github Actions formatter if possible
|
39
|
+
task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true'
|
39
40
|
end
|
40
41
|
|
41
42
|
CLEAN.include 'test/tmp'
|
@@ -8,9 +8,26 @@ module Kafo
|
|
8
8
|
|
9
9
|
def initialize(manifest)
|
10
10
|
@logger = KafoConfigure.logger
|
11
|
-
|
11
|
+
|
12
|
+
lines = []
|
13
|
+
type_line_without_newlines = +''
|
12
14
|
manifest.each_line do |line|
|
13
|
-
|
15
|
+
line = line.force_encoding("UTF-8").strip
|
16
|
+
next if line.start_with?('#')
|
17
|
+
|
18
|
+
line = line.split(' #').first.strip
|
19
|
+
if line =~ TYPE_DEFINITION
|
20
|
+
lines << type_line_without_newlines
|
21
|
+
type_line_without_newlines = line
|
22
|
+
else
|
23
|
+
type_line_without_newlines << line
|
24
|
+
end
|
25
|
+
end
|
26
|
+
lines << type_line_without_newlines
|
27
|
+
|
28
|
+
@types = {}
|
29
|
+
lines.each do |line|
|
30
|
+
if (type = TYPE_DEFINITION.match(line))
|
14
31
|
@types[type[1]] = type[2]
|
15
32
|
end
|
16
33
|
end
|
data/lib/kafo/kafo_configure.rb
CHANGED
@@ -120,7 +120,7 @@ module Kafo
|
|
120
120
|
request_config_reload if applied_total > 0
|
121
121
|
|
122
122
|
if ARGV.include?('--migrations-only')
|
123
|
-
verbose =
|
123
|
+
verbose = ARGV.include?('--verbose') || ARGV.include?('-v')
|
124
124
|
Logging.setup(verbose: verbose)
|
125
125
|
self.class.logger.notice('Log buffers flushed')
|
126
126
|
self.class.exit(0)
|
@@ -519,7 +519,7 @@ module Kafo
|
|
519
519
|
method, message = log_parser.parse(line)
|
520
520
|
progress_log(method, message, logger)
|
521
521
|
|
522
|
-
if (output = line.match(/(?:.+\]): Starting to evaluate the resource( \((?<count>\d+) of (?<total>\d+)\))?/))
|
522
|
+
if (output = line.match(/(?:.+\]): Starting to evaluate the resource(?: \((?<count>\d+) of (?<total>\d+)\))?/))
|
523
523
|
if (output[:count].to_i % 250) == 1 && output[:count].to_i != 1
|
524
524
|
logger.notice("#{output[:count].to_i - 1} configuration steps out of #{output[:total]} steps complete.")
|
525
525
|
end
|
data/lib/kafo/param.rb
CHANGED
@@ -161,7 +161,7 @@ module Kafo
|
|
161
161
|
|
162
162
|
def normalize_value(value)
|
163
163
|
case value
|
164
|
-
when ::HighLine::String
|
164
|
+
when ::HighLine::String # don't persist highline extensions
|
165
165
|
value.to_s
|
166
166
|
when Array
|
167
167
|
value.map { |v| normalize_value(v) }
|
data/lib/kafo/progress_bar.rb
CHANGED
@@ -34,7 +34,7 @@ module Kafo
|
|
34
34
|
@all_lines += 1
|
35
35
|
|
36
36
|
# we print every 20th line during installation preparing otherwise only update at EVALTRACE_START
|
37
|
-
update_bar =
|
37
|
+
update_bar = @total == :unknown && @all_lines % 20 == 0
|
38
38
|
force_update = false
|
39
39
|
|
40
40
|
if (line_monitor = MONITOR_RESOURCE.match(line))
|
data/lib/kafo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kafo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marek Hulan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|