Sha256: 09c9b64aebf23b5fb57ec80b3b59f4992449a6dbd6ac69069b018b424826e005
Contents?: true
Size: 821 Bytes
Versions: 1
Compression:
Stored size: 821 Bytes
Contents
require "yaml" unless defined?(YAML) module LVM module Attributes VERSION = "0.3.12".freeze def load(version, name) cwd = __dir__ # was going to be symlinks, but RubyGems didn't seem to want to package # them if version == "2.02.28" version = "2.02.27" elsif ((31..39).map { |x| "2.02.#{x}" }).include?(version) version = "2.02.30" end file = File.join(cwd, "attributes", version, name) begin YAML.load_file(file) rescue Errno::ENOENT => e raise ArgumentError.new("Unable to load lvm attributes [#{name}] for version [#{version}]. " \ "The version/object may not be supported or you may need to upgrade the chef-ruby-lvm-attrib gem. Error [#{e.message}]") end end module_function :load end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chef-ruby-lvm-attrib-0.3.12 | lib/lvm/attributes.rb |