Class: Hookie::Plugin::FishEyePlugin
Instance Attribute Summary
Attributes inherited from BasePlugin
#config
Instance Method Summary
collapse
Methods inherited from BasePlugin
#config_key, #initialize, #log
Instance Method Details
#post_receive ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/hookie/plugins/fisheye_plugin.rb', line 28
def post_receive
log "Sending scan request to FishEye ... "
response = notify()
if response == []
log "Request sent to FishEye"
elsif response[:message]
log "Error: #{response[:message]}"
else
log "Unknown response #{response}"
end
end
|
#should_run? ⇒ Boolean
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/hookie/plugins/fisheye_plugin.rb', line 14
def should_run?
warnings = []
if @framework.changes.empty?
log "No changes"
return false
end
warnings << "hookie.fisheye.apikey not set!" unless @config[:apikey]
warnings << "hookie.fisheye.url not set!" unless @config[:url]
log warnings.join(", ") unless warnings.empty?
warnings.empty?
end
|
#to_s ⇒ Object
10
11
12
|
# File 'lib/hookie/plugins/fisheye_plugin.rb', line 10
def to_s
"FishEye Notifier"
end
|