Sha256: 4f293bec44419b41de79e4b0c26bbc00a4016b680d446ba21cbdb7431dc466c2
Contents?: true
Size: 737 Bytes
Versions: 9
Compression:
Stored size: 737 Bytes
Contents
module Stove class Runner include Logify attr_reader :cookbook attr_reader :options def initialize(cookbook, options = {}) @cookbook = cookbook @options = options end def run run_plugin :git if Config.artifactory run_plugin :artifactory else run_plugin :supermarket end end private def run_plugin(name) if skip?(name) log.info { "Skipping plugin `:#{name}'" } else log.info { "Running plugin `:#{name}'" } klass = Plugin.const_get(Util.camelize(name)) klass.new(cookbook, options).run end end def skip?(thing) key = "no_#{thing}".to_sym !!options[key] end end end
Version data entries
9 entries across 9 versions & 2 rubygems