Module: R10K::Util::License

Defined in:
lib/r10k/util/license.rb

Class Method Summary collapse

Class Method Details

.loadObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/r10k/util/license.rb', line 7

def self.load
  if Gem::Specification::find_all_by_name('pe-license').any?
    begin
      return PELicense.load_license_key
    rescue PELicense::InvalidLicenseError => e
      raise R10K::Error.wrap(e, "Invalid PE license detected: #{e.message}")
    end
  end

  nil
end