Class: Vigil
- Inherits:
-
Object
- Object
- Vigil
- Defined in:
- lib/vigil.rb,
lib/vigil/os.rb,
lib/vigil/git.rb,
lib/vigil/project.rb,
lib/vigil/vagrant.rb,
lib/vigil/version.rb,
lib/vigil/pipeline.rb,
lib/vigil/revision.rb,
lib/vigil/vmbuilder.rb,
lib/vigil/test_pipeline.rb,
lib/vigil/revision_repository.rb
Defined Under Namespace
Modules: Git, Vagrant Classes: OS, Pipeline, Project, Revision, RevisionRepository, TestPipeline, VMBuilder
Constant Summary collapse
- VERSION =
"0.1"
Class Attribute Summary collapse
-
.os ⇒ Object
Returns the value of attribute os.
-
.plugman ⇒ Object
Returns the value of attribute plugman.
-
.run_dir ⇒ Object
Returns the value of attribute run_dir.
Instance Method Summary collapse
- #_initialize_projects(projects) ⇒ Object
- #_less_often_than_every(n_seconds) ⇒ Object
-
#initialize(args) ⇒ Vigil
constructor
A new instance of Vigil.
- #run ⇒ Object
Constructor Details
Class Attribute Details
.os ⇒ Object
Returns the value of attribute os.
15 16 17 |
# File 'lib/vigil.rb', line 15 def os @os end |
.plugman ⇒ Object
Returns the value of attribute plugman.
17 18 19 |
# File 'lib/vigil.rb', line 17 def plugman @plugman end |
.run_dir ⇒ Object
Returns the value of attribute run_dir.
16 17 18 |
# File 'lib/vigil.rb', line 16 def run_dir @run_dir end |
Instance Method Details
#_initialize_projects(projects) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/vigil.rb', line 28 def _initialize_projects(projects) @projects = projects.map do |p| Project.new( name: p[:name], git_url: p[:git][:url], branch: p[:git][:branch] ) end end |
#_less_often_than_every(n_seconds) ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/vigil.rb', line 51 def _less_often_than_every(n_seconds) start = Time.now yield _end = Time.now if _end - start < n_seconds n = n_seconds - (_end - start) puts "Sleeping for #{n} sec." sleep n end end |