Module: Subtrigger
- Extended by:
- Subtrigger
- Included in:
- Subtrigger
- Defined in:
- lib/subtrigger.rb,
lib/subtrigger/email.rb,
lib/subtrigger/trigger.rb
Overview
testing purposes.
Defined Under Namespace
Instance Attribute Summary collapse
-
#sendmail ⇒ Object
Returns the value of attribute sendmail.
-
#svn ⇒ Object
Returns the value of attribute svn.
-
#svn_args ⇒ Object
Returns the value of attribute svn_args.
Instance Method Summary collapse
-
#on(pattern, &block) ⇒ Object
Define a new
Triggerobject – shortcut method toTrigger#define. -
#run(*args) ⇒ Object
This is the main spark in the program.
-
#version ⇒ Object
Output the version number for this gem by reading /VERSION.
Instance Attribute Details
#sendmail ⇒ Object
Returns the value of attribute sendmail.
82 83 84 |
# File 'lib/subtrigger.rb', line 82 def sendmail @sendmail end |
#svn ⇒ Object
Returns the value of attribute svn.
82 83 84 |
# File 'lib/subtrigger.rb', line 82 def svn @svn end |
#svn_args ⇒ Object
Returns the value of attribute svn_args.
82 83 84 |
# File 'lib/subtrigger.rb', line 82 def svn_args @svn_args end |
Instance Method Details
#on(pattern, &block) ⇒ Object
Define a new Trigger object – shortcut method to Trigger#define. To enable method chaining this method returns itself.
104 105 106 107 |
# File 'lib/subtrigger.rb', line 104 def on(pattern, &block) Trigger.define(pattern, &block) self end |
#run(*args) ⇒ Object
This is the main spark in the program. It runs all available triggers on the repository object created with the two command line arguments: the path to the repository and its revision number.
If an exception occurs, the program will quit with its error message.
95 96 97 98 99 |
# File 'lib/subtrigger.rb', line 95 def run(*args) Trigger.run(Repository.new(*args)) rescue Exception => e puts "Error: #{e}" and exit(1) end |
#version ⇒ Object
Output the version number for this gem by reading /VERSION
85 86 87 |
# File 'lib/subtrigger.rb', line 85 def version File.read(File.join(File.dirname(__FILE__), *%w{.. VERSION})) end |