Sha256: a0b622216639d2b66014b95e416600eb9488b6181bd792320218af8878f65869
Contents?: true
Size: 724 Bytes
Versions: 13
Compression:
Stored size: 724 Bytes
Contents
require 'site_hook/config' module SiteHook class Methods def self.mklogdir path = SiteHook::Paths.default_logs if path.exist? # Path exists, don't do anything else FileUtils.mkpath(path.to_s) end end # @param [String] hook_name the hook name as defined in the projects:... directive def self.find_hook(hook_name) project_objs = SiteHook::Configs::Projects.constants ret_val = project_objs.detect do |obj| SiteHook::Configs::Projects.const_get(obj.to_s).real_key.to_s == hook_name.to_s end if ret_val.nil? return nil elsif ret_val return SiteHook::Configs::Projects.const_get(ret_val) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems