Class: Integrity::Notifier::Shell
- Inherits:
-
Notifier::Base
- Object
- Notifier::Base
- Integrity::Notifier::Shell
- Defined in:
- lib/integrity/notifier/shell.rb
Instance Attribute Summary collapse
-
#fail_script ⇒ Object
readonly
Returns the value of attribute fail_script.
-
#pass_script ⇒ Object
readonly
Returns the value of attribute pass_script.
Class Method Summary collapse
Instance Method Summary collapse
- #deliver! ⇒ Object
-
#initialize(commit, config = {}) ⇒ Shell
constructor
A new instance of Shell.
Constructor Details
#initialize(commit, config = {}) ⇒ Shell
Returns a new instance of Shell.
11 12 13 14 15 |
# File 'lib/integrity/notifier/shell.rb', line 11 def initialize(commit, config={}) @pass_script = config["pass_script"] @fail_script = config["fail_script"] super(commit, config) # sets @config and @commit end |
Instance Attribute Details
#fail_script ⇒ Object (readonly)
Returns the value of attribute fail_script.
5 6 7 |
# File 'lib/integrity/notifier/shell.rb', line 5 def fail_script @fail_script end |
#pass_script ⇒ Object (readonly)
Returns the value of attribute pass_script.
5 6 7 |
# File 'lib/integrity/notifier/shell.rb', line 5 def pass_script @pass_script end |
Class Method Details
.to_haml ⇒ Object
7 8 9 |
# File 'lib/integrity/notifier/shell.rb', line 7 def self.to_haml File.read(File.dirname(__FILE__) + "/config.haml") end |
Instance Method Details
#deliver! ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/integrity/notifier/shell.rb', line 17 def deliver! #we have access to commit and to config if @commit.failed? `#{fail_script}` else `#{pass_script}` end end |