kafo 5.1.0 → 6.2.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/README.md +1 -0
- data/Rakefile +8 -1
- data/doc/kafo_run.png +0 -0
- data/doc/kafo_run.uml +2 -0
- data/lib/kafo/app_option/declaration.rb +17 -0
- data/lib/kafo/app_option/definition.rb +14 -0
- data/lib/kafo/color_scheme.rb +2 -2
- data/lib/kafo/configuration.rb +26 -8
- data/lib/kafo/exit_handler.rb +1 -1
- data/lib/kafo/help_builders/base.rb +5 -3
- data/lib/kafo/help_builders/basic.rb +13 -2
- data/lib/kafo/hook_context.rb +81 -18
- data/lib/kafo/hooking.rb +27 -14
- data/lib/kafo/kafo_configure.rb +147 -122
- data/lib/kafo/logger.rb +13 -123
- data/lib/kafo/logging.rb +128 -0
- data/lib/kafo/param.rb +3 -3
- data/lib/kafo/progress_bar.rb +13 -1
- data/lib/kafo/puppet_command.rb +8 -1
- data/lib/kafo/puppet_log_parser.rb +10 -4
- data/lib/kafo/puppet_module.rb +6 -6
- data/lib/kafo/scenario_manager.rb +11 -11
- data/lib/kafo/store.rb +1 -1
- data/lib/kafo/string_helper.rb +1 -1
- data/lib/kafo/system_checker.rb +1 -1
- data/lib/kafo/version.rb +1 -1
- data/lib/kafo/wizard.rb +18 -8
- metadata +12 -10
- data/modules/kafo_configure/spec/fixtures/manifests/site.pp +0 -0
    
        data/lib/kafo/store.rb
    CHANGED
    
    
    
        data/lib/kafo/string_helper.rb
    CHANGED
    
    
    
        data/lib/kafo/system_checker.rb
    CHANGED
    
    
    
        data/lib/kafo/version.rb
    CHANGED
    
    
    
        data/lib/kafo/wizard.rb
    CHANGED
    
    | @@ -1,5 +1,6 @@ | |
| 1 1 | 
             
            # encoding: UTF-8
         | 
| 2 | 
            -
            require ' | 
| 2 | 
            +
            require 'forwardable'
         | 
| 3 | 
            +
            require 'highline'
         | 
| 3 4 | 
             
            require 'yaml'
         | 
| 4 5 |  | 
| 5 6 | 
             
            module Kafo
         | 
| @@ -8,14 +9,17 @@ module Kafo | |
| 8 9 | 
             
                  Kafo::ENV::LANG =~ /UTF-8\z/
         | 
| 9 10 | 
             
                end
         | 
| 10 11 |  | 
| 12 | 
            +
                extend Forwardable
         | 
| 13 | 
            +
                def_delegators :@highline, :agree, :ask, :choose, :say
         | 
| 14 | 
            +
             | 
| 11 15 | 
             
                OK = utf_support? ? '✓' : 'y'
         | 
| 12 16 | 
             
                NO = utf_support? ? '✗' : 'n'
         | 
| 13 17 |  | 
| 14 | 
            -
                def initialize(kafo)
         | 
| 18 | 
            +
                def initialize(kafo, input=$stdin, output=$stdout)
         | 
| 15 19 | 
             
                  @kafo   = kafo
         | 
| 16 20 | 
             
                  @config = kafo.config
         | 
| 17 21 | 
             
                  @name   = @config.app[:name] || 'Kafo'
         | 
| 18 | 
            -
                  setup_terminal
         | 
| 22 | 
            +
                  @highline = setup_terminal(input, output)
         | 
| 19 23 | 
             
                end
         | 
| 20 24 |  | 
| 21 25 | 
             
                def run
         | 
| @@ -178,11 +182,17 @@ END | |
| 178 182 | 
             
                  say "\n" + HighLine.color("Value for #{param.name} reset to default", :important)
         | 
| 179 183 | 
             
                end
         | 
| 180 184 |  | 
| 181 | 
            -
                def setup_terminal
         | 
| 182 | 
            -
                   | 
| 183 | 
            -
                   | 
| 184 | 
            -
                   | 
| 185 | 
            -
             | 
| 185 | 
            +
                def setup_terminal(input, output)
         | 
| 186 | 
            +
                  highline = HighLine.new(input, output)
         | 
| 187 | 
            +
                  # HighLine 2 vs 1
         | 
| 188 | 
            +
                  data = if highline.respond_to?(:terminal)
         | 
| 189 | 
            +
                           highline.terminal.terminal_size
         | 
| 190 | 
            +
                         else
         | 
| 191 | 
            +
                           HighLine::SystemExtensions.terminal_size
         | 
| 192 | 
            +
                         end
         | 
| 193 | 
            +
                  highline.wrap_at = data.first > 80 ? 80 : data.first if data.first
         | 
| 194 | 
            +
                  highline.page_at = data.last if data.last
         | 
| 195 | 
            +
                  highline
         | 
| 186 196 | 
             
                end
         | 
