Sha256: 2544c620d4118af514fe9a596c9313461f65a41042bd40c0d1b7d814243d3de8
Contents?: true
Size: 659 Bytes
Versions: 14
Compression:
Stored size: 659 Bytes
Contents
require "license_acceptance/strategy/base" module LicenseAcceptance module Strategy # Look for acceptance values in the environment class Environment < Base attr_reader :env def initialize(env) @env = env end def accepted? look_for_value(ACCEPT) end def silent? look_for_value(ACCEPT_SILENT) end def no_persist? look_for_value(ACCEPT_NO_PERSIST) end private def look_for_value(sought) if env['CHEF_LICENSE'] && env['CHEF_LICENSE'].downcase == sought return true end return false end end end end
Version data entries
14 entries across 14 versions & 1 rubygems