train-core 3.3.4 → 3.3.6
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
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: b6481551d7379b4a6cdee61568a1252e7feae2dc2d83def688417945eced8776
         | 
| 4 | 
            +
              data.tar.gz: 3bec9acaea41dba70ed5c55cb7d6460d40e1c900002a172356419c80da222f7e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: '09b0f40e16fc0533bb474a460d3526fd767cacd2e2c18e35a6f9aa825e953adc7de241116d12a832c179c6e7383afbb7357ecf31bdeb75347854083fee328caa'
         | 
| 7 | 
            +
              data.tar.gz: c1bcbb41f3c7e3e832f1adf70b5f02634906e6f40d8ed989ff7aafb56b2e5008ba4cab5ce483dc39badaf8142e8e685a7f262c1f154d28c078ce0d899d9561fc
         | 
| @@ -34,16 +34,24 @@ module Train::Platforms::Detect::Helpers | |
| 34 34 | 
             
                end
         | 
| 35 35 |  | 
| 36 36 | 
             
                def command_output(cmd)
         | 
| 37 | 
            -
                  res = @backend.run_command(cmd) | 
| 37 | 
            +
                  res = @backend.run_command(cmd)
         | 
| 38 | 
            +
                  stdout = res.stdout
         | 
| 39 | 
            +
                  stderr = res.stderr
         | 
| 38 40 | 
             
                  # When you try to execute command using ssh connction as root user and you have provided ssh user identity file
         | 
| 39 41 | 
             
                  # it gives standard output to login as authorised user other than root. To show this standard ouput as an error
         | 
| 40 42 | 
             
                  # to user we are matching the string of stdout and raising the error here so that user gets exact information.
         | 
| 41 | 
            -
                  if @backend.class.to_s == "Train::Transports::SSH::Connection" | 
| 42 | 
            -
                     | 
| 43 | 
            +
                  if @backend.class.to_s == "Train::Transports::SSH::Connection"
         | 
| 44 | 
            +
                    if stdout =~ /Please login as the user/
         | 
| 45 | 
            +
                      raise Train::UserError, "SSH failed: #{stdout}"
         | 
| 46 | 
            +
                    end
         | 
| 47 | 
            +
             | 
| 48 | 
            +
                    if stderr =~ /WARNING: Your password has expired/
         | 
| 49 | 
            +
                      raise Train::UserError, "SSH failed: #{stderr}"
         | 
| 50 | 
            +
                    end
         | 
| 43 51 | 
             
                  end
         | 
| 44 52 |  | 
| 45 | 
            -
                   | 
| 46 | 
            -
                   | 
| 53 | 
            +
                  stdout.strip! unless stdout.nil?
         | 
| 54 | 
            +
                  stdout
         | 
| 47 55 | 
             
                end
         | 
| 48 56 |  | 
| 49 57 | 
             
                def unix_uname_s
         | 
| @@ -357,7 +357,7 @@ module Train::Platforms::Detect::Specifications | |
| 357 357 | 
             
                  declare_instance("mac_os_x", "macOS X", "darwin") do
         | 
| 358 358 | 
             
                    cmd = unix_file_contents("/System/Library/CoreServices/SystemVersion.plist")
         | 
| 359 359 | 
             
                    @platform[:uuid_command] = "system_profiler SPHardwareDataType | awk '/UUID/ { print $3; }'"
         | 
| 360 | 
            -
                    cmd =~ /Mac OS X/i
         | 
| 360 | 
            +
                    cmd =~ /Mac OS X|macOS/i
         | 
| 361 361 | 
             
                  end
         | 
| 362 362 |  | 
| 363 363 | 
             
                  declare_instance("darwin", "Darwin", "darwin") do
         | 
    
        data/lib/train/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: train-core
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 3.3. | 
| 4 | 
            +
              version: 3.3.6
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Chef InSpec Team
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020- | 
| 11 | 
            +
            date: 2020-07-02 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: addressable
         |