Class: Propel::Runner
- Inherits:
-
Object
- Object
- Propel::Runner
- Defined in:
- lib/propel/runner.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Instance Method Summary collapse
-
#initialize(args = [ ]) ⇒ Runner
constructor
A new instance of Runner.
- #start ⇒ Object
Constructor Details
#initialize(args = [ ]) ⇒ Runner
Returns a new instance of Runner.
5 6 7 8 9 10 11 12 |
# File 'lib/propel/runner.rb', line 5 def initialize(args = [ ]) @repository = GitRepository.new @options = Configuration.new(args, @repository). @logger = Logger.new(@options) @repository.logger = @logger @repository. = @options end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
3 4 5 |
# File 'lib/propel/runner.rb', line 3 def logger @logger end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
3 4 5 |
# File 'lib/propel/runner.rb', line 3 def repository @repository end |
Instance Method Details
#start ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/propel/runner.rb', line 14 def start @repository.ensure_attached_head! if @repository.changed? if remote_build_configured? if @options[:fix_ci] logger.puts("Thanks for trying to fix the build!", :green) else check_remote_build! end else logger.warn "Remote build is not configured. You should point propel to the status URL of your CI server." end propel! else logger.puts("There is nothing to propel - your HEAD is identical to #{@repository.remote_config} #{@repository.merge_config}.", :green) end end |