Sha256: f62cbfabe377bfd91dc029b15b4c2e48b103a74feaac3ab3bdd8281fcc301a48

Contents?: true

Size: 698 Bytes

Versions: 68

Compression:

Stored size: 698 Bytes

Contents

require 'r10k/errors'
require 'r10k/features'

module R10K
  module Util
    module License
      extend R10K::Logging

      def self.load
        if R10K::Features.available?(:pe_license)
          logger.debug2 _("pe_license feature is available, loading PE license key")
          begin
            return PELicense.load_license_key
          rescue PELicense::InvalidLicenseError => e
            raise R10K::Error.wrap(e, _("Invalid PE license detected: %{error_msg}") % {error_msg: e.message} )
          end
        else
          logger.debug2 _("pe_license feature is not available, PE only Puppet modules will not be downloadable.")
          nil
        end
      end
    end
  end
end

Version data entries

68 entries across 68 versions & 2 rubygems

Version Path
r10k-5.0.0 lib/r10k/util/license.rb
r10k-4.1.0 lib/r10k/util/license.rb
r10k-4.0.2 lib/r10k/util/license.rb
r10k-4.0.1 lib/r10k/util/license.rb
r10k-4.0.0 lib/r10k/util/license.rb
r10k-4.0.0.pre lib/r10k/util/license.rb
r10k-3.16.0 lib/r10k/util/license.rb
r10k-3.15.4 lib/r10k/util/license.rb
r10k-3.15.3 lib/r10k/util/license.rb
r10k-3.15.2 lib/r10k/util/license.rb
r10k-3.15.1 lib/r10k/util/license.rb
r10k-3.15.0 lib/r10k/util/license.rb
akerl-r10k-3.14.2.1 lib/r10k/util/license.rb
r10k-3.14.2 lib/r10k/util/license.rb
r10k-3.14.1 lib/r10k/util/license.rb
r10k-3.14.0 lib/r10k/util/license.rb
r10k-3.13.0 lib/r10k/util/license.rb
r10k-3.12.1 lib/r10k/util/license.rb
r10k-3.12.0 lib/r10k/util/license.rb
r10k-3.11.0 lib/r10k/util/license.rb