Sha256: a3e3c72c8688f56419e4e8e3af0fc8d17c0bffe0d8244a5fb074432bab5579f3

Contents?: true

Size: 986 Bytes

Versions: 10

Compression:

Stored size: 986 Bytes

Contents

require 'hiera/backend/eyaml/subcommand'
require 'hiera/backend/eyaml'

class Hiera
  module Backend
    module Eyaml
      module Subcommands

        class Version < Subcommand

          def self.options
            []
          end

          def self.description
            "show version information"
          end

          def self.execute
            plugin_versions = {}

            Eyaml::LoggingHelper.info "hiera-eyaml (core): #{Eyaml::VERSION}"

            Plugins.plugins.each do |plugin|
              plugin_shortname = plugin.name.split("hiera-eyaml-").last
              plugin_version = begin
                Encryptor.find(plugin_shortname)::VERSION.to_s
              rescue
                "unknown (is plugin compatible with eyaml 2.0+ ?)"
              end
              Eyaml::LoggingHelper.info "hiera-eyaml-#{plugin_shortname} (gem): #{plugin_version}"
            end

            nil
            
          end

        end

      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hiera-eyaml-3.4.0 lib/hiera/backend/eyaml/subcommands/version.rb
hiera-eyaml-3.3.0 lib/hiera/backend/eyaml/subcommands/version.rb
hiera-eyaml-3.2.2 lib/hiera/backend/eyaml/subcommands/version.rb
hiera-eyaml-3.2.1 lib/hiera/backend/eyaml/subcommands/version.rb
hiera-eyaml-3.2.0 lib/hiera/backend/eyaml/subcommands/version.rb
hiera-eyaml-3.1.1 lib/hiera/backend/eyaml/subcommands/version.rb
hiera-eyaml-3.1.0 lib/hiera/backend/eyaml/subcommands/version.rb
hiera-eyaml-3.0.0 lib/hiera/backend/eyaml/subcommands/version.rb
hiera-eyaml-2.1.0 lib/hiera/backend/eyaml/subcommands/version.rb
hiera-eyaml-2.1.0.rc2 lib/hiera/backend/eyaml/subcommands/version.rb