lib/jenkins/builder/config.rb in jenkins-builder-0.1.3 vs lib/jenkins/builder/config.rb in jenkins-builder-0.1.4
- old
+ new
@@ -55,9 +55,15 @@
def branches=(branches)
@config['branches'] = branches
end
+ def hooks_of(job)
+ hooks = @config['hooks'] && @config['hooks'][job]
+ hooks = [hooks] if hooks.is_a?(String)
+ hooks
+ end
+
def init
@config = {}
save(@config, @file)
end