| 187 197 | 
             
              end
         | 
| 188 198 | 
             
            end
         | 
    
        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:  | 
| 4 | 
            +
              version: 6.2.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Marek Hulan
         | 
| 8 | 
            -
            autorequire: | 
| 8 | 
            +
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2021-01-04 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -171,7 +171,7 @@ dependencies: | |
| 171 171 | 
             
                    version: 1.6.21
         | 
| 172 172 | 
             
                - - "<"
         | 
| 173 173 | 
             
                  - !ruby/object:Gem::Version
         | 
| 174 | 
            -
                    version: ' | 
| 174 | 
            +
                    version: '3.0'
         | 
| 175 175 | 
             
              type: :runtime
         | 
| 176 176 | 
             
              prerelease: false
         | 
| 177 177 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| @@ -181,7 +181,7 @@ dependencies: | |
| 181 181 | 
             
                    version: 1.6.21
         | 
| 182 182 | 
             
                - - "<"
         | 
| 183 183 | 
             
                  - !ruby/object:Gem::Version
         | 
| 184 | 
            -
                    version: ' | 
| 184 | 
            +
                    version: '3.0'
         | 
| 185 185 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 186 186 | 
             
              name: powerbar
         | 
| 187 187 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -218,6 +218,8 @@ files: | |
| 218 218 | 
             
            - doc/kafo_run.png
         | 
| 219 219 | 
             
            - doc/kafo_run.uml
         | 
| 220 220 | 
             
            - lib/kafo.rb
         | 
| 221 | 
            +
            - lib/kafo/app_option/declaration.rb
         | 
| 222 | 
            +
            - lib/kafo/app_option/definition.rb
         | 
| 221 223 | 
             
            - lib/kafo/base_context.rb
         | 
| 222 224 | 
             
            - lib/kafo/color_scheme.rb
         | 
| 223 225 | 
             
            - lib/kafo/condition.rb
         | 
| @@ -257,6 +259,7 @@ files: | |
| 257 259 | 
             
            - lib/kafo/hooking.rb
         | 
| 258 260 | 
             
            - lib/kafo/kafo_configure.rb
         | 
| 259 261 | 
             
            - lib/kafo/logger.rb
         | 
| 262 | 
            +
            - lib/kafo/logging.rb
         | 
| 260 263 | 
             
            - lib/kafo/migration_context.rb
         | 
| 261 264 | 
             
            - lib/kafo/migrations.rb
         | 
| 262 265 | 
             
            - lib/kafo/param.rb
         | 
| @@ -290,7 +293,6 @@ files: | |
| 290 293 | 
             
            - modules/kafo_configure/spec/classes/init_spec.rb
         | 
| 291 294 | 
             
            - modules/kafo_configure/spec/fixtures/hiera/hiera.yaml
         | 
| 292 295 | 
             
            - modules/kafo_configure/spec/fixtures/hiera/test.yaml
         | 
| 293 | 
            -
            - modules/kafo_configure/spec/fixtures/manifests/site.pp
         | 
| 294 296 | 
             
            - modules/kafo_configure/spec/fixtures/modules/dummy/manifests/init.pp
         | 
| 295 297 | 
             
            - modules/kafo_configure/spec/fixtures/modules/dummy/manifests/params.pp
         | 
| 296 298 | 
             
            - modules/kafo_configure/spec/functions/dump_lookups_spec.rb
         | 
| @@ -301,7 +303,7 @@ homepage: https://github.com/theforeman/kafo | |
| 301 303 | 
             
            licenses:
         | 
| 302 304 | 
             
            - GPL-3.0+
         | 
| 303 305 | 
             
            metadata: {}
         | 
| 304 | 
            -
            post_install_message: | 
| 306 | 
            +
            post_install_message:
         | 
| 305 307 | 
             
            rdoc_options: []
         | 
| 306 308 | 
             
            require_paths:
         | 
| 307 309 | 
             
            - lib
         | 
| @@ -309,15 +311,15 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 309 311 | 
             
              requirements:
         | 
| 310 312 | 
             
              - - ">="
         | 
| 311 313 | 
             
                - !ruby/object:Gem::Version
         | 
| 312 | 
            -
                  version: 2. | 
| 314 | 
            +
                  version: 2.4.0
         | 
| 313 315 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 314 316 | 
             
              requirements:
         | 
| 315 317 | 
             
              - - ">="
         | 
| 316 318 | 
             
                - !ruby/object:Gem::Version
         | 
| 317 319 | 
             
                  version: '0'
         | 
| 318 320 | 
             
            requirements: []
         | 
| 319 | 
            -
            rubygems_version: 3.1. | 
| 320 | 
            -
            signing_key: | 
| 321 | 
            +
            rubygems_version: 3.1.4
         | 
| 322 | 
            +
            signing_key:
         | 
| 321 323 | 
             
            specification_version: 4
         | 
| 322 324 | 
             
            summary: A gem for making installations based on puppet user friendly
         | 
| 323 325 | 
             
            test_files: []
         | 
| 
            File without changes
         |