kafo 7.2.0 → 7.4.0

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: b2f9f3f9827dd2b9f738acab79a596169fd4c4ea075ec5a99c35a40f291dfcee
4
- data.tar.gz: 1695c0717da6eb8809a14114bd09746efcb1dd82773cf585dbb987ea97c13f8e
3
+ metadata.gz: 2d04f6f1cc8a7839323067b6cf40b090fe57a19674c73aa9571e95e8f93521d3
4
+ data.tar.gz: d0274c02639fe01e19aa6ef79fcd5e86cd29f45b8b8f28461c59a192559a21b1
5
5
  SHA512:
6
- metadata.gz: 0d26ee6f46875bcaa7f77c2e83dfc7b77aaee073f0977e9dedb1afc977fd118bc55fb430f450dacab0b8d016bf0805462a4a8c4bfe5cbd82e4d515abcc6c915a
7
- data.tar.gz: c5b129d7e90fb1895afc03781b723e2cd9fa792eb2f3ac1d754a8c744f120a555be977067af66f4c1868ab5fc195093bd1623195b117f73be57106888504ff43
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
- begin
35
- require 'rubocop/rake_task'
36
- RuboCop::RakeTask.new
37
- rescue LoadError
38
- puts 'Rubocop not loaded'
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
- @types = {}
11
+
12
+ lines = []
13
+ type_line_without_newlines = +''
12
14
  manifest.each_line do |line|
13
- if (type = TYPE_DEFINITION.match(line.force_encoding("UTF-8")))
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
@@ -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 = (ARGV.include?('--verbose') || ARGV.include?('-v'))
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 # don't persist highline extensions
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) }
@@ -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 = (@total == :unknown && @all_lines % 20 == 0)
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
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
  module Kafo
3
3
  PARSER_CACHE_VERSION = 1
4
- VERSION = "7.2.0"
4
+ VERSION = "7.4.0"
5
5
  end
@@ -9,7 +9,7 @@
9
9
  "requirements": [
10
10
  {
11
11
  "name": "puppet",
12
- "version_requirement": ">= 4.5.0 < 8.0.0"
12
+ "version_requirement": ">= 4.5.0 < 9.0.0"
13
13
  }
14
14
  ]
15
15
  }
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.2.0
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: 2023-09-22 00:00:00.000000000 Z
11
+ date: 2024-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler